Commit 940390d9 authored by Mark Bloch's avatar Mark Bloch Committed by Jakub Kicinski

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: default avatarMark Bloch <mbloch@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20240911201757.1505453-6-saeed@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent da2f660b
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment