]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Avoid group version scan when not necessary
authorEli Cohen <eli@mellanox.com>
Wed, 4 Mar 2020 08:32:56 +0000 (10:32 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Mar 2020 06:19:11 +0000 (23:19 -0700)
commitd571a752e34e3b89b0b45901184baf0ecef0f11c
treed860c06b722b6881a5e1b42ba43f661f07cc723a
parent5d3399f5d8bceac2b1b55baaa35294710cde1b60
net/mlx5: Avoid group version scan when not necessary

Group version is used when modifying a rule is allowed
(FLOW_ACT_NO_APPEND is clear) to detect a case where the rule was found
but while the groups where unlocked a new FTE was added. In this case,
the added FTE could be one with identical match value so we need to
attempt again with group lock held.

Change the code so version is retrieved only when FLOW_ACT_NO_APPEND is
cleared. As result, later compare can also be avoided if FLOW_ACT_NO_APPEND
is cleared.

Also improve comments text.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c