[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be290c78-1929-9d33-d236-d5d202613522@gmail.com>
Date: Wed, 3 Feb 2021 19:15:57 -0700
From: David Ahern <dsahern@...il.com>
To: Marcelo Ricardo Leitner <mleitner@...hat.com>,
netdev@...r.kernel.org
Cc: Jakub Kicinski <kuba@...nel.org>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [PATCH net-next v2] netlink: add tracepoint at NL_SET_ERR_MSG
On 2/3/21 6:48 PM, Marcelo Ricardo Leitner wrote:
> From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
>
> Often userspace won't request the extack information, or they don't log it
> because of log level or so, and even when they do, sometimes it's not
> enough to know exactly what caused the error.
>
> Netlink extack is the standard way of reporting erros with descriptive
> error messages. With a trace point on it, we then can know exactly where
> the error happened, regardless of userspace app. Also, we can even see if
> the err msg was overwritten.
>
> The wrapper do_trace_netlink_extack() is because trace points shouldn't be
> called from .h files, as trace points are not that small, and the function
> call to do_trace_netlink_extack() on the macros is not protected by
> tracepoint_enabled() because the macros are called from modules, and this
> would require exporting some trace structs. As this is error path, it's
> better to export just the wrapper instead.
>
> v2: removed leftover tracepoint declaration
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
> ---
> include/linux/netlink.h | 6 ++++++
> include/trace/events/netlink.h | 29 +++++++++++++++++++++++++++++
> net/netlink/af_netlink.c | 8 ++++++++
> 3 files changed, 43 insertions(+)
> create mode 100644 include/trace/events/netlink.h
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists