diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2018-06-12 11:59:43 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-08-21 15:55:16 -0700 |
commit | 70e83bd3b0e434ee9fa8e0010f76080aa4320725 (patch) | |
tree | 9f04cf5335ac585c43fc203c7b8f9d399171e359 /drivers/net/ethernet/alteon | |
parent | 1216ce9d4a740bed88393177174fef275069a560 (diff) |
net/mlx5e: Refactor mlx5e_neigh_update_table->encap_lock
To remove dependency on rtnl lock, always take neigh update encap lock when
modifying neigh update hash table and list. Originally, this lock was only
used to synchronize with netevent handler function, which is called from bh
context and cannot use rtnl lock for synchronization. Take lock in encap
entry attach function to prevent concurrent modifications of neigh update
hash table and list.
Taking the encap lock when creating new nhe introduces a problem that we
need to allocate new entry with sleeping GFP_KERNEL flag while holding a
spinlock. However, since previous patch in this series has already
converted lookup in netevent handler function to user rcu read lock instead
of encap lock, we can safely convert the lock type to mutex.
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/alteon')
0 files changed, 0 insertions, 0 deletions