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

Li, Xiaoyun xiaoyun.li at intel.com
Thu Jun 17 05:29:42 CEST 2021


Hi

> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Sent: Thursday, June 17, 2021 00:32
> 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 v2] 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 concatanate split

Typo: "concatenate"
And it's really good to have those split strings combined. Thanks.

> format string to make it easier to search using grep.
> 
> Fix indent of format string arguments.
> 
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> ---
> 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                  | 452 ++++++------
>  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, 1002 insertions(+), 822 deletions(-)
<snip>
> 2.30.2

This patch overall looks good to me.

But there're some warnings about coding styles reported. http://mails.dpdk.org/archives/test-report/2021-June/199047.html
Not all of them makes sense.
But can you check ones with QUOTED_WHITESPACE_BEFORE_NEWLINE, UNSPECIFIED_INT, EMBEDDED_FUNCTION_NAME?
The latter two type of warnings are legacy issues but it'll be good to have them fixed.

BRs
Xiaoyun


More information about the dev mailing list