DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Savisko <michaelsav@nvidia.com>
To: <dev@dpdk.org>
Cc: <michaelsav@nvidia.com>, <orika@nvidia.com>,
	<viacheslavo@nvidia.com>, <asafp@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Subject: [PATCH 03/10] common/mlx5: new glue callback for send to kernel action
Date: Tue, 20 Sep 2022 17:04:15 +0300	[thread overview]
Message-ID: <20220920140422.98165-4-michaelsav@nvidia.com> (raw)
In-Reply-To: <20220920140422.98165-1-michaelsav@nvidia.com>

Add new glue callback dr_create_flow_action_send_to_kernel.
Default callback invokes mlx5dv_dr_action_create_dest_root_table().

Signed-off-by: Michael Savisko <michaelsav@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_glue.c | 17 +++++++++++++++++
 drivers/common/mlx5/linux/mlx5_glue.h |  2 ++
 2 files changed, 19 insertions(+)

diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index 450dd6a06a..b954df0784 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -1434,6 +1434,21 @@ mlx5_glue_dv_free_pp(struct mlx5dv_pp *pp)
 #endif
 }
 
+static void *
+mlx5_glue_dr_create_flow_action_send_to_kernel(void *tbl, uint16_t priority)
+{
+#ifdef HAVE_MLX5DV_DR_ACTION_CREATE_DEST_ROOT_TABLE
+	struct mlx5dv_dr_table *table = (struct mlx5dv_dr_table *)tbl;
+
+	return mlx5dv_dr_action_create_dest_root_table(table, priority);
+#else
+	RTE_SET_USED(tbl);
+	RTE_SET_USED(priority);
+	errno = ENOTSUP;
+	return NULL;
+#endif
+}
+
 __rte_cache_aligned
 const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
 	.version = MLX5_GLUE_VERSION,
@@ -1561,4 +1576,6 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
 	.dv_free_var = mlx5_glue_dv_free_var,
 	.dv_alloc_pp = mlx5_glue_dv_alloc_pp,
 	.dv_free_pp = mlx5_glue_dv_free_pp,
+	.dr_create_flow_action_send_to_kernel =
+		mlx5_glue_dr_create_flow_action_send_to_kernel,
 };
diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h
index c4903a6dce..9616dfdd06 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.h
+++ b/drivers/common/mlx5/linux/mlx5_glue.h
@@ -373,6 +373,8 @@ struct mlx5_glue {
 	void *(*dv_create_flow_action_aso)
 			(struct mlx5dv_dr_domain *domain, void *aso_obj,
 			 uint32_t offset, uint32_t flags, uint8_t return_reg_c);
+	void *(*dr_create_flow_action_send_to_kernel)(void *tbl,
+						      uint16_t priority);
 };
 
 extern const struct mlx5_glue *mlx5_glue;
-- 
2.27.0


  parent reply	other threads:[~2022-09-20 14:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 14:04 [PATCH 00/10] net/mlx5: implement " Michael Savisko
2022-09-20 14:04 ` [PATCH 01/10] common/mlx5: update meson build file Michael Savisko
2022-09-20 14:04 ` [PATCH 02/10] net/mlx5: disable send to kernel action in HW streering Michael Savisko
2022-09-20 14:04 ` Michael Savisko [this message]
2022-09-20 14:04 ` [PATCH 04/10] net/mlx5: add function to create send to kernel action Michael Savisko
2022-09-20 14:04 ` [PATCH 05/10] net/mlx5: introduce new mlx5 action flag Michael Savisko
2022-09-20 14:04 ` [PATCH 06/10] net/mlx5: introduce new mlx5 flow fate Michael Savisko
2022-09-20 14:04 ` [PATCH 07/10] net/mlx5: get priority to send traffic to kernel Michael Savisko
2022-09-20 14:04 ` [PATCH 08/10] net/mlx5: expose table resource release function Michael Savisko
2022-09-20 14:04 ` [PATCH 09/10] net/mlx5: add send to kernel action resource holder Michael Savisko
2022-09-20 14:04 ` [PATCH 10/10] net/mlx5: translation of rte flow send to kernel action Michael Savisko

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=20220920140422.98165-4-michaelsav@nvidia.com \
    --to=michaelsav@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@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).