]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix deletion of duplicate rules
authorMaor Gottlieb <maorg@nvidia.com>
Wed, 21 Oct 2020 05:42:49 +0000 (08:42 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Nov 2020 20:17:06 +0000 (12:17 -0800)
commit4cefb938e29fccacf8a423b0634d7e67d2dc0430
tree704fd87de3e0e15ee612271ecf4aa4c9564c51f8
parenta832f57c1e9628e760af1ccf889649d693e4b7ca
net/mlx5: Fix deletion of duplicate rules

When a rule is duplicated, the refcount of the rule is increased so only
the second deletion of the rule should cause destruction of the FTE.
Currently, the FTE will be destroyed in the first deletion of rule since
the modify_mask will be 0.
Fix it and call to destroy FTE only if all the rules (FTE's children)
have been removed.

Fixes: 030a9e6b53ce ("net/mlx5: Consolidate update FTE for all removal changes")
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c