Thread (2 messages) 2 messages, 2 authors, 6h ago

Re: [PATCH net-next] net/tcp: Add explicit tracepoint for tcp_syn_ack_timeout()

From: Eric Dumazet <edumazet@google.com>
Date: 2026-07-07 07:53:02
Also in: netdev
Subsystem: networking [general], networking [tcp], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Neal Cardwell, Linus Torvalds

On Mon, Jul 6, 2026 at 6:01 PM Emil Tsalapatis [off-list ref] wrote:
Clang can inline the tcp_syn_ack_timeout() function during compilation,
making it impossible to use kprobes for tracing without preventing
inlining. Add an explicit tracepoint to it instead.
So much copy/pasting for a very small issue :/
Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
---
 include/trace/events/tcp.h | 72 ++++++++++++++++++++++++++++++++++++++
 net/ipv4/tcp_timer.c       |  3 ++
 2 files changed, 75 insertions(+)
tcp_syn_ack_timeout() is hardly a fast path, so you can instead:
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 322db13333c7..ab2c3de19e46 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -748,7 +748,7 @@ static void tcp_write_timer(struct timer_list *t)
        sock_put(sk);
 }

-void tcp_syn_ack_timeout(const struct request_sock *req)
+noinline_for_tracing void tcp_syn_ack_timeout(const struct request_sock *req)
 {
        struct net *net = read_pnet(&inet_rsk(req)->ireq_net);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help