aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-07-31 18:19:06 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2019-08-09 14:54:08 -0700
commitb32accda8afd36d7de1581375467fd3642d3c73e (patch)
tree948768d121b0c6dc17c0d9cad3dd9fdc9c61d1dd /drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
parentnet/mlx5e: Protect hairpin entry flows list with spinlock (diff)
downloadlinux-dev-b32accda8afd36d7de1581375467fd3642d3c73e.tar.xz
linux-dev-b32accda8afd36d7de1581375467fd3642d3c73e.zip
net/mlx5e: Protect hairpin hash table with mutex
To remove dependency on rtnl lock, protect hairpin hash table from concurrent modifications with new "hairpin_tbl_lock" mutex. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/fs.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h b/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
index 4518ce19112e..100506a3dd58 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
@@ -17,6 +17,7 @@ struct mlx5e_tc_table {
struct rhashtable ht;
DECLARE_HASHTABLE(mod_hdr_tbl, 8);
+ struct mutex hairpin_tbl_lock; /* protects hairpin_tbl */
DECLARE_HASHTABLE(hairpin_tbl, 8);
struct notifier_block netdevice_nb;