[2/8] eal: don't allow legacy mode with in-memory mode

Message ID b7596a048e7b47884ae2129ff1d20ffb7d4d4d8c.1535041359.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Improve running DPDK without hugetlbfs mounpoint |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Anatoly Burakov Aug. 23, 2018, 4:59 p.m. UTC
  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 <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index dd5f97402..873099acc 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;
 }