aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/net.h')
-rw-r--r--include/trace/events/net.h158
1 files changed, 158 insertions, 0 deletions
diff --git a/include/trace/events/net.h b/include/trace/events/net.h
index f99645d05a8f..a34f27b2e394 100644
--- a/include/trace/events/net.h
+++ b/include/trace/events/net.h
@@ -6,9 +6,67 @@
6 6
7#include <linux/skbuff.h> 7#include <linux/skbuff.h>
8#include <linux/netdevice.h> 8#include <linux/netdevice.h>
9#include <linux/if_vlan.h>
9#include <linux/ip.h> 10#include <linux/ip.h>
10#include <linux/tracepoint.h> 11#include <linux/tracepoint.h>
11 12
13TRACE_EVENT(net_dev_start_xmit,
14
15 TP_PROTO(const struct sk_buff *skb, const struct net_device *dev),
16
17 TP_ARGS(skb, dev),
18
19 TP_STRUCT__entry(
20 __string( name, dev->name )
21 __field( u16, queue_mapping )
22 __field( const void *, skbaddr )
23 __field( bool, vlan_tagged )
24 __field( u16, vlan_proto )
25 __field( u16, vlan_tci )
26 __field( u16, protocol )
27 __field( u8, ip_summed )
28 __field( unsigned int, len )
29 __field( unsigned int, data_len )
30 __field( int, network_offset )
31 __field( bool, transport_offset_valid)
32 __field( int, transport_offset)
33 __field( u8, tx_flags )
34 __field( u16, gso_size )
35 __field( u16, gso_segs )
36 __field( u16, gso_type )
37 ),
38
39 TP_fast_assign(
40 __assign_str(name, dev->name);
41 __entry->queue_mapping = skb->queue_mapping;
42 __entry->skbaddr = skb;
43 __entry->vlan_tagged = vlan_tx_tag_present(skb);
44 __entry->vlan_proto = ntohs(skb->vlan_proto);
45 __entry->vlan_tci = vlan_tx_tag_get(skb);
46 __entry->protocol = ntohs(skb->protocol);
47 __entry->ip_summed = skb->ip_summed;
48 __entry->len = skb->len;
49 __entry->data_len = skb->data_len;
50 __entry->network_offset = skb_network_offset(skb);
51 __entry->transport_offset_valid =
52 skb_transport_header_was_set(skb);
53 __entry->transport_offset = skb_transport_offset(skb);
54 __entry->tx_flags = skb_shinfo(skb)->tx_flags;
55 __entry->gso_size = skb_shinfo(skb)->gso_size;
56 __entry->gso_segs = skb_shinfo(skb)->gso_segs;
57 __entry->gso_type = skb_shinfo(skb)->gso_type;
58 ),
59
60 TP_printk("dev=%s queue_mapping=%u skbaddr=%p vlan_tagged=%d vlan_proto=0x%04x vlan_tci=0x%04x protocol=0x%04x ip_summed=%d len=%u data_len=%u network_offset=%d transport_offset_valid=%d transport_offset=%d tx_flags=%d gso_size=%d gso_segs=%d gso_type=%#x",
61 __get_str(name), __entry->queue_mapping, __entry->skbaddr,
62 __entry->vlan_tagged, __entry->vlan_proto, __entry->vlan_tci,
63 __entry->protocol, __entry->ip_summed, __entry->len,
64 __entry->data_len,
65 __entry->network_offset, __entry->transport_offset_valid,
66 __entry->transport_offset, __entry->tx_flags,
67 __entry->gso_size, __entry->gso_segs, __entry->gso_type)
68);
69
12TRACE_EVENT(net_dev_xmit, 70TRACE_EVENT(net_dev_xmit,
13 71
14 TP_PROTO(struct sk_buff *skb, 72 TP_PROTO(struct sk_buff *skb,
@@ -78,6 +136,106 @@ DEFINE_EVENT(net_dev_template, netif_rx,
78 136
79 TP_ARGS(skb) 137 TP_ARGS(skb)
80); 138);
139
140DECLARE_EVENT_CLASS(net_dev_rx_verbose_template,
141
142 TP_PROTO(const struct sk_buff *skb),
143
144 TP_ARGS(skb),
145
146 TP_STRUCT__entry(
147 __string( name, skb->dev->name )
148 __field( unsigned int, napi_id )
149 __field( u16, queue_mapping )
150 __field( const void *, skbaddr )
151 __field( bool, vlan_tagged )
152 __field( u16, vlan_proto )
153 __field( u16, vlan_tci )
154 __field( u16, protocol )
155 __field( u8, ip_summed )
156 __field( u32, rxhash )
157 __field( bool, l4_rxhash )
158 __field( unsigned int, len )
159 __field( unsigned int, data_len )
160 __field( unsigned int, truesize )
161 __field( bool, mac_header_valid)
162 __field( int, mac_header )
163 __field( unsigned char, nr_frags )
164 __field( u16, gso_size )
165 __field( u16, gso_type )
166 ),
167
168 TP_fast_assign(
169 __assign_str(name, skb->dev->name);
170#ifdef CONFIG_NET_RX_BUSY_POLL
171 __entry->napi_id = skb->napi_id;
172#else
173 __entry->napi_id = 0;
174#endif
175 __entry->queue_mapping = skb->queue_mapping;
176 __entry->skbaddr = skb;
177 __entry->vlan_tagged = vlan_tx_tag_present(skb);
178 __entry->vlan_proto = ntohs(skb->vlan_proto);
179 __entry->vlan_tci = vlan_tx_tag_get(skb);
180 __entry->protocol = ntohs(skb->protocol);
181 __entry->ip_summed = skb->ip_summed;
182 __entry->rxhash = skb->rxhash;
183 __entry->l4_rxhash = skb->l4_rxhash;
184 __entry->len = skb->len;
185 __entry->data_len = skb->data_len;
186 __entry->truesize = skb->truesize;
187 __entry->mac_header_valid = skb_mac_header_was_set(skb);
188 __entry->mac_header = skb_mac_header(skb) - skb->data;
189 __entry->nr_frags = skb_shinfo(skb)->nr_frags;
190 __entry->gso_size = skb_shinfo(skb)->gso_size;
191 __entry->gso_type = skb_shinfo(skb)->gso_type;
192 ),
193
194 TP_printk("dev=%s napi_id=%#x queue_mapping=%u skbaddr=%p vlan_tagged=%d vlan_proto=0x%04x vlan_tci=0x%04x protocol=0x%04x ip_summed=%d rxhash=0x%08x l4_rxhash=%d len=%u data_len=%u truesize=%u mac_header_valid=%d mac_header=%d nr_frags=%d gso_size=%d gso_type=%#x",
195 __get_str(name), __entry->napi_id, __entry->queue_mapping,
196 __entry->skbaddr, __entry->vlan_tagged, __entry->vlan_proto,
197 __entry->vlan_tci, __entry->protocol, __entry->ip_summed,
198 __entry->rxhash, __entry->l4_rxhash, __entry->len,
199 __entry->data_len, __entry->truesize,
200 __entry->mac_header_valid, __entry->mac_header,
201 __entry->nr_frags, __entry->gso_size, __entry->gso_type)
202);
203
204DEFINE_EVENT(net_dev_rx_verbose_template, napi_gro_frags_entry,
205
206 TP_PROTO(const struct sk_buff *skb),
207
208 TP_ARGS(skb)
209);
210
211DEFINE_EVENT(net_dev_rx_verbose_template, napi_gro_receive_entry,
212
213 TP_PROTO(const struct sk_buff *skb),
214
215 TP_ARGS(skb)
216);
217
218DEFINE_EVENT(net_dev_rx_verbose_template, netif_receive_skb_entry,
219
220 TP_PROTO(const struct sk_buff *skb),
221
222 TP_ARGS(skb)
223);
224
225DEFINE_EVENT(net_dev_rx_verbose_template, netif_rx_entry,
226
227 TP_PROTO(const struct sk_buff *skb),
228
229 TP_ARGS(skb)
230);
231
232DEFINE_EVENT(net_dev_rx_verbose_template, netif_rx_ni_entry,
233
234 TP_PROTO(const struct sk_buff *skb),
235
236 TP_ARGS(skb)
237);
238
81#endif /* _TRACE_NET_H */ 239#endif /* _TRACE_NET_H */
82 240
83/* This part must be outside protection */ 241/* This part must be outside protection */