aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Abeni2024-03-07 15:29:51 +0100
committerPaolo Abeni2024-03-07 15:29:51 +0100
commita148f82c457f957cdc9445101882c225aa8c3ff0 (patch)
tree1d8c13b018f332b1cf886c5c59a60ef20040f42f
parent25a6838317606461cfed35698bf2233c1c40c065 (diff)
parent0ab544b6f055f234f708f294f4a6e47262573a4c (diff)
Merge branch 'tcp-add-two-missing-addresses-when-using-trace'
Jason Xing says: ==================== tcp: add two missing addresses when using trace When I reviewed other people's patch [1], I noticed that similar things also happen in tcp_event_skb class and tcp_event_sk_skb class. They don't print those two addrs of skb/sk which already exist. In this patch, I just do as other trace functions do, like trace_net_dev_start_xmit(), to know the exact flow or skb we would like to know in case some systems doesn't support BPF programs well or we have to use /sys/kernel/debug/tracing only for some reasons. [1] Link: https://lore.kernel.org/netdev/CAL+tcoAhvFhXdr1WQU8mv_6ZX5nOoNpbOLAB6=C+DB-qXQ11Ew@mail.gmail.com/ v2 Link: https://lore.kernel.org/netdev/CANn89iJcScraKAUk1GzZFoOO20RtC9iXpiJ4LSOWT5RUAC_QQA@mail.gmail.com/ 1. change the description. ==================== Link: https://lore.kernel.org/r/20240304092934.76698-1-kerneljasonxing@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--include/trace/events/tcp.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h
index 7b1ddffa3dfc..6ca3e0343666 100644
--- a/include/trace/events/tcp.h
+++ b/include/trace/events/tcp.h
@@ -88,7 +88,8 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,
sk->sk_v6_rcv_saddr, sk->sk_v6_daddr);
),
- TP_printk("family=%s sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
+ TP_printk("skbaddr=%p skaddr=%p family=%s sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
+ __entry->skbaddr, __entry->skaddr,
show_family_name(__entry->family),
__entry->sport, __entry->dport, __entry->saddr, __entry->daddr,
__entry->saddr_v6, __entry->daddr_v6,
@@ -361,7 +362,8 @@ DECLARE_EVENT_CLASS(tcp_event_skb,
TP_STORE_ADDR_PORTS_SKB(__entry, skb);
),
- TP_printk("src=%pISpc dest=%pISpc", __entry->saddr, __entry->daddr)
+ TP_printk("skbaddr=%p src=%pISpc dest=%pISpc",
+ __entry->skbaddr, __entry->saddr, __entry->daddr)
);
DEFINE_EVENT(tcp_event_skb, tcp_bad_csum,