From: Hamdan Igbaria <hamd...@nvidia.com> Add mlx5dr_devx_obj struct to mlx5dr_action, so we could hold the FT obj in dest table action.
Signed-off-by: Hamdan Igbaria <hamd...@nvidia.com> Acked-by: Suanming Mou <suanmi...@nvidia.com> --- drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++++ drivers/net/mlx5/hws/mlx5dr_action.h | 3 +++ drivers/net/mlx5/hws/mlx5dr_table.c | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c index ea9fc23732..55ec4f71c9 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.c +++ b/drivers/net/mlx5/hws/mlx5dr_action.c @@ -787,6 +787,8 @@ mlx5dr_action_create_dest_table(struct mlx5dr_context *ctx, ret = mlx5dr_action_create_stcs(action, tbl->ft); if (ret) goto free_action; + + action->devx_dest.devx_obj = tbl->ft; } return action; @@ -864,6 +866,8 @@ mlx5dr_action_create_dest_tir(struct mlx5dr_context *ctx, ret = mlx5dr_action_create_stcs(action, cur_obj); if (ret) goto clean_obj; + + action->devx_dest.devx_obj = cur_obj; } return action; diff --git a/drivers/net/mlx5/hws/mlx5dr_action.h b/drivers/net/mlx5/hws/mlx5dr_action.h index 314e289780..104c6880c1 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.h +++ b/drivers/net/mlx5/hws/mlx5dr_action.h @@ -148,6 +148,9 @@ struct mlx5dr_action { struct { struct mlx5dv_steering_anchor *sa; } root_tbl; + struct { + struct mlx5dr_devx_obj *devx_obj; + } devx_dest; }; }; diff --git a/drivers/net/mlx5/hws/mlx5dr_table.c b/drivers/net/mlx5/hws/mlx5dr_table.c index e1150cd75d..91eb92db78 100644 --- a/drivers/net/mlx5/hws/mlx5dr_table.c +++ b/drivers/net/mlx5/hws/mlx5dr_table.c @@ -68,7 +68,6 @@ static void mlx5dr_table_down_default_fdb_miss_tbl(struct mlx5dr_table *tbl) return; mlx5dr_cmd_forward_tbl_destroy(default_miss); - ctx->common_res[tbl_type].default_miss = NULL; } -- 2.39.2