]>
Commit | Line | Data |
---|---|---|
a131d164 KW |
1 | /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ |
2 | /* | |
3 | * Copyright(c) 2018 Intel Corporation. | |
4 | * | |
5 | */ | |
6 | #if !defined(__HFI1_TRACE_TID_H) || defined(TRACE_HEADER_MULTI_READ) | |
7 | #define __HFI1_TRACE_TID_H | |
8 | ||
9 | #include <linux/tracepoint.h> | |
10 | #include <linux/trace_seq.h> | |
11 | ||
12 | #include "hfi.h" | |
13 | ||
14 | #define tidtype_name(type) { PT_##type, #type } | |
15 | #define show_tidtype(type) \ | |
16 | __print_symbolic(type, \ | |
17 | tidtype_name(EXPECTED), \ | |
18 | tidtype_name(EAGER), \ | |
19 | tidtype_name(INVALID)) \ | |
20 | ||
21 | #undef TRACE_SYSTEM | |
22 | #define TRACE_SYSTEM hfi1_tid | |
23 | ||
84f4a40d KW |
24 | u8 hfi1_trace_get_tid_ctrl(u32 ent); |
25 | u16 hfi1_trace_get_tid_len(u32 ent); | |
26 | u16 hfi1_trace_get_tid_idx(u32 ent); | |
27 | ||
a131d164 KW |
28 | #define OPFN_PARAM_PRN "[%s] qpn 0x%x %s OPFN: qp 0x%x, max read %u, " \ |
29 | "max write %u, max length %u, jkey 0x%x timeout %u " \ | |
30 | "urg %u" | |
31 | ||
84f4a40d KW |
32 | #define TID_FLOW_PRN "[%s] qpn 0x%x flow %d: idx %d resp_ib_psn 0x%x " \ |
33 | "generation 0x%x fpsn 0x%x-%x r_next_psn 0x%x " \ | |
3ce5daa2 KW |
34 | "ib_psn 0x%x-%x npagesets %u tnode_cnt %u " \ |
35 | "tidcnt %u tid_idx %u tid_offset %u length %u sent %u" | |
84f4a40d KW |
36 | |
37 | #define TID_NODE_PRN "[%s] qpn 0x%x %s idx %u grp base 0x%x map 0x%x " \ | |
38 | "used %u cnt %u" | |
39 | ||
3ce5daa2 KW |
40 | #define RSP_INFO_PRN "[%s] qpn 0x%x state 0x%x s_state 0x%x psn 0x%x " \ |
41 | "r_psn 0x%x r_state 0x%x r_flags 0x%x " \ | |
42 | "r_head_ack_queue %u s_tail_ack_queue %u " \ | |
4f9264d1 | 43 | "s_acked_ack_queue %u s_ack_state 0x%x " \ |
3ce5daa2 KW |
44 | "s_nak_state 0x%x s_flags 0x%x ps_flags 0x%x " \ |
45 | "iow_flags 0x%lx" | |
46 | ||
47 | #define SENDER_INFO_PRN "[%s] qpn 0x%x state 0x%x s_cur %u s_tail %u " \ | |
48 | "s_head %u s_acked %u s_last %u s_psn 0x%x " \ | |
49 | "s_last_psn 0x%x s_flags 0x%x ps_flags 0x%x " \ | |
50 | "iow_flags 0x%lx s_state 0x%x s_num_rd %u s_retry %u" | |
51 | ||
52 | #define TID_READ_SENDER_PRN "[%s] qpn 0x%x newreq %u tid_r_reqs %u " \ | |
53 | "tid_r_comp %u pending_tid_r_segs %u " \ | |
54 | "s_flags 0x%x ps_flags 0x%x iow_flags 0x%lx " \ | |
9e93e967 | 55 | "s_state 0x%x hw_flow_index %u generation 0x%x " \ |
3ce5daa2 KW |
56 | "fpsn 0x%x flow_flags 0x%x" |
57 | ||
58 | #define TID_REQ_PRN "[%s] qpn 0x%x newreq %u opcode 0x%x psn 0x%x lpsn 0x%x " \ | |
59 | "cur_seg %u comp_seg %u ack_seg %u " \ | |
60 | "total_segs %u setup_head %u clear_tail %u flow_idx %u " \ | |
61 | "state %u r_flow_psn 0x%x " \ | |
62 | "s_next_psn 0x%x" | |
63 | ||
64 | #define RCV_ERR_PRN "[%s] qpn 0x%x s_flags 0x%x state 0x%x " \ | |
4f9264d1 | 65 | "s_acked_ack_queue %u s_tail_ack_queue %u " \ |
3ce5daa2 KW |
66 | "r_head_ack_queue %u opcode 0x%x psn 0x%x r_psn 0x%x " \ |
67 | " diff %d" | |
68 | ||
a131d164 KW |
69 | DECLARE_EVENT_CLASS(/* class */ |
70 | hfi1_exp_tid_reg_unreg, | |
71 | TP_PROTO(unsigned int ctxt, u16 subctxt, u32 rarr, u32 npages, | |
72 | unsigned long va, unsigned long pa, dma_addr_t dma), | |
73 | TP_ARGS(ctxt, subctxt, rarr, npages, va, pa, dma), | |
74 | TP_STRUCT__entry(/* entry */ | |
75 | __field(unsigned int, ctxt) | |
76 | __field(u16, subctxt) | |
77 | __field(u32, rarr) | |
78 | __field(u32, npages) | |
79 | __field(unsigned long, va) | |
80 | __field(unsigned long, pa) | |
81 | __field(dma_addr_t, dma) | |
82 | ), | |
83 | TP_fast_assign(/* assign */ | |
84 | __entry->ctxt = ctxt; | |
85 | __entry->subctxt = subctxt; | |
86 | __entry->rarr = rarr; | |
87 | __entry->npages = npages; | |
88 | __entry->va = va; | |
89 | __entry->pa = pa; | |
90 | __entry->dma = dma; | |
91 | ), | |
92 | TP_printk("[%u:%u] entry:%u, %u pages @ 0x%lx, va:0x%lx dma:0x%llx", | |
93 | __entry->ctxt, | |
94 | __entry->subctxt, | |
95 | __entry->rarr, | |
96 | __entry->npages, | |
97 | __entry->pa, | |
98 | __entry->va, | |
99 | __entry->dma | |
100 | ) | |
101 | ); | |
102 | ||
103 | DEFINE_EVENT(/* exp_tid_unreg */ | |
104 | hfi1_exp_tid_reg_unreg, hfi1_exp_tid_unreg, | |
105 | TP_PROTO(unsigned int ctxt, u16 subctxt, u32 rarr, u32 npages, | |
106 | unsigned long va, unsigned long pa, dma_addr_t dma), | |
107 | TP_ARGS(ctxt, subctxt, rarr, npages, va, pa, dma) | |
108 | ); | |
109 | ||
110 | DEFINE_EVENT(/* exp_tid_reg */ | |
111 | hfi1_exp_tid_reg_unreg, hfi1_exp_tid_reg, | |
112 | TP_PROTO(unsigned int ctxt, u16 subctxt, u32 rarr, u32 npages, | |
113 | unsigned long va, unsigned long pa, dma_addr_t dma), | |
114 | TP_ARGS(ctxt, subctxt, rarr, npages, va, pa, dma) | |
115 | ); | |
116 | ||
117 | TRACE_EVENT(/* put_tid */ | |
118 | hfi1_put_tid, | |
119 | TP_PROTO(struct hfi1_devdata *dd, | |
120 | u32 index, u32 type, unsigned long pa, u16 order), | |
121 | TP_ARGS(dd, index, type, pa, order), | |
122 | TP_STRUCT__entry(/* entry */ | |
123 | DD_DEV_ENTRY(dd) | |
124 | __field(unsigned long, pa); | |
125 | __field(u32, index); | |
126 | __field(u32, type); | |
127 | __field(u16, order); | |
128 | ), | |
129 | TP_fast_assign(/* assign */ | |
130 | DD_DEV_ASSIGN(dd); | |
131 | __entry->pa = pa; | |
132 | __entry->index = index; | |
133 | __entry->type = type; | |
134 | __entry->order = order; | |
135 | ), | |
136 | TP_printk("[%s] type %s pa %lx index %u order %u", | |
137 | __get_str(dev), | |
138 | show_tidtype(__entry->type), | |
139 | __entry->pa, | |
140 | __entry->index, | |
141 | __entry->order | |
142 | ) | |
143 | ); | |
144 | ||
145 | TRACE_EVENT(/* exp_tid_inval */ | |
146 | hfi1_exp_tid_inval, | |
147 | TP_PROTO(unsigned int ctxt, u16 subctxt, unsigned long va, u32 rarr, | |
148 | u32 npages, dma_addr_t dma), | |
149 | TP_ARGS(ctxt, subctxt, va, rarr, npages, dma), | |
150 | TP_STRUCT__entry(/* entry */ | |
151 | __field(unsigned int, ctxt) | |
152 | __field(u16, subctxt) | |
153 | __field(unsigned long, va) | |
154 | __field(u32, rarr) | |
155 | __field(u32, npages) | |
156 | __field(dma_addr_t, dma) | |
157 | ), | |
158 | TP_fast_assign(/* assign */ | |
159 | __entry->ctxt = ctxt; | |
160 | __entry->subctxt = subctxt; | |
161 | __entry->va = va; | |
162 | __entry->rarr = rarr; | |
163 | __entry->npages = npages; | |
164 | __entry->dma = dma; | |
165 | ), | |
166 | TP_printk("[%u:%u] entry:%u, %u pages @ 0x%lx dma: 0x%llx", | |
167 | __entry->ctxt, | |
168 | __entry->subctxt, | |
169 | __entry->rarr, | |
170 | __entry->npages, | |
171 | __entry->va, | |
172 | __entry->dma | |
173 | ) | |
174 | ); | |
175 | ||
176 | DECLARE_EVENT_CLASS(/* opfn_state */ | |
177 | hfi1_opfn_state_template, | |
178 | TP_PROTO(struct rvt_qp *qp), | |
179 | TP_ARGS(qp), | |
180 | TP_STRUCT__entry(/* entry */ | |
181 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
182 | __field(u32, qpn) | |
183 | __field(u16, requested) | |
184 | __field(u16, completed) | |
185 | __field(u8, curr) | |
186 | ), | |
187 | TP_fast_assign(/* assign */ | |
188 | struct hfi1_qp_priv *priv = qp->priv; | |
189 | ||
190 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
191 | __entry->qpn = qp->ibqp.qp_num; | |
192 | __entry->requested = priv->opfn.requested; | |
193 | __entry->completed = priv->opfn.completed; | |
194 | __entry->curr = priv->opfn.curr; | |
195 | ), | |
196 | TP_printk(/* print */ | |
197 | "[%s] qpn 0x%x requested 0x%x completed 0x%x curr 0x%x", | |
198 | __get_str(dev), | |
199 | __entry->qpn, | |
200 | __entry->requested, | |
201 | __entry->completed, | |
202 | __entry->curr | |
203 | ) | |
204 | ); | |
205 | ||
206 | DEFINE_EVENT(/* event */ | |
207 | hfi1_opfn_state_template, hfi1_opfn_state_conn_request, | |
208 | TP_PROTO(struct rvt_qp *qp), | |
209 | TP_ARGS(qp) | |
210 | ); | |
211 | ||
212 | DEFINE_EVENT(/* event */ | |
213 | hfi1_opfn_state_template, hfi1_opfn_state_sched_conn_request, | |
214 | TP_PROTO(struct rvt_qp *qp), | |
215 | TP_ARGS(qp) | |
216 | ); | |
217 | ||
218 | DEFINE_EVENT(/* event */ | |
219 | hfi1_opfn_state_template, hfi1_opfn_state_conn_response, | |
220 | TP_PROTO(struct rvt_qp *qp), | |
221 | TP_ARGS(qp) | |
222 | ); | |
223 | ||
224 | DEFINE_EVENT(/* event */ | |
225 | hfi1_opfn_state_template, hfi1_opfn_state_conn_reply, | |
226 | TP_PROTO(struct rvt_qp *qp), | |
227 | TP_ARGS(qp) | |
228 | ); | |
229 | ||
230 | DEFINE_EVENT(/* event */ | |
231 | hfi1_opfn_state_template, hfi1_opfn_state_conn_error, | |
232 | TP_PROTO(struct rvt_qp *qp), | |
233 | TP_ARGS(qp) | |
234 | ); | |
235 | ||
236 | DECLARE_EVENT_CLASS(/* opfn_data */ | |
237 | hfi1_opfn_data_template, | |
238 | TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), | |
239 | TP_ARGS(qp, capcode, data), | |
240 | TP_STRUCT__entry(/* entry */ | |
241 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
242 | __field(u32, qpn) | |
243 | __field(u32, state) | |
244 | __field(u8, capcode) | |
245 | __field(u64, data) | |
246 | ), | |
247 | TP_fast_assign(/* assign */ | |
248 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
249 | __entry->qpn = qp->ibqp.qp_num; | |
250 | __entry->state = qp->state; | |
251 | __entry->capcode = capcode; | |
252 | __entry->data = data; | |
253 | ), | |
254 | TP_printk(/* printk */ | |
255 | "[%s] qpn 0x%x (state 0x%x) Capcode %u data 0x%llx", | |
256 | __get_str(dev), | |
257 | __entry->qpn, | |
258 | __entry->state, | |
259 | __entry->capcode, | |
260 | __entry->data | |
261 | ) | |
262 | ); | |
263 | ||
264 | DEFINE_EVENT(/* event */ | |
265 | hfi1_opfn_data_template, hfi1_opfn_data_conn_request, | |
266 | TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), | |
267 | TP_ARGS(qp, capcode, data) | |
268 | ); | |
269 | ||
270 | DEFINE_EVENT(/* event */ | |
271 | hfi1_opfn_data_template, hfi1_opfn_data_conn_response, | |
272 | TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), | |
273 | TP_ARGS(qp, capcode, data) | |
274 | ); | |
275 | ||
276 | DEFINE_EVENT(/* event */ | |
277 | hfi1_opfn_data_template, hfi1_opfn_data_conn_reply, | |
278 | TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), | |
279 | TP_ARGS(qp, capcode, data) | |
280 | ); | |
281 | ||
282 | DECLARE_EVENT_CLASS(/* opfn_param */ | |
283 | hfi1_opfn_param_template, | |
284 | TP_PROTO(struct rvt_qp *qp, char remote, | |
285 | struct tid_rdma_params *param), | |
286 | TP_ARGS(qp, remote, param), | |
287 | TP_STRUCT__entry(/* entry */ | |
288 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
289 | __field(u32, qpn) | |
290 | __field(char, remote) | |
291 | __field(u32, param_qp) | |
292 | __field(u32, max_len) | |
293 | __field(u16, jkey) | |
294 | __field(u8, max_read) | |
295 | __field(u8, max_write) | |
296 | __field(u8, timeout) | |
297 | __field(u8, urg) | |
298 | ), | |
299 | TP_fast_assign(/* assign */ | |
300 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
301 | __entry->qpn = qp->ibqp.qp_num; | |
302 | __entry->remote = remote; | |
303 | __entry->param_qp = param->qp; | |
304 | __entry->max_len = param->max_len; | |
305 | __entry->jkey = param->jkey; | |
306 | __entry->max_read = param->max_read; | |
307 | __entry->max_write = param->max_write; | |
308 | __entry->timeout = param->timeout; | |
309 | __entry->urg = param->urg; | |
310 | ), | |
311 | TP_printk(/* print */ | |
312 | OPFN_PARAM_PRN, | |
313 | __get_str(dev), | |
314 | __entry->qpn, | |
315 | __entry->remote ? "remote" : "local", | |
316 | __entry->param_qp, | |
317 | __entry->max_read, | |
318 | __entry->max_write, | |
319 | __entry->max_len, | |
320 | __entry->jkey, | |
321 | __entry->timeout, | |
322 | __entry->urg | |
323 | ) | |
324 | ); | |
325 | ||
326 | DEFINE_EVENT(/* event */ | |
327 | hfi1_opfn_param_template, hfi1_opfn_param, | |
328 | TP_PROTO(struct rvt_qp *qp, char remote, | |
329 | struct tid_rdma_params *param), | |
330 | TP_ARGS(qp, remote, param) | |
331 | ); | |
332 | ||
333 | DECLARE_EVENT_CLASS(/* msg */ | |
334 | hfi1_msg_template, | |
335 | TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), | |
336 | TP_ARGS(qp, msg, more), | |
337 | TP_STRUCT__entry(/* entry */ | |
338 | __field(u32, qpn) | |
339 | __string(msg, msg) | |
340 | __field(u64, more) | |
341 | ), | |
342 | TP_fast_assign(/* assign */ | |
343 | __entry->qpn = qp ? qp->ibqp.qp_num : 0; | |
344 | __assign_str(msg, msg); | |
345 | __entry->more = more; | |
346 | ), | |
347 | TP_printk(/* print */ | |
348 | "qpn 0x%x %s 0x%llx", | |
349 | __entry->qpn, | |
350 | __get_str(msg), | |
351 | __entry->more | |
352 | ) | |
353 | ); | |
354 | ||
355 | DEFINE_EVENT(/* event */ | |
356 | hfi1_msg_template, hfi1_msg_opfn_conn_request, | |
357 | TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), | |
358 | TP_ARGS(qp, msg, more) | |
359 | ); | |
360 | ||
361 | DEFINE_EVENT(/* event */ | |
362 | hfi1_msg_template, hfi1_msg_opfn_conn_error, | |
363 | TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), | |
364 | TP_ARGS(qp, msg, more) | |
365 | ); | |
366 | ||
84f4a40d KW |
367 | DEFINE_EVENT(/* event */ |
368 | hfi1_msg_template, hfi1_msg_alloc_tids, | |
369 | TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), | |
370 | TP_ARGS(qp, msg, more) | |
371 | ); | |
372 | ||
3ce5daa2 KW |
373 | DEFINE_EVENT(/* event */ |
374 | hfi1_msg_template, hfi1_msg_tid_restart_req, | |
375 | TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), | |
376 | TP_ARGS(qp, msg, more) | |
377 | ); | |
378 | ||
379 | DEFINE_EVENT(/* event */ | |
380 | hfi1_msg_template, hfi1_msg_handle_kdeth_eflags, | |
381 | TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), | |
382 | TP_ARGS(qp, msg, more) | |
383 | ); | |
384 | ||
84f4a40d KW |
385 | DECLARE_EVENT_CLASS(/* tid_flow_page */ |
386 | hfi1_tid_flow_page_template, | |
387 | TP_PROTO(struct rvt_qp *qp, struct tid_rdma_flow *flow, u32 index, | |
388 | char mtu8k, char v1, void *vaddr), | |
389 | TP_ARGS(qp, flow, index, mtu8k, v1, vaddr), | |
390 | TP_STRUCT__entry(/* entry */ | |
391 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
392 | __field(u32, qpn) | |
393 | __field(char, mtu8k) | |
394 | __field(char, v1) | |
395 | __field(u32, index) | |
396 | __field(u64, page) | |
397 | __field(u64, vaddr) | |
398 | ), | |
399 | TP_fast_assign(/* assign */ | |
400 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
401 | __entry->qpn = qp->ibqp.qp_num; | |
402 | __entry->mtu8k = mtu8k; | |
403 | __entry->v1 = v1; | |
404 | __entry->index = index; | |
405 | __entry->page = vaddr ? (u64)virt_to_page(vaddr) : 0ULL; | |
406 | __entry->vaddr = (u64)vaddr; | |
407 | ), | |
408 | TP_printk(/* print */ | |
409 | "[%s] qpn 0x%x page[%u]: page 0x%llx %s 0x%llx", | |
410 | __get_str(dev), | |
411 | __entry->qpn, | |
412 | __entry->index, | |
413 | __entry->page, | |
414 | __entry->mtu8k ? (__entry->v1 ? "v1" : "v0") : "vaddr", | |
415 | __entry->vaddr | |
416 | ) | |
417 | ); | |
418 | ||
419 | DEFINE_EVENT(/* event */ | |
420 | hfi1_tid_flow_page_template, hfi1_tid_flow_page, | |
421 | TP_PROTO(struct rvt_qp *qp, struct tid_rdma_flow *flow, u32 index, | |
422 | char mtu8k, char v1, void *vaddr), | |
423 | TP_ARGS(qp, flow, index, mtu8k, v1, vaddr) | |
424 | ); | |
425 | ||
426 | DECLARE_EVENT_CLASS(/* tid_pageset */ | |
427 | hfi1_tid_pageset_template, | |
428 | TP_PROTO(struct rvt_qp *qp, u32 index, u16 idx, u16 count), | |
429 | TP_ARGS(qp, index, idx, count), | |
430 | TP_STRUCT__entry(/* entry */ | |
431 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
432 | __field(u32, qpn) | |
433 | __field(u32, index) | |
434 | __field(u16, idx) | |
435 | __field(u16, count) | |
436 | ), | |
437 | TP_fast_assign(/* assign */ | |
438 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
439 | __entry->qpn = qp->ibqp.qp_num; | |
440 | __entry->index = index; | |
441 | __entry->idx = idx; | |
442 | __entry->count = count; | |
443 | ), | |
444 | TP_printk(/* print */ | |
445 | "[%s] qpn 0x%x list[%u]: idx %u count %u", | |
446 | __get_str(dev), | |
447 | __entry->qpn, | |
448 | __entry->index, | |
449 | __entry->idx, | |
450 | __entry->count | |
451 | ) | |
452 | ); | |
453 | ||
454 | DEFINE_EVENT(/* event */ | |
455 | hfi1_tid_pageset_template, hfi1_tid_pageset, | |
456 | TP_PROTO(struct rvt_qp *qp, u32 index, u16 idx, u16 count), | |
457 | TP_ARGS(qp, index, idx, count) | |
458 | ); | |
459 | ||
460 | DECLARE_EVENT_CLASS(/* tid_fow */ | |
461 | hfi1_tid_flow_template, | |
462 | TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), | |
463 | TP_ARGS(qp, index, flow), | |
464 | TP_STRUCT__entry(/* entry */ | |
465 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
466 | __field(u32, qpn) | |
467 | __field(int, index) | |
468 | __field(int, idx) | |
469 | __field(u32, resp_ib_psn) | |
470 | __field(u32, generation) | |
471 | __field(u32, fspsn) | |
472 | __field(u32, flpsn) | |
473 | __field(u32, r_next_psn) | |
3ce5daa2 KW |
474 | __field(u32, ib_spsn) |
475 | __field(u32, ib_lpsn) | |
84f4a40d KW |
476 | __field(u32, npagesets) |
477 | __field(u32, tnode_cnt) | |
478 | __field(u32, tidcnt) | |
3ce5daa2 KW |
479 | __field(u32, tid_idx) |
480 | __field(u32, tid_offset) | |
84f4a40d | 481 | __field(u32, length) |
3ce5daa2 | 482 | __field(u32, sent) |
84f4a40d KW |
483 | ), |
484 | TP_fast_assign(/* assign */ | |
485 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
486 | __entry->qpn = qp->ibqp.qp_num; | |
487 | __entry->index = index; | |
488 | __entry->idx = flow->idx; | |
489 | __entry->resp_ib_psn = flow->flow_state.resp_ib_psn; | |
490 | __entry->generation = flow->flow_state.generation; | |
491 | __entry->fspsn = full_flow_psn(flow, | |
492 | flow->flow_state.spsn); | |
493 | __entry->flpsn = full_flow_psn(flow, | |
494 | flow->flow_state.lpsn); | |
495 | __entry->r_next_psn = flow->flow_state.r_next_psn; | |
3ce5daa2 KW |
496 | __entry->ib_spsn = flow->flow_state.ib_spsn; |
497 | __entry->ib_lpsn = flow->flow_state.ib_lpsn; | |
84f4a40d KW |
498 | __entry->npagesets = flow->npagesets; |
499 | __entry->tnode_cnt = flow->tnode_cnt; | |
500 | __entry->tidcnt = flow->tidcnt; | |
3ce5daa2 KW |
501 | __entry->tid_idx = flow->tid_idx; |
502 | __entry->tid_offset = flow->tid_offset; | |
84f4a40d | 503 | __entry->length = flow->length; |
3ce5daa2 | 504 | __entry->sent = flow->sent; |
84f4a40d KW |
505 | ), |
506 | TP_printk(/* print */ | |
507 | TID_FLOW_PRN, | |
508 | __get_str(dev), | |
509 | __entry->qpn, | |
510 | __entry->index, | |
511 | __entry->idx, | |
512 | __entry->resp_ib_psn, | |
513 | __entry->generation, | |
514 | __entry->fspsn, | |
515 | __entry->flpsn, | |
516 | __entry->r_next_psn, | |
3ce5daa2 KW |
517 | __entry->ib_spsn, |
518 | __entry->ib_lpsn, | |
84f4a40d KW |
519 | __entry->npagesets, |
520 | __entry->tnode_cnt, | |
521 | __entry->tidcnt, | |
3ce5daa2 KW |
522 | __entry->tid_idx, |
523 | __entry->tid_offset, | |
524 | __entry->length, | |
525 | __entry->sent | |
84f4a40d KW |
526 | ) |
527 | ); | |
528 | ||
529 | DEFINE_EVENT(/* event */ | |
530 | hfi1_tid_flow_template, hfi1_tid_flow_alloc, | |
531 | TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), | |
532 | TP_ARGS(qp, index, flow) | |
533 | ); | |
534 | ||
3ce5daa2 KW |
535 | DEFINE_EVENT(/* event */ |
536 | hfi1_tid_flow_template, hfi1_tid_flow_build_read_pkt, | |
537 | TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), | |
538 | TP_ARGS(qp, index, flow) | |
539 | ); | |
540 | ||
541 | DEFINE_EVENT(/* event */ | |
542 | hfi1_tid_flow_template, hfi1_tid_flow_build_read_resp, | |
543 | TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), | |
544 | TP_ARGS(qp, index, flow) | |
545 | ); | |
546 | ||
547 | DEFINE_EVENT(/* event */ | |
548 | hfi1_tid_flow_template, hfi1_tid_flow_rcv_read_req, | |
549 | TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), | |
550 | TP_ARGS(qp, index, flow) | |
551 | ); | |
552 | ||
553 | DEFINE_EVENT(/* event */ | |
554 | hfi1_tid_flow_template, hfi1_tid_flow_rcv_read_resp, | |
555 | TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), | |
556 | TP_ARGS(qp, index, flow) | |
557 | ); | |
558 | ||
559 | DEFINE_EVENT(/* event */ | |
560 | hfi1_tid_flow_template, hfi1_tid_flow_restart_req, | |
561 | TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), | |
562 | TP_ARGS(qp, index, flow) | |
563 | ); | |
564 | ||
84f4a40d KW |
565 | DECLARE_EVENT_CLASS(/* tid_node */ |
566 | hfi1_tid_node_template, | |
567 | TP_PROTO(struct rvt_qp *qp, const char *msg, u32 index, u32 base, | |
568 | u8 map, u8 used, u8 cnt), | |
569 | TP_ARGS(qp, msg, index, base, map, used, cnt), | |
570 | TP_STRUCT__entry(/* entry */ | |
571 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
572 | __field(u32, qpn) | |
573 | __string(msg, msg) | |
574 | __field(u32, index) | |
575 | __field(u32, base) | |
576 | __field(u8, map) | |
577 | __field(u8, used) | |
578 | __field(u8, cnt) | |
579 | ), | |
580 | TP_fast_assign(/* assign */ | |
581 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
582 | __entry->qpn = qp->ibqp.qp_num; | |
583 | __assign_str(msg, msg); | |
584 | __entry->index = index; | |
585 | __entry->base = base; | |
586 | __entry->map = map; | |
587 | __entry->used = used; | |
588 | __entry->cnt = cnt; | |
589 | ), | |
590 | TP_printk(/* print */ | |
591 | TID_NODE_PRN, | |
592 | __get_str(dev), | |
593 | __entry->qpn, | |
594 | __get_str(msg), | |
595 | __entry->index, | |
596 | __entry->base, | |
597 | __entry->map, | |
598 | __entry->used, | |
599 | __entry->cnt | |
600 | ) | |
601 | ); | |
602 | ||
603 | DEFINE_EVENT(/* event */ | |
604 | hfi1_tid_node_template, hfi1_tid_node_add, | |
605 | TP_PROTO(struct rvt_qp *qp, const char *msg, u32 index, u32 base, | |
606 | u8 map, u8 used, u8 cnt), | |
607 | TP_ARGS(qp, msg, index, base, map, used, cnt) | |
608 | ); | |
609 | ||
610 | DECLARE_EVENT_CLASS(/* tid_entry */ | |
611 | hfi1_tid_entry_template, | |
612 | TP_PROTO(struct rvt_qp *qp, int index, u32 ent), | |
613 | TP_ARGS(qp, index, ent), | |
614 | TP_STRUCT__entry(/* entry */ | |
615 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
616 | __field(u32, qpn) | |
617 | __field(int, index) | |
618 | __field(u8, ctrl) | |
619 | __field(u16, idx) | |
620 | __field(u16, len) | |
621 | ), | |
622 | TP_fast_assign(/* assign */ | |
623 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
624 | __entry->qpn = qp->ibqp.qp_num; | |
625 | __entry->index = index; | |
626 | __entry->ctrl = hfi1_trace_get_tid_ctrl(ent); | |
627 | __entry->idx = hfi1_trace_get_tid_idx(ent); | |
628 | __entry->len = hfi1_trace_get_tid_len(ent); | |
629 | ), | |
630 | TP_printk(/* print */ | |
631 | "[%s] qpn 0x%x TID entry %d: idx %u len %u ctrl 0x%x", | |
632 | __get_str(dev), | |
633 | __entry->qpn, | |
634 | __entry->index, | |
635 | __entry->idx, | |
636 | __entry->len, | |
637 | __entry->ctrl | |
638 | ) | |
639 | ); | |
640 | ||
641 | DEFINE_EVENT(/* event */ | |
642 | hfi1_tid_entry_template, hfi1_tid_entry_alloc, | |
643 | TP_PROTO(struct rvt_qp *qp, int index, u32 entry), | |
644 | TP_ARGS(qp, index, entry) | |
645 | ); | |
646 | ||
3ce5daa2 KW |
647 | DEFINE_EVENT(/* event */ |
648 | hfi1_tid_entry_template, hfi1_tid_entry_build_read_resp, | |
649 | TP_PROTO(struct rvt_qp *qp, int index, u32 ent), | |
650 | TP_ARGS(qp, index, ent) | |
651 | ); | |
652 | ||
653 | DEFINE_EVENT(/* event */ | |
654 | hfi1_tid_entry_template, hfi1_tid_entry_rcv_read_req, | |
655 | TP_PROTO(struct rvt_qp *qp, int index, u32 ent), | |
656 | TP_ARGS(qp, index, ent) | |
657 | ); | |
658 | ||
659 | DECLARE_EVENT_CLASS(/* rsp_info */ | |
660 | hfi1_responder_info_template, | |
661 | TP_PROTO(struct rvt_qp *qp, u32 psn), | |
662 | TP_ARGS(qp, psn), | |
663 | TP_STRUCT__entry(/* entry */ | |
664 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
665 | __field(u32, qpn) | |
666 | __field(u8, state) | |
667 | __field(u8, s_state) | |
668 | __field(u32, psn) | |
669 | __field(u32, r_psn) | |
670 | __field(u8, r_state) | |
671 | __field(u8, r_flags) | |
672 | __field(u8, r_head_ack_queue) | |
673 | __field(u8, s_tail_ack_queue) | |
4f9264d1 | 674 | __field(u8, s_acked_ack_queue) |
3ce5daa2 KW |
675 | __field(u8, s_ack_state) |
676 | __field(u8, s_nak_state) | |
677 | __field(u8, r_nak_state) | |
678 | __field(u32, s_flags) | |
679 | __field(u32, ps_flags) | |
680 | __field(unsigned long, iow_flags) | |
681 | ), | |
682 | TP_fast_assign(/* assign */ | |
683 | struct hfi1_qp_priv *priv = qp->priv; | |
684 | ||
685 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
686 | __entry->qpn = qp->ibqp.qp_num; | |
687 | __entry->state = qp->state; | |
688 | __entry->s_state = qp->s_state; | |
689 | __entry->psn = psn; | |
690 | __entry->r_psn = qp->r_psn; | |
691 | __entry->r_state = qp->r_state; | |
692 | __entry->r_flags = qp->r_flags; | |
693 | __entry->r_head_ack_queue = qp->r_head_ack_queue; | |
694 | __entry->s_tail_ack_queue = qp->s_tail_ack_queue; | |
4f9264d1 | 695 | __entry->s_acked_ack_queue = qp->s_acked_ack_queue; |
3ce5daa2 KW |
696 | __entry->s_ack_state = qp->s_ack_state; |
697 | __entry->s_nak_state = qp->s_nak_state; | |
698 | __entry->s_flags = qp->s_flags; | |
699 | __entry->ps_flags = priv->s_flags; | |
700 | __entry->iow_flags = priv->s_iowait.flags; | |
701 | ), | |
702 | TP_printk(/* print */ | |
703 | RSP_INFO_PRN, | |
704 | __get_str(dev), | |
705 | __entry->qpn, | |
706 | __entry->state, | |
707 | __entry->s_state, | |
708 | __entry->psn, | |
709 | __entry->r_psn, | |
710 | __entry->r_state, | |
711 | __entry->r_flags, | |
712 | __entry->r_head_ack_queue, | |
713 | __entry->s_tail_ack_queue, | |
4f9264d1 | 714 | __entry->s_acked_ack_queue, |
3ce5daa2 KW |
715 | __entry->s_ack_state, |
716 | __entry->s_nak_state, | |
717 | __entry->s_flags, | |
718 | __entry->ps_flags, | |
719 | __entry->iow_flags | |
720 | ) | |
721 | ); | |
722 | ||
723 | DEFINE_EVENT(/* event */ | |
724 | hfi1_responder_info_template, hfi1_rsp_make_rc_ack, | |
725 | TP_PROTO(struct rvt_qp *qp, u32 psn), | |
726 | TP_ARGS(qp, psn) | |
727 | ); | |
728 | ||
729 | DEFINE_EVENT(/* event */ | |
730 | hfi1_responder_info_template, hfi1_rsp_rcv_tid_read_req, | |
731 | TP_PROTO(struct rvt_qp *qp, u32 psn), | |
732 | TP_ARGS(qp, psn) | |
733 | ); | |
734 | ||
735 | DEFINE_EVENT(/* event */ | |
736 | hfi1_responder_info_template, hfi1_rsp_tid_rcv_error, | |
737 | TP_PROTO(struct rvt_qp *qp, u32 psn), | |
738 | TP_ARGS(qp, psn) | |
739 | ); | |
740 | ||
741 | DECLARE_EVENT_CLASS(/* sender_info */ | |
742 | hfi1_sender_info_template, | |
743 | TP_PROTO(struct rvt_qp *qp), | |
744 | TP_ARGS(qp), | |
745 | TP_STRUCT__entry(/* entry */ | |
746 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
747 | __field(u32, qpn) | |
748 | __field(u8, state) | |
749 | __field(u32, s_cur) | |
750 | __field(u32, s_tail) | |
751 | __field(u32, s_head) | |
752 | __field(u32, s_acked) | |
753 | __field(u32, s_last) | |
754 | __field(u32, s_psn) | |
755 | __field(u32, s_last_psn) | |
756 | __field(u32, s_flags) | |
757 | __field(u32, ps_flags) | |
758 | __field(unsigned long, iow_flags) | |
759 | __field(u8, s_state) | |
760 | __field(u8, s_num_rd) | |
761 | __field(u8, s_retry) | |
762 | ), | |
763 | TP_fast_assign(/* assign */ | |
764 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)) | |
765 | __entry->qpn = qp->ibqp.qp_num; | |
766 | __entry->state = qp->state; | |
767 | __entry->s_cur = qp->s_cur; | |
768 | __entry->s_tail = qp->s_tail; | |
769 | __entry->s_head = qp->s_head; | |
770 | __entry->s_acked = qp->s_acked; | |
771 | __entry->s_last = qp->s_last; | |
772 | __entry->s_psn = qp->s_psn; | |
773 | __entry->s_last_psn = qp->s_last_psn; | |
774 | __entry->s_flags = qp->s_flags; | |
775 | __entry->ps_flags = ((struct hfi1_qp_priv *)qp->priv)->s_flags; | |
776 | __entry->iow_flags = | |
777 | ((struct hfi1_qp_priv *)qp->priv)->s_iowait.flags; | |
778 | __entry->s_state = qp->s_state; | |
779 | __entry->s_num_rd = qp->s_num_rd_atomic; | |
780 | __entry->s_retry = qp->s_retry; | |
781 | ), | |
782 | TP_printk(/* print */ | |
783 | SENDER_INFO_PRN, | |
784 | __get_str(dev), | |
785 | __entry->qpn, | |
786 | __entry->state, | |
787 | __entry->s_cur, | |
788 | __entry->s_tail, | |
789 | __entry->s_head, | |
790 | __entry->s_acked, | |
791 | __entry->s_last, | |
792 | __entry->s_psn, | |
793 | __entry->s_last_psn, | |
794 | __entry->s_flags, | |
795 | __entry->ps_flags, | |
796 | __entry->iow_flags, | |
797 | __entry->s_state, | |
798 | __entry->s_num_rd, | |
799 | __entry->s_retry | |
800 | ) | |
801 | ); | |
802 | ||
803 | DEFINE_EVENT(/* event */ | |
804 | hfi1_sender_info_template, hfi1_sender_make_rc_req, | |
805 | TP_PROTO(struct rvt_qp *qp), | |
806 | TP_ARGS(qp) | |
807 | ); | |
808 | ||
809 | DEFINE_EVENT(/* event */ | |
810 | hfi1_sender_info_template, hfi1_sender_reset_psn, | |
811 | TP_PROTO(struct rvt_qp *qp), | |
812 | TP_ARGS(qp) | |
813 | ); | |
814 | ||
815 | DEFINE_EVENT(/* event */ | |
816 | hfi1_sender_info_template, hfi1_sender_restart_rc, | |
817 | TP_PROTO(struct rvt_qp *qp), | |
818 | TP_ARGS(qp) | |
819 | ); | |
820 | ||
821 | DEFINE_EVENT(/* event */ | |
822 | hfi1_sender_info_template, hfi1_sender_do_rc_ack, | |
823 | TP_PROTO(struct rvt_qp *qp), | |
824 | TP_ARGS(qp) | |
825 | ); | |
826 | ||
827 | DEFINE_EVENT(/* event */ | |
828 | hfi1_sender_info_template, hfi1_sender_rcv_tid_read_resp, | |
829 | TP_PROTO(struct rvt_qp *qp), | |
830 | TP_ARGS(qp) | |
831 | ); | |
832 | ||
833 | DECLARE_EVENT_CLASS(/* tid_read_sender */ | |
834 | hfi1_tid_read_sender_template, | |
835 | TP_PROTO(struct rvt_qp *qp, char newreq), | |
836 | TP_ARGS(qp, newreq), | |
837 | TP_STRUCT__entry(/* entry */ | |
838 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
839 | __field(u32, qpn) | |
840 | __field(char, newreq) | |
841 | __field(u32, tid_r_reqs) | |
842 | __field(u32, tid_r_comp) | |
843 | __field(u32, pending_tid_r_segs) | |
844 | __field(u32, s_flags) | |
845 | __field(u32, ps_flags) | |
846 | __field(unsigned long, iow_flags) | |
9e93e967 | 847 | __field(u8, s_state) |
3ce5daa2 KW |
848 | __field(u32, hw_flow_index) |
849 | __field(u32, generation) | |
850 | __field(u32, fpsn) | |
851 | __field(u32, flow_flags) | |
852 | ), | |
853 | TP_fast_assign(/* assign */ | |
854 | struct hfi1_qp_priv *priv = qp->priv; | |
855 | ||
856 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
857 | __entry->qpn = qp->ibqp.qp_num; | |
858 | __entry->newreq = newreq; | |
859 | __entry->tid_r_reqs = priv->tid_r_reqs; | |
860 | __entry->tid_r_comp = priv->tid_r_comp; | |
861 | __entry->pending_tid_r_segs = priv->pending_tid_r_segs; | |
862 | __entry->s_flags = qp->s_flags; | |
863 | __entry->ps_flags = priv->s_flags; | |
864 | __entry->iow_flags = priv->s_iowait.flags; | |
9e93e967 | 865 | __entry->s_state = priv->s_state; |
3ce5daa2 KW |
866 | __entry->hw_flow_index = priv->flow_state.index; |
867 | __entry->generation = priv->flow_state.generation; | |
868 | __entry->fpsn = priv->flow_state.psn; | |
869 | __entry->flow_flags = priv->flow_state.flags; | |
870 | ), | |
871 | TP_printk(/* print */ | |
872 | TID_READ_SENDER_PRN, | |
873 | __get_str(dev), | |
874 | __entry->qpn, | |
875 | __entry->newreq, | |
876 | __entry->tid_r_reqs, | |
877 | __entry->tid_r_comp, | |
878 | __entry->pending_tid_r_segs, | |
879 | __entry->s_flags, | |
880 | __entry->ps_flags, | |
881 | __entry->iow_flags, | |
9e93e967 | 882 | __entry->s_state, |
3ce5daa2 KW |
883 | __entry->hw_flow_index, |
884 | __entry->generation, | |
885 | __entry->fpsn, | |
886 | __entry->flow_flags | |
887 | ) | |
888 | ); | |
889 | ||
890 | DEFINE_EVENT(/* event */ | |
891 | hfi1_tid_read_sender_template, hfi1_tid_read_sender_make_req, | |
892 | TP_PROTO(struct rvt_qp *qp, char newreq), | |
893 | TP_ARGS(qp, newreq) | |
894 | ); | |
895 | ||
896 | DECLARE_EVENT_CLASS(/* tid_rdma_request */ | |
897 | hfi1_tid_rdma_request_template, | |
898 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
899 | struct tid_rdma_request *req), | |
900 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req), | |
901 | TP_STRUCT__entry(/* entry */ | |
902 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
903 | __field(u32, qpn) | |
904 | __field(char, newreq) | |
905 | __field(u8, opcode) | |
906 | __field(u32, psn) | |
907 | __field(u32, lpsn) | |
908 | __field(u32, cur_seg) | |
909 | __field(u32, comp_seg) | |
910 | __field(u32, ack_seg) | |
911 | __field(u32, total_segs) | |
912 | __field(u16, setup_head) | |
913 | __field(u16, clear_tail) | |
914 | __field(u16, flow_idx) | |
915 | __field(u32, state) | |
916 | __field(u32, r_flow_psn) | |
917 | __field(u32, s_next_psn) | |
918 | ), | |
919 | TP_fast_assign(/* assign */ | |
920 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
921 | __entry->qpn = qp->ibqp.qp_num; | |
922 | __entry->newreq = newreq; | |
923 | __entry->opcode = opcode; | |
924 | __entry->psn = psn; | |
925 | __entry->lpsn = lpsn; | |
926 | __entry->cur_seg = req->cur_seg; | |
927 | __entry->comp_seg = req->comp_seg; | |
928 | __entry->ack_seg = req->ack_seg; | |
929 | __entry->total_segs = req->total_segs; | |
930 | __entry->setup_head = req->setup_head; | |
931 | __entry->clear_tail = req->clear_tail; | |
932 | __entry->flow_idx = req->flow_idx; | |
933 | __entry->state = req->state; | |
934 | __entry->r_flow_psn = req->r_flow_psn; | |
935 | __entry->s_next_psn = req->s_next_psn; | |
936 | ), | |
937 | TP_printk(/* print */ | |
938 | TID_REQ_PRN, | |
939 | __get_str(dev), | |
940 | __entry->qpn, | |
941 | __entry->newreq, | |
942 | __entry->opcode, | |
943 | __entry->psn, | |
944 | __entry->lpsn, | |
945 | __entry->cur_seg, | |
946 | __entry->comp_seg, | |
947 | __entry->ack_seg, | |
948 | __entry->total_segs, | |
949 | __entry->setup_head, | |
950 | __entry->clear_tail, | |
951 | __entry->flow_idx, | |
952 | __entry->state, | |
953 | __entry->r_flow_psn, | |
954 | __entry->s_next_psn | |
955 | ) | |
956 | ); | |
957 | ||
958 | DEFINE_EVENT(/* event */ | |
959 | hfi1_tid_rdma_request_template, hfi1_tid_req_make_req_read, | |
960 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
961 | struct tid_rdma_request *req), | |
962 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) | |
963 | ); | |
964 | ||
965 | DEFINE_EVENT(/* event */ | |
966 | hfi1_tid_rdma_request_template, hfi1_tid_req_build_read_req, | |
967 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
968 | struct tid_rdma_request *req), | |
969 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) | |
970 | ); | |
971 | ||
972 | DEFINE_EVENT(/* event */ | |
973 | hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_read_req, | |
974 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
975 | struct tid_rdma_request *req), | |
976 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) | |
977 | ); | |
978 | ||
979 | DEFINE_EVENT(/* event */ | |
980 | hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_read_resp, | |
981 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
982 | struct tid_rdma_request *req), | |
983 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) | |
984 | ); | |
985 | ||
986 | DEFINE_EVENT(/* event */ | |
987 | hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_err, | |
988 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
989 | struct tid_rdma_request *req), | |
990 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) | |
991 | ); | |
992 | ||
993 | DEFINE_EVENT(/* event */ | |
994 | hfi1_tid_rdma_request_template, hfi1_tid_req_restart_req, | |
995 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
996 | struct tid_rdma_request *req), | |
997 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) | |
998 | ); | |
999 | ||
1000 | DEFINE_EVENT(/* event */ | |
1001 | hfi1_tid_rdma_request_template, hfi1_tid_req_setup_tid_wqe, | |
1002 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, | |
1003 | struct tid_rdma_request *req), | |
1004 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) | |
1005 | ); | |
1006 | ||
1007 | DECLARE_EVENT_CLASS(/* rc_rcv_err */ | |
1008 | hfi1_rc_rcv_err_template, | |
1009 | TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), | |
1010 | TP_ARGS(qp, opcode, psn, diff), | |
1011 | TP_STRUCT__entry(/* entry */ | |
1012 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
1013 | __field(u32, qpn) | |
1014 | __field(u32, s_flags) | |
1015 | __field(u8, state) | |
4f9264d1 | 1016 | __field(u8, s_acked_ack_queue) |
3ce5daa2 KW |
1017 | __field(u8, s_tail_ack_queue) |
1018 | __field(u8, r_head_ack_queue) | |
1019 | __field(u32, opcode) | |
1020 | __field(u32, psn) | |
1021 | __field(u32, r_psn) | |
1022 | __field(int, diff) | |
1023 | ), | |
1024 | TP_fast_assign(/* assign */ | |
1025 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)) | |
1026 | __entry->qpn = qp->ibqp.qp_num; | |
1027 | __entry->s_flags = qp->s_flags; | |
1028 | __entry->state = qp->state; | |
4f9264d1 | 1029 | __entry->s_acked_ack_queue = qp->s_acked_ack_queue; |
3ce5daa2 KW |
1030 | __entry->s_tail_ack_queue = qp->s_tail_ack_queue; |
1031 | __entry->r_head_ack_queue = qp->r_head_ack_queue; | |
1032 | __entry->opcode = opcode; | |
1033 | __entry->psn = psn; | |
1034 | __entry->r_psn = qp->r_psn; | |
1035 | __entry->diff = diff; | |
1036 | ), | |
1037 | TP_printk(/* print */ | |
1038 | RCV_ERR_PRN, | |
1039 | __get_str(dev), | |
1040 | __entry->qpn, | |
1041 | __entry->s_flags, | |
1042 | __entry->state, | |
4f9264d1 | 1043 | __entry->s_acked_ack_queue, |
3ce5daa2 KW |
1044 | __entry->s_tail_ack_queue, |
1045 | __entry->r_head_ack_queue, | |
1046 | __entry->opcode, | |
1047 | __entry->psn, | |
1048 | __entry->r_psn, | |
1049 | __entry->diff | |
1050 | ) | |
1051 | ); | |
1052 | ||
1053 | DEFINE_EVENT(/* event */ | |
1054 | hfi1_rc_rcv_err_template, hfi1_tid_rdma_rcv_err, | |
1055 | TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), | |
1056 | TP_ARGS(qp, opcode, psn, diff) | |
1057 | ); | |
1058 | ||
1059 | DECLARE_EVENT_CLASS(/* sge */ | |
1060 | hfi1_sge_template, | |
1061 | TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), | |
1062 | TP_ARGS(qp, index, sge), | |
1063 | TP_STRUCT__entry(/* entry */ | |
1064 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) | |
1065 | __field(u32, qpn) | |
1066 | __field(int, index) | |
1067 | __field(u64, vaddr) | |
1068 | __field(u32, sge_length) | |
1069 | ), | |
1070 | TP_fast_assign(/* assign */ | |
1071 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); | |
1072 | __entry->qpn = qp->ibqp.qp_num; | |
1073 | __entry->index = index; | |
1074 | __entry->vaddr = (u64)sge->vaddr; | |
1075 | __entry->sge_length = sge->sge_length; | |
1076 | ), | |
1077 | TP_printk(/* print */ | |
1078 | "[%s] qpn 0x%x sge %d: vaddr 0x%llx sge_length %u", | |
1079 | __get_str(dev), | |
1080 | __entry->qpn, | |
1081 | __entry->index, | |
1082 | __entry->vaddr, | |
1083 | __entry->sge_length | |
1084 | ) | |
1085 | ); | |
1086 | ||
1087 | DEFINE_EVENT(/* event */ | |
1088 | hfi1_sge_template, hfi1_sge_check_align, | |
1089 | TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), | |
1090 | TP_ARGS(qp, index, sge) | |
1091 | ); | |
1092 | ||
a131d164 KW |
1093 | #endif /* __HFI1_TRACE_TID_H */ |
1094 | ||
1095 | #undef TRACE_INCLUDE_PATH | |
1096 | #undef TRACE_INCLUDE_FILE | |
1097 | #define TRACE_INCLUDE_PATH . | |
1098 | #define TRACE_INCLUDE_FILE trace_tid | |
1099 | #include <trace/define_trace.h> |