From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>, netdev@vger.kernel.org
Subject: Re: [PATCH RESEND net-next] netlink: add tracepoint at NL_SET_ERR_MSG
Date: Tue, 2 Feb 2021 16:30:35 -0300 [thread overview]
Message-ID: <20210202193035.GI3288@horizon.localdomain> (raw)
In-Reply-To: <37002645-e09b-1067-eda6-ee30155afe47@gmail.com>
On Tue, Feb 02, 2021 at 09:16:28AM -0700, David Ahern wrote:
> On 2/2/21 5:30 AM, Marcelo Ricardo Leitner wrote:
> >
> > Also, if the message is a common one, one may not be able to easily
> > distinguish them. Ideally this shouldn't happen, but when debugging
> > applications such as OVS, where lots of netlink requests are flying,
> > it saves us time. I can, for example, look at a perf capture and
> > search for cls_flower or so. Otherwise, it will all show up as
> > "af_netlink: <err_msg>"
>
> Modules should be using the NL_SET_ERR_MSG_MOD variant, so the message
> would be ""af_netlink: cls_flower: <err_msg>"
Ah, right. They don't always do, though (and that probably should be
fixed). Also, currently there is no _MOD variant for NL_SET_ERR_MSG_ATTR.
For example:
$ git grep NL_SET_ERR_MSG -- cls_flower.c
cls_flower.c: NL_SET_ERR_MSG_MOD(extack, "Failed to setup flow action");
cls_flower.c: NL_SET_ERR_MSG_ATTR(extack,
cls_flower.c: NL_SET_ERR_MSG_ATTR(extack,
cls_flower.c: NL_SET_ERR_MSG(extack, "Missing MPLS option \"depth\"");
...
>
> I get the value in knowing the call site, so not arguing against that.
> Just hoping that your experience matches theory.
Okay.
Thanks,
Marcelo
next prev parent reply other threads:[~2021-02-02 19:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 18:12 [PATCH RESEND net-next] netlink: add tracepoint at NL_SET_ERR_MSG Marcelo Ricardo Leitner
2021-02-02 1:34 ` Jakub Kicinski
2021-02-02 12:30 ` Marcelo Ricardo Leitner
2021-02-02 16:16 ` David Ahern
2021-02-02 19:30 ` Marcelo Ricardo Leitner [this message]
2021-02-03 22:31 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210202193035.GI3288@horizon.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=dsahern@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox