在 2021/4/17 0:28, Stephen Hemminger 写道:
On Fri, 16 Apr 2021 11:22:02 +0100
Kevin Traynor <ktray...@redhat.com> wrote:

+       if (dev_conf == NULL) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Cannot configure ethdev port %u to NULL dev_conf\n",

The others use a natural sounding names instead of argument name. If you
wanted to match that it could be "..to NULL conf"

I would prefer that error messages don't try to be English sentences.
The wording ends up awkward. and overly wordy.
If function name is automatically included by RTE_ETHDEV_LOG() then
Just:
                RTE_ETHDEV_LOG(ERR, "NULL ethdev")
should be enough for programmer to find/fix the problem
.
Hi, Stephen, thanks your for comment.
But I am on side with Andrew Rybchenko.
"- log messages should be human readable (i.e. I'd avoid
   usage of function name)"

Reply via email to