From: Gregory Etelson <getelson@nvidia.com>
To: <dev@dpdk.org>
Cc: getelson@nvidia.com, <mkashani@nvidia.com>,
rasland@nvidia.com, "Tamar Mashiah" <tmashiah@nvidia.com>,
stable@dpdk.org
Subject: [PATCH 2/2] net/mlx5/hws: add DROP action to multi destination actions
Date: Thu, 13 Feb 2025 10:32:39 +0200 [thread overview]
Message-ID: <20250213083239.94360-2-getelson@nvidia.com> (raw)
In-Reply-To: <20250213083239.94360-1-getelson@nvidia.com>
From: Tamar Mashiah <tmashiah@nvidia.com>
Add DROP action to multi destination actions, set NOP
destination type when DROP is specified.
cc: stable@dpdk.org
Signed-off-by: Tamar Mashiah <tmashiah@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
prev parent reply other threads:[~2025-02-13 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 8:32 [PATCH 1/2] net/mlx5: add DROP destination to mirror clone actions Gregory Etelson
2025-02-13 8:32 ` Gregory Etelson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250213083239.94360-2-getelson@nvidia.com \
--to=getelson@nvidia.com \
--cc=dev@dpdk.org \
--cc=mkashani@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=tmashiah@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).