[PATCH v1 2/3] net/mlx5/hws: add mlx5dr obj struct to mlx5dr action
Shun Hao
shunh at nvidia.com
Thu Sep 28 15:09:12 CEST 2023
From: Hamdan Igbaria <hamdani at 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 <hamdani at nvidia.com>
Acked-by: Alex Vesker <valex at nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_action.c | 2 ++
drivers/net/mlx5/hws/mlx5dr_action.h | 3 +++
drivers/net/mlx5/hws/mlx5dr_table.c | 1 -
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index d38201d738..ba17d97517 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -785,6 +785,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;
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 f91f04d924..c26b22c248 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.20.0
More information about the dev
mailing list