Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
net.h
Go to the documentation of this file.
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM net
3 
4 #if !defined(_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_NET_H
6 
7 #include <linux/skbuff.h>
8 #include <linux/netdevice.h>
9 #include <linux/ip.h>
10 #include <linux/tracepoint.h>
11 
12 TRACE_EVENT(net_dev_xmit,
13 
14  TP_PROTO(struct sk_buff *skb,
15  int rc,
16  struct net_device *dev,
17  unsigned int skb_len),
18 
19  TP_ARGS(skb, rc, dev, skb_len),
20 
22  __field( void *, skbaddr )
23  __field( unsigned int, len )
24  __field( int, rc )
25  __string( name, dev->name )
26  ),
27 
29  __entry->skbaddr = skb;
30  __entry->len = skb_len;
31  __entry->rc = rc;
32  __assign_str(name, dev->name);
33  ),
34 
35  TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
36  __get_str(name), __entry->skbaddr, __entry->len, __entry->rc)
37 );
38 
39 DECLARE_EVENT_CLASS(net_dev_template,
40 
41  TP_PROTO(struct sk_buff *skb),
42 
43  TP_ARGS(skb),
44 
46  __field( void *, skbaddr )
47  __field( unsigned int, len )
48  __string( name, skb->dev->name )
49  ),
50 
52  __entry->skbaddr = skb;
53  __entry->len = skb->len;
54  __assign_str(name, skb->dev->name);
55  ),
56 
57  TP_printk("dev=%s skbaddr=%p len=%u",
58  __get_str(name), __entry->skbaddr, __entry->len)
59 )
60 
61 DEFINE_EVENT(net_dev_template, net_dev_queue,
62 
63  TP_PROTO(struct sk_buff *skb),
64 
65  TP_ARGS(skb)
66 );
67 
68 DEFINE_EVENT(net_dev_template, netif_receive_skb,
69 
70  TP_PROTO(struct sk_buff *skb),
71 
72  TP_ARGS(skb)
73 );
74 
75 DEFINE_EVENT(net_dev_template, netif_rx,
76 
77  TP_PROTO(struct sk_buff *skb),
78 
79  TP_ARGS(skb)
80 );
81 #endif /* _TRACE_NET_H */
82 
83 /* This part must be outside protection */
84 #include <trace/define_trace.h>