[RFC] lib: set/get max memzone segments
Ophir Munk
ophirmu at mellanox.com
Wed Apr 19 10:48:35 CEST 2023
Devendra Singh Rawat, Alok Prasad - can you please give your feedback on the qede driver updates?
> -----Original Message-----
> 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 the max value via an rte API - rather than
> changing the dpdk source code per application. In many organizations, the
> possibility to compile a private DPDK library for a particular application does
> not exist at all. With this option there is no need to recompile DPDK and it
> allows using an in-box packaged DPDK.
> An example usage for updating the RTE_MAX_MEMZONE 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 commit 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 - run-time
> customized.
> This commit adds an API which must be called before rte_eal_init():
> rte_memzone_max_set(int max). If not called, the default memzone
> (RTE_MAX_MEMZONE) is used. There is also an API to query the effective
> max memzone: rte_memzone_max_get().
>
> Signed-off-by: Ophir Munk <ophirmu at nvidia.com>
> ---
> app/test/test_func_reentrancy.c | 2 +-
> app/test/test_malloc_perf.c | 2 +-
> app/test/test_memzone.c | 2 +-
> config/rte_config.h | 1 -
> drivers/net/qede/base/bcm_osal.c | 26 +++++++++++++++++++++-----
> drivers/net/qede/base/bcm_osal.h | 3 +++
> drivers/net/qede/qede_main.c | 7 +++++++
> lib/eal/common/eal_common_memzone.c | 28
More information about the dev
mailing list