net/mlx5: optimize hash list synchronization
authorSuanming Mou <suanmingm@nvidia.com>
Thu, 3 Dec 2020 02:18:51 +0000 (04:18 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:04 +0000 (16:03 +0100)
commitd14cbf3db102075c3238605f3f30c13ecb755229
tree070b155d8dbf2536b366e4839271b5dafae31833
parent4165bfd20d2c2f3670f88f901dcd5e8f7479d0ed
net/mlx5: optimize hash list synchronization

Since all the hash table operations are related with one dedicated
bucket, the hash table lock and gen_cnt can be allocated per-bucket.

Currently, the hash table uses one global lock to protect all the
buckets, that global lock avoids the buckets to be operated at one
time, it hurts the hash table performance. And the gen_cnt updated
by the entire hash table causes incorrect redundant list research.

This commit optimized the lock and gen_cnt to bucket solid allows
different bucket entries can be operated more efficiently.

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