# Re: \[PATCH net-next\] trace: tcp: Add tracepoint for tcp\_sendmsg()

- From: Eric Dumazet \<hidden\>
- Date: 2025-02-24 19:04:10 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/02/2941695
- Thread: https://ratatoskr.run/netdev/2025/02/2941611/t.md

```text
On Mon, Feb 24, 2025 at 7:24 PM Breno Leitao [ref] wrote:
>
> Add a lightweight tracepoint to monitor TCP sendmsg operations, enabling
> the tracing of TCP messages being sent.
>
> Meta has been using BPF programs to monitor this function for years,
> indicating significant interest in observing this important
> functionality. Adding a proper tracepoint provides a stable API for all
> users who need visibility into TCP message transmission.
>
> The implementation uses DECLARE_TRACE instead of TRACE_EVENT to avoid
> creating unnecessary trace event infrastructure and tracefs exports,
> keeping the implementation minimal while stabilizing the API.
>
> Given that this patch creates a rawtracepoint, you could hook into it
> using regular tooling, like bpftrace, using regular rawtracepoint
> infrastructure, such as:
>
>         rawtracepoint:tcp_sendmsg_tp {
>                 ....
>         }

I would expect tcp_sendmsg() being stable enough ?

kprobe:tcp_sendmsg {
}
```
