DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>, <stephen@networkplumber.org>,
	<aman.deep.singh@intel.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 1/4] app/testpmd: remove restrict of number of TCs in DCB command
Date: Tue, 25 Feb 2025 17:19:26 +0800	[thread overview]
Message-ID: <20250225091929.25072-2-fengchengwen@huawei.com> (raw)
In-Reply-To: <20250225091929.25072-1-fengchengwen@huawei.com>

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@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@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 86d763b66a..c23b811764 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3469,9 +3469,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,
-			"The invalid number of traffic class, only 4 or 8 allowed.\n");
+			"The invalid number of traffic class, only 2~8 allowed.\n");
 		return;
 	}
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index eeef49500f..38bc00705f 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2167,7 +2167,7 @@ Set the DCB mode for an individual port::
 
    testpmd> port config (port_id) dcb vt (on|off) (traffic_class) pfc (on|off)
 
-The traffic class should be 4 or 8.
+The traffic class could be 2~8.
 
 port config - Burst
 ~~~~~~~~~~~~~~~~~~~
-- 
2.17.1


  reply	other threads:[~2025-02-25  9:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  9:19 [PATCH 0/4] enhance testpmd " Chengwen Feng
2025-02-25  9:19 ` Chengwen Feng [this message]
2025-02-25  9:19 ` [PATCH 2/4] app/testpmd: support config prio-tc map in " Chengwen Feng
2025-02-25  9:19 ` [PATCH 3/4] app/testpmd: support don't adjust queue num " Chengwen Feng
2025-02-25  9:19 ` [PATCH 4/4] app/testpmd: support disable " Chengwen Feng
2025-02-25 14:42 ` [PATCH 0/4] enhance testpmd " Stephen Hemminger

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=20250225091929.25072-2-fengchengwen@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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;
as well as URLs for NNTP newsgroup(s).