patch 'net/mana: fix Tx burst error handling' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:04:42 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
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/08/26. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/dd262175d354a2262d12cd6f5f69642c920fb65c
Thanks.
Kevin
---
>From dd262175d354a2262d12cd6f5f69642c920fb65c Mon Sep 17 00:00:00 2001
From: Tathagat Priyadarshi <tathagat.dpdk at gmail.com>
Date: Tue, 27 Oct 2026 18:21:14 +0000
Subject: [PATCH] net/mana: fix Tx burst error handling
[ upstream commit 1a7aea32761480ed88e7e7eb1d05bb6119e20b17 ]
mana_tx_burst() skipped, using continue, a packet that exceeded the
segment limit or whose SGL could not be populated. rte_eth_tx_burst()
callers treat the return value as a contiguous prefix of consumed
packets, so later packets were posted while the caller considered them
unsent and freed them, and their completions then freed them again.
Drop such a packet instead: count it in stats.errors, free it and
include it in the returned count. Return early only when the ring is
full, since a packet that fails validation would fail again on every
retry and stall applications that loop until all packets are sent.
sgl.gdma_sgl[] holds MAX_SGL_ENTRIES_FOR_TRANSMIT entries, but
max_send_sge comes from the device and was not limited, so a packet with
more segments could write past the array. Reject such packets and limit
the advertised nb_seg_max and nb_mtu_seg_max to the same value.
Fixes: 7f322844f427 ("net/mana: send packets")
Fixes: d878cb09501d ("net/mana: report device info")
Signed-off-by: Tathagat Priyadarshi <tathagat.dpdk at gmail.com>
---
drivers/net/mana/mana.c | 4 ++--
drivers/net/mana/tx.c | 18 ++++++++++++++----
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 67396cda1f..752eb33bc8 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -372,7 +372,7 @@ mana_dev_info_get(struct rte_eth_dev *dev,
dev_info->tx_desc_lim.nb_align = MIN_BUFFERS_PER_QUEUE;
dev_info->tx_desc_lim.nb_seg_max =
- RTE_MIN(priv->max_send_sge, UINT16_MAX);
+ RTE_MIN(priv->max_send_sge, MAX_SGL_ENTRIES_FOR_TRANSMIT);
dev_info->tx_desc_lim.nb_mtu_seg_max =
- RTE_MIN(priv->max_send_sge, UINT16_MAX);
+ RTE_MIN(priv->max_send_sge, MAX_SGL_ENTRIES_FOR_TRANSMIT);
/* Speed */
diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c
index 57dbbc3651..16a2230a22 100644
--- a/drivers/net/mana/tx.c
+++ b/drivers/net/mana/tx.c
@@ -190,4 +190,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
void *db_page;
uint16_t pkt_sent = 0;
+ uint16_t nb_done = 0;
uint32_t num_comp, i;
#ifdef RTE_ARCH_32
@@ -251,8 +252,9 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/* Drop the packet if it exceeds max segments */
- if (m_pkt->nb_segs > priv->max_send_sge) {
+ if (unlikely(m_pkt->nb_segs > priv->max_send_sge ||
+ m_pkt->nb_segs > MAX_SGL_ENTRIES_FOR_TRANSMIT)) {
DP_LOG(ERR, "send packet segments %d exceeding max",
m_pkt->nb_segs);
- continue;
+ goto drop;
}
@@ -405,5 +407,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/* Skip this packet if we can't populate all segments */
if (seg_idx != m_pkt->nb_segs)
- continue;
+ goto drop;
/* If we can at least queue post two WQEs and there are at
@@ -450,4 +452,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
pkt_sent++;
+ nb_done++;
DP_LOG(DEBUG, "nb_pkts %u pkt[%d] sent",
@@ -472,4 +475,11 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
break;
}
+
+ continue;
+
+drop:
+ txq->stats.errors++;
+ rte_pktmbuf_free(m_pkt);
+ nb_done++;
}
@@ -502,4 +512,4 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
}
- return pkt_sent;
+ return nb_done;
}
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:49.271072323 +0000
+++ 0356-net-mana-fix-Tx-burst-error-handling.patch 2026-12-03 12:52:39.275572656 +0000
@@ -1 +1 @@
-From 1a7aea32761480ed88e7e7eb1d05bb6119e20b17 Mon Sep 17 00:00:00 2001
+From dd262175d354a2262d12cd6f5f69642c920fb65c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1a7aea32761480ed88e7e7eb1d05bb6119e20b17 ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -33 +34 @@
-index 0ea6d9a54a..d0c79a34ef 100644
+index 67396cda1f..752eb33bc8 100644
@@ -36 +37 @@
-@@ -411,7 +411,7 @@ mana_dev_info_get(struct rte_eth_dev *dev,
+@@ -372,7 +372,7 @@ mana_dev_info_get(struct rte_eth_dev *dev,
@@ -47 +48 @@
-index 10f2212b5d..16e63e89c9 100644
+index 57dbbc3651..16a2230a22 100644
@@ -50 +51 @@
-@@ -193,4 +193,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -190,4 +190,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -55,2 +56,2 @@
- uint32_t expected = 0;
-@@ -279,8 +280,9 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+ #ifdef RTE_ARCH_32
+@@ -251,8 +252,9 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -68 +69 @@
-@@ -433,5 +435,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -405,5 +407,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -75 +76 @@
-@@ -478,4 +480,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -450,4 +452,5 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -81 +82 @@
-@@ -500,4 +503,11 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -472,4 +475,11 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -93,2 +94,2 @@
-@@ -524,4 +534,4 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
- rte_memory_order_release);
+@@ -502,4 +512,4 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+ }
More information about the stable
mailing list