skb.h (498495dba268b20e8eadd7fe93c140c68b6cc9d2) skb.h (c504e5c2f9648a1e5c2be01e8c3f59d394192bd3)
1/* SPDX-License-Identifier: GPL-2.0 */
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM skb
4
5#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
6#define _TRACE_SKB_H
7
8#include <linux/skbuff.h>
9#include <linux/netdevice.h>
10#include <linux/tracepoint.h>
11
1/* SPDX-License-Identifier: GPL-2.0 */
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM skb
4
5#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
6#define _TRACE_SKB_H
7
8#include <linux/skbuff.h>
9#include <linux/netdevice.h>
10#include <linux/tracepoint.h>
11
12#define TRACE_SKB_DROP_REASON \
13 EM(SKB_DROP_REASON_NOT_SPECIFIED, NOT_SPECIFIED) \
14 EMe(SKB_DROP_REASON_MAX, MAX)
15
16#undef EM
17#undef EMe
18
19#define EM(a, b) TRACE_DEFINE_ENUM(a);
20#define EMe(a, b) TRACE_DEFINE_ENUM(a);
21
22TRACE_SKB_DROP_REASON
23
24#undef EM
25#undef EMe
26#define EM(a, b) { a, #b },
27#define EMe(a, b) { a, #b }
28
12/*
13 * Tracepoint for free an sk_buff:
14 */
15TRACE_EVENT(kfree_skb,
16
29/*
30 * Tracepoint for free an sk_buff:
31 */
32TRACE_EVENT(kfree_skb,
33
17 TP_PROTO(struct sk_buff *skb, void *location),
34 TP_PROTO(struct sk_buff *skb, void *location,
35 enum skb_drop_reason reason),
18
36
19 TP_ARGS(skb, location),
37 TP_ARGS(skb, location, reason),
20
21 TP_STRUCT__entry(
38
39 TP_STRUCT__entry(
22 __field( void *, skbaddr )
23 __field( void *, location )
24 __field( unsigned short, protocol )
40 __field(void *, skbaddr)
41 __field(void *, location)
42 __field(unsigned short, protocol)
43 __field(enum skb_drop_reason, reason)
25 ),
26
27 TP_fast_assign(
28 __entry->skbaddr = skb;
29 __entry->location = location;
30 __entry->protocol = ntohs(skb->protocol);
44 ),
45
46 TP_fast_assign(
47 __entry->skbaddr = skb;
48 __entry->location = location;
49 __entry->protocol = ntohs(skb->protocol);
50 __entry->reason = reason;
31 ),
32
51 ),
52
33 TP_printk("skbaddr=%p protocol=%u location=%p",
34 __entry->skbaddr, __entry->protocol, __entry->location)
53 TP_printk("skbaddr=%p protocol=%u location=%p reason: %s",
54 __entry->skbaddr, __entry->protocol, __entry->location,
55 __print_symbolic(__entry->reason,
56 TRACE_SKB_DROP_REASON))
35);
36
37TRACE_EVENT(consume_skb,
38
39 TP_PROTO(struct sk_buff *skb),
40
41 TP_ARGS(skb),
42

--- 34 unchanged lines hidden ---
57);
58
59TRACE_EVENT(consume_skb,
60
61 TP_PROTO(struct sk_buff *skb),
62
63 TP_ARGS(skb),
64

--- 34 unchanged lines hidden ---