On Sun, Mar 21, 2021 at 11:31 PM Thomas Monjalon <tho...@monjalon.net> wrote:
>
> The main intent of this series is to provide a nice help
> for the --log-level option.

The changes on usage() and the --log-level help are not related and
could have been separated in two series.

Like a series with:
  eal: use macros for help option
  eal: move private log functions
  eal: introduce maximum log level macro
  eal: catch invalid log level number
  eal: add log level help

About these --log-level related patches, I am ok with them (with just
a comment on sorting logtypes).

Then a series with:
  eal: explain argv behaviour during init
  eal: improve options usage text
  app: fix exit messages
  app: hook in EAL usage help
  app/regex: fix usage text
  app/testpmd: fix usage text

For the usage() patches, the main enhancement comes from hooking the
app/ usage() to rte_set_application_usage_hook().

As for the "eal: improve options usage text" patch, there are two
changes in behavior.

Taking testpmd as an example:

"""
Usage: ./build/app/dpdk-testpmd [EAL options] -- [testpmd options]

  --interactive: run in interactive mode.
  --cmdline-file: execute cli commands before startup.
  --auto-start: start forwarding on init [always when non-interactive].
  --help: display this message and quit.
  --tx-first: start forwarding sending a burst first (only if
interactive is disabled).
  --stats-period=PERIOD: statistics will be shown every PERIOD seconds
(only if interactive is disabled).
[snip]
  --hairpin-mode=0xXX: bitmask set the hairpin port mode.
    0x10 - explicit Tx rule, 0x02 - hairpin ports paired
    0x01 - hairpin ports loop, 0x00 - hairpin port self

EAL common options:
  -c COREMASK         Hexadecimal bitmask of cores to run on
  -l CORELIST         List of cores to run on
                      The argument format is <c1>[-c2][,c3[-c4],...]
                      where c1, c2, etc are core indexes between 0 and 128
  --lcores COREMAP    Map lcore set to physical cpu set
                      The argument format is
[snip]
"""

- The "Usage: " lists [EAL options] first, so I would expect them to
be listed first.
Hence I am not a fan of the reordering.


- Testpmd options are not identified anymore while it was easier
before to find out about it with the "===== Application Usage ====="
banner.
Applications now must add a banner to differentiate their options from
the EAL ones.


-- 
David Marchand

Reply via email to