Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ping Gan <jacky_gam_2001@163.com>
Cc: Manjusaka <me@manjusaka.me>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230808084923.2239142-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
8a70ed95 f8d3e0dc

+4 -1
+4 -1
include/trace/events/tcp.h
··· 381 381 __field(const void *, skaddr) 382 382 __field(__u16, sport) 383 383 __field(__u16, dport) 384 + __field(__u16, family) 384 385 __array(__u8, saddr, 4) 385 386 __array(__u8, daddr, 4) 386 387 __array(__u8, saddr_v6, 16) ··· 397 396 398 397 __entry->sport = ntohs(inet->inet_sport); 399 398 __entry->dport = ntohs(inet->inet_dport); 399 + __entry->family = sk->sk_family; 400 400 401 401 p32 = (__be32 *) __entry->saddr; 402 402 *p32 = inet->inet_saddr; ··· 411 409 __entry->cong_state = ca_state; 412 410 ), 413 411 414 - TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c cong_state=%u", 412 + TP_printk("family=%s sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c cong_state=%u", 413 + show_family_name(__entry->family), 415 414 __entry->sport, __entry->dport, 416 415 __entry->saddr, __entry->daddr, 417 416 __entry->saddr_v6, __entry->daddr_v6,