patch 'net/iavf: fix Tx preparation' has been queued to stable release 20.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Nov 8 20:25:34 CET 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 11/10/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/f2d782858db14fc7867179c79a73274ac4dc101e

Thanks.

Luca Boccassi

---
>From f2d782858db14fc7867179c79a73274ac4dc101e Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Thu, 2 Nov 2023 08:05:04 -0400
Subject: [PATCH] net/iavf: fix Tx preparation

[ upstream commit 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e ]

1. check nb_segs > Tx ring size for TSO case.
2. report nb_mtu_seg_max and nb_seg_max in dev_info.

Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Qiming Yang <qiming.yang at intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 ++
 drivers/net/iavf/iavf_rxtx.c   | 7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index b6ace7e005..643c73a488 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -843,6 +843,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		.nb_max = IAVF_MAX_RING_DESC,
 		.nb_min = IAVF_MIN_RING_DESC,
 		.nb_align = IAVF_ALIGN_RING_DESC,
+		.nb_mtu_seg_max = IAVF_TX_MAX_MTU_SEG,
+		.nb_seg_max = IAVF_MAX_RING_DESC,
 	};
 
 	return 0;
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index fb6694f4cd..7daaa0dbc2 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2347,12 +2347,12 @@ end_of_tx:
 
 /* TX prep functions */
 uint16_t
-iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
-	      uint16_t nb_pkts)
+iavf_prep_pkts(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;
 
 	for (i = 0; i < nb_pkts; i++) {
 		m = tx_pkts[i];
@@ -2365,7 +2365,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 				return i;
 			}
 		} else if ((m->tso_segsz < IAVF_MIN_TSO_MSS) ||
-			   (m->tso_segsz > IAVF_MAX_TSO_MSS)) {
+			   (m->tso_segsz > IAVF_MAX_TSO_MSS) ||
+			   (m->nb_segs > txq->nb_tx_desc)) {
 			/* MSS outside the range are considered malicious */
 			rte_errno = EINVAL;
 			return i;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-08 19:23:53.666746255 +0000
+++ 0036-net-iavf-fix-Tx-preparation.patch	2023-11-08 19:23:51.833397534 +0000
@@ -1 +1 @@
-From 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e Mon Sep 17 00:00:00 2001
+From f2d782858db14fc7867179c79a73274ac4dc101e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -16,2 +17,2 @@
- drivers/net/iavf/iavf_rxtx.c   | 3 ++-
- 2 files changed, 4 insertions(+), 1 deletion(-)
+ drivers/net/iavf/iavf_rxtx.c   | 7 ++++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
@@ -20 +21 @@
-index 98cc5c8ea8..0c6ab4ac5a 100644
+index b6ace7e005..643c73a488 100644
@@ -23 +24 @@
-@@ -1207,6 +1207,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -843,6 +843,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -31 +32 @@
- 	dev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;
+ 	return 0;
@@ -33 +34 @@
-index 610912f635..45f638c1d2 100644
+index fb6694f4cd..7daaa0dbc2 100644
@@ -36 +37,16 @@
-@@ -3656,7 +3656,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2347,12 +2347,12 @@ end_of_tx:
+ 
+ /* TX prep functions */
+ uint16_t
+-iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+-	      uint16_t nb_pkts)
++iavf_prep_pkts(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;
+ 
+ 	for (i = 0; i < nb_pkts; i++) {
+ 		m = tx_pkts[i];
+@@ -2365,7 +2365,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,


More information about the stable mailing list