1
2
3
4
5
6
7
8
9
10
11
12
13
14#undef TRACE_SYSTEM
15#define TRACE_SYSTEM i40e
16
17
18
19
20#if !defined(_I40E_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
21#define _I40E_TRACE_H_
22
23#include <linux/tracepoint.h>
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45#define _I40E_TRACE_NAME(trace_name) (trace_ ## i40e ## _ ## trace_name)
46#define I40E_TRACE_NAME(trace_name) _I40E_TRACE_NAME(trace_name)
47
48#define i40e_trace(trace_name, args...) I40E_TRACE_NAME(trace_name)(args)
49
50#define i40e_trace_enabled(trace_name) I40E_TRACE_NAME(trace_name##_enabled)()
51
52
53
54
55
56
57
58
59DECLARE_EVENT_CLASS(
60 i40e_tx_template,
61
62 TP_PROTO(struct i40e_ring *ring,
63 struct i40e_tx_desc *desc,
64 struct i40e_tx_buffer *buf),
65
66 TP_ARGS(ring, desc, buf),
67
68
69
70
71
72
73
74
75 TP_STRUCT__entry(
76 __field(void*, ring)
77 __field(void*, desc)
78 __field(void*, buf)
79 __string(devname, ring->netdev->name)
80 ),
81
82 TP_fast_assign(
83 __entry->ring = ring;
84 __entry->desc = desc;
85 __entry->buf = buf;
86 __assign_str(devname, ring->netdev->name);
87 ),
88
89 TP_printk(
90 "netdev: %s ring: %p desc: %p buf %p",
91 __get_str(devname), __entry->ring,
92 __entry->desc, __entry->buf)
93);
94
95DEFINE_EVENT(
96 i40e_tx_template, i40e_clean_tx_irq,
97 TP_PROTO(struct i40e_ring *ring,
98 struct i40e_tx_desc *desc,
99 struct i40e_tx_buffer *buf),
100
101 TP_ARGS(ring, desc, buf));
102
103DEFINE_EVENT(
104 i40e_tx_template, i40e_clean_tx_irq_unmap,
105 TP_PROTO(struct i40e_ring *ring,
106 struct i40e_tx_desc *desc,
107 struct i40e_tx_buffer *buf),
108
109 TP_ARGS(ring, desc, buf));
110
111DECLARE_EVENT_CLASS(
112 i40e_rx_template,
113
114 TP_PROTO(struct i40e_ring *ring,
115 union i40e_16byte_rx_desc *desc,
116 struct sk_buff *skb),
117
118 TP_ARGS(ring, desc, skb),
119
120 TP_STRUCT__entry(
121 __field(void*, ring)
122 __field(void*, desc)
123 __field(void*, skb)
124 __string(devname, ring->netdev->name)
125 ),
126
127 TP_fast_assign(
128 __entry->ring = ring;
129 __entry->desc = desc;
130 __entry->skb = skb;
131 __assign_str(devname, ring->netdev->name);
132 ),
133
134 TP_printk(
135 "netdev: %s ring: %p desc: %p skb %p",
136 __get_str(devname), __entry->ring,
137 __entry->desc, __entry->skb)
138);
139
140DEFINE_EVENT(
141 i40e_rx_template, i40e_clean_rx_irq,
142 TP_PROTO(struct i40e_ring *ring,
143 union i40e_16byte_rx_desc *desc,
144 struct sk_buff *skb),
145
146 TP_ARGS(ring, desc, skb));
147
148DEFINE_EVENT(
149 i40e_rx_template, i40e_clean_rx_irq_rx,
150 TP_PROTO(struct i40e_ring *ring,
151 union i40e_16byte_rx_desc *desc,
152 struct sk_buff *skb),
153
154 TP_ARGS(ring, desc, skb));
155
156DECLARE_EVENT_CLASS(
157 i40e_xmit_template,
158
159 TP_PROTO(struct sk_buff *skb,
160 struct i40e_ring *ring),
161
162 TP_ARGS(skb, ring),
163
164 TP_STRUCT__entry(
165 __field(void*, skb)
166 __field(void*, ring)
167 __string(devname, ring->netdev->name)
168 ),
169
170 TP_fast_assign(
171 __entry->skb = skb;
172 __entry->ring = ring;
173 __assign_str(devname, ring->netdev->name);
174 ),
175
176 TP_printk(
177 "netdev: %s skb: %p ring: %p",
178 __get_str(devname), __entry->skb,
179 __entry->ring)
180);
181
182DEFINE_EVENT(
183 i40e_xmit_template, i40e_xmit_frame_ring,
184 TP_PROTO(struct sk_buff *skb,
185 struct i40e_ring *ring),
186
187 TP_ARGS(skb, ring));
188
189DEFINE_EVENT(
190 i40e_xmit_template, i40e_xmit_frame_ring_drop,
191 TP_PROTO(struct sk_buff *skb,
192 struct i40e_ring *ring),
193
194 TP_ARGS(skb, ring));
195
196
197
198#endif
199
200
201
202
203
204
205#undef TRACE_INCLUDE_PATH
206#define TRACE_INCLUDE_PATH .
207#undef TRACE_INCLUDE_FILE
208#define TRACE_INCLUDE_FILE i40e_trace
209#include <trace/define_trace.h>
210