Meta has been using BPF programs to monitor tcp_sendmsg() 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.
David Ahern is using a similar functionality with a custom patch[1]. So, this means we have more than a single use case for this request, and it might be a good idea to have such feature upstream. Link: https://lore.kernel.org/all/[email protected]/ [1] Signed-off-by: Breno Leitao <[email protected]> --- Changes in v2: - Change to a full tracepoint inside tcp_sendmsg_locked(), heavily inspired in David's patch - Link to v1: https://lore.kernel.org/r/[email protected] --- Breno Leitao (2): net: pass const to msg_data_left() trace: tcp: Add tracepoint for tcp_sendmsg_locked() include/linux/socket.h | 2 +- include/trace/events/tcp.h | 24 ++++++++++++++++++++++++ net/ipv4/tcp.c | 2 ++ 3 files changed, 27 insertions(+), 1 deletion(-) --- base-commit: 1a9239bb4253f9076b5b4b2a1a4e8d7defd77a95 change-id: 20250224-tcpsendmsg-4f0a236751d7 Best regards, -- Breno Leitao <[email protected]>
