DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maayan Kashani <mkashani@nvidia.com>
To: <dev@dpdk.org>
Cc: <mkashani@nvidia.com>, <dsosnowski@nvidia.com>,
	<rasland@nvidia.com>, Yevgeny Kliteynik <kliteyn@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Subject: [PATCH v3 2/3] net/mlx5/hws: add support for action type LAST
Date: Mon, 3 Jun 2024 13:43:55 +0300	[thread overview]
Message-ID: <20240603104357.9437-2-mkashani@nvidia.com> (raw)
In-Reply-To: <20240603104357.9437-1-mkashani@nvidia.com>

From: Yevgeny Kliteynik <kliteyn@nvidia.com>

Add support for MLX5DR_ACTION_TYP_LAST action type.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr.h        | 12 ++++++++++++
 drivers/net/mlx5/hws/mlx5dr_action.c |  9 +++++++++
 2 files changed, 21 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr.h b/drivers/net/mlx5/hws/mlx5dr.h
index 86cd4f1db5..5ceb1a7b4b 100644
--- a/drivers/net/mlx5/hws/mlx5dr.h
+++ b/drivers/net/mlx5/hws/mlx5dr.h
@@ -677,6 +677,18 @@ struct mlx5dr_action *
 mlx5dr_action_create_tag(struct mlx5dr_context *ctx,
 			 uint32_t flags);
 
+/* Create direct rule LAST action.
+ *
+ * @param[in] ctx
+ *	The context in which the new action will be created.
+ * @param[in] flags
+ *	Action creation flags. (enum mlx5dr_action_flags)
+ * @return pointer to mlx5dr_action on success NULL otherwise.
+ */
+struct mlx5dr_action *
+mlx5dr_action_create_last(struct mlx5dr_context *ctx,
+			  uint32_t flags);
+
 /* Create direct rule counter action.
  *
  * @param[in] ctx
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index 562fb5cbb4..90f2f17bd0 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -1319,6 +1319,13 @@ mlx5dr_action_create_tag(struct mlx5dr_context *ctx,
 	return NULL;
 }
 
+struct mlx5dr_action *
+mlx5dr_action_create_last(struct mlx5dr_context *ctx,
+			  uint32_t flags)
+{
+	return mlx5dr_action_create_generic(ctx, flags, MLX5DR_ACTION_TYP_LAST);
+}
+
 static struct mlx5dr_action *
 mlx5dr_action_create_aso(struct mlx5dr_context *ctx,
 			 enum mlx5dr_action_type action_type,
@@ -3005,6 +3012,8 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
 		for (i = 0; i < MLX5DR_ACTION_NAT64_STAGES; i++)
 			mlx5dr_action_destroy(action->nat64.stages[i]);
 		break;
+	case MLX5DR_ACTION_TYP_LAST:
+		break;
 	}
 }
 
-- 
2.25.1


  reply	other threads:[~2024-06-03 10:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02 10:26 [PATCH 1/3] net/mlx5/hws: split the root rule creation and destruction Maayan Kashani
2024-06-03 10:43 ` [PATCH v3 " Maayan Kashani
2024-06-03 10:43   ` Maayan Kashani [this message]
2024-06-03 10:43   ` [PATCH v3 3/3] net/mlx5/hws: add support for backward-compatible API Maayan Kashani
2024-06-06 10:31   ` [PATCH v4 0/3] HWS non-template support Maayan Kashani
2024-06-06 10:31     ` [PATCH v4 1/3] net/mlx5/hws: split the root rule creation and destruction Maayan Kashani
2024-06-06 10:31     ` [PATCH v4 2/3] net/mlx5/hws: add support for action type LAST Maayan Kashani
2024-06-06 10:31     ` [PATCH v4 3/3] net/mlx5/hws: add support for backward-compatible API Maayan Kashani
2024-06-10  8:33     ` [PATCH v4 0/3] HWS non-template support Raslan Darawsheh

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=20240603104357.9437-2-mkashani@nvidia.com \
    --to=mkashani@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=kliteyn@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@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).