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

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:26 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

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/13/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=8dc1b42e316533093bf23e2dd1249f442a8ca2fc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8dc1b42e316533093bf23e2dd1249f442a8ca2fc 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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   | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index fce56d33cc..62d72a0155 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1183,6 +1183,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,
 	};
 
 	dev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 63e7de41c3..6a0cf31a4c 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2993,7 +2993,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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:25.097441900 +0800
+++ 0061-net-iavf-fix-Tx-preparation.patch	2023-12-11 17:56:23.057652300 +0800
@@ -1 +1 @@
-From 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e Mon Sep 17 00:00:00 2001
+From 8dc1b42e316533093bf23e2dd1249f442a8ca2fc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 98cc5c8ea8..0c6ab4ac5a 100644
+index fce56d33cc..62d72a0155 100644
@@ -23 +25 @@
-@@ -1207,6 +1207,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1183,6 +1183,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -33 +35 @@
-index 610912f635..45f638c1d2 100644
+index 63e7de41c3..6a0cf31a4c 100644
@@ -36 +38 @@
-@@ -3656,7 +3656,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2993,7 +2993,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,


More information about the stable mailing list