[PATCH] app/testpmd: fix DCB forwarding TC mask and queue guard

Stephen Hemminger stephen at networkplumber.org
Wed Mar 11 16:56:49 CET 2026


On Wed, 11 Mar 2026 08:37:51 +0000
Talluri Chaitanyababu <chaitanyababux.talluri at intel.com> wrote:

> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index c33c66f327..3fb9b940eb 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -3682,6 +3682,19 @@ cmd_config_dcb_parsed(void *parsed_result,
>  		return;
>  	}
>  
> +	/*
> +	 * Update forwarding TC mask to match actual configured TCs.
> +	 * Must query after init_port_dcb_config() to get updated nb_tcs.
> +	 */
> +	ret = rte_eth_dev_get_dcb_info(port_id, &dcb_info);
> +	if (ret == 0 && dcb_info.nb_tcs > 0) {
> +		dcb_fwd_tc_mask = (1u << dcb_info.nb_tcs) - 1;
> +	} else if (ret != 0) {
> +		fprintf(stderr, "Failed to get DCB info for port %u: %s\n",
> +				port_id, rte_strerror(-ret));
> +		return;
> +	}
> +

That function already called get_dcb_info only a few lines before?


More information about the dev mailing list