On Tue Jul 7, 2026 at 3:52 AM EDT, Eric Dumazet wrote: > On Mon, Jul 6, 2026 at 6:01 PM Emil Tsalapatis <[email protected]> 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 <[email protected]> >> --- >> 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);
Sounds good, I will respin and just mark it noinline.
