net/mlx5: add DROP destination to mirror clone actions
PATCH 1/2 net/mlx5: add DROP destination to mirror clone actions
From: Tamar Mashiah <[email protected]>
Add DROP destination to mirror clone actions.
--- .mailmap | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5_flow_hw.c | 5 +++++ 3 files changed, 7 insertions(+)
.mailmap +1 -0
@@ -1517,6 +1517,7 @@ Takeshi Yoshimura <[email protected]> <[email protected]> Takuya Asada <[email protected]> Tal Avraham <[email protected]> Tal Shnaiderman <[email protected]> <[email protected]> +Tamar Mashiah <[email protected]> Tao Y Yang <[email protected]> Tao Zhu <[email protected]> Taripin Samuel <[email protected]>
drivers/common/mlx5/mlx5_prm.h +1 -0
@@ -5221,6 +5221,7 @@ enum mlx5_flow_destination_type {MLX5_FLOW_DESTINATION_TYPE_VPORT =0x0 ,MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE =0x1 ,MLX5_FLOW_DESTINATION_TYPE_TIR =0x2 , + MLX5_FLOW_DESTINATION_TYPE_NOP = 0xb, }; enum mlx5_flow_context_action {
drivers/net/mlx5/mlx5_flow_hw.c +5 -0
@@ -14144,6 +14144,7 @@ mlx5_mirror_terminal_action(const struct rte_flow_action *action)case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT :case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR :case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX : +case RTE_FLOW_ACTION_TYPE_DROP :return true;default :break ;
@@ -14187,6 +14188,8 @@ mlx5_mirror_validate_sample_action(struct rte_eth_dev *dev,return false;break ;case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX : +case RTE_FLOW_ACTION_TYPE_JUMP : +case RTE_FLOW_ACTION_TYPE_DROP :break ;default :return false;
@@ -14382,6 +14385,8 @@ hw_mirror_format_clone(struct rte_eth_dev *dev, &actions[i], "failed to create reformat action");break ; +case RTE_FLOW_ACTION_TYPE_DROP : +break ;default : return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
Signature · 1 line
2.45.2
PATCH 2/2 net/mlx5/hws: add DROP action to multi destination actions
From: Tamar Mashiah <[email protected]>
Add DROP action to multi destination actions, set NOP destination type when DROP is specified.
--- drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++++ drivers/net/mlx5/hws/mlx5dr_cmd.c | 4 ++++ 2 files changed, 8 insertions(+)
drivers/net/mlx5/hws/mlx5dr_action.c +4 -0
@@ -2389,6 +2389,10 @@ mlx5dr_action_create_dest_array(struct mlx5dr_context *ctx, dest_list[i].destination_id = dests[i].dest->devx_dest.devx_obj->id; fte_attr.action_flags |=MLX5_FLOW_CONTEXT_ACTION_FWD_DEST ;break ; +case MLX5DR_ACTION_TYP_DROP : + dest_list[i].destination_type =MLX5_FLOW_DESTINATION_TYPE_NOP ; + fte_attr.action_flags |=MLX5_FLOW_CONTEXT_ACTION_FWD_DEST ; +break ;case MLX5DR_ACTION_TYP_REFORMAT_L2_TO_TNL_L2 :case MLX5DR_ACTION_TYP_REFORMAT_L2_TO_TNL_L3 : packet_reformat = mlx5dr_action_dest_array_process_reformat
drivers/net/mlx5/hws/mlx5dr_cmd.c +4 -0
@@ -239,6 +239,10 @@ mlx5dr_cmd_set_fte(struct ibv_context *ctx, dest->ext_reformat->id); }break ; +case MLX5_FLOW_DESTINATION_TYPE_NOP : +MLX5_SET (dest_format, in_dests, destination_type, + dest->destination_type); +break ;default : rte_errno =EOPNOTSUPP ; goto free_devx;
Signature · 1 line
2.45.2
RE: [PATCH 2/2] net/mlx5/hws: add DROP action to multi destination actions
Quoted 14 lines
-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Thursday, February 13, 2025 9:33 AM
To: [email protected]
Cc: Gregory Etelson <[email protected]>; Maayan Kashani <[email protected]>; Raslan Darawsheh <[email protected]>; Tamar Mashiah <[email protected]>; [email protected]
Subject: [PATCH 2/2]net/mlx5/hws: add DROP action to multi destination actionsExternal email: Use caution opening links or attachments
Quoted 8 lines
From: Tamar Mashiah <[email protected]>
Add DROP action to multi destination actions, set NOP destination type when DROP is specified.
Signed-off-by Tamar Mashiah <[email protected]>
Best regards,
Dariusz Sosnowski
Quoted 14 lines
-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Thursday, February 13, 2025 9:33 AM
To: [email protected]
Cc: Gregory Etelson <[email protected]>; Maayan Kashani <[email protected]>; Raslan Darawsheh <[email protected]>; Tamar Mashiah <[email protected]>; [email protected]
Subject: [PATCH 1/2] net/mlx5: add DROP destination to mirror clone actionsExternal email: Use caution opening links or attachments
Quoted 7 lines
From: Tamar Mashiah <[email protected]>
Add DROP destination to mirror clone actions.
Signed-off-by Tamar Mashiah <[email protected]>
Best regards,
Dariusz Sosnowski
Hi,
From: Gregory Etelson <[email protected]>
Sent: Thursday, February 13, 2025 10:32 AM
To: [email protected]
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; Tamar Mashiah; [email protected]
Subject: [PATCH 1/2] net/mlx5: add DROP destination to mirror clone actions
From: Tamar Mashiah <[email protected]>
Add DROP destination to mirror clone actions.
Series applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh