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