]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR, Improve rule tracking memory consumption
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Thu, 8 Jul 2021 13:51:29 +0000 (16:51 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 26 Aug 2021 22:38:04 +0000 (15:38 -0700)
commit8a015baef50a7b60c866a58ae2dc0406958061d9
treeb154dd7137bb37fc17a7373fe4dba628148fba45
parent32c8e3b23020e4815480a169d4b144d2976fcb06
net/mlx5: DR, Improve rule tracking memory consumption

To track each STE of the rule a rule member was allocated, each
member would point to one STE. This means that we would allocate
40B (rule member) * number of STEs per rule.

To reduce this per rule allocation we use the STE tree pointers
for next_htbl and pointing STE to navigate the tree, this allows
us to keep only the pointer to the last STE of rule (always unique).
From the last rule STE we are able to traverse and rebuild all of
the STEs that construct the rule.

In our testing with 8M rules, each consisting of 7 STES, we were able
to reduce 1.6GB of memory.

Signed-off-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h