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

Shani Peretz shperetz at nvidia.com
Wed Apr 15 12:00:02 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/19/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/shanipr/dpdk-stable

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/0e5f59fb9117c8e771f65c888687d7cfe50c4488

Thanks.

Shani

---
>From 0e5f59fb9117c8e771f65c888687d7cfe50c4488 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 78dc62bbec..e53812ea16 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1461,6 +1461,7 @@ 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>
 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 c992c9c6e5..07036c30f0 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5038,6 +5038,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;
@@ -5083,6 +5084,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;
@@ -5091,7 +5093,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;
@@ -5116,7 +5119,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;
@@ -5131,6 +5134,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.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:34.577196887 +0300
+++ 0061-app-testpmd-fix-DCB-forwarding-TC-mismatch-handling.patch	2026-04-14 14:44:28.696448000 +0300
@@ -1 +1 @@
-From 388bb5d87a4e88182fc625f6d23e68fe790f2f25 Mon Sep 17 00:00:00 2001
+From 0e5f59fb9117c8e771f65c888687d7cfe50c4488 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 78dc62bbec..e53812ea16 100644
@@ -59 +60 @@
-@@ -1612,6 +1612,7 @@ Takeshi Yoshimura <tyos at jp.ibm.com> <t.yoshimura8869 at gmail.com>
+@@ -1461,6 +1461,7 @@ Takeshi Yoshimura <tyos at jp.ibm.com> <t.yoshimura8869 at gmail.com>
@@ -64 +64,0 @@
- Tamar Mashiah <tmashiah at nvidia.com>
@@ -66,0 +67 @@
+ Tao Zhu <taox.zhu at intel.com>
@@ -68 +69 @@
-index f9f3c542a6..052e8b7c24 100644
+index c992c9c6e5..07036c30f0 100644
@@ -71 +72,2 @@
-@@ -5377,6 +5377,7 @@ dcb_fwd_config_setup(void)
+@@ -5038,6 +5038,7 @@ dcb_fwd_config_setup(void)
+ 	lcoreid_t  lc_id;
@@ -74 +75,0 @@
- 	uint16_t sub_core_idx = 0;
@@ -79,2 +80,3 @@
-@@ -5442,6 +5443,7 @@ dcb_fwd_config_setup(void)
- 	dcb_fwd_tc_update_dcb_info(&rxp_dcb_info);
+@@ -5083,6 +5084,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 +83,0 @@
- 	dcb_fwd_tc_update_dcb_info(&txp_dcb_info);
@@ -87 +88 @@
-@@ -5450,7 +5452,8 @@ dcb_fwd_config_setup(void)
+@@ -5091,7 +5093,8 @@ dcb_fwd_config_setup(void)
@@ -97 +98,2 @@
-@@ -5480,7 +5483,7 @@ dcb_fwd_config_setup(void)
+@@ -5116,7 +5119,7 @@ dcb_fwd_config_setup(void)
+ 		sm_id = (streamid_t) (sm_id + fwd_lcores[lc_id]->stream_nb);
@@ -99 +100,0 @@
- 		sub_core_idx = 0;
@@ -106,2 +107,3 @@
-@@ -5497,6 +5500,8 @@ dcb_fwd_config_setup(void)
- 		dcb_fwd_tc_update_dcb_info(&rxp_dcb_info);
+@@ -5131,6 +5134,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 +110,0 @@
- 		dcb_fwd_tc_update_dcb_info(&txp_dcb_info);


More information about the stable mailing list