From: Tamar Mashiah <tmash...@nvidia.com> Add DROP action to multi destination actions, set NOP destination type when DROP is specified.
cc: sta...@dpdk.org Signed-off-by: Tamar Mashiah <tmash...@nvidia.com> --- drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++++ drivers/net/mlx5/hws/mlx5dr_cmd.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c index b038ca6879..309a55629b 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.c +++ b/drivers/net/mlx5/hws/mlx5dr_action.c @@ -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 diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c index a4f778a8a4..2127757aab 100644 --- a/drivers/net/mlx5/hws/mlx5dr_cmd.c +++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c @@ -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; -- 2.45.2