Kaike Wan | a131d16 | 2019-01-24 06:10:09 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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 | |
Kaike Wan | a131d16 | 2019-01-24 06:10:09 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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 " \ |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 34 | "ib_psn 0x%x-%x npagesets %u tnode_cnt %u " \ |
| 35 | "tidcnt %u tid_idx %u tid_offset %u length %u sent %u" |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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 " \ |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 43 | "s_acked_ack_queue %u s_ack_state 0x%x " \ |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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 " \ |
| 55 | "hw_flow_index %u generation 0x%x " \ |
| 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 " \ |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 65 | "s_acked_ack_queue %u s_tail_ack_queue %u " \ |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 66 | "r_head_ack_queue %u opcode 0x%x psn 0x%x r_psn 0x%x " \ |
| 67 | " diff %d" |
| 68 | |
Kaike Wan | a131d16 | 2019-01-24 06:10:09 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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) |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 474 | __field(u32, ib_spsn) |
| 475 | __field(u32, ib_lpsn) |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 476 | __field(u32, npagesets) |
| 477 | __field(u32, tnode_cnt) |
| 478 | __field(u32, tidcnt) |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 479 | __field(u32, tid_idx) |
| 480 | __field(u32, tid_offset) |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 481 | __field(u32, length) |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 482 | __field(u32, sent) |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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; |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 496 | __entry->ib_spsn = flow->flow_state.ib_spsn; |
| 497 | __entry->ib_lpsn = flow->flow_state.ib_lpsn; |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 498 | __entry->npagesets = flow->npagesets; |
| 499 | __entry->tnode_cnt = flow->tnode_cnt; |
| 500 | __entry->tidcnt = flow->tidcnt; |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 501 | __entry->tid_idx = flow->tid_idx; |
| 502 | __entry->tid_offset = flow->tid_offset; |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 503 | __entry->length = flow->length; |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 504 | __entry->sent = flow->sent; |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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, |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 517 | __entry->ib_spsn, |
| 518 | __entry->ib_lpsn, |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 519 | __entry->npagesets, |
| 520 | __entry->tnode_cnt, |
| 521 | __entry->tidcnt, |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 522 | __entry->tid_idx, |
| 523 | __entry->tid_offset, |
| 524 | __entry->length, |
| 525 | __entry->sent |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 84f4a40 | 2019-01-23 19:30:28 -0800 | [diff] [blame] | 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 | |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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) |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 674 | __field(u8, s_acked_ack_queue) |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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; |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 695 | __entry->s_acked_ack_queue = qp->s_acked_ack_queue; |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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, |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 714 | __entry->s_acked_ack_queue, |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 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) |
| 847 | __field(u32, hw_flow_index) |
| 848 | __field(u32, generation) |
| 849 | __field(u32, fpsn) |
| 850 | __field(u32, flow_flags) |
| 851 | ), |
| 852 | TP_fast_assign(/* assign */ |
| 853 | struct hfi1_qp_priv *priv = qp->priv; |
| 854 | |
| 855 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); |
| 856 | __entry->qpn = qp->ibqp.qp_num; |
| 857 | __entry->newreq = newreq; |
| 858 | __entry->tid_r_reqs = priv->tid_r_reqs; |
| 859 | __entry->tid_r_comp = priv->tid_r_comp; |
| 860 | __entry->pending_tid_r_segs = priv->pending_tid_r_segs; |
| 861 | __entry->s_flags = qp->s_flags; |
| 862 | __entry->ps_flags = priv->s_flags; |
| 863 | __entry->iow_flags = priv->s_iowait.flags; |
| 864 | __entry->hw_flow_index = priv->flow_state.index; |
| 865 | __entry->generation = priv->flow_state.generation; |
| 866 | __entry->fpsn = priv->flow_state.psn; |
| 867 | __entry->flow_flags = priv->flow_state.flags; |
| 868 | ), |
| 869 | TP_printk(/* print */ |
| 870 | TID_READ_SENDER_PRN, |
| 871 | __get_str(dev), |
| 872 | __entry->qpn, |
| 873 | __entry->newreq, |
| 874 | __entry->tid_r_reqs, |
| 875 | __entry->tid_r_comp, |
| 876 | __entry->pending_tid_r_segs, |
| 877 | __entry->s_flags, |
| 878 | __entry->ps_flags, |
| 879 | __entry->iow_flags, |
| 880 | __entry->hw_flow_index, |
| 881 | __entry->generation, |
| 882 | __entry->fpsn, |
| 883 | __entry->flow_flags |
| 884 | ) |
| 885 | ); |
| 886 | |
| 887 | DEFINE_EVENT(/* event */ |
| 888 | hfi1_tid_read_sender_template, hfi1_tid_read_sender_make_req, |
| 889 | TP_PROTO(struct rvt_qp *qp, char newreq), |
| 890 | TP_ARGS(qp, newreq) |
| 891 | ); |
| 892 | |
| 893 | DECLARE_EVENT_CLASS(/* tid_rdma_request */ |
| 894 | hfi1_tid_rdma_request_template, |
| 895 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 896 | struct tid_rdma_request *req), |
| 897 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req), |
| 898 | TP_STRUCT__entry(/* entry */ |
| 899 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) |
| 900 | __field(u32, qpn) |
| 901 | __field(char, newreq) |
| 902 | __field(u8, opcode) |
| 903 | __field(u32, psn) |
| 904 | __field(u32, lpsn) |
| 905 | __field(u32, cur_seg) |
| 906 | __field(u32, comp_seg) |
| 907 | __field(u32, ack_seg) |
| 908 | __field(u32, total_segs) |
| 909 | __field(u16, setup_head) |
| 910 | __field(u16, clear_tail) |
| 911 | __field(u16, flow_idx) |
| 912 | __field(u32, state) |
| 913 | __field(u32, r_flow_psn) |
| 914 | __field(u32, s_next_psn) |
| 915 | ), |
| 916 | TP_fast_assign(/* assign */ |
| 917 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); |
| 918 | __entry->qpn = qp->ibqp.qp_num; |
| 919 | __entry->newreq = newreq; |
| 920 | __entry->opcode = opcode; |
| 921 | __entry->psn = psn; |
| 922 | __entry->lpsn = lpsn; |
| 923 | __entry->cur_seg = req->cur_seg; |
| 924 | __entry->comp_seg = req->comp_seg; |
| 925 | __entry->ack_seg = req->ack_seg; |
| 926 | __entry->total_segs = req->total_segs; |
| 927 | __entry->setup_head = req->setup_head; |
| 928 | __entry->clear_tail = req->clear_tail; |
| 929 | __entry->flow_idx = req->flow_idx; |
| 930 | __entry->state = req->state; |
| 931 | __entry->r_flow_psn = req->r_flow_psn; |
| 932 | __entry->s_next_psn = req->s_next_psn; |
| 933 | ), |
| 934 | TP_printk(/* print */ |
| 935 | TID_REQ_PRN, |
| 936 | __get_str(dev), |
| 937 | __entry->qpn, |
| 938 | __entry->newreq, |
| 939 | __entry->opcode, |
| 940 | __entry->psn, |
| 941 | __entry->lpsn, |
| 942 | __entry->cur_seg, |
| 943 | __entry->comp_seg, |
| 944 | __entry->ack_seg, |
| 945 | __entry->total_segs, |
| 946 | __entry->setup_head, |
| 947 | __entry->clear_tail, |
| 948 | __entry->flow_idx, |
| 949 | __entry->state, |
| 950 | __entry->r_flow_psn, |
| 951 | __entry->s_next_psn |
| 952 | ) |
| 953 | ); |
| 954 | |
| 955 | DEFINE_EVENT(/* event */ |
| 956 | hfi1_tid_rdma_request_template, hfi1_tid_req_make_req_read, |
| 957 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 958 | struct tid_rdma_request *req), |
| 959 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) |
| 960 | ); |
| 961 | |
| 962 | DEFINE_EVENT(/* event */ |
| 963 | hfi1_tid_rdma_request_template, hfi1_tid_req_build_read_req, |
| 964 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 965 | struct tid_rdma_request *req), |
| 966 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) |
| 967 | ); |
| 968 | |
| 969 | DEFINE_EVENT(/* event */ |
| 970 | hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_read_req, |
| 971 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 972 | struct tid_rdma_request *req), |
| 973 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) |
| 974 | ); |
| 975 | |
| 976 | DEFINE_EVENT(/* event */ |
| 977 | hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_read_resp, |
| 978 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 979 | struct tid_rdma_request *req), |
| 980 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) |
| 981 | ); |
| 982 | |
| 983 | DEFINE_EVENT(/* event */ |
| 984 | hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_err, |
| 985 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 986 | struct tid_rdma_request *req), |
| 987 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) |
| 988 | ); |
| 989 | |
| 990 | DEFINE_EVENT(/* event */ |
| 991 | hfi1_tid_rdma_request_template, hfi1_tid_req_restart_req, |
| 992 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 993 | struct tid_rdma_request *req), |
| 994 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) |
| 995 | ); |
| 996 | |
| 997 | DEFINE_EVENT(/* event */ |
| 998 | hfi1_tid_rdma_request_template, hfi1_tid_req_setup_tid_wqe, |
| 999 | TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, |
| 1000 | struct tid_rdma_request *req), |
| 1001 | TP_ARGS(qp, newreq, opcode, psn, lpsn, req) |
| 1002 | ); |
| 1003 | |
| 1004 | DECLARE_EVENT_CLASS(/* rc_rcv_err */ |
| 1005 | hfi1_rc_rcv_err_template, |
| 1006 | TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), |
| 1007 | TP_ARGS(qp, opcode, psn, diff), |
| 1008 | TP_STRUCT__entry(/* entry */ |
| 1009 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) |
| 1010 | __field(u32, qpn) |
| 1011 | __field(u32, s_flags) |
| 1012 | __field(u8, state) |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 1013 | __field(u8, s_acked_ack_queue) |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 1014 | __field(u8, s_tail_ack_queue) |
| 1015 | __field(u8, r_head_ack_queue) |
| 1016 | __field(u32, opcode) |
| 1017 | __field(u32, psn) |
| 1018 | __field(u32, r_psn) |
| 1019 | __field(int, diff) |
| 1020 | ), |
| 1021 | TP_fast_assign(/* assign */ |
| 1022 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)) |
| 1023 | __entry->qpn = qp->ibqp.qp_num; |
| 1024 | __entry->s_flags = qp->s_flags; |
| 1025 | __entry->state = qp->state; |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 1026 | __entry->s_acked_ack_queue = qp->s_acked_ack_queue; |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 1027 | __entry->s_tail_ack_queue = qp->s_tail_ack_queue; |
| 1028 | __entry->r_head_ack_queue = qp->r_head_ack_queue; |
| 1029 | __entry->opcode = opcode; |
| 1030 | __entry->psn = psn; |
| 1031 | __entry->r_psn = qp->r_psn; |
| 1032 | __entry->diff = diff; |
| 1033 | ), |
| 1034 | TP_printk(/* print */ |
| 1035 | RCV_ERR_PRN, |
| 1036 | __get_str(dev), |
| 1037 | __entry->qpn, |
| 1038 | __entry->s_flags, |
| 1039 | __entry->state, |
Kaike Wan | 4f9264d | 2019-01-23 21:48:48 -0800 | [diff] [blame] | 1040 | __entry->s_acked_ack_queue, |
Kaike Wan | 3ce5daa2 | 2019-01-23 19:32:44 -0800 | [diff] [blame] | 1041 | __entry->s_tail_ack_queue, |
| 1042 | __entry->r_head_ack_queue, |
| 1043 | __entry->opcode, |
| 1044 | __entry->psn, |
| 1045 | __entry->r_psn, |
| 1046 | __entry->diff |
| 1047 | ) |
| 1048 | ); |
| 1049 | |
| 1050 | DEFINE_EVENT(/* event */ |
| 1051 | hfi1_rc_rcv_err_template, hfi1_tid_rdma_rcv_err, |
| 1052 | TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), |
| 1053 | TP_ARGS(qp, opcode, psn, diff) |
| 1054 | ); |
| 1055 | |
| 1056 | DECLARE_EVENT_CLASS(/* sge */ |
| 1057 | hfi1_sge_template, |
| 1058 | TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), |
| 1059 | TP_ARGS(qp, index, sge), |
| 1060 | TP_STRUCT__entry(/* entry */ |
| 1061 | DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) |
| 1062 | __field(u32, qpn) |
| 1063 | __field(int, index) |
| 1064 | __field(u64, vaddr) |
| 1065 | __field(u32, sge_length) |
| 1066 | ), |
| 1067 | TP_fast_assign(/* assign */ |
| 1068 | DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); |
| 1069 | __entry->qpn = qp->ibqp.qp_num; |
| 1070 | __entry->index = index; |
| 1071 | __entry->vaddr = (u64)sge->vaddr; |
| 1072 | __entry->sge_length = sge->sge_length; |
| 1073 | ), |
| 1074 | TP_printk(/* print */ |
| 1075 | "[%s] qpn 0x%x sge %d: vaddr 0x%llx sge_length %u", |
| 1076 | __get_str(dev), |
| 1077 | __entry->qpn, |
| 1078 | __entry->index, |
| 1079 | __entry->vaddr, |
| 1080 | __entry->sge_length |
| 1081 | ) |
| 1082 | ); |
| 1083 | |
| 1084 | DEFINE_EVENT(/* event */ |
| 1085 | hfi1_sge_template, hfi1_sge_check_align, |
| 1086 | TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), |
| 1087 | TP_ARGS(qp, index, sge) |
| 1088 | ); |
| 1089 | |
Kaike Wan | a131d16 | 2019-01-24 06:10:09 -0800 | [diff] [blame] | 1090 | #endif /* __HFI1_TRACE_TID_H */ |
| 1091 | |
| 1092 | #undef TRACE_INCLUDE_PATH |
| 1093 | #undef TRACE_INCLUDE_FILE |
| 1094 | #define TRACE_INCLUDE_PATH . |
| 1095 | #define TRACE_INCLUDE_FILE trace_tid |
| 1096 | #include <trace/define_trace.h> |