patch 'net/netvsc: fix VLAN metadata parsing' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:31:41 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

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/09/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From a254412faf34f120f418adebda45251262034212 Mon Sep 17 00:00:00 2001
From: Alan Elder <alan.elder at microsoft.com>
Date: Mon, 19 Feb 2024 09:31:39 +0000
Subject: [PATCH] net/netvsc: fix VLAN metadata parsing

[ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ]

The previous code incorrectly parsed the VLAN ID and priority.
If the 16-bits of VLAN ID and priority/CFI on the wire was
0123456789ABCDEF the code parsed it as 456789ABCDEF3012.  There
were macros defined to handle this conversion but they were not
used.

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

Signed-off-by: Alan Elder <alan.elder at microsoft.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/netvsc/hn_rxtx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index bc6f60c64a..6496979f28 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -612,7 +612,9 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 					   RTE_PTYPE_L4_MASK);
 
 	if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) {
-		m->vlan_tci = info->vlan_info;
+		m->vlan_tci = RTE_VLAN_TCI_MAKE(NDIS_VLAN_INFO_ID(info->vlan_info),
+						NDIS_VLAN_INFO_PRI(info->vlan_info),
+						NDIS_VLAN_INFO_CFI(info->vlan_info));
 		m->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_RX_VLAN;
 
 		/* NDIS always strips tag, put it back if necessary */
@@ -1332,7 +1334,9 @@ static void hn_encap(struct rndis_packet_msg *pkt,
 	if (m->ol_flags & RTE_MBUF_F_TX_VLAN) {
 		pi_data = hn_rndis_pktinfo_append(pkt, NDIS_VLAN_INFO_SIZE,
 						  NDIS_PKTINFO_TYPE_VLAN);
-		*pi_data = m->vlan_tci;
+		*pi_data = NDIS_VLAN_INFO_MAKE(RTE_VLAN_TCI_ID(m->vlan_tci),
+					       RTE_VLAN_TCI_PRI(m->vlan_tci),
+					       RTE_VLAN_TCI_DEI(m->vlan_tci));
 	}
 
 	if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.872835544 +0000
+++ 0084-net-netvsc-fix-VLAN-metadata-parsing.patch	2024-03-07 01:05:34.950943242 +0000
@@ -1 +1 @@
-From f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 Mon Sep 17 00:00:00 2001
+From a254412faf34f120f418adebda45251262034212 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index e4f5015aa3..9bf1ec5509 100644
+index bc6f60c64a..6496979f28 100644


More information about the stable mailing list