Skip to content

Commit

Permalink
build: add meson options of max_memseg_lists
Browse files Browse the repository at this point in the history
RTE_MAX_MEMSEG_LISTS = 128 is not enough for high-memory 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 <[email protected]>
  • Loading branch information
tchaikov committed Sep 17, 2023
1 parent 4742878 commit cafaa3c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ if get_option('mbuf_refcnt_atomic')
dpdk_conf.set('RTE_MBUF_REFCNT_ATOMIC', true)
endif
dpdk_conf.set10('RTE_IOVA_IN_MBUF', get_option('enable_iova_as_pa'))
dpdk_conf.set('RTE_MAX_MEMSEG_LISTS', get_option('max_memseg_lists'))

compile_time_cpuflags = []
subdir(arch_subdir)
Expand Down
1 change: 0 additions & 1 deletion config/rte_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ option('enable_iova_as_pa', type: 'boolean', value: true, description:
'Support the use of physical addresses for IO addresses, such as used by UIO or VFIO in no-IOMMU mode. When disabled, DPDK can only run with IOMMU support for address mappings, but will have more space available in the mbuf structure.')
option('mbuf_refcnt_atomic', type: 'boolean', value: true, description:
'Atomically access the mbuf refcnt.')
option('max_memseg_lists', type: 'integer', value: 128, description:
'maximum number of dynamic arrays holding memsegs')
option('platform', type: 'string', value: 'native', description:
'Platform to build, either "native", "generic" or a SoC. Please refer to the Linux build guide for more information.')
option('enable_trace_fp', type: 'boolean', value: false, description:
Expand Down

0 comments on commit cafaa3c

Please sign in to comment.