summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@igalia.com>2018-05-21 12:27:05 +0000
committerFlorin Coras <florin.coras@gmail.com>2018-06-21 14:58:19 +0000
commite513f98f5baa120c37d0ccb796ab06b424f3e473 (patch)
treec0805c62026f2a4c95cbad184ccb45b5e03f2f09
parent85aa49019f4b4b2b7a4fce4313fdc0f2de65c277 (diff)
VPP-1042: Fix the DPDK no-hugetbl flags
Change-Id: I7c611d3fa7fabe82294fc22a61d5a3927a2da39d Signed-off-by: Jessica Tallon <tsyesika@igalia.com>
-rw-r--r--src/plugins/dpdk/device/init.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 0ab339b8455..df91ca99f4b 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1034,7 +1034,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
/* Prime the pump */
if (unformat (input, "no-hugetlb"))
{
- vec_add1 (conf->eal_init_args, (u8 *) "no-huge");
+ vec_add1 (conf->eal_init_args, (u8 *) "--no-huge");
no_huge = 1;
}
@@ -1336,10 +1336,13 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
vec_add1 (conf->eal_init_args, tmp);
/* set socket-mem */
- tmp = format (0, "--socket-mem%c", 0);
- vec_add1 (conf->eal_init_args, tmp);
- tmp = format (0, "%s%c", socket_mem, 0);
- vec_add1 (conf->eal_init_args, tmp);
+ if (!no_huge)
+ {
+ tmp = format (0, "--socket-mem%c", 0);
+ vec_add1 (conf->eal_init_args, tmp);
+ tmp = format (0, "%s%c", socket_mem, 0);
+ vec_add1 (conf->eal_init_args, tmp);
+ }
/* NULL terminate the "argv" vector, in case of stupidity */
vec_add1 (conf->eal_init_args, 0);