PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/include/trace/events/skb.h

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35
C++ Header | 60 lines | 40 code | 16 blank | 4 comment | 2 complexity | b59baae04db1e8a863284989e0121bfb MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1#undef TRACE_SYSTEM
 2#define TRACE_SYSTEM skb
 3
 4#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
 5#define _TRACE_SKB_H
 6
 7#include <linux/skbuff.h>
 8#include <linux/netdevice.h>
 9#include <linux/tracepoint.h>
10
11/*
12 * Tracepoint for free an sk_buff:
13 */
14TRACE_EVENT(kfree_skb,
15
16	TP_PROTO(struct sk_buff *skb, void *location),
17
18	TP_ARGS(skb, location),
19
20	TP_STRUCT__entry(
21		__field(	void *,		skbaddr		)
22		__field(	unsigned short,	protocol	)
23		__field(	void *,		location	)
24	),
25
26	TP_fast_assign(
27		__entry->skbaddr = skb;
28		if (skb) {
29			__entry->protocol = ntohs(skb->protocol);
30		}
31		__entry->location = location;
32	),
33
34	TP_printk("skbaddr=%p protocol=%u location=%p",
35		__entry->skbaddr, __entry->protocol, __entry->location)
36);
37
38TRACE_EVENT(skb_copy_datagram_iovec,
39
40	TP_PROTO(const struct sk_buff *skb, int len),
41
42	TP_ARGS(skb, len),
43
44	TP_STRUCT__entry(
45		__field(	const void *,		skbaddr		)
46		__field(	int,			len		)
47	),
48
49	TP_fast_assign(
50		__entry->skbaddr = skb;
51		__entry->len = len;
52	),
53
54	TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len)
55);
56
57#endif /* _TRACE_SKB_H */
58
59/* This part must be outside protection */
60#include <trace/define_trace.h>