trace: tcp: Add const qualifier to skb parameter in tcp_probe event
authorBreno Leitao <leitao@debian.org>
Wed, 16 Apr 2025 17:06:12 +0000 (10:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 18 Apr 2025 02:04:43 +0000 (19:04 -0700)
Change the tcp_probe tracepoint to accept a const struct sk_buff
parameter instead of a non-const one. This improves type safety and
better reflects that the skb is not modified within the tracepoint
implementation.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250416-tcp_probe-v1-1-1edc3c5a1cb8@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/trace/events/tcp.h

index 75d3d53..53e878f 100644 (file)
@@ -293,7 +293,7 @@ DECLARE_TRACE(tcp_cwnd_reduction_tp,
 
 TRACE_EVENT(tcp_probe,
 
-       TP_PROTO(struct sock *sk, struct sk_buff *skb),
+       TP_PROTO(struct sock *sk, const struct sk_buff *skb),
 
        TP_ARGS(sk, skb),