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

- From: David Ahern \<dsahern@kernel.org\>
- Date: 2025-02-26 17:12:09 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/02/2946165
- Thread: https://ratatoskr.run/netdev/2025/02/2941611/t.md

```text
On 2/26/25 9:10 AM, Breno Leitao wrote:
>> Also, if a tracepoint is added, inside of tcp_sendmsg_locked would cover
>> more use cases (see kernel references to it).
> 
> Agree, this seems to provide more useful information
> 
>> We have a patch for a couple years now with a tracepoint inside the
> 
> Sorry, where do you have this patch? is it downstream?

company tree. Attached. Where to put tracepoints and what arguments to
supply so that it is beneficial to multiple users is always a touchy
subject :-), so I have not tried to push the patch out. sock arg should
be added to it for example.

The key is to see how tcp_sendmsg_locked breaks up the buffers, and then
another one in tcp_write_xmit to see when the actual push out happens.
At the time I was looking at latency in the stack - from sendmsg call to
driver pushing descriptors to hardware.
```

## Attachments

- [0001-tcp-Add-tracepoints-to-tcp\_write\_xmit-and-tcp\_sendms.patch](https://ratatoskr.run/netdev/2025/02/2946165/attachment/0) (text/plain, 3337 bytes)
