[RFC] config: customize max memzones configuration

Bruce Richardson bruce.richardson at intel.com
Mon Jan 30 10:47:05 CET 2023


On Mon, Jan 30, 2023 at 11:23:02AM +0200, Ophir Munk wrote:
> In current DPDK the RTE_MAX_MEMZONE definition is unconditionally hard
> coded as 2560.  For applications requiring different values of this
> parameter – it is more convenient to set its value as part of the meson
> command line or to set the max value via an rte API - rather than
> changing the dpdk source code per application.
> 
> An example would be of an application that uses the DPDK mempool library
> which is based on DPDK memzone library.  The application may need to
> create a number of steering tables, each of which will require its own
> mempool allocation.  This RFC is not about how to optimize the
> application usage of mempool nor about how to improve the mempool
> implementation based on memzone.  It is about how to make the max
> memzone definition - build-time or run-time customized.
> 
> I would like to suggest three options.
> 
> Option 1
> ========
> Add a Meson option in meson options.txt and remove the
> RTE_MAX_MEMZONE definition from config/rte_config.h
> 
> For example,
> 
>  config/meson.build
> 
>  # set other values pulled from the build options
>  dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores'))
>  +dpdk_conf.set('RTE_MAX_MEMZONE', get_option('max_memzones'))
>  dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
> 
>  meson_options.txt
> 
>  option('max_lcores', type: 'integer', value: 128,
>         description: 'maximum number of cores/threads supported by EAL')
>  +option('max_memzones', type: 'integer', value: 2560,
>  +       description: 'maximum number of memory zones supported by EAL')
>  option('max_numa_nodes', type: 'integer', value: 32,
>         description: 'maximum number of NUMA nodes supported by EAL')
> 
>  config/rte_config.h
> 
>  #define RTE_MAX_MEM_MB_PER_TYPE 65536
>  -#define RTE_MAX_MEMZONE 2560
>  #define RTE_MAX_TAILQ 32
> 
Of the 3 options, I think this first option would probably be my preferred one.

/Bruce


More information about the dev mailing list