On Mon, 21 Apr 2025 15:22:26 +0800
Chengwen Feng <fengcheng...@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: sta...@dpdk.org
> 
> Signed-off-by: Chengwen Feng <fengcheng...@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) {

Reply via email to