summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMark Bloch <mbloch@nvidia.com>2024-09-11 23:17:47 +0300
committerJakub Kicinski <kuba@kernel.org>2024-09-13 06:50:28 +0300
commit940390d976902e184e1186d0f7dab3ba884dec84 (patch)
treeb2fcb2467deb569226cef5ffcf82c1445540a643 /drivers/net
parentda2f660b3ba1be33310452959ab72d1d7ce39350 (diff)
downloadlinux-940390d976902e184e1186d0f7dab3ba884dec84.tar.xz
net/mlx5: fs, move hardware fte deletion function reset
Downstream patches will need this as we might not want to reset it when a pending rule is connected to the FTE. Signed-off-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20240911201757.1505453-6-saeed@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index e32725487702..899d91577a54 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -683,6 +683,8 @@ static void del_hw_fte(struct fs_node *node)
fte->index, fg->id);
node->active = false;
}
+ /* Avoid double call to del_hw_fte */
+ fte->node.del_hw_func = NULL;
}
static void del_sw_fte(struct fs_node *node)
@@ -2265,8 +2267,6 @@ void mlx5_del_flow_rules(struct mlx5_flow_handle *handle)
tree_remove_node(&handle->rule[i]->node, true);
if (list_empty(&fte->node.children)) {
fte->node.del_hw_func(&fte->node);
- /* Avoid double call to del_hw_fte */
- fte->node.del_hw_func = NULL;
up_write_ref_node(&fte->node, false);
tree_put_node(&fte->node, false);
} else if (fte->dests_size) {