Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
New upstream version 18.11
[deb_dpdk.git]
/
lib
/
librte_eal
/
bsdapp
/
eal
/
eal.c
diff --git
a/lib/librte_eal/bsdapp/eal/eal.c
b/lib/librte_eal/bsdapp/eal/eal.c
index
508cbc4
..
b8152a7
100644
(file)
--- 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 */