2 #define TRACE_SYSTEM net
4 #if !defined(_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/skbuff.h>
8 #include <linux/netdevice.h>
10 #include <linux/tracepoint.h>
12 TRACE_EVENT(net_dev_xmit
,
14 TP_PROTO(struct sk_buff
*skb
,
20 __field( void *, skbaddr
)
21 __field( unsigned int, len
)
23 __string( name
, skb
->dev
->name
)
27 __entry
->skbaddr
= skb
;
28 __entry
->len
= skb
->len
;
30 __assign_str(name
, skb
->dev
->name
);
33 TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
34 __get_str(name
), __entry
->skbaddr
, __entry
->len
, __entry
->rc
)
37 DECLARE_EVENT_CLASS(net_dev_template
,
39 TP_PROTO(struct sk_buff
*skb
),
44 __field( void *, skbaddr
)
45 __field( unsigned int, len
)
46 __string( name
, skb
->dev
->name
)
50 __entry
->skbaddr
= skb
;
51 __entry
->len
= skb
->len
;
52 __assign_str(name
, skb
->dev
->name
);
55 TP_printk("dev=%s skbaddr=%p len=%u",
56 __get_str(name
), __entry
->skbaddr
, __entry
->len
)
59 DEFINE_EVENT(net_dev_template
, net_dev_queue
,
61 TP_PROTO(struct sk_buff
*skb
),
66 DEFINE_EVENT(net_dev_template
, netif_receive_skb
,
68 TP_PROTO(struct sk_buff
*skb
),
73 DEFINE_EVENT(net_dev_template
, netif_rx
,
75 TP_PROTO(struct sk_buff
*skb
),
79 #endif /* _TRACE_NET_H */
81 /* This part must be outside protection */
82 #include <trace/define_trace.h>