patch 'app/testpmd: fix DCB forwarding TC mismatch handling' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Fri Mar 27 11:01:02 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/31/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/8a9af2d306b8749c02821294984b43525d518bcc
Thanks.
Kevin
---
>From 8a9af2d306b8749c02821294984b43525d518bcc Mon Sep 17 00:00:00 2001
From: Talluri Chaitanyababu <chaitanyababux.talluri at intel.com>
Date: Fri, 20 Mar 2026 06:29:54 +0000
Subject: [PATCH] app/testpmd: fix DCB forwarding TC mismatch handling
[ upstream commit 388bb5d87a4e88182fc625f6d23e68fe790f2f25 ]
Fix DCB forwarding failed when the number of TCs on ports is inconsistent.
When ports have asymmetric TC configurations (e.g. 2 ports, port0 has
4 TCs and port1 has 8 TCs), the forwarding logic iterates based only
on the Rx port TC count.
This can lead to accessing invalid Tx TC entries and incorrect queue
mapping, which will result in a SIGFPE exception.
Additionally, the existing VMDq pool guard in dcb_fwd_config_setup()
only checks RX queue counts and does not consider the case where the TX
port has no queues for a given pool/TC combination.
Fix this by:
1. Introducing an effective TC count using RTE_MIN() of Rx and Tx TC
values, ensuring forwarding only operates on valid TCs supported by
both ports.
2. Updating the loop condition to use the effective TC count instead of
only the Rx TC count.
3. Extending the queue validation in dcb_fwd_config_setup() to ensure
both Rx and Tx queues are valid for a given TC.
Testpmd command to reproduce:
x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-20 -n 4 \
-a 0000:31:00.0 -a 0000:4b:00.0 \
--file-prefix=testpmd1 -- -i --rxq=256 --txq=256 \
--nb-cores=16 --total-num-mbufs=600000
port stop all
port config 0 dcb vt off 8 pfc on
port config 1 dcb vt off 8 pfc on
port start all
port stop all
port config 0 dcb vt off 4 pfc on
This ensures correct queue mapping and avoids issues when switching
between different DCB configurations across ports.
Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
Signed-off-by: Talluri Chaitanyababu <chaitanyababux.talluri at intel.com>
Signed-off-by: Shaiq Wani <shaiq.wani at intel.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
.mailmap | 1 +
app/test-pmd/config.c | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index 24ec97c849..645659afe0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1609,4 +1609,5 @@ Takuya Asada <syuu at cloudius-systems.com>
Tal Avraham <talavr at annapurnalabs.com>
Tal Shnaiderman <talshn at nvidia.com> <talshn at mellanox.com>
+Talluri Chaitanyababu <chaitanyababux.talluri at intel.com>
Tamar Mashiah <tmashiah at nvidia.com>
Tanzeel Ahmed <tanzeelahmed713 at gmail.com>
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index f9f3c542a6..052e8b7c24 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5378,4 +5378,5 @@ dcb_fwd_config_setup(void)
uint16_t i, j, k, sm_id = 0;
uint16_t sub_core_idx = 0;
+ uint8_t effective_nb_tcs;
uint16_t total_tc_num;
struct rte_port *port;
@@ -5443,4 +5444,5 @@ dcb_fwd_config_setup(void)
(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &txp_dcb_info);
dcb_fwd_tc_update_dcb_info(&txp_dcb_info);
+ effective_nb_tcs = RTE_MIN(rxp_dcb_info.nb_tcs, txp_dcb_info.nb_tcs);
for (lc_id = 0; lc_id < cur_fwd_config.nb_fwd_lcores; lc_id++) {
@@ -5451,5 +5453,6 @@ dcb_fwd_config_setup(void)
* not enabled on the POOL
*/
- if (rxp_dcb_info.tc_queue.tc_rxq[i][tc].nb_queue == 0)
+ if (rxp_dcb_info.tc_queue.tc_rxq[i][tc].nb_queue == 0 ||
+ txp_dcb_info.tc_queue.tc_txq[i][tc].nb_queue == 0)
break;
k = fwd_lcores[lc_id]->stream_nb +
@@ -5481,5 +5484,5 @@ dcb_fwd_config_setup(void)
sub_core_idx = 0;
tc++;
- if (tc < rxp_dcb_info.nb_tcs)
+ if (tc < effective_nb_tcs)
continue;
/* Restart from TC 0 on next RX port */
@@ -5498,4 +5501,6 @@ dcb_fwd_config_setup(void)
rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &txp_dcb_info);
dcb_fwd_tc_update_dcb_info(&txp_dcb_info);
+
+ effective_nb_tcs = RTE_MIN(rxp_dcb_info.nb_tcs, txp_dcb_info.nb_tcs);
}
}
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-27 09:58:26.217102927 +0000
+++ 0002-app-testpmd-fix-DCB-forwarding-TC-mismatch-handling.patch 2026-03-27 09:58:26.115625510 +0000
@@ -1 +1 @@
-From 388bb5d87a4e88182fc625f6d23e68fe790f2f25 Mon Sep 17 00:00:00 2001
+From 8a9af2d306b8749c02821294984b43525d518bcc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 388bb5d87a4e88182fc625f6d23e68fe790f2f25 ]
+
@@ -45 +46,0 @@
-Cc: stable at dpdk.org
@@ -56 +57 @@
-index beccc84425..805e5ae762 100644
+index 24ec97c849..645659afe0 100644
@@ -59 +60 @@
-@@ -1613,4 +1613,5 @@ Takuya Asada <syuu at cloudius-systems.com>
+@@ -1609,4 +1609,5 @@ Takuya Asada <syuu at cloudius-systems.com>
More information about the stable
mailing list