From b29ac33ffccf856825c42dc11185b112f569ba57 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Thu, 2 Jul 2020 11:57:21 +0100 Subject: [PATCH] mem: fix 32-bit init config with meson When building with meson, the default size of virtual address space reserved for mapping pages was globally set at 512GB, which is too big for use in 32-bit processes. To match the behaviour with "make", we configure this to be 512GB for 64-bit and 2GB for 32-bit builds. Bugzilla ID: 498 Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Tested-by: Ferruh Yigit --- config/meson.build | 5 +++++ config/rte_config.h | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 351e268c1f..241d62acc7 100644 --- a/config/meson.build +++ b/config/meson.build @@ -238,6 +238,11 @@ dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp')) dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64) dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true) +if dpdk_conf.get('RTE_ARCH_64') + dpdk_conf.set('RTE_MAX_MEM_MB', 524288) +else # for 32-bit we need smaller reserved memory areas + dpdk_conf.set('RTE_MAX_MEM_MB', 2048) +endif compile_time_cpuflags = [] diff --git a/config/rte_config.h b/config/rte_config.h index e9201fd463..086acf74a2 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -38,7 +38,6 @@ #define RTE_MAX_MEM_MB_PER_LIST 32768 #define RTE_MAX_MEMSEG_PER_TYPE 32768 #define RTE_MAX_MEM_MB_PER_TYPE 65536 -#define RTE_MAX_MEM_MB 524288 #define RTE_MAX_MEMZONE 2560 #define RTE_MAX_TAILQ 32 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO -- 2.20.1