common/mlx5: allocate cache list memory individually
authorSuanming Mou <suanmingm@nvidia.com>
Tue, 13 Jul 2021 08:44:51 +0000 (11:44 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 15 Jul 2021 14:09:19 +0000 (16:09 +0200)
commit25481e5025a70513f4cd0404b6380ec70f1b2c7b
tree2ad7143c09a98a04dbce71649af648588a3c8983
parent961b6774c4518d86f9e5da0725372e0fd5780475
common/mlx5: allocate cache list memory individually

Currently, the list's local cache instance memory is allocated with
the list. As the local cache instance array size is RTE_MAX_LCORE,
most of the cases the system will only have very limited cores.
allocate the instance memory individually per core will be more
economic to the memory.

This commit changes the instance array to pointer array, allocate
the local cache memory only when the core is to be used.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_common_utils.c
drivers/common/mlx5/mlx5_common_utils.h