net/mlx5e: Protect encap hash table with mutex
authorVlad Buslov <vladbu@mellanox.com>
Fri, 2 Aug 2019 19:21:56 +0000 (22:21 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 9 Aug 2019 21:54:10 +0000 (14:54 -0700)
commit61086f391044fd587af9d70a9b8f6f800dd474ba
tree36d6585b6e191db6f64be8682b7f3a4c5ef5d6b6
parent948993f2beebbdc1c9d926cfdad9827cf6bb67c0
net/mlx5e: Protect encap hash table with mutex

To remove dependency on rtnl lock, protect encap hash table from concurrent
modifications with new "encap_tbl_lock" mutex. Use the mutex to protect
internal encap entry state from concurrent modification. This is necessary
because a flow can be attached to multiple encap entries simultaneously,
which significantly complicates using finer grained per-entry lock.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h