History

tcp: add tracing of skb/skaddr in tcp_event_sk_skb class

Printing the addresses can help us identify the exact skb/sk for those system in which it's not that easy to run BPF program. As we can see, it already fetches those, then use it directly and it will print like below: ...tcp_retransmit_skb: skbaddr=XXX skaddr=XXX family=AF_INET...

Jason Xing committed 2 years ago

Commit 4e441bb1 parent 25a68381 file · +2 −1Browse files

Showing the changes to include/trace (1 of 1 file). Show all

Unified · Split

include/trace/events/tcp.h+2−1
@@ -88,7 +88,8 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb, · 87 unmodified lines
8888 sk->sk_v6_rcv_saddr, sk->sk_v6_daddr);
8989 ),
9090
91− TP_printk("family=%s sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
91+ TP_printk("skbaddr=%p skaddr=%p family=%s sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
92+ __entry->skbaddr, __entry->skaddr,
9293 show_family_name(__entry->family),
9394 __entry->sport, __entry->dport, __entry->saddr, __entry->daddr,
9495 __entry->saddr_v6, __entry->daddr_v6,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t