[PATCH v5] app/testpmd: fix DCB forwarding TC mismatch handling

Stephen Hemminger stephen at networkplumber.org
Tue Mar 24 01:06:50 CET 2026


On Fri, 20 Mar 2026 06:29:54 +0000
Talluri Chaitanyababu <chaitanyababux.talluri at intel.com> wrote:

> 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")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Talluri Chaitanyababu <chaitanyababux.talluri at intel.com>
> Signed-off-by: Shaiq Wani <shaiq.wani at intel.com>
> ---

Applied to next-net


More information about the dev mailing list