[PATCH v2 1/4] app/testpmd: remove restrict of number of TCs in DCB command
Stephen Hemminger
stephen at networkplumber.org
Mon Apr 21 16:53:10 CEST 2025
On Mon, 21 Apr 2025 15:22:26 +0800
Chengwen Feng <fengchengwen at huawei.com> wrote:
> Currently, the "port config 0 dcb ..." command only supports 4 or 8
> TCs. Other number of TCs may be used in actual applications.
>
> This commit removes this restriction.
>
> Cc: stable at dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> ---
> app/test-pmd/cmdline.c | 4 ++--
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index b4089d281b..e34e47aaae 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -3472,9 +3472,9 @@ cmd_config_dcb_parsed(void *parsed_result,
> return;
> }
>
> - if ((res->num_tcs != RTE_ETH_4_TCS) && (res->num_tcs != RTE_ETH_8_TCS)) {
> + if ((res->num_tcs <= 1 || res->num_tcs > RTE_ETH_8_TCS)) {
> fprintf(stderr,
No longer need nested paren's here.
i.e
if (res->num_tcs <= 1 || res->num_tcs > RTE_ETH_8_TCS) {
More information about the dev
mailing list