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

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:47:32 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

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/31/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=de2d362411cbc91c28216db27330f5d6f6bb7635

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From de2d362411cbc91c28216db27330f5d6f6bb7635 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 55901a26c0..9541b3b02e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -34,6 +34,7 @@ Alain Leon <xerebz at gmail.com>
 Alan Brady <alan.brady at intel.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>
 Alejandro Lucero <alejandro.lucero at netronome.com>
diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
index ce073ea818..75285bdd12 100644
--- a/lib/net/rte_ether.h
+++ b/lib/net/rte_ether.h
@@ -46,6 +46,20 @@ 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:
  * A universally administered address is uniquely assigned to a device by its
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.305307010 +0800
+++ 0111-net-add-macros-for-VLAN-metadata-parsing.patch	2024-03-05 17:39:30.903566497 +0800
@@ -1 +1 @@
-From b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc Mon Sep 17 00:00:00 2001
+From de2d362411cbc91c28216db27330f5d6f6bb7635 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index b2d0fc0729..12d2875641 100644
+index 55901a26c0..9541b3b02e 100644


More information about the stable mailing list