patch 'net/gve: fix Tx for chained mbuf' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Mon Nov 11 07:28:00 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 11/30/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=32d8e5279beaacefe5e7cf91f4d265ac87667ce6

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 32d8e5279beaacefe5e7cf91f4d265ac87667ce6 Mon Sep 17 00:00:00 2001
From: Tathagat Priyadarshi <tathagat.dpdk at gmail.com>
Date: Fri, 2 Aug 2024 05:08:08 +0000
Subject: [PATCH] net/gve: fix Tx for chained mbuf
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 21b1d725e5a6cd38fe28d83c1f6cf00d80643b31 ]

The EOP and CSUM bit was not set for all the packets in mbuf chain
causing packet transmission stalls for packets split across
mbuf in chain.

Fixes: 4022f9999f56 ("net/gve: support basic Tx data path for DQO")

Signed-off-by: Tathagat Priyadarshi <tathagat.dpdk at gmail.com>
Signed-off-by: Varun Lakkur Ambaji Rao <varun.la at gmail.com>
Acked-by: Joshua Washington <joshwash at google.com>
---
 .mailmap                     | 1 +
 drivers/net/gve/gve_ethdev.h | 2 ++
 drivers/net/gve/gve_tx_dqo.c | 9 ++++++---
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index a72dce1a61..5f2593e00e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1489,6 +1489,7 @@ Vadim Suraev <vadim.suraev at gmail.com>
 Vakul Garg <vakul.garg at nxp.com>
 Vamsi Attunuru <vattunuru at marvell.com>
 Vanshika Shukla <vanshika.shukla at nxp.com>
+Varun Lakkur Ambaji Rao <varun.la at gmail.com>
 Varun Sethi <v.sethi at nxp.com>
 Vasily Philipov <vasilyf at mellanox.com>
 Veerasenareddy Burru <vburru at marvell.com>
diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h
index 58d8943e71..133860488c 100644
--- a/drivers/net/gve/gve_ethdev.h
+++ b/drivers/net/gve/gve_ethdev.h
@@ -33,6 +33,8 @@
 		RTE_MBUF_F_TX_L4_MASK  |	\
 		RTE_MBUF_F_TX_TCP_SEG)

+#define GVE_TX_CKSUM_OFFLOAD_MASK_DQO (GVE_TX_CKSUM_OFFLOAD_MASK | RTE_MBUF_F_TX_IP_CKSUM)
+
 /* A list of pages registered with the device during setup and used by a queue
  * as buffers
  */
diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index 97d9c6549b..b9d6d01749 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -89,6 +89,7 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint16_t sw_id;
 	uint64_t bytes;
 	uint16_t first_sw_id;
+	uint8_t csum;

 	sw_ring = txq->sw_ring;
 	txr = txq->tx_ring;
@@ -114,6 +115,9 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		ol_flags = tx_pkt->ol_flags;
 		nb_used = tx_pkt->nb_segs;
 		first_sw_id = sw_id;
+
+		csum = !!(ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO);
+
 		do {
 			if (sw_ring[sw_id] != NULL)
 				PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring");
@@ -126,6 +130,8 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			txd->pkt.dtype = GVE_TX_PKT_DESC_DTYPE_DQO;
 			txd->pkt.compl_tag = rte_cpu_to_le_16(first_sw_id);
 			txd->pkt.buf_size = RTE_MIN(tx_pkt->data_len, GVE_TX_MAX_BUF_SIZE_DQO);
+			txd->pkt.end_of_packet = 0;
+			txd->pkt.checksum_offload_enable = csum;

 			/* size of desc_ring and sw_ring could be different */
 			tx_id = (tx_id + 1) & mask;
@@ -138,9 +144,6 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		/* fill the last descriptor with End of Packet (EOP) bit */
 		txd->pkt.end_of_packet = 1;

-		if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK)
-			txd->pkt.checksum_offload_enable = 1;
-
 		txq->nb_free -= nb_used;
 		txq->nb_used += nb_used;
 	}
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-11 14:23:08.630247869 +0800
+++ 0074-net-gve-fix-Tx-for-chained-mbuf.patch	2024-11-11 14:23:05.182192838 +0800
@@ -1 +1 @@
-From 21b1d725e5a6cd38fe28d83c1f6cf00d80643b31 Mon Sep 17 00:00:00 2001
+From 32d8e5279beaacefe5e7cf91f4d265ac87667ce6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 21b1d725e5a6cd38fe28d83c1f6cf00d80643b31 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -17,0 +20 @@
+ drivers/net/gve/gve_ethdev.h | 2 ++
@@ -19 +22 @@
- 2 files changed, 7 insertions(+), 3 deletions(-)
+ 3 files changed, 9 insertions(+), 3 deletions(-)
@@ -22 +25 @@
-index 3abb37673b..995a6f0553 100644
+index a72dce1a61..5f2593e00e 100644
@@ -25 +28,2 @@
-@@ -1553,6 +1553,7 @@ Vakul Garg <vakul.garg at nxp.com>
+@@ -1489,6 +1489,7 @@ Vadim Suraev <vadim.suraev at gmail.com>
+ Vakul Garg <vakul.garg at nxp.com>
@@ -27 +30,0 @@
- Vamsi Krishna Atluri <vamsi.atluri at amd.com>
@@ -32,0 +36,13 @@
+diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h
+index 58d8943e71..133860488c 100644
+--- a/drivers/net/gve/gve_ethdev.h
++++ b/drivers/net/gve/gve_ethdev.h
+@@ -33,6 +33,8 @@
+ 		RTE_MBUF_F_TX_L4_MASK  |	\
+ 		RTE_MBUF_F_TX_TCP_SEG)
+
++#define GVE_TX_CKSUM_OFFLOAD_MASK_DQO (GVE_TX_CKSUM_OFFLOAD_MASK | RTE_MBUF_F_TX_IP_CKSUM)
++
+ /* A list of pages registered with the device during setup and used by a queue
+  * as buffers
+  */
@@ -34 +50 @@
-index 1b85557a15..b9d6d01749 100644
+index 97d9c6549b..b9d6d01749 100644
@@ -68 +84 @@
--		if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO)
+-		if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK)


More information about the stable mailing list