|SUCCESS| [v4] app/testpmd: fix DCB queue allocation for VMDq devices
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Apr 9 22:20:17 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/162959
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-09
This patch modifies DCB queue allocation logic in testpmd for VMDq devices. Let me analyze it against the DPDK guidelines.
commit 20260409064346.3513111-1-kavyax.a.v at intel.com
Author: KAVYA AV <kavyax.a.v at intel.com>
app/testpmd: fix DCB queue allocation for VMDq devices
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.
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index e2569d9e30..23a27322f8 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -4481,8 +4481,11 @@ init_port_dcb_config(portid_t pid,
> nb_rxq = rte_port->dev_info.max_rx_queues;
> nb_txq = rte_port->dev_info.max_tx_queues;
> } else {
> - nb_rxq = (queueid_t)num_tcs;
> - nb_txq = (queueid_t)num_tcs;
> + /* Use PF queue count for DCB-only mode with VMDQ devices */
> + nb_rxq = rte_port->dev_info.max_rx_queues -
> + rte_port->dev_info.vmdq_queue_num;
> + nb_txq = rte_port->dev_info.max_tx_queues -
> + rte_port->dev_info.vmdq_queue_num;
Can the subtraction here result in negative values if vmdq_queue_num
exceeds max_rx_queues or max_tx_queues? The result is assigned to
queueid_t (likely unsigned), which could cause underflow.
Does this code handle devices where vmdq_queue_num equals zero? For
non-VMDq devices, this changes behavior from num_tcs to max_queues,
which contradicts the commit message claim about maintaining
compatibility with non-VMDq devices.
The comment mentions "DCB-only mode with VMDQ devices", but does this
else branch execute only when VMDq is present? Looking at the context,
this else block appears to execute when dcb_vt is not enabled, which
includes both VMDq and non-VMDq devices.
> }
> }
> }
More information about the test-report
mailing list