[PATCH v3] app/testpmd: fix DCB queue allocation for VMDq devices

Stephen Hemminger stephen at networkplumber.org
Tue Mar 24 16:46:55 CET 2026


On Tue, 24 Mar 2026 10:05:00 +0000
KAVYA AV <kavyax.a.v at intel.com> wrote:

> When using DCB mode with VT disabled and requesting more queues than
> traffic classes (e.g., rxq=64 with 8 TCs), testpmd crashes with null
> pointer errors because it artificially limits queue allocation to
> num_tcs.
> 
> For VMDq devices, use actual VMDq queue layout (vmdq_queue_num) instead
> of limiting to num_tcs. This allows VMDq devices to utilize their full
> queue capacity while maintaining compatibility with non-VMDq devices.
> 
> Fixes null pointer dereference when queue structures are accessed
> beyond the allocated range.
> 
> Fixes: 2169699b15fc ("app/testpmd: add queue restriction in DCB command")
> Cc: stable at dpdk.org
> 
> Signed-off-by: KAVYA AV <kavyax.a.v at intel.com>
> ---

I can't follow all the stuff here, is rather complex and esoteric case.
So did AI review.

The feedback from AI raised some questions (the I here is AI not me):


The basic idea of using dynamic VMDq queue info instead of limiting
to num_tcs is right -- the current code clearly crashes when more
queues are requested than traffic classes.

However, I'm not convinced vmdq_queue_num is the correct value here.
This code path is DCB-only (VT disabled) on a device with
vmdq_pool_base > 0, which in practice means i40e. In that case
vmdq_queue_num is the total VMDq pool queue count
(vmdq_nb_qps * max_nb_vmdq_vsi), but with VT disabled the PF queues
are what's used for DCB, not the VMDq pool queues. The PF queue count
would be max_rx_queues - vmdq_queue_num. Using the VMDq count here
could over-allocate or misconfigure queues in DCB-only mode.

Can you explain why vmdq_queue_num is the right value rather than
the PF queue count? Or test what happens when this value exceeds
what the hardware supports in DCB-only mode?

Minor: the prose line "Fixes null pointer dereference when queue
structures are accessed beyond the allocated range." reads as a
sentence fragment. Fold it into the preceding paragraph or drop it
since the Fixes tag already identifies what's being fixed.



More information about the dev mailing list