net/mlx5: DR, Remove num_of_entries byte_size from struct mlx5_dr_icm_chunk
authorRongwei Liu <rongweil@nvidia.com>
Fri, 28 Jan 2022 04:13:07 +0000 (06:13 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 17 Mar 2022 18:51:57 +0000 (11:51 -0700)
commitf51bb51793008d559d45a5fb0d856b2deb87890a
tree6f7291eff4a9b315e06a4476fa18fb93d36d5d8e
parent5c4f9b6e91e8b3957abe95b18040cc519ce6edc0
net/mlx5: DR, Remove num_of_entries byte_size from struct mlx5_dr_icm_chunk

Target to reduce the memory consumption in large scale of flow rules.

They can be calculated quickly from buddy memory pool.
1. num_of_entries calls dr_icm_pool_get_chunk_num_of_entries().
2. byte_size calls dr_icm_pool_get_chunk_byte_size().

Use chunk size in dr_icm_chunk to speed up and the one in dr_ste_htbl
will be removed in the upcoming commit.

This commit reduce 8 bytes from struct mlx5_dr_icm_chunk and its
current size is 56 bytes.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Reviewed-by: Shun Hao <shunh@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h