common/mlx5: add memory management functions
authorSuanming Mou <suanmingm@mellanox.com>
Sun, 28 Jun 2020 02:21:58 +0000 (10:21 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 13:44:36 +0000 (15:44 +0200)
commitd38e3d52665778e2b0b048d2ae4a743bfa2e72c5
treed6f8db3189ba489c96837f3136628bf7cd46b87a
parent6db1bcf0387bb8fd117bbe44e7e07d8ec09775f1
common/mlx5: add memory management functions

Add the internal mlx5 memory management functions:

mlx5_malloc_mem_select();
mlx5_memory_stat_dump();
mlx5_rellaocate();
mlx5_malloc();
mlx5_free();

User will be allowed to manage memory from system or from rte memory
with the unified functions.

In this case, for the system with limited memory which can not reserve
lots of rte hugepage memory in advanced, will allocate the memory from
system for some of not so important control path objects based on the
sys_mem_en configuration.

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/common/mlx5/Makefile
drivers/common/mlx5/meson.build
drivers/common/mlx5/mlx5_malloc.c [new file with mode: 0644]
drivers/common/mlx5/mlx5_malloc.h [new file with mode: 0644]
drivers/common/mlx5/rte_common_mlx5_version.map