eal: do not allow legacy mode with --in-memory mode
authorAnatoly Burakov <anatoly.burakov@intel.com>
Tue, 4 Sep 2018 15:15:43 +0000 (16:15 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 19 Sep 2018 12:40:56 +0000 (14:40 +0200)
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>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_eal/common/eal_common_options.c

index dd5f974..873099a 100644 (file)
@@ -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;
 }