From 5113798fbf6991b75c4fa76989962cddae4edbc0 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 30 Jul 2019 19:21:53 +0200 Subject: [PATCH] eal: warn on legacy memory allocation requirement When using --no-huge mode, dynamic allocation is not supported. Because of this limitation, the option --legacy-mem is implied and -m may be needed to specify the amount of memory to allocate. Otherwise the default amount MEMSIZE_IF_NO_HUGE_PAGE will be allocated. The option --socket-mem can also be used with --legacy-mem when hugepages are supported. Signed-off-by: Thomas Monjalon Acked-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_options.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 7b182b82d0..05cae5f75c 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -1591,6 +1591,11 @@ eal_check_common_options(struct internal_config *internal_cfg) "with --"OPT_MATCH_ALLOCATIONS"\n"); return -1; } + if (internal_cfg->legacy_mem && internal_cfg->memory == 0) { + RTE_LOG(NOTICE, EAL, "Static memory layout is selected, " + "amount of reserved memory can be adjusted with " + "-m or --"OPT_SOCKET_MEM"\n"); + } return 0; } -- 2.20.1