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
,
16 struct net_device
*dev
,
17 unsigned int skb_len
),
19 TP_ARGS(skb
, rc
, dev
, skb_len
),
22 __field( void *, skbaddr
)
23 __field( unsigned int, len
)
25 __string( name
, dev
->name
)
29 __entry
->skbaddr
= skb
;
30 __entry
->len
= skb_len
;
32 __assign_str(name
, dev
->name
);
35 TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
36 __get_str(name
), __entry
->skbaddr
, __entry
->len
, __entry
->rc
)
39 DECLARE_EVENT_CLASS(net_dev_template
,
41 TP_PROTO(struct sk_buff
*skb
),
46 __field( void *, skbaddr
)
47 __field( unsigned int, len
)
48 __string( name
, skb
->dev
->name
)
52 __entry
->skbaddr
= skb
;
53 __entry
->len
= skb
->len
;
54 __assign_str(name
, skb
->dev
->name
);
57 TP_printk("dev=%s skbaddr=%p len=%u",
58 __get_str(name
), __entry
->skbaddr
, __entry
->len
)
61 DEFINE_EVENT(net_dev_template
, net_dev_queue
,
63 TP_PROTO(struct sk_buff
*skb
),
68 DEFINE_EVENT(net_dev_template
, netif_receive_skb
,
70 TP_PROTO(struct sk_buff
*skb
),
75 DEFINE_EVENT(net_dev_template
, netif_rx
,
77 TP_PROTO(struct sk_buff
*skb
),
81 #endif /* _TRACE_NET_H */
83 /* This part must be outside protection */
84 #include <trace/define_trace.h>