patch 'net/iavf: add segment-length check to Tx prep' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Sat Dec 7 09:00:35 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 12/10/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=ef3dab691fbfae50f5f9ead05f4f6e2503d1c386

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ef3dab691fbfae50f5f9ead05f4f6e2503d1c386 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Mon, 11 Nov 2024 16:42:20 +0000
Subject: [PATCH] net/iavf: add segment-length check to Tx prep
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ]

In the Tx prep function, the metadata checks were only checking the
packet length and ignoring the data length. For single-buffer packets we
can quickly check that the data length is the packet length.

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

Reported-by: Padraig Connolly <padraig.j.connolly at intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Tested-by: Padraig Connolly <padraig.j.connolly at intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index ec0dffa30e..5fbc581b95 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3668,7 +3668,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}

-		if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) {
+		/* valid packets are greater than min size, and single-buffer pkts
+		 * must have data_len == pkt_len
+		 */
+		if (m->pkt_len < IAVF_TX_MIN_PKT_LEN ||
+				(m->nb_segs == 1 && m->data_len != m->pkt_len)) {
 			rte_errno = EINVAL;
 			return i;
 		}
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-12-06 23:26:46.679573103 +0800
+++ 0077-net-iavf-add-segment-length-check-to-Tx-prep.patch	2024-12-06 23:26:44.083044826 +0800
@@ -1 +1 @@
-From 4523e0753b243066357f98fd9739fde72605d0fb Mon Sep 17 00:00:00 2001
+From ef3dab691fbfae50f5f9ead05f4f6e2503d1c386 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 4850b9e381..6a093c6746 100644
+index ec0dffa30e..5fbc581b95 100644
@@ -25 +27 @@
-@@ -3677,7 +3677,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -3668,7 +3668,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,


More information about the stable mailing list