Skip to contentSkip to conversation

tcp: add missing family to tcp_set_ca_state() tracepoint

PATCH Applied Eric Dumazet 3 participants 3 messages Aug 8, 2023 – Aug 9, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcp: add missing family to tcp_set_ca_state() tracepoint

Before this code is copied, add the missing family, as we did in commit 3dd344ea84e1 ("net: tracepoint: exposing sk_family in all tcp:tracepoints")

Fixes 15fcdf6ae116 ("tcp: Add tracepoint for tcp_set_ca_state")
Cc Ping Gan <[email protected]>
Cc Manjusaka <[email protected]>
---
 include/trace/events/tcp.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/trace/events/tcp.h +4 -1
index bf06db8d2046c4a7f59070b724ce6fc7762f9d4b..7b1ddffa3dfc825f431bc575f4e86a3509dc9426 100644
@@ -381,6 +381,7 @@ TRACE_EVENT(tcp_cong_state_set,
 		__field(const void *, skaddr)
 		__field(__u16, sport)
 		__field(__u16, dport)
+		__field(__u16, family)
 		__array(__u8, saddr, 4)
 		__array(__u8, daddr, 4)
 		__array(__u8, saddr_v6, 16)
@@ -396,6 +397,7 @@ TRACE_EVENT(tcp_cong_state_set,
 
 		__entry->sport = ntohs(inet->inet_sport);
 		__entry->dport = ntohs(inet->inet_dport);
+		__entry->family = sk->sk_family;
 
 		p32 = (__be32 *) __entry->saddr;
 		*p32 = inet->inet_saddr;
@@ -409,7 +411,8 @@ TRACE_EVENT(tcp_cong_state_set,
 		__entry->cong_state = ca_state;
 	),
 
-	TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c cong_state=%u",
+	TP_printk("family=%s sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c cong_state=%u",
+		  show_family_name(__entry->family),
 		  __entry->sport, __entry->dport,
 		  __entry->saddr, __entry->daddr,
 		  __entry->saddr_v6, __entry->daddr_v6,
Signature · 1 line
2.41.0.640.ga95def55d0-goog
#2 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Tue, 8 Aug 2023 08:49:23 +0000 you wrote:

Before this code is copied, add the missing family, as we did in commit 3dd344ea84e1 ("net: tracepoint: exposing sk_family in all tcp:tracepoints")

Fixes 15fcdf6ae116 ("tcp: Add tracepoint for tcp_set_ca_state")
Cc Ping Gan <[email protected]>
Cc Manjusaka <[email protected]>

[...]

Here is the summary with links:
- [net] tcp: add missing family to tcp_set_ca_state() tracepoint

    https://git.kernel.org/netdev/net/c/8a70ed9520c5

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html