diff mbox series

[v3,11/11] app/testpmd: fix usage text

Message ID 20210312181720.242252-12-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers show
Series improve options help | expand

Checks

Context Check Description
ci/iol-mellanox-Performance fail Performance Testing issues
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon March 12, 2021, 6:17 p.m. UTC
The options help text was including an incomplete and redundant
summary of the options before explaining each. The summary is dropped.

The details of the option --hairpin-mode had an extra space,
breaking the alignment with the next line.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-pmd/parameters.c | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

Comments

Li, Xiaoyun March 19, 2021, 8:59 a.m. UTC | #1
Hi

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Saturday, March 13, 2021 02:17
> To: dev@dpdk.org
> Cc: david.marchand@redhat.com; Richardson, Bruce
> <bruce.richardson@intel.com>; mb@smartsharesystems.com; Li, Xiaoyun
> <xiaoyun.li@intel.com>
> Subject: [PATCH v3 11/11] app/testpmd: fix usage text
> 
> The options help text was including an incomplete and redundant summary of
> the options before explaining each. The summary is dropped.
> 
> The details of the option --hairpin-mode had an extra space, breaking the
> alignment with the next line.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  app/test-pmd/parameters.c | 26 ++------------------------
>  1 file changed, 2 insertions(+), 24 deletions(-)
> 
> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index
> 7f41021d4d..efcbf1e845 100644
> --- a/app/test-pmd/parameters.c
> +++ b/app/test-pmd/parameters.c
> @@ -49,29 +49,7 @@
>  void
>  usage(const char *progname)
>  {
> -	printf("usage: %s [EAL options] -- "
> -#ifdef RTE_LIB_CMDLINE
> -	       "[--interactive|-i] "
> -	       "[--cmdline-file=FILENAME] "
> -#endif
> -	       "[--help|-h] | [--auto-start|-a] | ["
> -	       "--tx-first | --stats-period=PERIOD | "
> -	       "--coremask=COREMASK --portmask=PORTMASK --numa "
> -	       "--portlist=PORTLIST "
> -	       "--mbuf-size= | --total-num-mbufs= | "
> -	       "--nb-cores= | --nb-ports= | "
> -#ifdef RTE_LIB_CMDLINE
> -	       "--eth-peers-configfile= | "
> -	       "--eth-peer=X,M:M:M:M:M:M | "
> -	       "--tx-ip=SRC,DST | --tx-udp=PORT | "

The patch looks good to me. But I found one issue.
"--tx-ip=SRC,DST | --tx-udp=PORT " These 2 parameters are missing in the detailed usage text below.

And out of curiosity, I compared the detailed usage items and lgopts in launch_args_parse()
There are several missing items in the usage text.
"--ports" (I didn't find this in the parse actually, should this be removed from lgopts?)
"--noisy-lkup-num-reads-writes" (This one is misspelled in the usage text as the 2nd " noisy-lkup-num- writes ")
"--no-numa" "--mp-anon" "--enable-scatter" There 3 parameters are missing in usage text.

BRs
Xiaoyun

> -#endif
> -	       "--pkt-filter-mode= |"
> -	       "--rss-ip | --rss-udp | --rss-level-inner | --rss-level-outer |"
> -	       "--rxpt= | --rxht= | --rxwt= |"
> -	       " --rxfreet= | --txpt= | --txht= | --txwt= | --txfreet= | "
> -	       "--txrst= | --tx-offloads= | | --rx-offloads= | "
> -	       "--vxlan-gpe-port= | --geneve-parsed-port= | "
> -	       "--record-core-cycles | --record-burst-stats]\n",
> +	printf("\nUsage: %s [EAL options] -- [testpmd options]\n\n",
>  	       progname);
>  #ifdef RTE_LIB_CMDLINE
>  	printf("  --interactive: run in interactive mode.\n"); @@ -221,7 +199,7
> @@ usage(const char *progname)
>  	       "enabled\n");
>  	printf("  --record-core-cycles: enable measurement of CPU cycles.\n");
>  	printf("  --record-burst-stats: enable display of RX and TX bursts.\n");
> -	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n "
> +	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
>  	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
>  	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
>  }
> --
> 2.30.1
Thomas Monjalon March 19, 2021, 9:29 a.m. UTC | #2
19/03/2021 09:59, Li, Xiaoyun:
> The patch looks good to me. But I found one issue.
> "--tx-ip=SRC,DST | --tx-udp=PORT " These 2 parameters are missing in the detailed usage text below.
> 
> And out of curiosity, I compared the detailed usage items and lgopts in launch_args_parse()
> There are several missing items in the usage text.
> "--ports" (I didn't find this in the parse actually, should this be removed from lgopts?)
> "--noisy-lkup-num-reads-writes" (This one is misspelled in the usage text as the 2nd " noisy-lkup-num- writes ")
> "--no-numa" "--mp-anon" "--enable-scatter" There 3 parameters are missing in usage text.

Thanks, I will check each of them.
diff mbox series

Patch

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 7f41021d4d..efcbf1e845 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -49,29 +49,7 @@ 
 void
 usage(const char *progname)
 {
-	printf("usage: %s [EAL options] -- "
-#ifdef RTE_LIB_CMDLINE
-	       "[--interactive|-i] "
-	       "[--cmdline-file=FILENAME] "
-#endif
-	       "[--help|-h] | [--auto-start|-a] | ["
-	       "--tx-first | --stats-period=PERIOD | "
-	       "--coremask=COREMASK --portmask=PORTMASK --numa "
-	       "--portlist=PORTLIST "
-	       "--mbuf-size= | --total-num-mbufs= | "
-	       "--nb-cores= | --nb-ports= | "
-#ifdef RTE_LIB_CMDLINE
-	       "--eth-peers-configfile= | "
-	       "--eth-peer=X,M:M:M:M:M:M | "
-	       "--tx-ip=SRC,DST | --tx-udp=PORT | "
-#endif
-	       "--pkt-filter-mode= |"
-	       "--rss-ip | --rss-udp | --rss-level-inner | --rss-level-outer |"
-	       "--rxpt= | --rxht= | --rxwt= |"
-	       " --rxfreet= | --txpt= | --txht= | --txwt= | --txfreet= | "
-	       "--txrst= | --tx-offloads= | | --rx-offloads= | "
-	       "--vxlan-gpe-port= | --geneve-parsed-port= | "
-	       "--record-core-cycles | --record-burst-stats]\n",
+	printf("\nUsage: %s [EAL options] -- [testpmd options]\n\n",
 	       progname);
 #ifdef RTE_LIB_CMDLINE
 	printf("  --interactive: run in interactive mode.\n");
@@ -221,7 +199,7 @@  usage(const char *progname)
 	       "enabled\n");
 	printf("  --record-core-cycles: enable measurement of CPU cycles.\n");
 	printf("  --record-burst-stats: enable display of RX and TX bursts.\n");
-	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n "
+	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
 }