patch 'net: add macros for VLAN metadata parsing' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:34:29 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d100a5e79625ddcd2617f39b3147a16f658c0a70

Thanks.

Kevin

---
>From d100a5e79625ddcd2617f39b3147a16f658c0a70 Mon Sep 17 00:00:00 2001
From: Alan Elder <alan.elder at microsoft.com>
Date: Mon, 19 Feb 2024 09:31:25 +0000
Subject: [PATCH] net: add macros for VLAN metadata parsing

[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ]

Add common macros for extracting parts of VLAN tag.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Alan Elder <alan.elder at microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 .mailmap            |  1 +
 lib/net/rte_ether.h | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/.mailmap b/.mailmap
index 5891d511a4..dde19c1fe8 100644
--- a/.mailmap
+++ b/.mailmap
@@ -32,4 +32,5 @@ Alain Leon <xerebz at gmail.com>
 Alan Carew <alan.carew at intel.com>
 Alan Dewar <alan.dewar at att.com> <adewar at brocade.com>
+Alan Elder <alan.elder at microsoft.com>
 Alan Liu <zaoxingliu at gmail.com>
 Alan Winkowski <walan at marvell.com>
diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
index 3d9852d9e2..1d84fc1098 100644
--- a/lib/net/rte_ether.h
+++ b/lib/net/rte_ether.h
@@ -48,4 +48,18 @@ extern "C" {
 #define RTE_ETHER_MIN_MTU 68 /**< Minimum MTU for IPv4 packets, see RFC 791. */
 
+/* VLAN header fields */
+#define RTE_VLAN_DEI_SHIFT	12
+#define RTE_VLAN_PRI_SHIFT	13
+#define RTE_VLAN_PRI_MASK	0xe000 /* Priority Code Point */
+#define RTE_VLAN_DEI_MASK	0x1000 /* Drop Eligible Indicator */
+#define RTE_VLAN_ID_MASK	0x0fff /* VLAN Identifier */
+
+#define RTE_VLAN_TCI_ID(vlan_tci)	((vlan_tci) & RTE_VLAN_ID_MASK)
+#define RTE_VLAN_TCI_PRI(vlan_tci)	(((vlan_tci) & RTE_VLAN_PRI_MASK) >> RTE_VLAN_PRI_SHIFT)
+#define RTE_VLAN_TCI_DEI(vlan_tci)	(((vlan_tci) & RTE_VLAN_DEI_MASK) >> RTE_VLAN_DEI_SHIFT)
+#define RTE_VLAN_TCI_MAKE(id, pri, dei)	((id) |					\
+					 ((pri) << RTE_VLAN_PRI_SHIFT) |	\
+					 ((dei) << RTE_VLAN_DEI_SHIFT))
+
 /**
  * Ethernet address:
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.978579391 +0000
+++ 0056-net-add-macros-for-VLAN-metadata-parsing.patch	2024-03-05 14:08:54.700520898 +0000
@@ -1 +1 @@
-From b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc Mon Sep 17 00:00:00 2001
+From d100a5e79625ddcd2617f39b3147a16f658c0a70 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index b2d0fc0729..12d2875641 100644
+index 5891d511a4..dde19c1fe8 100644
@@ -22 +23 @@
-@@ -35,4 +35,5 @@ Alan Brady <alan.brady at intel.com>
+@@ -32,4 +32,5 @@ Alain Leon <xerebz at gmail.com>
@@ -29 +30 @@
-index ce073ea818..75285bdd12 100644
+index 3d9852d9e2..1d84fc1098 100644
@@ -32 +33 @@
-@@ -47,4 +47,18 @@ extern "C" {
+@@ -48,4 +48,18 @@ extern "C" {



More information about the stable mailing list