DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>, <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <aman.deep.singh@intel.com>
Subject: [PATCH 2/2] app/testpmd: support show DCB config
Date: Tue, 25 Nov 2025 11:41:58 +0800	[thread overview]
Message-ID: <20251125034158.55192-3-fengchengwen@huawei.com> (raw)
In-Reply-To: <20251125034158.55192-1-fengchengwen@huawei.com>

Add command 'show config dcbfwd' which show DCB configuration.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test-pmd/cmdline.c                      | 22 ++++++++++++++++++---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  4 +++-
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index e701cd7ec4..d90c97a161 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -195,7 +195,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"show (rxq|txq) info (port_id) (queue_id)\n"
 			"    Display information for configured RX/TX queue.\n\n"
 
-			"show config (rxtx|cores|fwd|rxoffs|rxpkts|rxhdrs|txpkts)\n"
+			"show config (rxtx|cores|fwd|dcbfwd|rxoffs|rxpkts|rxhdrs|txpkts|txtimes)\n"
 			"    Display the given configuration.\n\n"
 
 			"read rxd (port_id) (queue_id) (rxd_id)\n"
@@ -7364,6 +7364,20 @@ struct cmd_showcfg_result {
 	cmdline_fixed_string_t what;
 };
 
+static void show_dcb_fwd_config(void)
+{
+	uint8_t i;
+
+	printf("DCB forwarding config:\n");
+	printf("  Enabled TC list:");
+	for (i = 0; i < RTE_ETH_8_TCS; i++) {
+		if (dcb_fwd_tc_mask & (1u << i))
+			printf(" %d", i);
+	}
+	printf("\n");
+	printf("  Cores-per-TC: %u\n", dcb_fwd_tc_cores);
+}
+
 static void cmd_showcfg_parsed(void *parsed_result,
 			       __rte_unused struct cmdline *cl,
 			       __rte_unused void *data)
@@ -7375,6 +7389,8 @@ static void cmd_showcfg_parsed(void *parsed_result,
 		fwd_lcores_config_display();
 	else if (!strcmp(res->what, "fwd"))
 		pkt_fwd_config_display(&cur_fwd_config);
+	else if (!strcmp(res->what, "dcbfwd"))
+		show_dcb_fwd_config();
 	else if (!strcmp(res->what, "rxoffs"))
 		show_rx_pkt_offsets();
 	else if (!strcmp(res->what, "rxpkts"))
@@ -7393,12 +7409,12 @@ static cmdline_parse_token_string_t cmd_showcfg_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showcfg_result, cfg, "config");
 static cmdline_parse_token_string_t cmd_showcfg_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showcfg_result, what,
-				 "rxtx#cores#fwd#rxoffs#rxpkts#rxhdrs#txpkts#txtimes");
+				 "rxtx#cores#fwd#dcbfwd#rxoffs#rxpkts#rxhdrs#txpkts#txtimes");
 
 static cmdline_parse_inst_t cmd_showcfg = {
 	.f = cmd_showcfg_parsed,
 	.data = NULL,
-	.help_str = "show config rxtx|cores|fwd|rxoffs|rxpkts|rxhdrs|txpkts|txtimes",
+	.help_str = "show config rxtx|cores|fwd|dcbfwd|rxoffs|rxpkts|rxhdrs|txpkts|txtimes",
 	.tokens = {
 		(void *)&cmd_showcfg_show,
 		(void *)&cmd_showcfg_port,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 62bb167d56..d20c603cef 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -297,7 +297,7 @@ show config
 Displays the configuration of the application.
 The configuration comes from the command-line, the runtime or the application defaults::
 
-   testpmd> show config (rxtx|cores|fwd|rxoffs|rxpkts|rxhdrs|txpkts|txtimes)
+   testpmd> show config (rxtx|cores|fwd|dcbfwd|rxoffs|rxpkts|rxhdrs|txpkts|txtimes)
 
 The available information categories are:
 
@@ -307,6 +307,8 @@ The available information categories are:
 
 * ``fwd``: Packet forwarding configuration.
 
+* ``dcbfwd``: DCB forwarding configuration.
+
 * ``rxoffs``: Packet offsets for RX split.
 
 * ``rxpkts``: Packets to RX length-based split configuration.
-- 
2.17.1


      parent reply	other threads:[~2025-11-25  3:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25  3:41 [PATCH 0/2] add two enhance for DCB Chengwen Feng
2025-11-25  3:41 ` [PATCH 1/2] app/testpmd: support multi-cores process one TC help Chengwen Feng
2025-11-25  3:41 ` Chengwen Feng [this message]

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=20251125034158.55192-3-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).