]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: fs, delete the FTE when there are no rules attached to it
authorMark Bloch <mbloch@nvidia.com>
Tue, 15 Mar 2022 11:23:40 +0000 (11:23 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 3 May 2022 04:21:15 +0000 (21:21 -0700)
commit50cb9931075f2d93f04ee7a82a998ebaf9f0e139
tree84ede19cbf3b186da8369cc13b478b30dd9d6ca1
parent98d7f5783ff80593fa43858c2c24a7f8857b782f
net/mlx5: fs, delete the FTE when there are no rules attached to it

When an FTE has no children is means all the rules where removed
and the FTE can be deleted regardless of the dests_size value.
While dests_size should be 0 when there are no children
be extra careful not to leak memory or get firmware syndrome
if the proper bookkeeping of dests_size wasn't done.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c