RTE_MAX_MEMSEG_LISTS = 128 is not enough for many-core machines, in our case, we need to increase it to 8192. so add an option so user can override it.
Signed-off-by: Kefu Chai <tchai...@gmail.com> --- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index c90c7a0bfe..8d03dc6471 100644 --- a/config/meson.build +++ b/config/meson.build @@ -299,6 +299,7 @@ if dpdk_conf.get('RTE_ARCH_64') else # for 32-bit we need smaller reserved memory areas dpdk_conf.set('RTE_MAX_MEM_MB', 2048) endif +dpdk_conf.set('RTE_MAX_MEMSEG_LISTS', get_option('max_memseg_lists')) if get_option('atomic_mbuf_ref_counts') dpdk_conf.set('RTE_MBUF_REFCNT_ATOMIC', true) endif diff --git a/config/rte_config.h b/config/rte_config.h index 208d916a1f..0a659f5e1a 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -29,7 +29,6 @@ /* EAL defines */ #define RTE_MAX_HEAPS 32 -#define RTE_MAX_MEMSEG_LISTS 128 #define RTE_MAX_MEMSEG_PER_LIST 8192 #define RTE_MAX_MEM_MB_PER_LIST 32768 #define RTE_MAX_MEMSEG_PER_TYPE 32768 diff --git a/meson_options.txt b/meson_options.txt index 222ad6d9d9..9127f8556f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -38,6 +38,8 @@ option('max_lcores', type: 'string', value: 'default', description: 'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.') option('max_numa_nodes', type: 'string', value: 'default', description: 'Set the highest NUMA node supported by EAL; "default" is different per-arch, "detect" detects the highest NUMA node on the build machine.') +option('max_memseg_lists', type: 'integer', value: 128, description: + 'maximum number of dynamic arrays holding memsegs') option('atomic_mbuf_ref_counts', type: 'boolean', value: true, description: 'atomically access the mbuf refcnt') option('platform', type: 'string', value: 'native', description: -- 2.33.0