Thread (20 messages) 20 messages, 6 authors, 2021-07-24

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

From: Li, Xiaoyun <hidden>
Date: 2021-06-17 03:29:55

Hi
-----Original Message-----
From: Andrew Rybchenko <redacted>
Sent: Thursday, June 17, 2021 00:32
To: Li, Xiaoyun <redacted>; Ori Kam <redacted>
Cc: dev@dpdk.org; Richardson, Bruce <redacted>; Yigit,
Ferruh [off-list ref]; Singh, Aman Deep
[off-list ref]
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 <redacted>
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help