diff mbox series

[net-next] trace: tcp: Add const qualifier to skb parameter in tcp_probe event

Message ID 20250416-tcp_probe-v1-1-1edc3c5a1cb8@debian.org (mailing list archive)
State Accepted
Commit 1df4a945444f071a9c5e09580a485919c42d4de5
Delegated to: Netdev Maintainers
Headers show
Series [net-next] trace: tcp: Add const qualifier to skb parameter in tcp_probe event | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/build_tools success Errors and warnings before: 26 (+2) this patch: 26 (+2)
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 2 this patch: 2
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 24 this patch: 24
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2025-04-17--21-00 (tests: 916)

Commit Message

Breno Leitao April 16, 2025, 5:06 p.m. UTC
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>
---
Sending this for net-next to avoid bringing this to stable tree, which
would make backport harder for not a big benefit.
---
 include/trace/events/tcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 40ad72f88a65814ffeb1ab362074c6f8c4dc3f61
change-id: 20250416-tcp_probe-004337dc78a5

Best regards,

Comments

Kuniyuki Iwashima April 16, 2025, 7:35 p.m. UTC | #1
From: Breno Leitao <leitao@debian.org>
Date: Wed, 16 Apr 2025 10:06:12 -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>
patchwork-bot+netdevbpf@kernel.org April 18, 2025, 2:51 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 16 Apr 2025 10:06:12 -0700 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [net-next] trace: tcp: Add const qualifier to skb parameter in tcp_probe event
    https://git.kernel.org/netdev/net-next/c/1df4a945444f

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h
index 75d3d53a3832c..53e878fa14d14 100644
--- a/include/trace/events/tcp.h
+++ b/include/trace/events/tcp.h
@@ -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),