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

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

Checks

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

Commit Message

Thomas Monjalon March 9, 2021, 11:31 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

Ajit Khaparde March 12, 2021, 7:09 p.m. UTC | #1
On Tue, Mar 9, 2021 at 3:32 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

> ---
>  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 | "
> -#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
>
  

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");
 }