DPDK patches and discussions
 help / color / mirror / Atom feed
From: Haifei Luo <haifeil@nvidia.com>
To: <dev@dpdk.org>
Cc: <orika@nvidia.com>, <viacheslavo@nvidia.com>,
	<rasland@nvidia.com>, <xuemingl@nvidia.com>, <haifeil@nvidia.com>,
	Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>
Subject: [PATCH v2 2/5] common/mlx5: extend HCA attribute query for NSH
Date: Mon, 25 Sep 2023 05:09:17 +0300	[thread overview]
Message-ID: <20230925020921.4607-3-haifeil@nvidia.com> (raw)
In-Reply-To: <20230925020921.4607-1-haifeil@nvidia.com>

Add NSH supporting field in two places:
1. New HCA capability indicating NSH is supported
2. New field in "mlx5_ifc_per_protocol_networking_offload_caps_bits"
   structure

Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 3 +++
 drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
 drivers/common/mlx5/mlx5_prm.h       | 4 +++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 66a77159a0..830199212e 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1313,6 +1313,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->tunnel_stateless_gtp = MLX5_GET
 					(per_protocol_networking_offload_caps,
 					 hcattr, tunnel_stateless_gtp);
+	attr->tunnel_stateless_vxlan_gpe_nsh = MLX5_GET
+					(per_protocol_networking_offload_caps,
+					 hcattr, tunnel_stateless_vxlan_gpe_nsh);
 	attr->rss_ind_tbl_cap = MLX5_GET
 					(per_protocol_networking_offload_caps,
 					 hcattr, rss_ind_tbl_cap);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index e071cd841f..11772431ae 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -196,6 +196,7 @@ struct mlx5_hca_attr {
 	uint32_t tunnel_stateless_geneve_rx:1;
 	uint32_t geneve_max_opt_len:1; /* 0x0: 14DW, 0x1: 63DW */
 	uint32_t tunnel_stateless_gtp:1;
+	uint32_t tunnel_stateless_vxlan_gpe_nsh:1;
 	uint32_t max_lso_cap;
 	uint32_t scatter_fcs:1;
 	uint32_t lro_cap:1;
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 51f426c614..f005877dd7 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -1964,7 +1964,9 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits {
 	u8 swp_lso[0x1];
 	u8 reserved_at_23[0x8];
 	u8 tunnel_stateless_gtp[0x1];
-	u8 reserved_at_25[0x4];
+	u8 reserved_at_25[0x2];
+	u8 tunnel_stateless_vxlan_gpe_nsh[0x1];
+	u8 reserved_at_28[0x1];
 	u8 max_vxlan_udp_ports[0x8];
 	u8 reserved_at_38[0x6];
 	u8 max_geneve_opt_len[0x1];
-- 
2.27.0


  parent reply	other threads:[~2023-09-25  2:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09  7:40 [PATCH 0/5] support item NSH matching Haifei Luo
2023-08-09  7:40 ` [PATCH 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-08-09  7:40 ` [PATCH 2/5] common/mlx5: extend HCA attribute query for NSH Haifei Luo
2023-08-09  7:40 ` [PATCH 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-08-09  7:40 ` [PATCH 4/5] app/testpmd: support for NSH flow item Haifei Luo
2023-08-09  7:40 ` [PATCH 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-09-25  2:09 ` [PATCH v2 0/5] support item NSH matching Haifei Luo
2023-09-25  2:09   ` [PATCH v2 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-09-25  2:09   ` Haifei Luo [this message]
2023-09-25  2:09   ` [PATCH v2 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-09-25  2:09   ` [PATCH v2 4/5] app/testpmd: support for NSH flow item Haifei Luo
2023-09-25  2:09   ` [PATCH v2 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-09-25  8:07   ` [PATCH v3 0/5] support item NSH matching Haifei Luo
2023-09-25  8:07     ` [PATCH v3 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-09-25  8:07     ` [PATCH v3 2/5] common/mlx5: extend HCA attribute query for NSH Haifei Luo
2023-09-25  8:07     ` [PATCH v3 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-09-25  8:07     ` [PATCH v3 4/5] app/testpmd: support for NSH flow item Haifei Luo
2023-09-25  8:07     ` [PATCH v3 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-10-08  3:10     ` [PATCH v4 0/5] support item NSH matching Haifei Luo
2023-10-08  3:10       ` [PATCH v4 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-10-08  3:10       ` [PATCH v4 2/5] common/mlx5: extend HCA attribute query for NSH Haifei Luo
2023-10-08  3:10       ` [PATCH v4 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-10-08  3:10       ` [PATCH v4 4/5] app/testpmd: support for NSH flow item Haifei Luo
2023-10-08  3:10       ` [PATCH v4 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-10-09 11:15       ` [PATCH v4 0/5] support item NSH matching Raslan Darawsheh
2023-10-16  9:27         ` Thomas Monjalon
2023-10-08 10:34   ` [PATCH v2 " 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=20230925020921.4607-3-haifeil@nvidia.com \
    --to=haifeil@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    --cc=xuemingl@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).