aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/dpdk/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index bcfaf25750a..47b5153d00c 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -1148,11 +1148,11 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
u32 pages_avail;
pages_avail = get_node_free_hugepages_num(c, 1048576);
- if (!(pages_avail >= pages_num_1g))
+ if (!pages_avail || !(pages_avail >= pages_num_1g))
use_1g = 0;
pages_avail = get_node_free_hugepages_num(c, 2048);
- if (!(pages_avail >= pages_num_2m))
+ if (!pages_avail || !(pages_avail >= pages_num_2m))
use_2m = 0;
}
}