1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM skb
5 #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/skbuff.h>
9 #include <linux/netdevice.h>
10 #include <linux/tracepoint.h>
13 * Tracepoint for free an sk_buff:
15 TRACE_EVENT(kfree_skb
,
17 TP_PROTO(struct sk_buff
*skb
, void *location
),
19 TP_ARGS(skb
, location
),
22 __field( void *, skbaddr
)
23 __field( void *, location
)
24 __field( unsigned short, protocol
)
28 __entry
->skbaddr
= skb
;
29 __entry
->location
= location
;
30 __entry
->protocol
= ntohs(skb
->protocol
);
33 TP_printk("skbaddr=%p protocol=%u location=%p",
34 __entry
->skbaddr
, __entry
->protocol
, __entry
->location
)
37 TRACE_EVENT(consume_skb
,
39 TP_PROTO(struct sk_buff
*skb
),
44 __field( void *, skbaddr
)
48 __entry
->skbaddr
= skb
;
51 TP_printk("skbaddr=%p", __entry
->skbaddr
)
54 TRACE_EVENT(skb_copy_datagram_iovec
,
56 TP_PROTO(const struct sk_buff
*skb
, int len
),
61 __field( const void *, skbaddr
)
66 __entry
->skbaddr
= skb
;
70 TP_printk("skbaddr=%p len=%d", __entry
->skbaddr
, __entry
->len
)
73 #endif /* _TRACE_SKB_H */
75 /* This part must be outside protection */
76 #include <trace/define_trace.h>