patch 'app/testpmd: fix DCB forwarding TC mismatch handling' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 26 13:57:35 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.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 03/28/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f5f3f0d012122b3e23e31d2390b667c7f9e4b087

Thanks.

Luca Boccassi

---
>From f5f3f0d012122b3e23e31d2390b667c7f9e4b087 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              | 2 ++
 app/test-pmd/config.c | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index f3057e6d7e..4827761a8a 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1545,6 +1545,8 @@ Takeshi Yoshimura <tyos at jp.ibm.com> <t.yoshimura8869 at gmail.com>
 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>
 Tao Y Yang <tao.y.yang at intel.com>
 Tao Zhu <taox.zhu at intel.com>
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e1a4d40191..af07314717 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5286,6 +5286,7 @@ dcb_fwd_config_setup(void)
 	lcoreid_t  lc_id;
 	uint16_t nb_rx_queue, nb_tx_queue;
 	uint16_t i, j, k, sm_id = 0;
+	uint8_t effective_nb_tcs;
 	uint16_t total_tc_num;
 	struct rte_port *port;
 	uint8_t tc = 0;
@@ -5331,6 +5332,7 @@ dcb_fwd_config_setup(void)
 	/* get the dcb info on the first RX and TX ports */
 	(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
 	(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &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++) {
 		fwd_lcores[lc_id]->stream_nb = 0;
@@ -5339,7 +5341,8 @@ dcb_fwd_config_setup(void)
 			/* if the nb_queue is zero, means this tc is
 			 * 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 +
 				fwd_lcores[lc_id]->stream_idx;
@@ -5364,7 +5367,7 @@ dcb_fwd_config_setup(void)
 		sm_id = (streamid_t) (sm_id + fwd_lcores[lc_id]->stream_nb);
 
 		tc++;
-		if (tc < rxp_dcb_info.nb_tcs)
+		if (tc < effective_nb_tcs)
 			continue;
 		/* Restart from TC 0 on next RX port */
 		tc = 0;
@@ -5379,6 +5382,8 @@ dcb_fwd_config_setup(void)
 		/* get the dcb information on next RX and TX ports */
 		rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
 		rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &txp_dcb_info);
+
+		effective_nb_tcs = RTE_MIN(rxp_dcb_info.nb_tcs, txp_dcb_info.nb_tcs);
 	}
 }
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-26 12:56:33.497758385 +0000
+++ 0001-app-testpmd-fix-DCB-forwarding-TC-mismatch-handling.patch	2026-03-26 12:56:33.393542747 +0000
@@ -1 +1 @@
-From 388bb5d87a4e88182fc625f6d23e68fe790f2f25 Mon Sep 17 00:00:00 2001
+From f5f3f0d012122b3e23e31d2390b667c7f9e4b087 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 388bb5d87a4e88182fc625f6d23e68fe790f2f25 ]
+
@@ -45 +46,0 @@
-Cc: stable at dpdk.org
@@ -51 +52 @@
- .mailmap              | 1 +
+ .mailmap              | 2 ++
@@ -53 +54 @@
- 2 files changed, 8 insertions(+), 2 deletions(-)
+ 2 files changed, 9 insertions(+), 2 deletions(-)
@@ -56 +57 @@
-index beccc84425..805e5ae762 100644
+index f3057e6d7e..4827761a8a 100644
@@ -59 +60 @@
-@@ -1612,6 +1612,7 @@ Takeshi Yoshimura <tyos at jp.ibm.com> <t.yoshimura8869 at gmail.com>
+@@ -1545,6 +1545,8 @@ Takeshi Yoshimura <tyos at jp.ibm.com> <t.yoshimura8869 at gmail.com>
@@ -64 +65 @@
- Tamar Mashiah <tmashiah at nvidia.com>
++Tamar Mashiah <tmashiah at nvidia.com>
@@ -66,0 +68 @@
+ Tao Zhu <taox.zhu at intel.com>
@@ -68 +70 @@
-index f9f3c542a6..052e8b7c24 100644
+index e1a4d40191..af07314717 100644
@@ -71 +73,2 @@
-@@ -5377,6 +5377,7 @@ dcb_fwd_config_setup(void)
+@@ -5286,6 +5286,7 @@ dcb_fwd_config_setup(void)
+ 	lcoreid_t  lc_id;
@@ -74 +76,0 @@
- 	uint16_t sub_core_idx = 0;
@@ -79,2 +81,3 @@
-@@ -5442,6 +5443,7 @@ dcb_fwd_config_setup(void)
- 	dcb_fwd_tc_update_dcb_info(&rxp_dcb_info);
+@@ -5331,6 +5332,7 @@ dcb_fwd_config_setup(void)
+ 	/* get the dcb info on the first RX and TX ports */
+ 	(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
@@ -82 +84,0 @@
- 	dcb_fwd_tc_update_dcb_info(&txp_dcb_info);
@@ -87 +89 @@
-@@ -5450,7 +5452,8 @@ dcb_fwd_config_setup(void)
+@@ -5339,7 +5341,8 @@ dcb_fwd_config_setup(void)
@@ -97 +99,2 @@
-@@ -5480,7 +5483,7 @@ dcb_fwd_config_setup(void)
+@@ -5364,7 +5367,7 @@ dcb_fwd_config_setup(void)
+ 		sm_id = (streamid_t) (sm_id + fwd_lcores[lc_id]->stream_nb);
@@ -99 +101,0 @@
- 		sub_core_idx = 0;
@@ -106,2 +108,3 @@
-@@ -5497,6 +5500,8 @@ dcb_fwd_config_setup(void)
- 		dcb_fwd_tc_update_dcb_info(&rxp_dcb_info);
+@@ -5379,6 +5382,8 @@ dcb_fwd_config_setup(void)
+ 		/* get the dcb information on next RX and TX ports */
+ 		rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
@@ -109 +111,0 @@
- 		dcb_fwd_tc_update_dcb_info(&txp_dcb_info);


More information about the stable mailing list