patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' has been queued to stable release 23.11.3
Xueming Li
xuemingl at nvidia.com
Sat Dec 7 08:59:46 CET 2024
Hi,
FYI, your patch has been queued to stable release 23.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/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=9458e5b98f1d4c71dc0baeb88c0963033c8ebc69
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 9458e5b98f1d4c71dc0baeb88c0963033c8ebc69 Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Fri, 18 Oct 2024 11:13:50 -0700
Subject: [PATCH] net/netvsc: force Tx VLAN offload on 801.2Q packet
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ]
The VSP assumes the packet doesn't have VLAN tags. When VLAN tag is
present in a TX packet, always strip it and use PPI to send VLAN info
through VSP packet.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Signed-off-by: Long Li <longli at microsoft.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/net/netvsc/hn_rxtx.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 5777a14d70..eea120ae82 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1569,14 +1569,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
struct rte_mbuf *m = tx_pkts[nb_tx];
- uint32_t pkt_size = m->pkt_len + HN_RNDIS_PKT_LEN;
struct rndis_packet_msg *pkt;
struct hn_txdesc *txd;
+ uint32_t pkt_size;
txd = hn_txd_get(txq);
if (txd == NULL)
break;
+ if (!(m->ol_flags & RTE_MBUF_F_TX_VLAN)) {
+ struct rte_ether_hdr *eh =
+ rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
+ struct rte_vlan_hdr *vh;
+
+ /* Force TX vlan offloading for 801.2Q packet */
+ if (eh->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN)) {
+ vh = (struct rte_vlan_hdr *)(eh + 1);
+ m->ol_flags |= RTE_MBUF_F_TX_VLAN;
+ m->vlan_tci = rte_be_to_cpu_16(vh->vlan_tci);
+
+ /* Copy ether header over */
+ memmove(rte_pktmbuf_adj(m, sizeof(struct rte_vlan_hdr)),
+ eh, 2 * RTE_ETHER_ADDR_LEN);
+ }
+ }
+ pkt_size = m->pkt_len + HN_RNDIS_PKT_LEN;
+
/* For small packets aggregate them in chimney buffer */
if (m->pkt_len <= hv->tx_copybreak &&
pkt_size <= txq->agg_szmax) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-12-06 23:26:45.052428615 +0800
+++ 0028-net-netvsc-force-Tx-VLAN-offload-on-801.2Q-packet.patch 2024-12-06 23:26:43.913044828 +0800
@@ -1 +1 @@
-From 06c968f9ba8afeaf03b60871a453652a5828ff3f Mon Sep 17 00:00:00 2001
+From 9458e5b98f1d4c71dc0baeb88c0963033c8ebc69 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 52aedb001f..9d3948e03d 100644
+index 5777a14d70..eea120ae82 100644
@@ -23 +25 @@
-@@ -1557,14 +1557,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1569,14 +1569,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
More information about the stable
mailing list