patch 'net/iavf: fix TSO with big segments' has been queued to stable release 20.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Oct 19 01:59:23 CEST 2023


Hi,

FYI, your patch has been queued to stable release 20.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/21/23. 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/dc9a211b46bc452b1f1dda47bc7648529bc30879

Thanks.

Luca Boccassi

---
>From dc9a211b46bc452b1f1dda47bc7648529bc30879 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 27 Sep 2023 11:41:46 +0200
Subject: [PATCH] net/iavf: fix TSO with big segments

[ upstream commit 8a1a5327ba71a19d8a6e1b9ceb5563b4af2c2029 ]

Packets to be segmented with TSO are usually larger than MTU.
Plus, a single segment for the whole packet may be used: in OVS case,
an external rte_malloc'd buffer is used for packets received
from vhost-user ports.

Before this fix, TSO packets were dropped by net/iavf with the following
message:
2023-09-18T14:08:52.739Z|00610|dpdk(pmd-c31/id:11)|ERR|iavf_prep_pkts():
	INVALID mbuf: bad data_len=[2962]

Remove the check on data_len.

Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 66a81197fd..fb6694f4cd 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2347,15 +2347,12 @@ end_of_tx:
 
 /* TX prep functions */
 uint16_t
-iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 	      uint16_t nb_pkts)
 {
 	int i, ret;
 	uint64_t ol_flags;
 	struct rte_mbuf *m;
-	struct iavf_tx_queue *txq = tx_queue;
-	struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id];
-	uint16_t max_frame_size = dev->data->mtu + IAVF_ETH_OVERHEAD;
 
 	for (i = 0; i < nb_pkts; i++) {
 		m = tx_pkts[i];
@@ -2379,9 +2376,7 @@ iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-		/* check the data_len in mbuf */
-		if (m->data_len < IAVF_TX_MIN_PKT_LEN ||
-			m->data_len > max_frame_size) {
+		if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) {
 			rte_errno = EINVAL;
 			return i;
 		}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-19 00:28:57.956544264 +0100
+++ 0034-net-iavf-fix-TSO-with-big-segments.patch	2023-10-19 00:28:56.297806636 +0100
@@ -1 +1 @@
-From 8a1a5327ba71a19d8a6e1b9ceb5563b4af2c2029 Mon Sep 17 00:00:00 2001
+From dc9a211b46bc452b1f1dda47bc7648529bc30879 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a1a5327ba71a19d8a6e1b9ceb5563b4af2c2029 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -24,2 +25,2 @@
- drivers/net/iavf/iavf_rxtx.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
+ drivers/net/iavf/iavf_rxtx.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
@@ -28 +29 @@
-index 21a06b8351..c6ef6af1d8 100644
+index 66a81197fd..fb6694f4cd 100644
@@ -31 +32,10 @@
-@@ -3636,7 +3636,6 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2347,15 +2347,12 @@ end_of_tx:
+ 
+ /* TX prep functions */
+ uint16_t
+-iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
++iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+ 	      uint16_t nb_pkts)
+ {
+ 	int i, ret;
+ 	uint64_t ol_flags;
@@ -33,2 +43,2 @@
- 	struct iavf_tx_queue *txq = tx_queue;
- 	struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id];
+-	struct iavf_tx_queue *txq = tx_queue;
+-	struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id];
@@ -36,2 +45,0 @@
- 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
- 	struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
@@ -39 +47,3 @@
-@@ -3665,9 +3664,7 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+ 	for (i = 0; i < nb_pkts; i++) {
+ 		m = tx_pkts[i];
+@@ -2379,9 +2376,7 @@ iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,


More information about the stable mailing list