]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit21586a0fc44caf43c5ac5df9bb5620fdfb95ba92
treea4814052516f452bd8fcb41a1fde1dc24941942b
parent83e79489135bdf13590ad09f3341f9ef509c2cf9
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: 41d07074154c ("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