app/testpmd: add dump command help message

Message ID 20230627144426.23144-1-viacheslavo@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: add dump command help message |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

Slava Ovsiienko June 27, 2023, 2:44 p.m. UTC
  There was missing "dump_xxxxx" commands help message.
Patch adds support for "help dump" command to see one.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 app/test-pmd/cmdline.c | 43 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit June 27, 2023, 6:03 p.m. UTC | #1
On 6/27/2023 3:44 PM, Viacheslav Ovsiienko wrote:
> There was missing "dump_xxxxx" commands help message.
> Patch adds support for "help dump" command to see one.
> 

Hi Slava,

Thanks for the patch, this seems missed for a while.

> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
>  app/test-pmd/cmdline.c | 43 ++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 41 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 18e6e19497..9edbb7d04f 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -92,6 +92,7 @@ static void cmd_help_brief_parsed(__rte_unused void *parsed_result,
>  		"    help ports                      : Configuring ports.\n"
>  		"    help filters                    : Filters configuration help.\n"
>  		"    help traffic_management         : Traffic Management commands.\n"
> +		"    help dump                       : Dumps related commands.\n"

I am not sure 'dump_*' commands are unique group to make a new help
section, even description is vague "dump related ..", or if they are
important enough for a new section,

what would you think to append them to 'display' section?
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 18e6e19497..9edbb7d04f 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -92,6 +92,7 @@  static void cmd_help_brief_parsed(__rte_unused void *parsed_result,
 		"    help ports                      : Configuring ports.\n"
 		"    help filters                    : Filters configuration help.\n"
 		"    help traffic_management         : Traffic Management commands.\n"
+		"    help dump                       : Dumps related commands.\n"
 		"    help devices                    : Device related commands.\n"
 		"    help drivers                    : Driver specific commands.\n"
 		"    help all                        : All of the above sections.\n\n"
@@ -982,6 +983,44 @@  static void cmd_help_long_parsed(void *parsed_result,
 		);
 	}
 
+	if (show_all || !strcmp(res->section, "dump")) {
+		cmdline_printf(
+			cl,
+			"\n"
+			"Dump Commands:\n"
+			"--------------\n"
+			"dump_physmem\n"
+			"    Dumps all physical memory segment layouts\n\n"
+
+			"dump_socket_mem\n"
+			"    Dumps the memory usage of all sockets\n\n"
+
+			"dump_memzone\n"
+			"    Dumps the layout of all memory zones\n\n"
+
+			"dump_struct_sizes\n"
+			"    Dumps the size of all memory structures\n\n"
+
+			"dump_ring\n"
+			"    Dumps the status of all or specific element in DPDK rings\n\n"
+
+			"dump_mempool\n"
+			"    Dumps the statistics of all or specific memory pool\n\n"
+
+			"dump_devargs\n"
+			"    Dumps the user device list\n\n"
+
+			"dump_lcores\n"
+			"    Dumps the logical cores list\n\n"
+
+			"dump_trace\n"
+			"    Dumps the tracing data to the folder according to the current EAL settings\n\n"
+
+			"dump_log_types\n"
+			"    Dumps the log level for all the dpdk modules\n\n"
+		);
+	}
+
 	if (show_all || !strcmp(res->section, "devices")) {
 		cmdline_printf(
 			cl,
@@ -1016,13 +1055,13 @@  static cmdline_parse_token_string_t cmd_help_long_help =
 static cmdline_parse_token_string_t cmd_help_long_section =
 	TOKEN_STRING_INITIALIZER(struct cmd_help_long_result, section,
 		"all#control#display#config#ports#"
-		"filters#traffic_management#devices#drivers");
+		"filters#traffic_management#dump#devices#drivers");
 
 static cmdline_parse_inst_t cmd_help_long = {
 	.f = cmd_help_long_parsed,
 	.data = NULL,
 	.help_str = "help all|control|display|config|ports|"
-		"filters|traffic_management|devices|drivers: "
+		"filters|traffic_management|dump|devices|drivers: "
 		"Show help",
 	.tokens = {
 		(void *)&cmd_help_long_help,