mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
net/mlx5: Wait for inactive autogroups
[ Upstream commit 49c0355d301b4e0e01e0f19ddbb023bd7d0ee48c ]
Currently, if one thread tries to add an entry to an autogrouped table
with no free matching group, while another thread is in the process of
creating a new matching autogroup, it doesn't wait for the new group
creation, and creates an unnecessary new autogroup.
Instead of skipping inactive, wait on the write lock of those groups.
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Stable-dep-of: 8ec40e3f1f72 ("net/mlx5: Fix return value when searching for existing flow group")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6ab93dcedc
commit
2fa390ee36
1 changed files with 5 additions and 3 deletions
|
|
@ -1768,11 +1768,13 @@ skip_search:
|
|||
list_for_each_entry(iter, match_head, list) {
|
||||
g = iter->g;
|
||||
|
||||
if (!g->node.active)
|
||||
continue;
|
||||
|
||||
nested_down_write_ref_node(&g->node, FS_LOCK_PARENT);
|
||||
|
||||
if (!g->node.active) {
|
||||
up_write_ref_node(&g->node, false);
|
||||
continue;
|
||||
}
|
||||
|
||||
err = insert_fte(g, fte);
|
||||
if (err) {
|
||||
up_write_ref_node(&g->node, false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue