Re: [PATCH net-next v3] net/sock: Introduce trace_sk_data_ready()

From: Peilin Ye
Date: Wed Oct 12 2022 - 13:57:29 EST


On Wed, Oct 12, 2022 at 08:58:32AM +0300, Leon Romanovsky wrote:
> > + trace_sk_data_ready(sk, __func__);
> > pr_debug("Entering iscsi_target_sk_data_ready: conn: %p\n", conn);
>
> This can go.

<...>

> __func__ repetitive pattern hints that it is not best API interface.
>
>
> > +TRACE_EVENT(sk_data_ready,
> > +
> > + TP_PROTO(const struct sock *sk, const char *func),
> > +
> > + TP_ARGS(sk, func),
> > +
> > + TP_STRUCT__entry(
> > + __field(const void *, skaddr)
> > + __field(__u16, family)
> > + __field(__u16, protocol)
> > + __string(func, func)
>
> TRACE_EVENT() is macro defined in .h file, you can safely put __func__
> instead.

Thanks for the suggestions! I will update in v4.

Peilin Ye