Re: [PATCH net-next] udp: Add tracepoint for udp_sendmsg()

Breno Leitao
2025-04-17T16:00:30Z

On Thu, Apr 17, 2025 at 08:55:27AM -0700, David Ahern wrote:
> On 4/17/25 5:42 AM, Breno Leitao wrote:
> > Hello David,
> >
> > On Wed, Apr 16, 2025 at 04:16:26PM -0700, David Ahern wrote:
> >> On 4/16/25 1:23 PM, Breno Leitao wrote:
> >>> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> >>> index f9f5b92cf4b61..8c2902504a399 100644
> >>> --- a/net/ipv4/udp.c
> >>> +++ b/net/ipv4/udp.c
> >>> @@ -1345,6 +1345,8 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
> >>> connected = 1;
> >>> }
> >>>
> >>> + trace_udp_sendmsg_tp(sk, msg);
> >>
> >> why `_tp` suffix? the usual naming is trace_${func}
> >
> > I got the impression that DECLARE_TRACE() raw tracepoints names end up
> > in _tp():
> >
> > include/trace/events/tcp.h
> > DECLARE_TRACE(tcp_cwnd_reduction_tp,
>
> that is the only networking one:
>
> $ git grep trace_ net drivers/net | grep _tp
> net/bpf/test_run.c: trace_bpf_trigger_tp(nonce);
> net/ipv4/tcp_input.c: trace_tcp_cwnd_reduction_tp(sk,
> newly_acked_sacked, newly_lost, flag);

Do we want to rename them and remove the _tp? I suppose it is OK given
that tracepoints are not expected to be stable?

Also, if we have consensus about this patch, I will remove the _tp from
it.

Thanks!
--breno