patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' has been queued to stable release 22.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Nov 12 23:07:31 CET 2024
Hi,
FYI, your patch has been queued to stable release 22.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 11/14/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/19fe4f972bb03c453127acd784f139791c62dbf1
Thanks.
Luca Boccassi
---
>From 19fe4f972bb03c453127acd784f139791c62dbf1 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
[ 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 fc9df9f3b4..080cab4464 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.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-11-12 22:06:59.353468525 +0000
+++ 0021-net-netvsc-force-Tx-VLAN-offload-on-801.2Q-packet.patch 2024-11-12 22:06:58.667307202 +0000
@@ -1 +1 @@
-From 06c968f9ba8afeaf03b60871a453652a5828ff3f Mon Sep 17 00:00:00 2001
+From 19fe4f972bb03c453127acd784f139791c62dbf1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 52aedb001f..9d3948e03d 100644
+index fc9df9f3b4..080cab4464 100644
@@ -23 +24 @@
-@@ -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