net/mlx5/hws: removing the table name from dest root table
PATCH 1/2 net/mlx5/hws: removing the table name from dest root table
From: Itamar Gozlan <[email protected]>
Jumping to root (group 0) does not behave the same as jumping to groups with level > 0.
To better emphasize that it is not the same action, a rename is made to drop the name table.
--- drivers/net/mlx5/hws/mlx5dr.h | 11 ++++------- drivers/net/mlx5/hws/mlx5dr_action.c | 27 ++++++++++----------------- drivers/net/mlx5/hws/mlx5dr_debug.c | 2 +- 3 files changed, 15 insertions(+), 25 deletions(-)
drivers/net/mlx5/hws/mlx5dr.h +4 -7
@@ -45,7 +45,7 @@ enum mlx5dr_action_type {MLX5DR_ACTION_TYP_PUSH_VLAN ,MLX5DR_ACTION_TYP_ASO_METER ,MLX5DR_ACTION_TYP_ASO_CT , -MLX5DR_ACTION_TYP_DEST_ROOT_TABLE , +MLX5DR_ACTION_TYP_DEST_ROOT , MLX5DR_ACTION_TYP_MAX, };
@@ -570,8 +570,6 @@ mlx5dr_action_create_push_vlan(struct mlx5dr_context *ctx, uint32_t flags);* the given priority. * @param[in] ctx * The context in which the new action will be created. -* @param[in] tbl -* The root table to jump to. * @param[in] priority * The priority of matcher in the root table to jump to. * @param[in] flags
@@ -579,10 +577,9 @@ mlx5dr_action_create_push_vlan(struct mlx5dr_context *ctx, uint32_t flags);* @return pointer to mlx5dr_action on success NULL otherwise. */ struct mlx5dr_action * -mlx5dr_action_create_dest_root_table (struct mlx5dr_context *ctx, -struct mlx5dr_table *tbl, -uint16_t priority, -uint32_t flags); +mlx5dr_action_create_dest_root (struct mlx5dr_context *ctx, +uint16_t priority, +uint32_t flags);/* Destroy direct rule action. *
drivers/net/mlx5/hws/mlx5dr_action.c +10 -17
@@ -34,7 +34,7 @@ static const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_MAX][MLX5DR_ACTION_TYP_BIT (MLX5DR_ACTION_TYP_MISS ) |BIT (MLX5DR_ACTION_TYP_TIR ) |BIT (MLX5DR_ACTION_TYP_DROP ) | -BIT (MLX5DR_ACTION_TYP_DEST_ROOT_TABLE ), +BIT (MLX5DR_ACTION_TYP_DEST_ROOT ), BIT(MLX5DR_ACTION_TYP_LAST), }, [MLX5DR_TABLE_TYPE_NIC_TX] = {
@@ -51,7 +51,7 @@ static const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_MAX][MLX5DR_ACTION_TYP_BIT (MLX5DR_ACTION_TYP_FT ) |BIT (MLX5DR_ACTION_TYP_MISS ) |BIT (MLX5DR_ACTION_TYP_DROP ) | -BIT (MLX5DR_ACTION_TYP_DEST_ROOT_TABLE ), +BIT (MLX5DR_ACTION_TYP_DEST_ROOT ), BIT(MLX5DR_ACTION_TYP_LAST), }, [MLX5DR_TABLE_TYPE_FDB] = {
@@ -71,7 +71,7 @@ static const uint32_t action_order_arr[MLX5DR_TABLE_TYPE_MAX][MLX5DR_ACTION_TYP_ BIT(MLX5DR_ACTION_TYP_MISS) | BIT(MLX5DR_ACTION_TYP_VPORT) | BIT(MLX5DR_ACTION_TYP_DROP) | - BIT(MLX5DR_ACTION_TYP_DEST_ROOT_TABLE), + BIT(MLX5DR_ACTION_TYP_DEST_ROOT), BIT(MLX5DR_ACTION_TYP_LAST), }, };
@@ -524,7 +524,7 @@ static void mlx5dr_action_fill_stc_attr(struct mlx5dr_action *action, attr->action_offset =MLX5DR_ACTION_OFFSET_HIT ; attr->dest_table_id = obj->id;break ; -case MLX5DR_ACTION_TYP_DEST_ROOT_TABLE : +case MLX5DR_ACTION_TYP_DEST_ROOT : attr->action_type =MLX5_IFC_STC_ACTION_TYPE_JUMP_TO_FT ; attr->action_offset =MLX5DR_ACTION_OFFSET_HIT ; attr->dest_table_id = action->root_tbl.sa->id;
@@ -1648,10 +1648,9 @@ mlx5dr_action_create_modify_header(struct mlx5dr_context *ctx, }struct mlx5dr_action * -mlx5dr_action_create_dest_root_table (struct mlx5dr_context *ctx, -struct mlx5dr_table *tbl, -uint16_t priority, -uint32_t flags) +mlx5dr_action_create_dest_root (struct mlx5dr_context *ctx, +uint16_t priority, +uint32_t flags) {struct mlx5dv_steering_anchor_attr attr = {0 };struct mlx5dv_steering_anchor *sa;
@@ -1664,12 +1663,6 @@ mlx5dr_action_create_dest_root_table(struct mlx5dr_context *ctx,return NULL ; } -if (!mlx5dr_table_is_root (tbl)) { -DR_LOG (ERR ,"Non root table cannot be set as destination" ); - rte_errno =ENOTSUP ; -return NULL ; - } -if (mlx5dr_context_shared_gvmi_used (ctx)) {DR_LOG (ERR ,"Cannot use this action in shared GVMI context" ); rte_errno =ENOTSUP ;
@@ -1687,7 +1680,7 @@ mlx5dr_action_create_dest_root_table(struct mlx5dr_context *ctx,return NULL ; } - action =mlx5dr_action_create_generic (ctx, flags,MLX5DR_ACTION_TYP_DEST_ROOT_TABLE ); + action =mlx5dr_action_create_generic (ctx, flags,MLX5DR_ACTION_TYP_DEST_ROOT );if (!action) goto free_steering_anchor;
@@ -1725,7 +1718,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)case MLX5DR_ACTION_TYP_PUSH_VLAN :mlx5dr_action_destroy_stcs (action);break ; -case MLX5DR_ACTION_TYP_DEST_ROOT_TABLE : +case MLX5DR_ACTION_TYP_DEST_ROOT :mlx5dr_action_destroy_stcs (action); mlx5_glue->destroy_steering_anchor (action->root_tbl.sa);break ;
@@ -2216,7 +2209,7 @@ int mlx5dr_action_template_process(struct mlx5dr_action_template *at)case MLX5DR_ACTION_TYP_DROP :case MLX5DR_ACTION_TYP_TIR :case MLX5DR_ACTION_TYP_FT : -case MLX5DR_ACTION_TYP_DEST_ROOT_TABLE : +case MLX5DR_ACTION_TYP_DEST_ROOT :case MLX5DR_ACTION_TYP_VPORT :case MLX5DR_ACTION_TYP_MISS :/* Hit action */
drivers/net/mlx5/hws/mlx5dr_debug.c +1 -1
@@ -22,7 +22,7 @@ const char *mlx5dr_debug_action_type_str[] = { [MLX5DR_ACTION_TYP_PUSH_VLAN] = "PUSH_VLAN", [MLX5DR_ACTION_TYP_ASO_METER] = "ASO_METER", [MLX5DR_ACTION_TYP_ASO_CT] = "ASO_CT", - [MLX5DR_ACTION_TYP_DEST_ROOT_TABLE ] ="DEST_ROOT_TABLE" , + [MLX5DR_ACTION_TYP_DEST_ROOT ] ="DEST_ROOT" , }; static_assert(ARRAY_SIZE(mlx5dr_debug_action_type_str) == MLX5DR_ACTION_TYP_MAX,
Signature · 1 line
2.25.1
PATCH 2/2 net/mlx5: add support for send to kernel over HWS
Added hws send to kernel action and root tbl in mlx5_priv. Initialized in hws configure and used in hws actions translate.
--- drivers/net/mlx5/mlx5.h | 2 ++ drivers/net/mlx5/mlx5_flow_hw.c | 59 +++++++++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5.h +2 -0
@@ -1852,6 +1852,8 @@ struct mlx5_priv {struct mlx5dr_action *hw_drop[2 ];/* HW steering global tag action. */ struct mlx5dr_action *hw_tag[2 ]; +/* HW steering global send to kernel action. */ +struct mlx5dr_action *hw_send_to_kernel;/* HW steering create ongoing rte flow table list header. */ LIST_HEAD(flow_hw_tbl_ongo, rte_flow_template_table) flow_hw_tbl_ongo;struct mlx5_indexed_pool *acts_ipool;/* Action data indexed pool. */
drivers/net/mlx5/mlx5_flow_hw.c +57 -2
107 lines not on this page · raw message
Signature · 1 line
2.25.1
RE: [PATCH 2/2] net/mlx5: add support for send to kernel over HWS
Quoted 9 lines
-----Original Message-----
From: Bar Neuman <[email protected]>
Sent: Tuesday, June 13, 2023 8:28 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Maayan Kashani <[email protected]>
Subject: [PATCH 2/2] net/mlx5: add support for send to kernel over HWS
Quoted 4 lines
Added hws send to kernel action and root tbl in
mlx5_priv. Initialized in hws configure and used in hws actions translate.Signed-off-by Bar Neuman <[email protected]>
Quoted 11 lines
-----Original Message-----
From: Bar Neuman <[email protected]>
Sent: Tuesday, June 13, 2023 8:28 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Maayan Kashani <[email protected]>; Itamar Gozlan <[email protected]>
Subject: [PATCH 1/2]net/mlx5/hws: removing the table name from dest root table
Quoted 8 lines
From: Itamar Gozlan <[email protected]>
Jumping to root (group 0) does not behave the same as jumping to groups with level > 0.
To better emphasize that it is not the same action, a rename is made to drop the name table.Signed-off-by Itamar Gozlan <[email protected]>
Hi,
Quoted 11 lines
-----Original Message-----
From: Bar Neuman <[email protected]>
Sent: Tuesday, June 13, 2023 8:28 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Maayan Kashani <[email protected]>; Itamar Gozlan <[email protected]>
Subject: [PATCH 1/2]net/mlx5/hws: removing the table name from dest root table
Quoted 8 lines
From: Itamar Gozlan <[email protected]>
Jumping to root (group 0) does not behave the same as jumping to groups with level > 0.
To better emphasize that it is not the same action, a rename is made to drop the name table.Signed-off-by Itamar Gozlan <[email protected]>
Series applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh