public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: KAVYA AV <kavyax.a.v@intel.com>
To: dev@dpdk.org, bruce.richardson@intel.com, aman.deep.singh@intel.com
Cc: shaiq.wani@intel.com, KAVYA AV <kavyax.a.v@intel.com>, stable@dpdk.org
Subject: [PATCH v4] app/testpmd: fix DCB queue allocation for VMDq devices
Date: Thu,  9 Apr 2026 06:43:46 +0000	[thread overview]
Message-ID: <20260409064346.3513111-1-kavyax.a.v@intel.com> (raw)
In-Reply-To: <20260313101553.1827216-1-kavyax.a.v@intel.com>

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: 2169699b15fc ("app/testpmd: add queue restriction in DCB command")
Cc: stable@dpdk.org

Signed-off-by: KAVYA AV <kavyax.a.v@intel.com>
---

v4:
* Replaced configured queue count with PF-based layout.
* Revised commit message.

v3:
* Replaced configured queue count with actual VMDQ queue layout.
* Changed comment accordingly.
* Revised commit message.

v2: Moved the comment inside the else block.
---
 app/test-pmd/testpmd.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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;
 			}
 		}
 	}
-- 
2.43.0


      parent reply	other threads:[~2026-04-09  6:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 10:15 [PATCH] app/testpmd: fix DCB queue allocation for VMDq devices KAVYA AV
2026-03-13 21:00 ` Stephen Hemminger
2026-03-16  5:52 ` [PATCH v2] " KAVYA AV
2026-03-23 23:51   ` Stephen Hemminger
2026-03-24 10:05 ` [PATCH v3] " KAVYA AV
2026-03-24 15:46   ` Stephen Hemminger
2026-03-26 11:22     ` A V, KavyaX
2026-04-09  6:43 ` KAVYA AV [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260409064346.3513111-1-kavyax.a.v@intel.com \
    --to=kavyax.a.v@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=shaiq.wani@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox