DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rongwei Liu <rongweil@nvidia.com>
To: <dev@dpdk.org>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,
	<orika@nvidia.com>, <suanmingm@nvidia.com>, <thomas@monjalon.net>
Cc: Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	"Ferruh Yigit" <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [PATCH v8 2/3] ethdev: add VXLAN last reserved field
Date: Fri, 7 Jun 2024 17:02:07 +0300	[thread overview]
Message-ID: <20240607140208.315235-3-rongweil@nvidia.com> (raw)
In-Reply-To: <20240607140208.315235-1-rongweil@nvidia.com>

Add "uint8_t last_rsvd" as union with origin rsvd1.
Add RTE_FLOW_FIELD_VXLAN_LAST_RSVD into rte flow packet
field.

The new union is used by testpmd matching item VXLAN
"last_rsvd" and modify target RTE_FLOW_FIELD_VXLAN_LAST_RSVD.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-pmd/cmdline_flow.c | 5 +++--
 lib/ethdev/rte_flow.h       | 1 +
 lib/net/rte_vxlan.h         | 5 ++++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 775ce20fc4..99e2db04df 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -1006,6 +1006,7 @@ static const char *const flow_field_ids[] = {
 	"ipv6_flow_label", "ipv6_traffic_class",
 	"esp_spi", "esp_seq_num", "esp_proto",
 	"random",
+	"vxlan_last_rsvd",
 	NULL
 };
 
@@ -4912,11 +4913,11 @@ static const struct token token_list[] = {
 	},
 	[ITEM_VXLAN_LAST_RSVD] = {
 		.name = "last_rsvd",
-		.help = "VXLAN last reserved bits",
+		.help = "VXLAN last reserved byte",
 		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan,
-					     hdr.rsvd1)),
+					     hdr.last_rsvd)),
 	},
 	[ITEM_E_TAG] = {
 		.name = "e_tag",
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 6e8ab1d4c7..74cf2e0f59 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -2428,6 +2428,7 @@ enum rte_flow_field_id {
 	RTE_FLOW_FIELD_ESP_SEQ_NUM,     /**< ESP Sequence Number. */
 	RTE_FLOW_FIELD_ESP_PROTO,       /**< ESP next protocol value. */
 	RTE_FLOW_FIELD_RANDOM,          /**< Random value. */
+	RTE_FLOW_FIELD_VXLAN_LAST_RSVD, /**< VXLAN last reserved byte. */
 };
 
 /**
diff --git a/lib/net/rte_vxlan.h b/lib/net/rte_vxlan.h
index 997fc784fc..57300fb442 100644
--- a/lib/net/rte_vxlan.h
+++ b/lib/net/rte_vxlan.h
@@ -41,7 +41,10 @@ struct rte_vxlan_hdr {
 			uint8_t    flags;    /**< Should be 8 (I flag). */
 			uint8_t    rsvd0[3]; /**< Reserved. */
 			uint8_t    vni[3];   /**< VXLAN identifier. */
-			uint8_t    rsvd1;    /**< Reserved. */
+			union {
+				uint8_t    rsvd1;        /**< Reserved. */
+				uint8_t    last_rsvd;    /**< Reserved. */
+			};
 		};
 	};
 } __rte_packed;
