diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-11-27 10:46:23 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-11-27 10:46:29 +0000 |
commit | 9a2c57201a7c6c1c14983cb8a8b5f92288f52d97 (patch) | |
tree | 83c5896c77226dc54a647cd70e13bd46f344cdf8 /lib/librte_eal/bsdapp | |
parent | cc14a60f8943239ecc1316364ae024abd39e2632 (diff) | |
parent | a4f0fa29488e582ab8b5ef9db475b3d26ded690c (diff) |
Merge tag 'upstream/18.11' into 18.11.x
Upstream version 18.11
Change-Id: Id9cada796755fc46d8b3f4af056b0e80879c94f6
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_eal/bsdapp')
-rw-r--r-- | lib/librte_eal/bsdapp/eal/eal.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 508cbc46..b8152a75 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -556,9 +556,11 @@ int rte_eal_has_hugepages(void) int rte_eal_iopl_init(void) { - static int fd; + static int fd = -1; + + if (fd < 0) + fd = open("/dev/io", O_RDWR); - fd = open("/dev/io", O_RDWR); if (fd < 0) return -1; /* keep fd open for iopl */ |