[dpdk-dev] [PATCH v3] app/testpmd: send failure logs to stderr

Li, Xiaoyun xiaoyun.li at intel.com
Fri Jun 18 10:32:39 CEST 2021


> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Sent: Thursday, June 17, 2021 22:20
> To: Li, Xiaoyun <xiaoyun.li at intel.com>; Ori Kam <orika at nvidia.com>
> Cc: dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>; Yigit,
> Ferruh <ferruh.yigit at intel.com>; Singh, Aman Deep
> <aman.deep.singh at intel.com>
> Subject: [PATCH v3] app/testpmd: send failure logs to stderr
> 
> Running with stdout suppressed or redirected for further processing
> is very confusing in the case of errors. Fix it by logging errors and
> warnings to stderr.
> 
> Since lines with log messages are touched anyway concatenate split
> format strings to make it easier to search using grep.
> 
> Fix indent of format string arguments.
> 
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> ---
> v3:
>  - fix typo in the patch description
>  - fix applicable coding style issues reported by patchwork
> 
> v2:
>  - switch from printf() to fpritnf(stderr, ...) in more cases
>  - do not inherit acks from the previous version since the patch is
>    much bigger
>  - fix style in few cases (TAB vs spaces, missing space separtor etc)
>  - still don't use TESTPMD_LOG() since the patch does not add new logs.
>    Also switching to TESTPMD_LOG() will add "testpmd: " prefix to log
>    messages and it is a real change and could be a pain for automation.
> 
>  app/test-pmd/bpf_cmd.c                 |   6 +-
>  app/test-pmd/cmdline.c                 | 957 ++++++++++++++-----------
>  app/test-pmd/cmdline_flow.c            |  20 +-
>  app/test-pmd/cmdline_mtr.c             |   8 +-
>  app/test-pmd/cmdline_tm.c              |  33 +-
>  app/test-pmd/config.c                  | 455 ++++++------
>  app/test-pmd/csumonly.c                |   5 +-
>  app/test-pmd/parameters.c              |  21 +-
>  app/test-pmd/testpmd.c                 | 298 ++++----
>  app/test-pmd/util.c                    |  19 +-
>  doc/guides/rel_notes/release_21_08.rst |   5 +
>  11 files changed, 1004 insertions(+), 823 deletions(-)

Acked-by: Xiaoyun Li <xiaoyun.li at intel.com>


More information about the dev mailing list