Re: [PATCH net-next] trace: tcp: Add tracepoint for tcp_sendmsg()

David Ahern
2025-04-02T14:11:04Z

On 4/2/25 8:57 AM, Breno Leitao wrote:
> diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h
> index 1a40c41ff8c30..cd90a8c66d683 100644
> --- a/include/trace/events/tcp.h
> +++ b/include/trace/events/tcp.h
> @@ -259,6 +259,29 @@ TRACE_EVENT(tcp_retransmit_synack,
> __entry->saddr_v6, __entry->daddr_v6)
> );
>
> +TRACE_EVENT(tcp_sendmsg_locked,
> + TP_PROTO(struct msghdr *msg, struct sk_buff *skb, int size_goal),

How about passing in the sk reference here; not needed for trace
entries, but makes it directly accessible for bpf programs.

Otherwise, LGTM.