[PATCH] app/testpmd: fix DCB queue allocation for VMDq devices
KAVYA AV
kavyax.a.v at intel.com
Fri Mar 13 11:15:53 CET 2026
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 device-specific queue count (nb_rx_queues/
nb_tx_queues) 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>
---
app/test-pmd/testpmd.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index fbacee89ea..70be52d36f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -4444,9 +4444,11 @@ init_port_dcb_config(portid_t pid,
if (rte_port->dev_info.vmdq_pool_base == 0) {
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 device queue count to prevent null pointer errors */
+ else {
+ nb_rxq = rte_port->dev_info.nb_rx_queues;
+ nb_txq = rte_port->dev_info.nb_tx_queues;
}
}
}
--
2.43.0
More information about the dev
mailing list