-- 
2.27.0


  parent reply	other threads:[~2024-06-07 14:03 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23  7:28 [PATCH v1 0/3] support VXLAN rsvd1 modification Rongwei Liu
2024-05-23  7:28 ` [PATCH v1 1/3] ethdev: add VXLAN last reserved field Rongwei Liu
2024-05-23  7:28 ` [PATCH v1 2/3] app/testpmd: add VXLAN last reserved modification command Rongwei Liu
2024-05-24 15:53   ` Dariusz Sosnowski
2024-05-27  2:47     ` [PATCH v2 0/4] support VXLAN rsvd1 modification Rongwei Liu
2024-05-27  2:47       ` [PATCH v2 1/4] app/testpmd: fix the testpmd field string sequence Rongwei Liu
2024-05-30  8:22         ` rongwei liu
2024-06-03  7:30         ` Dariusz Sosnowski
2024-05-27  2:47       ` [PATCH v2 2/4] ethdev: add VXLAN last reserved field Rongwei Liu
2024-06-04 11:27         ` rongwei liu
2024-06-04 11:59         ` Thomas Monjalon
2024-06-04 12:06           ` rongwei liu
2024-06-04 12:14           ` [PATCH v3 0/3] support VXLAN rsvd1 modification Rongwei Liu
2024-06-04 12:15             ` [PATCH v3 1/3] app/testpmd: fix the testpmd field string sequence Rongwei Liu
2024-06-04 12:15             ` [PATCH v3 2/3] ethdev: add VXLAN last reserved field Rongwei Liu
2024-06-04 12:15             ` [PATCH v3 3/3] net/mlx5: implement VXLAN last reserved modification Rongwei Liu
2024-05-27  2:47       ` [PATCH v2 3/4] app/testpmd: add VXLAN last reserved modification command Rongwei Liu
2024-06-04 12:00         ` Thomas Monjalon
2024-05-27  2:47       ` [PATCH v2 4/4] net/mlx5: implement VXLAN last reserved modification Rongwei Liu
2024-06-04 12:19         ` Thomas Monjalon
2024-06-04 12:24           ` rongwei liu
2024-06-04 12:38           ` [PATCH v4 0/3] support VXLAN rsvd1 modification Rongwei Liu
2024-06-04 12:38             ` [PATCH v4 1/3] app/testpmd: fix the testpmd field string sequence Rongwei Liu
2024-06-04 12:38             ` [PATCH v4 2/3] ethdev: add VXLAN last reserved field Rongwei Liu
2024-06-04 15:03               ` Thomas Monjalon
2024-06-04 16:29                 ` rongwei liu
2024-06-04 16:40                   ` Dariusz Sosnowski
2024-06-04 18:37                     ` Thomas Monjalon
2024-06-05  1:16                       ` rongwei liu
2024-06-05  7:13                         ` Thomas Monjalon
2024-06-05  8:14                           ` rongwei liu
2024-06-05  9:35                             ` Thomas Monjalon
2024-06-05  9:41                               ` rongwei liu
2024-06-05  9:53                                 ` Thomas Monjalon
2024-06-05 10:21                                   ` [PATCH v6 0/4] support VXLAN last reserved byte modification Rongwei Liu
2024-06-05 10:21                                     ` [PATCH v6 1/4] app/testpmd: fix the testpmd field string sequence Rongwei Liu
2024-06-09 14:29                                       ` Ori Kam
2024-06-05 10:21                                     ` [PATCH v6 2/4] net: add new union into VXLAN header Rongwei Liu
2024-06-05 10:42                                       ` Thomas Monjalon
2024-06-05 11:28                                         ` rongwei liu
2024-06-05 12:14                                           ` Thomas Monjalon
2024-06-05 13:04                                             ` [PATCH v7 0/3] support VXLAN last reserved byte modification Rongwei Liu
2024-06-05 13:04                                               ` [PATCH v7 1/3] app/testpmd: fix the testpmd field string sequence Rongwei Liu
2024-06-05 13:04                                               ` [PATCH v7 2/3] ethdev: add VXLAN last reserved field Rongwei Liu
2024-06-07 13:25                                                 ` Thomas Monjalon
2024-06-07 13:55                                                   ` rongwei liu
2024-06-07 14:02                                                   ` [PATCH v8 0/3] support VXLAN last reserved byte modification Rongwei Liu
2024-06-07 14:02                                                     ` [PATCH v8 1/3] app/testpmd: fix the testpmd field string sequence Rongwei Liu
2024-06-11  6:59                                                       ` Ori Kam
2024-06-11 14:52                                                       ` Ferruh Yigit
2024-06-07 14:02                                                     ` Rongwei Liu [this message]
2024-06-09 10:32                                                       ` [PATCH v8 2/3] ethdev: add VXLAN last reserved field Thomas Monjalon
2024-06-11 14:52                                                       ` Ferruh Yigit
2024-06-12  1:25                                                         ` rongwei liu
2024-06-25 14:46                                                           ` Thomas Monjalon
2024-06-07 14:02                                                     ` [PATCH v8 3/3] net/mlx5: implement VXLAN last reserved modification Rongwei Liu
2024-06-11 14:52                                                     ` [PATCH v8 0/3] support VXLAN last reserved byte modification Ferruh Yigit
2024-06-05 13:04                                               ` [PATCH v7 3/3] net/mlx5: implement VXLAN last reserved modification Rongwei Liu
2024-06-05 10:21                                     ` [PATCH v6 3/4] ethdev: add VXLAN last reserved field Rongwei Liu
2024-06-05 10:21                                     ` [PATCH v6 4/4] net/mlx5: implement VXLAN last reserved modification Rongwei Liu
2024-06-05  8:41                           ` [PATCH v5 0/3] support VXLAN last reserved byte modification Rongwei Liu
2024-06-05  8:41                             ` [PATCH v5 1/3] app/testpmd: fix the testpmd field string sequence Rongwei Liu
2024-06-05  8:41                             ` [PATCH v5 2/3] ethdev: add VXLAN last reserved field Rongwei Liu
2024-06-05  8:41                             ` [PATCH v5 3/3] net/mlx5: implement VXLAN last reserved modification Rongwei Liu
2024-06-04 12:38             ` [PATCH v4 " Rongwei Liu
2024-05-27  2:56     ` [PATCH v1 2/3] app/testpmd: add VXLAN last reserved modification command rongwei liu
2024-05-23  7:28 ` [PATCH v1 3/3] net/mlx5: implement VXLAN last reserved modification Rongwei Liu

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=20240607140208.315235-3-rongweil@nvidia.com \
    --to=rongweil@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=ferruh.yigit@amd.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=yuying.zhang@intel.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).