Skip to content

Commit f6e37b2

Browse files
liu-song-6davem330
authored andcommitted
tcp: add trace event class tcp_event_sk_skb
Introduce event class tcp_event_sk_skb for tcp tracepoints that have arguments sk and skb. Existing tracepoint trace_tcp_retransmit_skb() falls into this class. This patch rewrites the definition of trace_tcp_retransmit_skb() with tcp_event_sk_skb. Signed-off-by: Song Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bded442 commit f6e37b2

File tree

1 file changed

+14
-1
lines changed
  • include/trace/events

1 file changed

+14
-1
lines changed

include/trace/events/tcp.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
#include <linux/tracepoint.h>
1010
#include <net/ipv6.h>
1111

12-
TRACE_EVENT(tcp_retransmit_skb,
12+
/*
13+
* tcp event with arguments sk and skb
14+
*
15+
* Note: this class requires a valid sk pointer; while skb pointer could
16+
* be NULL.
17+
*/
18+
DECLARE_EVENT_CLASS(tcp_event_sk_skb,
1319

1420
TP_PROTO(struct sock *sk, struct sk_buff *skb),
1521

@@ -64,6 +70,13 @@ TRACE_EVENT(tcp_retransmit_skb,
6470
__entry->saddr_v6, __entry->daddr_v6)
6571
);
6672

73+
DEFINE_EVENT(tcp_event_sk_skb, tcp_retransmit_skb,
74+
75+
TP_PROTO(struct sock *sk, struct sk_buff *skb),
76+
77+
TP_ARGS(sk, skb)
78+
);
79+
6780
#endif /* _TRACE_TCP_H */
6881

6982
/* This part must be outside protection */

0 commit comments

Comments
 (0)