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

Stephen Hemminger stephen at networkplumber.org
Fri Mar 13 22:00:44 CET 2026


On Fri, 13 Mar 2026 10:15:53 +0000
KAVYA AV <kavyax.a.v at intel.com> wrote:

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

Please don't break up  "} else {" with a comment.
The comment is associated with the next two lines anyway.


More information about the dev mailing list