]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR, Limit STE hash table enlarge based on bytemask
authorAlex Vesker <valex@mellanox.com>
Sun, 10 Nov 2019 13:39:36 +0000 (15:39 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 20 Nov 2019 20:33:05 +0000 (12:33 -0800)
commit6c7bb7e46c09a3bc351195ab09bf398db68a3c12
treea4814052516f452bd8fcb41a1fde1dc24941942b
parent5b089a941a82ac9e10b1e0dcc6d867f8e75e6efd
net/mlx5: DR, Limit STE hash table enlarge based on bytemask

When an ste hash table has too many collision we enlarge it
to a bigger hash table (rehash). Rehashing collision improvement
depends on the bytemask value. The more 1 bits we have in bytemask
means better spreading in the table.

Without this fix tables can grow in size without providing any
improvement which can lead to memory depletion and failures.

This patch will limit table rehash to reduce memory and improve
the performance.

Fixes: e49297b3a5b0 ("net/mlx5: DR, Expose steering rule functionality")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Reviewed-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c