From: Anatoly Burakov Date: Tue, 4 Sep 2018 15:15:43 +0000 (+0100) Subject: eal: do not allow legacy mode with --in-memory mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d4ce95d6b40a91c662dcba3d6faa0f15c8c09afb;p=dpdk.git eal: do not allow legacy mode with --in-memory mode In-memory mode was never meant to support legacy mode, because we cannot sort anonymous pages anyway. Fixes: 72b49ff623c4 ("mem: support --in-memory mode") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index dd5f974022..873099acc7 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -1390,6 +1390,12 @@ eal_check_common_options(struct internal_config *internal_cfg) "--"OPT_HUGE_UNLINK"\n"); return -1; } + if (internal_cfg->legacy_mem && + internal_cfg->in_memory) { + RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible " + "with --"OPT_IN_MEMORY"\n"); + return -1; + } return 0; }