1a131d164SKaike Wan /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 2a131d164SKaike Wan /* 3a131d164SKaike Wan * Copyright(c) 2018 Intel Corporation. 4a131d164SKaike Wan * 5a131d164SKaike Wan */ 6a131d164SKaike Wan #if !defined(__HFI1_TRACE_TID_H) || defined(TRACE_HEADER_MULTI_READ) 7a131d164SKaike Wan #define __HFI1_TRACE_TID_H 8a131d164SKaike Wan 9a131d164SKaike Wan #include <linux/tracepoint.h> 10a131d164SKaike Wan #include <linux/trace_seq.h> 11a131d164SKaike Wan 12a131d164SKaike Wan #include "hfi.h" 13a131d164SKaike Wan 14a131d164SKaike Wan #define tidtype_name(type) { PT_##type, #type } 15a131d164SKaike Wan #define show_tidtype(type) \ 16a131d164SKaike Wan __print_symbolic(type, \ 17a131d164SKaike Wan tidtype_name(EXPECTED), \ 18a131d164SKaike Wan tidtype_name(EAGER), \ 19a131d164SKaike Wan tidtype_name(INVALID)) \ 20a131d164SKaike Wan 21a131d164SKaike Wan #undef TRACE_SYSTEM 22a131d164SKaike Wan #define TRACE_SYSTEM hfi1_tid 23a131d164SKaike Wan 2484f4a40dSKaike Wan u8 hfi1_trace_get_tid_ctrl(u32 ent); 2584f4a40dSKaike Wan u16 hfi1_trace_get_tid_len(u32 ent); 2684f4a40dSKaike Wan u16 hfi1_trace_get_tid_idx(u32 ent); 2784f4a40dSKaike Wan 28a131d164SKaike Wan #define OPFN_PARAM_PRN "[%s] qpn 0x%x %s OPFN: qp 0x%x, max read %u, " \ 29a131d164SKaike Wan "max write %u, max length %u, jkey 0x%x timeout %u " \ 30a131d164SKaike Wan "urg %u" 31a131d164SKaike Wan 3284f4a40dSKaike Wan #define TID_FLOW_PRN "[%s] qpn 0x%x flow %d: idx %d resp_ib_psn 0x%x " \ 3384f4a40dSKaike Wan "generation 0x%x fpsn 0x%x-%x r_next_psn 0x%x " \ 343ce5daa2SKaike Wan "ib_psn 0x%x-%x npagesets %u tnode_cnt %u " \ 353ce5daa2SKaike Wan "tidcnt %u tid_idx %u tid_offset %u length %u sent %u" 3684f4a40dSKaike Wan 3784f4a40dSKaike Wan #define TID_NODE_PRN "[%s] qpn 0x%x %s idx %u grp base 0x%x map 0x%x " \ 3884f4a40dSKaike Wan "used %u cnt %u" 3984f4a40dSKaike Wan 403ce5daa2SKaike Wan #define RSP_INFO_PRN "[%s] qpn 0x%x state 0x%x s_state 0x%x psn 0x%x " \ 413ce5daa2SKaike Wan "r_psn 0x%x r_state 0x%x r_flags 0x%x " \ 423ce5daa2SKaike Wan "r_head_ack_queue %u s_tail_ack_queue %u " \ 434f9264d1SKaike Wan "s_acked_ack_queue %u s_ack_state 0x%x " \ 443ce5daa2SKaike Wan "s_nak_state 0x%x s_flags 0x%x ps_flags 0x%x " \ 453ce5daa2SKaike Wan "iow_flags 0x%lx" 463ce5daa2SKaike Wan 473ce5daa2SKaike Wan #define SENDER_INFO_PRN "[%s] qpn 0x%x state 0x%x s_cur %u s_tail %u " \ 483ce5daa2SKaike Wan "s_head %u s_acked %u s_last %u s_psn 0x%x " \ 493ce5daa2SKaike Wan "s_last_psn 0x%x s_flags 0x%x ps_flags 0x%x " \ 503ce5daa2SKaike Wan "iow_flags 0x%lx s_state 0x%x s_num_rd %u s_retry %u" 513ce5daa2SKaike Wan 523ce5daa2SKaike Wan #define TID_READ_SENDER_PRN "[%s] qpn 0x%x newreq %u tid_r_reqs %u " \ 533ce5daa2SKaike Wan "tid_r_comp %u pending_tid_r_segs %u " \ 543ce5daa2SKaike Wan "s_flags 0x%x ps_flags 0x%x iow_flags 0x%lx " \ 559e93e967SKaike Wan "s_state 0x%x hw_flow_index %u generation 0x%x " \ 563ce5daa2SKaike Wan "fpsn 0x%x flow_flags 0x%x" 573ce5daa2SKaike Wan 583ce5daa2SKaike Wan #define TID_REQ_PRN "[%s] qpn 0x%x newreq %u opcode 0x%x psn 0x%x lpsn 0x%x " \ 59*a05c9bdcSKaike Wan "cur_seg %u comp_seg %u ack_seg %u alloc_seg %u " \ 603ce5daa2SKaike Wan "total_segs %u setup_head %u clear_tail %u flow_idx %u " \ 61*a05c9bdcSKaike Wan "acked_tail %u state %u r_ack_psn 0x%x r_flow_psn 0x%x " \ 62*a05c9bdcSKaike Wan "r_last_ackd 0x%x s_next_psn 0x%x" 633ce5daa2SKaike Wan 643ce5daa2SKaike Wan #define RCV_ERR_PRN "[%s] qpn 0x%x s_flags 0x%x state 0x%x " \ 654f9264d1SKaike Wan "s_acked_ack_queue %u s_tail_ack_queue %u " \ 663ce5daa2SKaike Wan "r_head_ack_queue %u opcode 0x%x psn 0x%x r_psn 0x%x " \ 673ce5daa2SKaike Wan " diff %d" 683ce5daa2SKaike Wan 69*a05c9bdcSKaike Wan #define TID_WRITE_RSPDR_PRN "[%s] qpn 0x%x r_tid_head %u r_tid_tail %u " \ 70*a05c9bdcSKaike Wan "r_tid_ack %u r_tid_alloc %u alloc_w_segs %u " \ 71*a05c9bdcSKaike Wan "pending_tid_w_segs %u sync_pt %s " \ 72*a05c9bdcSKaike Wan "ps_nak_psn 0x%x ps_nak_state 0x%x " \ 73*a05c9bdcSKaike Wan "prnr_nak_state 0x%x hw_flow_index %u generation "\ 74*a05c9bdcSKaike Wan "0x%x fpsn 0x%x flow_flags 0x%x resync %s" \ 75*a05c9bdcSKaike Wan "r_next_psn_kdeth 0x%x" 76*a05c9bdcSKaike Wan 77*a05c9bdcSKaike Wan #define TID_WRITE_SENDER_PRN "[%s] qpn 0x%x newreq %u s_tid_cur %u " \ 78*a05c9bdcSKaike Wan "s_tid_tail %u s_tid_head %u " \ 79*a05c9bdcSKaike Wan "pending_tid_w_resp %u n_requests %u " \ 80*a05c9bdcSKaike Wan "n_tid_requests %u s_flags 0x%x ps_flags 0x%x "\ 81*a05c9bdcSKaike Wan "iow_flags 0x%lx s_state 0x%x s_retry %u" 82*a05c9bdcSKaike Wan 83*a05c9bdcSKaike Wan #define KDETH_EFLAGS_ERR_PRN "[%s] qpn 0x%x TID ERR: RcvType 0x%x " \ 84*a05c9bdcSKaike Wan "RcvTypeError 0x%x PSN 0x%x" 85*a05c9bdcSKaike Wan 86a131d164SKaike Wan DECLARE_EVENT_CLASS(/* class */ 87a131d164SKaike Wan hfi1_exp_tid_reg_unreg, 88a131d164SKaike Wan TP_PROTO(unsigned int ctxt, u16 subctxt, u32 rarr, u32 npages, 89a131d164SKaike Wan unsigned long va, unsigned long pa, dma_addr_t dma), 90a131d164SKaike Wan TP_ARGS(ctxt, subctxt, rarr, npages, va, pa, dma), 91a131d164SKaike Wan TP_STRUCT__entry(/* entry */ 92a131d164SKaike Wan __field(unsigned int, ctxt) 93a131d164SKaike Wan __field(u16, subctxt) 94a131d164SKaike Wan __field(u32, rarr) 95a131d164SKaike Wan __field(u32, npages) 96a131d164SKaike Wan __field(unsigned long, va) 97a131d164SKaike Wan __field(unsigned long, pa) 98a131d164SKaike Wan __field(dma_addr_t, dma) 99a131d164SKaike Wan ), 100a131d164SKaike Wan TP_fast_assign(/* assign */ 101a131d164SKaike Wan __entry->ctxt = ctxt; 102a131d164SKaike Wan __entry->subctxt = subctxt; 103a131d164SKaike Wan __entry->rarr = rarr; 104a131d164SKaike Wan __entry->npages = npages; 105a131d164SKaike Wan __entry->va = va; 106a131d164SKaike Wan __entry->pa = pa; 107a131d164SKaike Wan __entry->dma = dma; 108a131d164SKaike Wan ), 109a131d164SKaike Wan TP_printk("[%u:%u] entry:%u, %u pages @ 0x%lx, va:0x%lx dma:0x%llx", 110a131d164SKaike Wan __entry->ctxt, 111a131d164SKaike Wan __entry->subctxt, 112a131d164SKaike Wan __entry->rarr, 113a131d164SKaike Wan __entry->npages, 114a131d164SKaike Wan __entry->pa, 115a131d164SKaike Wan __entry->va, 116a131d164SKaike Wan __entry->dma 117a131d164SKaike Wan ) 118a131d164SKaike Wan ); 119a131d164SKaike Wan 120a131d164SKaike Wan DEFINE_EVENT(/* exp_tid_unreg */ 121a131d164SKaike Wan hfi1_exp_tid_reg_unreg, hfi1_exp_tid_unreg, 122a131d164SKaike Wan TP_PROTO(unsigned int ctxt, u16 subctxt, u32 rarr, u32 npages, 123a131d164SKaike Wan unsigned long va, unsigned long pa, dma_addr_t dma), 124a131d164SKaike Wan TP_ARGS(ctxt, subctxt, rarr, npages, va, pa, dma) 125a131d164SKaike Wan ); 126a131d164SKaike Wan 127a131d164SKaike Wan DEFINE_EVENT(/* exp_tid_reg */ 128a131d164SKaike Wan hfi1_exp_tid_reg_unreg, hfi1_exp_tid_reg, 129a131d164SKaike Wan TP_PROTO(unsigned int ctxt, u16 subctxt, u32 rarr, u32 npages, 130a131d164SKaike Wan unsigned long va, unsigned long pa, dma_addr_t dma), 131a131d164SKaike Wan TP_ARGS(ctxt, subctxt, rarr, npages, va, pa, dma) 132a131d164SKaike Wan ); 133a131d164SKaike Wan 134a131d164SKaike Wan TRACE_EVENT(/* put_tid */ 135a131d164SKaike Wan hfi1_put_tid, 136a131d164SKaike Wan TP_PROTO(struct hfi1_devdata *dd, 137a131d164SKaike Wan u32 index, u32 type, unsigned long pa, u16 order), 138a131d164SKaike Wan TP_ARGS(dd, index, type, pa, order), 139a131d164SKaike Wan TP_STRUCT__entry(/* entry */ 140a131d164SKaike Wan DD_DEV_ENTRY(dd) 141a131d164SKaike Wan __field(unsigned long, pa); 142a131d164SKaike Wan __field(u32, index); 143a131d164SKaike Wan __field(u32, type); 144a131d164SKaike Wan __field(u16, order); 145a131d164SKaike Wan ), 146a131d164SKaike Wan TP_fast_assign(/* assign */ 147a131d164SKaike Wan DD_DEV_ASSIGN(dd); 148a131d164SKaike Wan __entry->pa = pa; 149a131d164SKaike Wan __entry->index = index; 150a131d164SKaike Wan __entry->type = type; 151a131d164SKaike Wan __entry->order = order; 152a131d164SKaike Wan ), 153a131d164SKaike Wan TP_printk("[%s] type %s pa %lx index %u order %u", 154a131d164SKaike Wan __get_str(dev), 155a131d164SKaike Wan show_tidtype(__entry->type), 156a131d164SKaike Wan __entry->pa, 157a131d164SKaike Wan __entry->index, 158a131d164SKaike Wan __entry->order 159a131d164SKaike Wan ) 160a131d164SKaike Wan ); 161a131d164SKaike Wan 162a131d164SKaike Wan TRACE_EVENT(/* exp_tid_inval */ 163a131d164SKaike Wan hfi1_exp_tid_inval, 164a131d164SKaike Wan TP_PROTO(unsigned int ctxt, u16 subctxt, unsigned long va, u32 rarr, 165a131d164SKaike Wan u32 npages, dma_addr_t dma), 166a131d164SKaike Wan TP_ARGS(ctxt, subctxt, va, rarr, npages, dma), 167a131d164SKaike Wan TP_STRUCT__entry(/* entry */ 168a131d164SKaike Wan __field(unsigned int, ctxt) 169a131d164SKaike Wan __field(u16, subctxt) 170a131d164SKaike Wan __field(unsigned long, va) 171a131d164SKaike Wan __field(u32, rarr) 172a131d164SKaike Wan __field(u32, npages) 173a131d164SKaike Wan __field(dma_addr_t, dma) 174a131d164SKaike Wan ), 175a131d164SKaike Wan TP_fast_assign(/* assign */ 176a131d164SKaike Wan __entry->ctxt = ctxt; 177a131d164SKaike Wan __entry->subctxt = subctxt; 178a131d164SKaike Wan __entry->va = va; 179a131d164SKaike Wan __entry->rarr = rarr; 180a131d164SKaike Wan __entry->npages = npages; 181a131d164SKaike Wan __entry->dma = dma; 182a131d164SKaike Wan ), 183a131d164SKaike Wan TP_printk("[%u:%u] entry:%u, %u pages @ 0x%lx dma: 0x%llx", 184a131d164SKaike Wan __entry->ctxt, 185a131d164SKaike Wan __entry->subctxt, 186a131d164SKaike Wan __entry->rarr, 187a131d164SKaike Wan __entry->npages, 188a131d164SKaike Wan __entry->va, 189a131d164SKaike Wan __entry->dma 190a131d164SKaike Wan ) 191a131d164SKaike Wan ); 192a131d164SKaike Wan 193a131d164SKaike Wan DECLARE_EVENT_CLASS(/* opfn_state */ 194a131d164SKaike Wan hfi1_opfn_state_template, 195a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp), 196a131d164SKaike Wan TP_ARGS(qp), 197a131d164SKaike Wan TP_STRUCT__entry(/* entry */ 198a131d164SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 199a131d164SKaike Wan __field(u32, qpn) 200a131d164SKaike Wan __field(u16, requested) 201a131d164SKaike Wan __field(u16, completed) 202a131d164SKaike Wan __field(u8, curr) 203a131d164SKaike Wan ), 204a131d164SKaike Wan TP_fast_assign(/* assign */ 205a131d164SKaike Wan struct hfi1_qp_priv *priv = qp->priv; 206a131d164SKaike Wan 207a131d164SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 208a131d164SKaike Wan __entry->qpn = qp->ibqp.qp_num; 209a131d164SKaike Wan __entry->requested = priv->opfn.requested; 210a131d164SKaike Wan __entry->completed = priv->opfn.completed; 211a131d164SKaike Wan __entry->curr = priv->opfn.curr; 212a131d164SKaike Wan ), 213a131d164SKaike Wan TP_printk(/* print */ 214a131d164SKaike Wan "[%s] qpn 0x%x requested 0x%x completed 0x%x curr 0x%x", 215a131d164SKaike Wan __get_str(dev), 216a131d164SKaike Wan __entry->qpn, 217a131d164SKaike Wan __entry->requested, 218a131d164SKaike Wan __entry->completed, 219a131d164SKaike Wan __entry->curr 220a131d164SKaike Wan ) 221a131d164SKaike Wan ); 222a131d164SKaike Wan 223a131d164SKaike Wan DEFINE_EVENT(/* event */ 224a131d164SKaike Wan hfi1_opfn_state_template, hfi1_opfn_state_conn_request, 225a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp), 226a131d164SKaike Wan TP_ARGS(qp) 227a131d164SKaike Wan ); 228a131d164SKaike Wan 229a131d164SKaike Wan DEFINE_EVENT(/* event */ 230a131d164SKaike Wan hfi1_opfn_state_template, hfi1_opfn_state_sched_conn_request, 231a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp), 232a131d164SKaike Wan TP_ARGS(qp) 233a131d164SKaike Wan ); 234a131d164SKaike Wan 235a131d164SKaike Wan DEFINE_EVENT(/* event */ 236a131d164SKaike Wan hfi1_opfn_state_template, hfi1_opfn_state_conn_response, 237a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp), 238a131d164SKaike Wan TP_ARGS(qp) 239a131d164SKaike Wan ); 240a131d164SKaike Wan 241a131d164SKaike Wan DEFINE_EVENT(/* event */ 242a131d164SKaike Wan hfi1_opfn_state_template, hfi1_opfn_state_conn_reply, 243a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp), 244a131d164SKaike Wan TP_ARGS(qp) 245a131d164SKaike Wan ); 246a131d164SKaike Wan 247a131d164SKaike Wan DEFINE_EVENT(/* event */ 248a131d164SKaike Wan hfi1_opfn_state_template, hfi1_opfn_state_conn_error, 249a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp), 250a131d164SKaike Wan TP_ARGS(qp) 251a131d164SKaike Wan ); 252a131d164SKaike Wan 253a131d164SKaike Wan DECLARE_EVENT_CLASS(/* opfn_data */ 254a131d164SKaike Wan hfi1_opfn_data_template, 255a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), 256a131d164SKaike Wan TP_ARGS(qp, capcode, data), 257a131d164SKaike Wan TP_STRUCT__entry(/* entry */ 258a131d164SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 259a131d164SKaike Wan __field(u32, qpn) 260a131d164SKaike Wan __field(u32, state) 261a131d164SKaike Wan __field(u8, capcode) 262a131d164SKaike Wan __field(u64, data) 263a131d164SKaike Wan ), 264a131d164SKaike Wan TP_fast_assign(/* assign */ 265a131d164SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 266a131d164SKaike Wan __entry->qpn = qp->ibqp.qp_num; 267a131d164SKaike Wan __entry->state = qp->state; 268a131d164SKaike Wan __entry->capcode = capcode; 269a131d164SKaike Wan __entry->data = data; 270a131d164SKaike Wan ), 271a131d164SKaike Wan TP_printk(/* printk */ 272a131d164SKaike Wan "[%s] qpn 0x%x (state 0x%x) Capcode %u data 0x%llx", 273a131d164SKaike Wan __get_str(dev), 274a131d164SKaike Wan __entry->qpn, 275a131d164SKaike Wan __entry->state, 276a131d164SKaike Wan __entry->capcode, 277a131d164SKaike Wan __entry->data 278a131d164SKaike Wan ) 279a131d164SKaike Wan ); 280a131d164SKaike Wan 281a131d164SKaike Wan DEFINE_EVENT(/* event */ 282a131d164SKaike Wan hfi1_opfn_data_template, hfi1_opfn_data_conn_request, 283a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), 284a131d164SKaike Wan TP_ARGS(qp, capcode, data) 285a131d164SKaike Wan ); 286a131d164SKaike Wan 287a131d164SKaike Wan DEFINE_EVENT(/* event */ 288a131d164SKaike Wan hfi1_opfn_data_template, hfi1_opfn_data_conn_response, 289a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), 290a131d164SKaike Wan TP_ARGS(qp, capcode, data) 291a131d164SKaike Wan ); 292a131d164SKaike Wan 293a131d164SKaike Wan DEFINE_EVENT(/* event */ 294a131d164SKaike Wan hfi1_opfn_data_template, hfi1_opfn_data_conn_reply, 295a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, u8 capcode, u64 data), 296a131d164SKaike Wan TP_ARGS(qp, capcode, data) 297a131d164SKaike Wan ); 298a131d164SKaike Wan 299a131d164SKaike Wan DECLARE_EVENT_CLASS(/* opfn_param */ 300a131d164SKaike Wan hfi1_opfn_param_template, 301a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, char remote, 302a131d164SKaike Wan struct tid_rdma_params *param), 303a131d164SKaike Wan TP_ARGS(qp, remote, param), 304a131d164SKaike Wan TP_STRUCT__entry(/* entry */ 305a131d164SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 306a131d164SKaike Wan __field(u32, qpn) 307a131d164SKaike Wan __field(char, remote) 308a131d164SKaike Wan __field(u32, param_qp) 309a131d164SKaike Wan __field(u32, max_len) 310a131d164SKaike Wan __field(u16, jkey) 311a131d164SKaike Wan __field(u8, max_read) 312a131d164SKaike Wan __field(u8, max_write) 313a131d164SKaike Wan __field(u8, timeout) 314a131d164SKaike Wan __field(u8, urg) 315a131d164SKaike Wan ), 316a131d164SKaike Wan TP_fast_assign(/* assign */ 317a131d164SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 318a131d164SKaike Wan __entry->qpn = qp->ibqp.qp_num; 319a131d164SKaike Wan __entry->remote = remote; 320a131d164SKaike Wan __entry->param_qp = param->qp; 321a131d164SKaike Wan __entry->max_len = param->max_len; 322a131d164SKaike Wan __entry->jkey = param->jkey; 323a131d164SKaike Wan __entry->max_read = param->max_read; 324a131d164SKaike Wan __entry->max_write = param->max_write; 325a131d164SKaike Wan __entry->timeout = param->timeout; 326a131d164SKaike Wan __entry->urg = param->urg; 327a131d164SKaike Wan ), 328a131d164SKaike Wan TP_printk(/* print */ 329a131d164SKaike Wan OPFN_PARAM_PRN, 330a131d164SKaike Wan __get_str(dev), 331a131d164SKaike Wan __entry->qpn, 332a131d164SKaike Wan __entry->remote ? "remote" : "local", 333a131d164SKaike Wan __entry->param_qp, 334a131d164SKaike Wan __entry->max_read, 335a131d164SKaike Wan __entry->max_write, 336a131d164SKaike Wan __entry->max_len, 337a131d164SKaike Wan __entry->jkey, 338a131d164SKaike Wan __entry->timeout, 339a131d164SKaike Wan __entry->urg 340a131d164SKaike Wan ) 341a131d164SKaike Wan ); 342a131d164SKaike Wan 343a131d164SKaike Wan DEFINE_EVENT(/* event */ 344a131d164SKaike Wan hfi1_opfn_param_template, hfi1_opfn_param, 345a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, char remote, 346a131d164SKaike Wan struct tid_rdma_params *param), 347a131d164SKaike Wan TP_ARGS(qp, remote, param) 348a131d164SKaike Wan ); 349a131d164SKaike Wan 350a131d164SKaike Wan DECLARE_EVENT_CLASS(/* msg */ 351a131d164SKaike Wan hfi1_msg_template, 352a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 353a131d164SKaike Wan TP_ARGS(qp, msg, more), 354a131d164SKaike Wan TP_STRUCT__entry(/* entry */ 355a131d164SKaike Wan __field(u32, qpn) 356a131d164SKaike Wan __string(msg, msg) 357a131d164SKaike Wan __field(u64, more) 358a131d164SKaike Wan ), 359a131d164SKaike Wan TP_fast_assign(/* assign */ 360a131d164SKaike Wan __entry->qpn = qp ? qp->ibqp.qp_num : 0; 361a131d164SKaike Wan __assign_str(msg, msg); 362a131d164SKaike Wan __entry->more = more; 363a131d164SKaike Wan ), 364a131d164SKaike Wan TP_printk(/* print */ 365a131d164SKaike Wan "qpn 0x%x %s 0x%llx", 366a131d164SKaike Wan __entry->qpn, 367a131d164SKaike Wan __get_str(msg), 368a131d164SKaike Wan __entry->more 369a131d164SKaike Wan ) 370a131d164SKaike Wan ); 371a131d164SKaike Wan 372a131d164SKaike Wan DEFINE_EVENT(/* event */ 373a131d164SKaike Wan hfi1_msg_template, hfi1_msg_opfn_conn_request, 374a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 375a131d164SKaike Wan TP_ARGS(qp, msg, more) 376a131d164SKaike Wan ); 377a131d164SKaike Wan 378a131d164SKaike Wan DEFINE_EVENT(/* event */ 379a131d164SKaike Wan hfi1_msg_template, hfi1_msg_opfn_conn_error, 380a131d164SKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 381a131d164SKaike Wan TP_ARGS(qp, msg, more) 382a131d164SKaike Wan ); 383a131d164SKaike Wan 38484f4a40dSKaike Wan DEFINE_EVENT(/* event */ 38584f4a40dSKaike Wan hfi1_msg_template, hfi1_msg_alloc_tids, 38684f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 38784f4a40dSKaike Wan TP_ARGS(qp, msg, more) 38884f4a40dSKaike Wan ); 38984f4a40dSKaike Wan 3903ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 3913ce5daa2SKaike Wan hfi1_msg_template, hfi1_msg_tid_restart_req, 3923ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 3933ce5daa2SKaike Wan TP_ARGS(qp, msg, more) 3943ce5daa2SKaike Wan ); 3953ce5daa2SKaike Wan 3963ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 3973ce5daa2SKaike Wan hfi1_msg_template, hfi1_msg_handle_kdeth_eflags, 3983ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 3993ce5daa2SKaike Wan TP_ARGS(qp, msg, more) 4003ce5daa2SKaike Wan ); 4013ce5daa2SKaike Wan 402*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 403*a05c9bdcSKaike Wan hfi1_msg_template, hfi1_msg_tid_timeout, 404*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 405*a05c9bdcSKaike Wan TP_ARGS(qp, msg, more) 406*a05c9bdcSKaike Wan ); 407*a05c9bdcSKaike Wan 408*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 409*a05c9bdcSKaike Wan hfi1_msg_template, hfi1_msg_tid_retry_timeout, 410*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 411*a05c9bdcSKaike Wan TP_ARGS(qp, msg, more) 412*a05c9bdcSKaike Wan ); 413*a05c9bdcSKaike Wan 41484f4a40dSKaike Wan DECLARE_EVENT_CLASS(/* tid_flow_page */ 41584f4a40dSKaike Wan hfi1_tid_flow_page_template, 41684f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, struct tid_rdma_flow *flow, u32 index, 41784f4a40dSKaike Wan char mtu8k, char v1, void *vaddr), 41884f4a40dSKaike Wan TP_ARGS(qp, flow, index, mtu8k, v1, vaddr), 41984f4a40dSKaike Wan TP_STRUCT__entry(/* entry */ 42084f4a40dSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 42184f4a40dSKaike Wan __field(u32, qpn) 42284f4a40dSKaike Wan __field(char, mtu8k) 42384f4a40dSKaike Wan __field(char, v1) 42484f4a40dSKaike Wan __field(u32, index) 42584f4a40dSKaike Wan __field(u64, page) 42684f4a40dSKaike Wan __field(u64, vaddr) 42784f4a40dSKaike Wan ), 42884f4a40dSKaike Wan TP_fast_assign(/* assign */ 42984f4a40dSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 43084f4a40dSKaike Wan __entry->qpn = qp->ibqp.qp_num; 43184f4a40dSKaike Wan __entry->mtu8k = mtu8k; 43284f4a40dSKaike Wan __entry->v1 = v1; 43384f4a40dSKaike Wan __entry->index = index; 43484f4a40dSKaike Wan __entry->page = vaddr ? (u64)virt_to_page(vaddr) : 0ULL; 43584f4a40dSKaike Wan __entry->vaddr = (u64)vaddr; 43684f4a40dSKaike Wan ), 43784f4a40dSKaike Wan TP_printk(/* print */ 43884f4a40dSKaike Wan "[%s] qpn 0x%x page[%u]: page 0x%llx %s 0x%llx", 43984f4a40dSKaike Wan __get_str(dev), 44084f4a40dSKaike Wan __entry->qpn, 44184f4a40dSKaike Wan __entry->index, 44284f4a40dSKaike Wan __entry->page, 44384f4a40dSKaike Wan __entry->mtu8k ? (__entry->v1 ? "v1" : "v0") : "vaddr", 44484f4a40dSKaike Wan __entry->vaddr 44584f4a40dSKaike Wan ) 44684f4a40dSKaike Wan ); 44784f4a40dSKaike Wan 44884f4a40dSKaike Wan DEFINE_EVENT(/* event */ 44984f4a40dSKaike Wan hfi1_tid_flow_page_template, hfi1_tid_flow_page, 45084f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, struct tid_rdma_flow *flow, u32 index, 45184f4a40dSKaike Wan char mtu8k, char v1, void *vaddr), 45284f4a40dSKaike Wan TP_ARGS(qp, flow, index, mtu8k, v1, vaddr) 45384f4a40dSKaike Wan ); 45484f4a40dSKaike Wan 45584f4a40dSKaike Wan DECLARE_EVENT_CLASS(/* tid_pageset */ 45684f4a40dSKaike Wan hfi1_tid_pageset_template, 45784f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 index, u16 idx, u16 count), 45884f4a40dSKaike Wan TP_ARGS(qp, index, idx, count), 45984f4a40dSKaike Wan TP_STRUCT__entry(/* entry */ 46084f4a40dSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 46184f4a40dSKaike Wan __field(u32, qpn) 46284f4a40dSKaike Wan __field(u32, index) 46384f4a40dSKaike Wan __field(u16, idx) 46484f4a40dSKaike Wan __field(u16, count) 46584f4a40dSKaike Wan ), 46684f4a40dSKaike Wan TP_fast_assign(/* assign */ 46784f4a40dSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 46884f4a40dSKaike Wan __entry->qpn = qp->ibqp.qp_num; 46984f4a40dSKaike Wan __entry->index = index; 47084f4a40dSKaike Wan __entry->idx = idx; 47184f4a40dSKaike Wan __entry->count = count; 47284f4a40dSKaike Wan ), 47384f4a40dSKaike Wan TP_printk(/* print */ 47484f4a40dSKaike Wan "[%s] qpn 0x%x list[%u]: idx %u count %u", 47584f4a40dSKaike Wan __get_str(dev), 47684f4a40dSKaike Wan __entry->qpn, 47784f4a40dSKaike Wan __entry->index, 47884f4a40dSKaike Wan __entry->idx, 47984f4a40dSKaike Wan __entry->count 48084f4a40dSKaike Wan ) 48184f4a40dSKaike Wan ); 48284f4a40dSKaike Wan 48384f4a40dSKaike Wan DEFINE_EVENT(/* event */ 48484f4a40dSKaike Wan hfi1_tid_pageset_template, hfi1_tid_pageset, 48584f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 index, u16 idx, u16 count), 48684f4a40dSKaike Wan TP_ARGS(qp, index, idx, count) 48784f4a40dSKaike Wan ); 48884f4a40dSKaike Wan 48984f4a40dSKaike Wan DECLARE_EVENT_CLASS(/* tid_fow */ 49084f4a40dSKaike Wan hfi1_tid_flow_template, 49184f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 49284f4a40dSKaike Wan TP_ARGS(qp, index, flow), 49384f4a40dSKaike Wan TP_STRUCT__entry(/* entry */ 49484f4a40dSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 49584f4a40dSKaike Wan __field(u32, qpn) 49684f4a40dSKaike Wan __field(int, index) 49784f4a40dSKaike Wan __field(int, idx) 49884f4a40dSKaike Wan __field(u32, resp_ib_psn) 49984f4a40dSKaike Wan __field(u32, generation) 50084f4a40dSKaike Wan __field(u32, fspsn) 50184f4a40dSKaike Wan __field(u32, flpsn) 50284f4a40dSKaike Wan __field(u32, r_next_psn) 5033ce5daa2SKaike Wan __field(u32, ib_spsn) 5043ce5daa2SKaike Wan __field(u32, ib_lpsn) 50584f4a40dSKaike Wan __field(u32, npagesets) 50684f4a40dSKaike Wan __field(u32, tnode_cnt) 50784f4a40dSKaike Wan __field(u32, tidcnt) 5083ce5daa2SKaike Wan __field(u32, tid_idx) 5093ce5daa2SKaike Wan __field(u32, tid_offset) 51084f4a40dSKaike Wan __field(u32, length) 5113ce5daa2SKaike Wan __field(u32, sent) 51284f4a40dSKaike Wan ), 51384f4a40dSKaike Wan TP_fast_assign(/* assign */ 51484f4a40dSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 51584f4a40dSKaike Wan __entry->qpn = qp->ibqp.qp_num; 51684f4a40dSKaike Wan __entry->index = index; 51784f4a40dSKaike Wan __entry->idx = flow->idx; 51884f4a40dSKaike Wan __entry->resp_ib_psn = flow->flow_state.resp_ib_psn; 51984f4a40dSKaike Wan __entry->generation = flow->flow_state.generation; 52084f4a40dSKaike Wan __entry->fspsn = full_flow_psn(flow, 52184f4a40dSKaike Wan flow->flow_state.spsn); 52284f4a40dSKaike Wan __entry->flpsn = full_flow_psn(flow, 52384f4a40dSKaike Wan flow->flow_state.lpsn); 52484f4a40dSKaike Wan __entry->r_next_psn = flow->flow_state.r_next_psn; 5253ce5daa2SKaike Wan __entry->ib_spsn = flow->flow_state.ib_spsn; 5263ce5daa2SKaike Wan __entry->ib_lpsn = flow->flow_state.ib_lpsn; 52784f4a40dSKaike Wan __entry->npagesets = flow->npagesets; 52884f4a40dSKaike Wan __entry->tnode_cnt = flow->tnode_cnt; 52984f4a40dSKaike Wan __entry->tidcnt = flow->tidcnt; 5303ce5daa2SKaike Wan __entry->tid_idx = flow->tid_idx; 5313ce5daa2SKaike Wan __entry->tid_offset = flow->tid_offset; 53284f4a40dSKaike Wan __entry->length = flow->length; 5333ce5daa2SKaike Wan __entry->sent = flow->sent; 53484f4a40dSKaike Wan ), 53584f4a40dSKaike Wan TP_printk(/* print */ 53684f4a40dSKaike Wan TID_FLOW_PRN, 53784f4a40dSKaike Wan __get_str(dev), 53884f4a40dSKaike Wan __entry->qpn, 53984f4a40dSKaike Wan __entry->index, 54084f4a40dSKaike Wan __entry->idx, 54184f4a40dSKaike Wan __entry->resp_ib_psn, 54284f4a40dSKaike Wan __entry->generation, 54384f4a40dSKaike Wan __entry->fspsn, 54484f4a40dSKaike Wan __entry->flpsn, 54584f4a40dSKaike Wan __entry->r_next_psn, 5463ce5daa2SKaike Wan __entry->ib_spsn, 5473ce5daa2SKaike Wan __entry->ib_lpsn, 54884f4a40dSKaike Wan __entry->npagesets, 54984f4a40dSKaike Wan __entry->tnode_cnt, 55084f4a40dSKaike Wan __entry->tidcnt, 5513ce5daa2SKaike Wan __entry->tid_idx, 5523ce5daa2SKaike Wan __entry->tid_offset, 5533ce5daa2SKaike Wan __entry->length, 5543ce5daa2SKaike Wan __entry->sent 55584f4a40dSKaike Wan ) 55684f4a40dSKaike Wan ); 55784f4a40dSKaike Wan 55884f4a40dSKaike Wan DEFINE_EVENT(/* event */ 55984f4a40dSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_alloc, 56084f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 56184f4a40dSKaike Wan TP_ARGS(qp, index, flow) 56284f4a40dSKaike Wan ); 56384f4a40dSKaike Wan 5643ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 5653ce5daa2SKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_build_read_pkt, 5663ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 5673ce5daa2SKaike Wan TP_ARGS(qp, index, flow) 5683ce5daa2SKaike Wan ); 5693ce5daa2SKaike Wan 5703ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 5713ce5daa2SKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_build_read_resp, 5723ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 5733ce5daa2SKaike Wan TP_ARGS(qp, index, flow) 5743ce5daa2SKaike Wan ); 5753ce5daa2SKaike Wan 5763ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 5773ce5daa2SKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_read_req, 5783ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 5793ce5daa2SKaike Wan TP_ARGS(qp, index, flow) 5803ce5daa2SKaike Wan ); 5813ce5daa2SKaike Wan 5823ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 5833ce5daa2SKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_read_resp, 5843ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 5853ce5daa2SKaike Wan TP_ARGS(qp, index, flow) 5863ce5daa2SKaike Wan ); 5873ce5daa2SKaike Wan 5883ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 5893ce5daa2SKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_restart_req, 5903ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 5913ce5daa2SKaike Wan TP_ARGS(qp, index, flow) 5923ce5daa2SKaike Wan ); 5933ce5daa2SKaike Wan 594*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 595*a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_build_write_resp, 596*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 597*a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 598*a05c9bdcSKaike Wan ); 599*a05c9bdcSKaike Wan 600*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 601*a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_write_resp, 602*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 603*a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 604*a05c9bdcSKaike Wan ); 605*a05c9bdcSKaike Wan 606*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 607*a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_build_write_data, 608*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 609*a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 610*a05c9bdcSKaike Wan ); 611*a05c9bdcSKaike Wan 612*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 613*a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_tid_ack, 614*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 615*a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 616*a05c9bdcSKaike Wan ); 617*a05c9bdcSKaike Wan 618*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 619*a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_resync, 620*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 621*a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 622*a05c9bdcSKaike Wan ); 623*a05c9bdcSKaike Wan 624*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 625*a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_handle_kdeth_eflags, 626*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 627*a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 628*a05c9bdcSKaike Wan ); 629*a05c9bdcSKaike Wan 63084f4a40dSKaike Wan DECLARE_EVENT_CLASS(/* tid_node */ 63184f4a40dSKaike Wan hfi1_tid_node_template, 63284f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u32 index, u32 base, 63384f4a40dSKaike Wan u8 map, u8 used, u8 cnt), 63484f4a40dSKaike Wan TP_ARGS(qp, msg, index, base, map, used, cnt), 63584f4a40dSKaike Wan TP_STRUCT__entry(/* entry */ 63684f4a40dSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 63784f4a40dSKaike Wan __field(u32, qpn) 63884f4a40dSKaike Wan __string(msg, msg) 63984f4a40dSKaike Wan __field(u32, index) 64084f4a40dSKaike Wan __field(u32, base) 64184f4a40dSKaike Wan __field(u8, map) 64284f4a40dSKaike Wan __field(u8, used) 64384f4a40dSKaike Wan __field(u8, cnt) 64484f4a40dSKaike Wan ), 64584f4a40dSKaike Wan TP_fast_assign(/* assign */ 64684f4a40dSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 64784f4a40dSKaike Wan __entry->qpn = qp->ibqp.qp_num; 64884f4a40dSKaike Wan __assign_str(msg, msg); 64984f4a40dSKaike Wan __entry->index = index; 65084f4a40dSKaike Wan __entry->base = base; 65184f4a40dSKaike Wan __entry->map = map; 65284f4a40dSKaike Wan __entry->used = used; 65384f4a40dSKaike Wan __entry->cnt = cnt; 65484f4a40dSKaike Wan ), 65584f4a40dSKaike Wan TP_printk(/* print */ 65684f4a40dSKaike Wan TID_NODE_PRN, 65784f4a40dSKaike Wan __get_str(dev), 65884f4a40dSKaike Wan __entry->qpn, 65984f4a40dSKaike Wan __get_str(msg), 66084f4a40dSKaike Wan __entry->index, 66184f4a40dSKaike Wan __entry->base, 66284f4a40dSKaike Wan __entry->map, 66384f4a40dSKaike Wan __entry->used, 66484f4a40dSKaike Wan __entry->cnt 66584f4a40dSKaike Wan ) 66684f4a40dSKaike Wan ); 66784f4a40dSKaike Wan 66884f4a40dSKaike Wan DEFINE_EVENT(/* event */ 66984f4a40dSKaike Wan hfi1_tid_node_template, hfi1_tid_node_add, 67084f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u32 index, u32 base, 67184f4a40dSKaike Wan u8 map, u8 used, u8 cnt), 67284f4a40dSKaike Wan TP_ARGS(qp, msg, index, base, map, used, cnt) 67384f4a40dSKaike Wan ); 67484f4a40dSKaike Wan 67584f4a40dSKaike Wan DECLARE_EVENT_CLASS(/* tid_entry */ 67684f4a40dSKaike Wan hfi1_tid_entry_template, 67784f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 ent), 67884f4a40dSKaike Wan TP_ARGS(qp, index, ent), 67984f4a40dSKaike Wan TP_STRUCT__entry(/* entry */ 68084f4a40dSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 68184f4a40dSKaike Wan __field(u32, qpn) 68284f4a40dSKaike Wan __field(int, index) 68384f4a40dSKaike Wan __field(u8, ctrl) 68484f4a40dSKaike Wan __field(u16, idx) 68584f4a40dSKaike Wan __field(u16, len) 68684f4a40dSKaike Wan ), 68784f4a40dSKaike Wan TP_fast_assign(/* assign */ 68884f4a40dSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 68984f4a40dSKaike Wan __entry->qpn = qp->ibqp.qp_num; 69084f4a40dSKaike Wan __entry->index = index; 69184f4a40dSKaike Wan __entry->ctrl = hfi1_trace_get_tid_ctrl(ent); 69284f4a40dSKaike Wan __entry->idx = hfi1_trace_get_tid_idx(ent); 69384f4a40dSKaike Wan __entry->len = hfi1_trace_get_tid_len(ent); 69484f4a40dSKaike Wan ), 69584f4a40dSKaike Wan TP_printk(/* print */ 69684f4a40dSKaike Wan "[%s] qpn 0x%x TID entry %d: idx %u len %u ctrl 0x%x", 69784f4a40dSKaike Wan __get_str(dev), 69884f4a40dSKaike Wan __entry->qpn, 69984f4a40dSKaike Wan __entry->index, 70084f4a40dSKaike Wan __entry->idx, 70184f4a40dSKaike Wan __entry->len, 70284f4a40dSKaike Wan __entry->ctrl 70384f4a40dSKaike Wan ) 70484f4a40dSKaike Wan ); 70584f4a40dSKaike Wan 70684f4a40dSKaike Wan DEFINE_EVENT(/* event */ 70784f4a40dSKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_alloc, 70884f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 entry), 70984f4a40dSKaike Wan TP_ARGS(qp, index, entry) 71084f4a40dSKaike Wan ); 71184f4a40dSKaike Wan 7123ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 7133ce5daa2SKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_build_read_resp, 7143ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 ent), 7153ce5daa2SKaike Wan TP_ARGS(qp, index, ent) 7163ce5daa2SKaike Wan ); 7173ce5daa2SKaike Wan 7183ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 7193ce5daa2SKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_rcv_read_req, 7203ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 ent), 7213ce5daa2SKaike Wan TP_ARGS(qp, index, ent) 7223ce5daa2SKaike Wan ); 7233ce5daa2SKaike Wan 724*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 725*a05c9bdcSKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_rcv_write_resp, 726*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 entry), 727*a05c9bdcSKaike Wan TP_ARGS(qp, index, entry) 728*a05c9bdcSKaike Wan ); 729*a05c9bdcSKaike Wan 730*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 731*a05c9bdcSKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_build_write_data, 732*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 entry), 733*a05c9bdcSKaike Wan TP_ARGS(qp, index, entry) 734*a05c9bdcSKaike Wan ); 735*a05c9bdcSKaike Wan 7363ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* rsp_info */ 7373ce5daa2SKaike Wan hfi1_responder_info_template, 7383ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 7393ce5daa2SKaike Wan TP_ARGS(qp, psn), 7403ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 7413ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 7423ce5daa2SKaike Wan __field(u32, qpn) 7433ce5daa2SKaike Wan __field(u8, state) 7443ce5daa2SKaike Wan __field(u8, s_state) 7453ce5daa2SKaike Wan __field(u32, psn) 7463ce5daa2SKaike Wan __field(u32, r_psn) 7473ce5daa2SKaike Wan __field(u8, r_state) 7483ce5daa2SKaike Wan __field(u8, r_flags) 7493ce5daa2SKaike Wan __field(u8, r_head_ack_queue) 7503ce5daa2SKaike Wan __field(u8, s_tail_ack_queue) 7514f9264d1SKaike Wan __field(u8, s_acked_ack_queue) 7523ce5daa2SKaike Wan __field(u8, s_ack_state) 7533ce5daa2SKaike Wan __field(u8, s_nak_state) 7543ce5daa2SKaike Wan __field(u8, r_nak_state) 7553ce5daa2SKaike Wan __field(u32, s_flags) 7563ce5daa2SKaike Wan __field(u32, ps_flags) 7573ce5daa2SKaike Wan __field(unsigned long, iow_flags) 7583ce5daa2SKaike Wan ), 7593ce5daa2SKaike Wan TP_fast_assign(/* assign */ 7603ce5daa2SKaike Wan struct hfi1_qp_priv *priv = qp->priv; 7613ce5daa2SKaike Wan 7623ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 7633ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 7643ce5daa2SKaike Wan __entry->state = qp->state; 7653ce5daa2SKaike Wan __entry->s_state = qp->s_state; 7663ce5daa2SKaike Wan __entry->psn = psn; 7673ce5daa2SKaike Wan __entry->r_psn = qp->r_psn; 7683ce5daa2SKaike Wan __entry->r_state = qp->r_state; 7693ce5daa2SKaike Wan __entry->r_flags = qp->r_flags; 7703ce5daa2SKaike Wan __entry->r_head_ack_queue = qp->r_head_ack_queue; 7713ce5daa2SKaike Wan __entry->s_tail_ack_queue = qp->s_tail_ack_queue; 7724f9264d1SKaike Wan __entry->s_acked_ack_queue = qp->s_acked_ack_queue; 7733ce5daa2SKaike Wan __entry->s_ack_state = qp->s_ack_state; 7743ce5daa2SKaike Wan __entry->s_nak_state = qp->s_nak_state; 7753ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 7763ce5daa2SKaike Wan __entry->ps_flags = priv->s_flags; 7773ce5daa2SKaike Wan __entry->iow_flags = priv->s_iowait.flags; 7783ce5daa2SKaike Wan ), 7793ce5daa2SKaike Wan TP_printk(/* print */ 7803ce5daa2SKaike Wan RSP_INFO_PRN, 7813ce5daa2SKaike Wan __get_str(dev), 7823ce5daa2SKaike Wan __entry->qpn, 7833ce5daa2SKaike Wan __entry->state, 7843ce5daa2SKaike Wan __entry->s_state, 7853ce5daa2SKaike Wan __entry->psn, 7863ce5daa2SKaike Wan __entry->r_psn, 7873ce5daa2SKaike Wan __entry->r_state, 7883ce5daa2SKaike Wan __entry->r_flags, 7893ce5daa2SKaike Wan __entry->r_head_ack_queue, 7903ce5daa2SKaike Wan __entry->s_tail_ack_queue, 7914f9264d1SKaike Wan __entry->s_acked_ack_queue, 7923ce5daa2SKaike Wan __entry->s_ack_state, 7933ce5daa2SKaike Wan __entry->s_nak_state, 7943ce5daa2SKaike Wan __entry->s_flags, 7953ce5daa2SKaike Wan __entry->ps_flags, 7963ce5daa2SKaike Wan __entry->iow_flags 7973ce5daa2SKaike Wan ) 7983ce5daa2SKaike Wan ); 7993ce5daa2SKaike Wan 8003ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 8013ce5daa2SKaike Wan hfi1_responder_info_template, hfi1_rsp_make_rc_ack, 8023ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 8033ce5daa2SKaike Wan TP_ARGS(qp, psn) 8043ce5daa2SKaike Wan ); 8053ce5daa2SKaike Wan 8063ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 8073ce5daa2SKaike Wan hfi1_responder_info_template, hfi1_rsp_rcv_tid_read_req, 8083ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 8093ce5daa2SKaike Wan TP_ARGS(qp, psn) 8103ce5daa2SKaike Wan ); 8113ce5daa2SKaike Wan 8123ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 8133ce5daa2SKaike Wan hfi1_responder_info_template, hfi1_rsp_tid_rcv_error, 8143ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 8153ce5daa2SKaike Wan TP_ARGS(qp, psn) 8163ce5daa2SKaike Wan ); 8173ce5daa2SKaike Wan 818*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 819*a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_tid_write_alloc_res, 820*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 821*a05c9bdcSKaike Wan TP_ARGS(qp, psn) 822*a05c9bdcSKaike Wan ); 823*a05c9bdcSKaike Wan 824*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 825*a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_rcv_tid_write_req, 826*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 827*a05c9bdcSKaike Wan TP_ARGS(qp, psn) 828*a05c9bdcSKaike Wan ); 829*a05c9bdcSKaike Wan 830*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 831*a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_build_tid_write_resp, 832*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 833*a05c9bdcSKaike Wan TP_ARGS(qp, psn) 834*a05c9bdcSKaike Wan ); 835*a05c9bdcSKaike Wan 836*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 837*a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_rcv_tid_write_data, 838*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 839*a05c9bdcSKaike Wan TP_ARGS(qp, psn) 840*a05c9bdcSKaike Wan ); 841*a05c9bdcSKaike Wan 842*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 843*a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_make_tid_ack, 844*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 845*a05c9bdcSKaike Wan TP_ARGS(qp, psn) 846*a05c9bdcSKaike Wan ); 847*a05c9bdcSKaike Wan 848*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 849*a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_handle_kdeth_eflags, 850*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 851*a05c9bdcSKaike Wan TP_ARGS(qp, psn) 852*a05c9bdcSKaike Wan ); 853*a05c9bdcSKaike Wan 8543ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* sender_info */ 8553ce5daa2SKaike Wan hfi1_sender_info_template, 8563ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 8573ce5daa2SKaike Wan TP_ARGS(qp), 8583ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 8593ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 8603ce5daa2SKaike Wan __field(u32, qpn) 8613ce5daa2SKaike Wan __field(u8, state) 8623ce5daa2SKaike Wan __field(u32, s_cur) 8633ce5daa2SKaike Wan __field(u32, s_tail) 8643ce5daa2SKaike Wan __field(u32, s_head) 8653ce5daa2SKaike Wan __field(u32, s_acked) 8663ce5daa2SKaike Wan __field(u32, s_last) 8673ce5daa2SKaike Wan __field(u32, s_psn) 8683ce5daa2SKaike Wan __field(u32, s_last_psn) 8693ce5daa2SKaike Wan __field(u32, s_flags) 8703ce5daa2SKaike Wan __field(u32, ps_flags) 8713ce5daa2SKaike Wan __field(unsigned long, iow_flags) 8723ce5daa2SKaike Wan __field(u8, s_state) 8733ce5daa2SKaike Wan __field(u8, s_num_rd) 8743ce5daa2SKaike Wan __field(u8, s_retry) 8753ce5daa2SKaike Wan ), 8763ce5daa2SKaike Wan TP_fast_assign(/* assign */ 8773ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)) 8783ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 8793ce5daa2SKaike Wan __entry->state = qp->state; 8803ce5daa2SKaike Wan __entry->s_cur = qp->s_cur; 8813ce5daa2SKaike Wan __entry->s_tail = qp->s_tail; 8823ce5daa2SKaike Wan __entry->s_head = qp->s_head; 8833ce5daa2SKaike Wan __entry->s_acked = qp->s_acked; 8843ce5daa2SKaike Wan __entry->s_last = qp->s_last; 8853ce5daa2SKaike Wan __entry->s_psn = qp->s_psn; 8863ce5daa2SKaike Wan __entry->s_last_psn = qp->s_last_psn; 8873ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 8883ce5daa2SKaike Wan __entry->ps_flags = ((struct hfi1_qp_priv *)qp->priv)->s_flags; 8893ce5daa2SKaike Wan __entry->iow_flags = 8903ce5daa2SKaike Wan ((struct hfi1_qp_priv *)qp->priv)->s_iowait.flags; 8913ce5daa2SKaike Wan __entry->s_state = qp->s_state; 8923ce5daa2SKaike Wan __entry->s_num_rd = qp->s_num_rd_atomic; 8933ce5daa2SKaike Wan __entry->s_retry = qp->s_retry; 8943ce5daa2SKaike Wan ), 8953ce5daa2SKaike Wan TP_printk(/* print */ 8963ce5daa2SKaike Wan SENDER_INFO_PRN, 8973ce5daa2SKaike Wan __get_str(dev), 8983ce5daa2SKaike Wan __entry->qpn, 8993ce5daa2SKaike Wan __entry->state, 9003ce5daa2SKaike Wan __entry->s_cur, 9013ce5daa2SKaike Wan __entry->s_tail, 9023ce5daa2SKaike Wan __entry->s_head, 9033ce5daa2SKaike Wan __entry->s_acked, 9043ce5daa2SKaike Wan __entry->s_last, 9053ce5daa2SKaike Wan __entry->s_psn, 9063ce5daa2SKaike Wan __entry->s_last_psn, 9073ce5daa2SKaike Wan __entry->s_flags, 9083ce5daa2SKaike Wan __entry->ps_flags, 9093ce5daa2SKaike Wan __entry->iow_flags, 9103ce5daa2SKaike Wan __entry->s_state, 9113ce5daa2SKaike Wan __entry->s_num_rd, 9123ce5daa2SKaike Wan __entry->s_retry 9133ce5daa2SKaike Wan ) 9143ce5daa2SKaike Wan ); 9153ce5daa2SKaike Wan 9163ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9173ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_make_rc_req, 9183ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9193ce5daa2SKaike Wan TP_ARGS(qp) 9203ce5daa2SKaike Wan ); 9213ce5daa2SKaike Wan 9223ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9233ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_reset_psn, 9243ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9253ce5daa2SKaike Wan TP_ARGS(qp) 9263ce5daa2SKaike Wan ); 9273ce5daa2SKaike Wan 9283ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9293ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_restart_rc, 9303ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9313ce5daa2SKaike Wan TP_ARGS(qp) 9323ce5daa2SKaike Wan ); 9333ce5daa2SKaike Wan 9343ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9353ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_do_rc_ack, 9363ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9373ce5daa2SKaike Wan TP_ARGS(qp) 9383ce5daa2SKaike Wan ); 9393ce5daa2SKaike Wan 9403ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9413ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_rcv_tid_read_resp, 9423ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9433ce5daa2SKaike Wan TP_ARGS(qp) 9443ce5daa2SKaike Wan ); 9453ce5daa2SKaike Wan 946*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 947*a05c9bdcSKaike Wan hfi1_sender_info_template, hfi1_sender_rcv_tid_ack, 948*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 949*a05c9bdcSKaike Wan TP_ARGS(qp) 950*a05c9bdcSKaike Wan ); 951*a05c9bdcSKaike Wan 952*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 953*a05c9bdcSKaike Wan hfi1_sender_info_template, hfi1_sender_make_tid_pkt, 954*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 955*a05c9bdcSKaike Wan TP_ARGS(qp) 956*a05c9bdcSKaike Wan ); 957*a05c9bdcSKaike Wan 9583ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* tid_read_sender */ 9593ce5daa2SKaike Wan hfi1_tid_read_sender_template, 9603ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 9613ce5daa2SKaike Wan TP_ARGS(qp, newreq), 9623ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 9633ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 9643ce5daa2SKaike Wan __field(u32, qpn) 9653ce5daa2SKaike Wan __field(char, newreq) 9663ce5daa2SKaike Wan __field(u32, tid_r_reqs) 9673ce5daa2SKaike Wan __field(u32, tid_r_comp) 9683ce5daa2SKaike Wan __field(u32, pending_tid_r_segs) 9693ce5daa2SKaike Wan __field(u32, s_flags) 9703ce5daa2SKaike Wan __field(u32, ps_flags) 9713ce5daa2SKaike Wan __field(unsigned long, iow_flags) 9729e93e967SKaike Wan __field(u8, s_state) 9733ce5daa2SKaike Wan __field(u32, hw_flow_index) 9743ce5daa2SKaike Wan __field(u32, generation) 9753ce5daa2SKaike Wan __field(u32, fpsn) 9763ce5daa2SKaike Wan __field(u32, flow_flags) 9773ce5daa2SKaike Wan ), 9783ce5daa2SKaike Wan TP_fast_assign(/* assign */ 9793ce5daa2SKaike Wan struct hfi1_qp_priv *priv = qp->priv; 9803ce5daa2SKaike Wan 9813ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 9823ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 9833ce5daa2SKaike Wan __entry->newreq = newreq; 9843ce5daa2SKaike Wan __entry->tid_r_reqs = priv->tid_r_reqs; 9853ce5daa2SKaike Wan __entry->tid_r_comp = priv->tid_r_comp; 9863ce5daa2SKaike Wan __entry->pending_tid_r_segs = priv->pending_tid_r_segs; 9873ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 9883ce5daa2SKaike Wan __entry->ps_flags = priv->s_flags; 9893ce5daa2SKaike Wan __entry->iow_flags = priv->s_iowait.flags; 9909e93e967SKaike Wan __entry->s_state = priv->s_state; 9913ce5daa2SKaike Wan __entry->hw_flow_index = priv->flow_state.index; 9923ce5daa2SKaike Wan __entry->generation = priv->flow_state.generation; 9933ce5daa2SKaike Wan __entry->fpsn = priv->flow_state.psn; 9943ce5daa2SKaike Wan __entry->flow_flags = priv->flow_state.flags; 9953ce5daa2SKaike Wan ), 9963ce5daa2SKaike Wan TP_printk(/* print */ 9973ce5daa2SKaike Wan TID_READ_SENDER_PRN, 9983ce5daa2SKaike Wan __get_str(dev), 9993ce5daa2SKaike Wan __entry->qpn, 10003ce5daa2SKaike Wan __entry->newreq, 10013ce5daa2SKaike Wan __entry->tid_r_reqs, 10023ce5daa2SKaike Wan __entry->tid_r_comp, 10033ce5daa2SKaike Wan __entry->pending_tid_r_segs, 10043ce5daa2SKaike Wan __entry->s_flags, 10053ce5daa2SKaike Wan __entry->ps_flags, 10063ce5daa2SKaike Wan __entry->iow_flags, 10079e93e967SKaike Wan __entry->s_state, 10083ce5daa2SKaike Wan __entry->hw_flow_index, 10093ce5daa2SKaike Wan __entry->generation, 10103ce5daa2SKaike Wan __entry->fpsn, 10113ce5daa2SKaike Wan __entry->flow_flags 10123ce5daa2SKaike Wan ) 10133ce5daa2SKaike Wan ); 10143ce5daa2SKaike Wan 10153ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 10163ce5daa2SKaike Wan hfi1_tid_read_sender_template, hfi1_tid_read_sender_make_req, 10173ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 10183ce5daa2SKaike Wan TP_ARGS(qp, newreq) 10193ce5daa2SKaike Wan ); 10203ce5daa2SKaike Wan 10213ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* tid_rdma_request */ 10223ce5daa2SKaike Wan hfi1_tid_rdma_request_template, 10233ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 10243ce5daa2SKaike Wan struct tid_rdma_request *req), 10253ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req), 10263ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 10273ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 10283ce5daa2SKaike Wan __field(u32, qpn) 10293ce5daa2SKaike Wan __field(char, newreq) 10303ce5daa2SKaike Wan __field(u8, opcode) 10313ce5daa2SKaike Wan __field(u32, psn) 10323ce5daa2SKaike Wan __field(u32, lpsn) 10333ce5daa2SKaike Wan __field(u32, cur_seg) 10343ce5daa2SKaike Wan __field(u32, comp_seg) 10353ce5daa2SKaike Wan __field(u32, ack_seg) 1036*a05c9bdcSKaike Wan __field(u32, alloc_seg) 10373ce5daa2SKaike Wan __field(u32, total_segs) 10383ce5daa2SKaike Wan __field(u16, setup_head) 10393ce5daa2SKaike Wan __field(u16, clear_tail) 10403ce5daa2SKaike Wan __field(u16, flow_idx) 1041*a05c9bdcSKaike Wan __field(u16, acked_tail) 10423ce5daa2SKaike Wan __field(u32, state) 1043*a05c9bdcSKaike Wan __field(u32, r_ack_psn) 10443ce5daa2SKaike Wan __field(u32, r_flow_psn) 1045*a05c9bdcSKaike Wan __field(u32, r_last_acked) 10463ce5daa2SKaike Wan __field(u32, s_next_psn) 10473ce5daa2SKaike Wan ), 10483ce5daa2SKaike Wan TP_fast_assign(/* assign */ 10493ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 10503ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 10513ce5daa2SKaike Wan __entry->newreq = newreq; 10523ce5daa2SKaike Wan __entry->opcode = opcode; 10533ce5daa2SKaike Wan __entry->psn = psn; 10543ce5daa2SKaike Wan __entry->lpsn = lpsn; 10553ce5daa2SKaike Wan __entry->cur_seg = req->cur_seg; 10563ce5daa2SKaike Wan __entry->comp_seg = req->comp_seg; 10573ce5daa2SKaike Wan __entry->ack_seg = req->ack_seg; 1058*a05c9bdcSKaike Wan __entry->alloc_seg = req->alloc_seg; 10593ce5daa2SKaike Wan __entry->total_segs = req->total_segs; 10603ce5daa2SKaike Wan __entry->setup_head = req->setup_head; 10613ce5daa2SKaike Wan __entry->clear_tail = req->clear_tail; 10623ce5daa2SKaike Wan __entry->flow_idx = req->flow_idx; 1063*a05c9bdcSKaike Wan __entry->acked_tail = req->acked_tail; 10643ce5daa2SKaike Wan __entry->state = req->state; 1065*a05c9bdcSKaike Wan __entry->r_ack_psn = req->r_ack_psn; 10663ce5daa2SKaike Wan __entry->r_flow_psn = req->r_flow_psn; 1067*a05c9bdcSKaike Wan __entry->r_last_acked = req->r_last_acked; 10683ce5daa2SKaike Wan __entry->s_next_psn = req->s_next_psn; 10693ce5daa2SKaike Wan ), 10703ce5daa2SKaike Wan TP_printk(/* print */ 10713ce5daa2SKaike Wan TID_REQ_PRN, 10723ce5daa2SKaike Wan __get_str(dev), 10733ce5daa2SKaike Wan __entry->qpn, 10743ce5daa2SKaike Wan __entry->newreq, 10753ce5daa2SKaike Wan __entry->opcode, 10763ce5daa2SKaike Wan __entry->psn, 10773ce5daa2SKaike Wan __entry->lpsn, 10783ce5daa2SKaike Wan __entry->cur_seg, 10793ce5daa2SKaike Wan __entry->comp_seg, 10803ce5daa2SKaike Wan __entry->ack_seg, 1081*a05c9bdcSKaike Wan __entry->alloc_seg, 10823ce5daa2SKaike Wan __entry->total_segs, 10833ce5daa2SKaike Wan __entry->setup_head, 10843ce5daa2SKaike Wan __entry->clear_tail, 10853ce5daa2SKaike Wan __entry->flow_idx, 1086*a05c9bdcSKaike Wan __entry->acked_tail, 10873ce5daa2SKaike Wan __entry->state, 1088*a05c9bdcSKaike Wan __entry->r_ack_psn, 10893ce5daa2SKaike Wan __entry->r_flow_psn, 1090*a05c9bdcSKaike Wan __entry->r_last_acked, 10913ce5daa2SKaike Wan __entry->s_next_psn 10923ce5daa2SKaike Wan ) 10933ce5daa2SKaike Wan ); 10943ce5daa2SKaike Wan 10953ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 10963ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_req_read, 10973ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 10983ce5daa2SKaike Wan struct tid_rdma_request *req), 10993ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11003ce5daa2SKaike Wan ); 11013ce5daa2SKaike Wan 11023ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11033ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_build_read_req, 11043ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11053ce5daa2SKaike Wan struct tid_rdma_request *req), 11063ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11073ce5daa2SKaike Wan ); 11083ce5daa2SKaike Wan 11093ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11103ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_read_req, 11113ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11123ce5daa2SKaike Wan struct tid_rdma_request *req), 11133ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11143ce5daa2SKaike Wan ); 11153ce5daa2SKaike Wan 11163ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11173ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_read_resp, 11183ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11193ce5daa2SKaike Wan struct tid_rdma_request *req), 11203ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11213ce5daa2SKaike Wan ); 11223ce5daa2SKaike Wan 11233ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11243ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_err, 11253ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11263ce5daa2SKaike Wan struct tid_rdma_request *req), 11273ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11283ce5daa2SKaike Wan ); 11293ce5daa2SKaike Wan 11303ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11313ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_restart_req, 11323ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11333ce5daa2SKaike Wan struct tid_rdma_request *req), 11343ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11353ce5daa2SKaike Wan ); 11363ce5daa2SKaike Wan 11373ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11383ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_setup_tid_wqe, 11393ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11403ce5daa2SKaike Wan struct tid_rdma_request *req), 11413ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11423ce5daa2SKaike Wan ); 11433ce5daa2SKaike Wan 1144*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1145*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_write_alloc_res, 1146*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1147*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1148*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1149*a05c9bdcSKaike Wan ); 1150*a05c9bdcSKaike Wan 1151*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1152*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_write_req, 1153*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1154*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1155*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1156*a05c9bdcSKaike Wan ); 1157*a05c9bdcSKaike Wan 1158*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1159*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_build_write_resp, 1160*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1161*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1162*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1163*a05c9bdcSKaike Wan ); 1164*a05c9bdcSKaike Wan 1165*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1166*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_write_resp, 1167*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1168*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1169*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1170*a05c9bdcSKaike Wan ); 1171*a05c9bdcSKaike Wan 1172*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1173*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_write_data, 1174*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1175*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1176*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1177*a05c9bdcSKaike Wan ); 1178*a05c9bdcSKaike Wan 1179*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1180*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_tid_ack, 1181*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1182*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1183*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1184*a05c9bdcSKaike Wan ); 1185*a05c9bdcSKaike Wan 1186*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1187*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_tid_retry_timeout, 1188*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1189*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1190*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1191*a05c9bdcSKaike Wan ); 1192*a05c9bdcSKaike Wan 1193*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1194*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_resync, 1195*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1196*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1197*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1198*a05c9bdcSKaike Wan ); 1199*a05c9bdcSKaike Wan 1200*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1201*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_tid_pkt, 1202*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1203*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1204*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1205*a05c9bdcSKaike Wan ); 1206*a05c9bdcSKaike Wan 1207*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1208*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_tid_ack, 1209*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1210*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1211*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1212*a05c9bdcSKaike Wan ); 1213*a05c9bdcSKaike Wan 1214*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1215*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_handle_kdeth_eflags, 1216*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1217*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1218*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1219*a05c9bdcSKaike Wan ); 1220*a05c9bdcSKaike Wan 1221*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1222*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_rc_ack_write, 1223*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1224*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1225*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1226*a05c9bdcSKaike Wan ); 1227*a05c9bdcSKaike Wan 1228*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1229*a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_req_write, 1230*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1231*a05c9bdcSKaike Wan struct tid_rdma_request *req), 1232*a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1233*a05c9bdcSKaike Wan ); 1234*a05c9bdcSKaike Wan 12353ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* rc_rcv_err */ 12363ce5daa2SKaike Wan hfi1_rc_rcv_err_template, 12373ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), 12383ce5daa2SKaike Wan TP_ARGS(qp, opcode, psn, diff), 12393ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 12403ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 12413ce5daa2SKaike Wan __field(u32, qpn) 12423ce5daa2SKaike Wan __field(u32, s_flags) 12433ce5daa2SKaike Wan __field(u8, state) 12444f9264d1SKaike Wan __field(u8, s_acked_ack_queue) 12453ce5daa2SKaike Wan __field(u8, s_tail_ack_queue) 12463ce5daa2SKaike Wan __field(u8, r_head_ack_queue) 12473ce5daa2SKaike Wan __field(u32, opcode) 12483ce5daa2SKaike Wan __field(u32, psn) 12493ce5daa2SKaike Wan __field(u32, r_psn) 12503ce5daa2SKaike Wan __field(int, diff) 12513ce5daa2SKaike Wan ), 12523ce5daa2SKaike Wan TP_fast_assign(/* assign */ 12533ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)) 12543ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 12553ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 12563ce5daa2SKaike Wan __entry->state = qp->state; 12574f9264d1SKaike Wan __entry->s_acked_ack_queue = qp->s_acked_ack_queue; 12583ce5daa2SKaike Wan __entry->s_tail_ack_queue = qp->s_tail_ack_queue; 12593ce5daa2SKaike Wan __entry->r_head_ack_queue = qp->r_head_ack_queue; 12603ce5daa2SKaike Wan __entry->opcode = opcode; 12613ce5daa2SKaike Wan __entry->psn = psn; 12623ce5daa2SKaike Wan __entry->r_psn = qp->r_psn; 12633ce5daa2SKaike Wan __entry->diff = diff; 12643ce5daa2SKaike Wan ), 12653ce5daa2SKaike Wan TP_printk(/* print */ 12663ce5daa2SKaike Wan RCV_ERR_PRN, 12673ce5daa2SKaike Wan __get_str(dev), 12683ce5daa2SKaike Wan __entry->qpn, 12693ce5daa2SKaike Wan __entry->s_flags, 12703ce5daa2SKaike Wan __entry->state, 12714f9264d1SKaike Wan __entry->s_acked_ack_queue, 12723ce5daa2SKaike Wan __entry->s_tail_ack_queue, 12733ce5daa2SKaike Wan __entry->r_head_ack_queue, 12743ce5daa2SKaike Wan __entry->opcode, 12753ce5daa2SKaike Wan __entry->psn, 12763ce5daa2SKaike Wan __entry->r_psn, 12773ce5daa2SKaike Wan __entry->diff 12783ce5daa2SKaike Wan ) 12793ce5daa2SKaike Wan ); 12803ce5daa2SKaike Wan 12813ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 12823ce5daa2SKaike Wan hfi1_rc_rcv_err_template, hfi1_tid_rdma_rcv_err, 12833ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), 12843ce5daa2SKaike Wan TP_ARGS(qp, opcode, psn, diff) 12853ce5daa2SKaike Wan ); 12863ce5daa2SKaike Wan 12873ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* sge */ 12883ce5daa2SKaike Wan hfi1_sge_template, 12893ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), 12903ce5daa2SKaike Wan TP_ARGS(qp, index, sge), 12913ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 12923ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 12933ce5daa2SKaike Wan __field(u32, qpn) 12943ce5daa2SKaike Wan __field(int, index) 12953ce5daa2SKaike Wan __field(u64, vaddr) 12963ce5daa2SKaike Wan __field(u32, sge_length) 12973ce5daa2SKaike Wan ), 12983ce5daa2SKaike Wan TP_fast_assign(/* assign */ 12993ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 13003ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 13013ce5daa2SKaike Wan __entry->index = index; 13023ce5daa2SKaike Wan __entry->vaddr = (u64)sge->vaddr; 13033ce5daa2SKaike Wan __entry->sge_length = sge->sge_length; 13043ce5daa2SKaike Wan ), 13053ce5daa2SKaike Wan TP_printk(/* print */ 13063ce5daa2SKaike Wan "[%s] qpn 0x%x sge %d: vaddr 0x%llx sge_length %u", 13073ce5daa2SKaike Wan __get_str(dev), 13083ce5daa2SKaike Wan __entry->qpn, 13093ce5daa2SKaike Wan __entry->index, 13103ce5daa2SKaike Wan __entry->vaddr, 13113ce5daa2SKaike Wan __entry->sge_length 13123ce5daa2SKaike Wan ) 13133ce5daa2SKaike Wan ); 13143ce5daa2SKaike Wan 13153ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 13163ce5daa2SKaike Wan hfi1_sge_template, hfi1_sge_check_align, 13173ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), 13183ce5daa2SKaike Wan TP_ARGS(qp, index, sge) 13193ce5daa2SKaike Wan ); 13203ce5daa2SKaike Wan 1321*a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* tid_write_sp */ 1322*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, 1323*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1324*a05c9bdcSKaike Wan TP_ARGS(qp), 1325*a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1326*a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1327*a05c9bdcSKaike Wan __field(u32, qpn) 1328*a05c9bdcSKaike Wan __field(u32, r_tid_head) 1329*a05c9bdcSKaike Wan __field(u32, r_tid_tail) 1330*a05c9bdcSKaike Wan __field(u32, r_tid_ack) 1331*a05c9bdcSKaike Wan __field(u32, r_tid_alloc) 1332*a05c9bdcSKaike Wan __field(u32, alloc_w_segs) 1333*a05c9bdcSKaike Wan __field(u32, pending_tid_w_segs) 1334*a05c9bdcSKaike Wan __field(bool, sync_pt) 1335*a05c9bdcSKaike Wan __field(u32, ps_nak_psn) 1336*a05c9bdcSKaike Wan __field(u8, ps_nak_state) 1337*a05c9bdcSKaike Wan __field(u8, prnr_nak_state) 1338*a05c9bdcSKaike Wan __field(u32, hw_flow_index) 1339*a05c9bdcSKaike Wan __field(u32, generation) 1340*a05c9bdcSKaike Wan __field(u32, fpsn) 1341*a05c9bdcSKaike Wan __field(u32, flow_flags) 1342*a05c9bdcSKaike Wan __field(bool, resync) 1343*a05c9bdcSKaike Wan __field(u32, r_next_psn_kdeth) 1344*a05c9bdcSKaike Wan ), 1345*a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1346*a05c9bdcSKaike Wan struct hfi1_qp_priv *priv = qp->priv; 1347*a05c9bdcSKaike Wan 1348*a05c9bdcSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 1349*a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1350*a05c9bdcSKaike Wan __entry->r_tid_head = priv->r_tid_head; 1351*a05c9bdcSKaike Wan __entry->r_tid_tail = priv->r_tid_tail; 1352*a05c9bdcSKaike Wan __entry->r_tid_ack = priv->r_tid_ack; 1353*a05c9bdcSKaike Wan __entry->r_tid_alloc = priv->r_tid_alloc; 1354*a05c9bdcSKaike Wan __entry->alloc_w_segs = priv->alloc_w_segs; 1355*a05c9bdcSKaike Wan __entry->pending_tid_w_segs = priv->pending_tid_w_segs; 1356*a05c9bdcSKaike Wan __entry->sync_pt = priv->sync_pt; 1357*a05c9bdcSKaike Wan __entry->ps_nak_psn = priv->s_nak_psn; 1358*a05c9bdcSKaike Wan __entry->ps_nak_state = priv->s_nak_state; 1359*a05c9bdcSKaike Wan __entry->prnr_nak_state = priv->rnr_nak_state; 1360*a05c9bdcSKaike Wan __entry->hw_flow_index = priv->flow_state.index; 1361*a05c9bdcSKaike Wan __entry->generation = priv->flow_state.generation; 1362*a05c9bdcSKaike Wan __entry->fpsn = priv->flow_state.psn; 1363*a05c9bdcSKaike Wan __entry->flow_flags = priv->flow_state.flags; 1364*a05c9bdcSKaike Wan __entry->resync = priv->resync; 1365*a05c9bdcSKaike Wan __entry->r_next_psn_kdeth = priv->r_next_psn_kdeth; 1366*a05c9bdcSKaike Wan ), 1367*a05c9bdcSKaike Wan TP_printk(/* print */ 1368*a05c9bdcSKaike Wan TID_WRITE_RSPDR_PRN, 1369*a05c9bdcSKaike Wan __get_str(dev), 1370*a05c9bdcSKaike Wan __entry->qpn, 1371*a05c9bdcSKaike Wan __entry->r_tid_head, 1372*a05c9bdcSKaike Wan __entry->r_tid_tail, 1373*a05c9bdcSKaike Wan __entry->r_tid_ack, 1374*a05c9bdcSKaike Wan __entry->r_tid_alloc, 1375*a05c9bdcSKaike Wan __entry->alloc_w_segs, 1376*a05c9bdcSKaike Wan __entry->pending_tid_w_segs, 1377*a05c9bdcSKaike Wan __entry->sync_pt ? "yes" : "no", 1378*a05c9bdcSKaike Wan __entry->ps_nak_psn, 1379*a05c9bdcSKaike Wan __entry->ps_nak_state, 1380*a05c9bdcSKaike Wan __entry->prnr_nak_state, 1381*a05c9bdcSKaike Wan __entry->hw_flow_index, 1382*a05c9bdcSKaike Wan __entry->generation, 1383*a05c9bdcSKaike Wan __entry->fpsn, 1384*a05c9bdcSKaike Wan __entry->flow_flags, 1385*a05c9bdcSKaike Wan __entry->resync ? "yes" : "no", 1386*a05c9bdcSKaike Wan __entry->r_next_psn_kdeth 1387*a05c9bdcSKaike Wan ) 1388*a05c9bdcSKaike Wan ); 1389*a05c9bdcSKaike Wan 1390*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1391*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_alloc_res, 1392*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1393*a05c9bdcSKaike Wan TP_ARGS(qp) 1394*a05c9bdcSKaike Wan ); 1395*a05c9bdcSKaike Wan 1396*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1397*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_rcv_req, 1398*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1399*a05c9bdcSKaike Wan TP_ARGS(qp) 1400*a05c9bdcSKaike Wan ); 1401*a05c9bdcSKaike Wan 1402*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1403*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_build_resp, 1404*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1405*a05c9bdcSKaike Wan TP_ARGS(qp) 1406*a05c9bdcSKaike Wan ); 1407*a05c9bdcSKaike Wan 1408*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1409*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_rcv_data, 1410*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1411*a05c9bdcSKaike Wan TP_ARGS(qp) 1412*a05c9bdcSKaike Wan ); 1413*a05c9bdcSKaike Wan 1414*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1415*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_rcv_resync, 1416*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1417*a05c9bdcSKaike Wan TP_ARGS(qp) 1418*a05c9bdcSKaike Wan ); 1419*a05c9bdcSKaike Wan 1420*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1421*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_make_tid_ack, 1422*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1423*a05c9bdcSKaike Wan TP_ARGS(qp) 1424*a05c9bdcSKaike Wan ); 1425*a05c9bdcSKaike Wan 1426*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1427*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_handle_kdeth_eflags, 1428*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1429*a05c9bdcSKaike Wan TP_ARGS(qp) 1430*a05c9bdcSKaike Wan ); 1431*a05c9bdcSKaike Wan 1432*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1433*a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_make_rc_ack, 1434*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1435*a05c9bdcSKaike Wan TP_ARGS(qp) 1436*a05c9bdcSKaike Wan ); 1437*a05c9bdcSKaike Wan 1438*a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* tid_write_sender */ 1439*a05c9bdcSKaike Wan hfi1_tid_write_sender_template, 1440*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1441*a05c9bdcSKaike Wan TP_ARGS(qp, newreq), 1442*a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1443*a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1444*a05c9bdcSKaike Wan __field(u32, qpn) 1445*a05c9bdcSKaike Wan __field(char, newreq) 1446*a05c9bdcSKaike Wan __field(u32, s_tid_cur) 1447*a05c9bdcSKaike Wan __field(u32, s_tid_tail) 1448*a05c9bdcSKaike Wan __field(u32, s_tid_head) 1449*a05c9bdcSKaike Wan __field(u32, pending_tid_w_resp) 1450*a05c9bdcSKaike Wan __field(u32, n_requests) 1451*a05c9bdcSKaike Wan __field(u32, n_tid_requests) 1452*a05c9bdcSKaike Wan __field(u32, s_flags) 1453*a05c9bdcSKaike Wan __field(u32, ps_flags) 1454*a05c9bdcSKaike Wan __field(unsigned long, iow_flags) 1455*a05c9bdcSKaike Wan __field(u8, s_state) 1456*a05c9bdcSKaike Wan __field(u8, s_retry) 1457*a05c9bdcSKaike Wan ), 1458*a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1459*a05c9bdcSKaike Wan struct hfi1_qp_priv *priv = qp->priv; 1460*a05c9bdcSKaike Wan 1461*a05c9bdcSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 1462*a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1463*a05c9bdcSKaike Wan __entry->newreq = newreq; 1464*a05c9bdcSKaike Wan __entry->s_tid_cur = priv->s_tid_cur; 1465*a05c9bdcSKaike Wan __entry->s_tid_tail = priv->s_tid_tail; 1466*a05c9bdcSKaike Wan __entry->s_tid_head = priv->s_tid_head; 1467*a05c9bdcSKaike Wan __entry->pending_tid_w_resp = priv->pending_tid_w_resp; 1468*a05c9bdcSKaike Wan __entry->n_requests = atomic_read(&priv->n_requests); 1469*a05c9bdcSKaike Wan __entry->n_tid_requests = atomic_read(&priv->n_tid_requests); 1470*a05c9bdcSKaike Wan __entry->s_flags = qp->s_flags; 1471*a05c9bdcSKaike Wan __entry->ps_flags = priv->s_flags; 1472*a05c9bdcSKaike Wan __entry->iow_flags = priv->s_iowait.flags; 1473*a05c9bdcSKaike Wan __entry->s_state = priv->s_state; 1474*a05c9bdcSKaike Wan __entry->s_retry = priv->s_retry; 1475*a05c9bdcSKaike Wan ), 1476*a05c9bdcSKaike Wan TP_printk(/* print */ 1477*a05c9bdcSKaike Wan TID_WRITE_SENDER_PRN, 1478*a05c9bdcSKaike Wan __get_str(dev), 1479*a05c9bdcSKaike Wan __entry->qpn, 1480*a05c9bdcSKaike Wan __entry->newreq, 1481*a05c9bdcSKaike Wan __entry->s_tid_cur, 1482*a05c9bdcSKaike Wan __entry->s_tid_tail, 1483*a05c9bdcSKaike Wan __entry->s_tid_head, 1484*a05c9bdcSKaike Wan __entry->pending_tid_w_resp, 1485*a05c9bdcSKaike Wan __entry->n_requests, 1486*a05c9bdcSKaike Wan __entry->n_tid_requests, 1487*a05c9bdcSKaike Wan __entry->s_flags, 1488*a05c9bdcSKaike Wan __entry->ps_flags, 1489*a05c9bdcSKaike Wan __entry->iow_flags, 1490*a05c9bdcSKaike Wan __entry->s_state, 1491*a05c9bdcSKaike Wan __entry->s_retry 1492*a05c9bdcSKaike Wan ) 1493*a05c9bdcSKaike Wan ); 1494*a05c9bdcSKaike Wan 1495*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1496*a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_rcv_resp, 1497*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1498*a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1499*a05c9bdcSKaike Wan ); 1500*a05c9bdcSKaike Wan 1501*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1502*a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_rcv_tid_ack, 1503*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1504*a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1505*a05c9bdcSKaike Wan ); 1506*a05c9bdcSKaike Wan 1507*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1508*a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_retry_timeout, 1509*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1510*a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1511*a05c9bdcSKaike Wan ); 1512*a05c9bdcSKaike Wan 1513*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1514*a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_make_tid_pkt, 1515*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1516*a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1517*a05c9bdcSKaike Wan ); 1518*a05c9bdcSKaike Wan 1519*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1520*a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_make_req, 1521*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1522*a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1523*a05c9bdcSKaike Wan ); 1524*a05c9bdcSKaike Wan 1525*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1526*a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_restart_rc, 1527*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1528*a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1529*a05c9bdcSKaike Wan ); 1530*a05c9bdcSKaike Wan 1531*a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* tid_ack */ 1532*a05c9bdcSKaike Wan hfi1_tid_ack_template, 1533*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 aeth, u32 psn, 1534*a05c9bdcSKaike Wan u32 req_psn, u32 resync_psn), 1535*a05c9bdcSKaike Wan TP_ARGS(qp, aeth, psn, req_psn, resync_psn), 1536*a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1537*a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1538*a05c9bdcSKaike Wan __field(u32, qpn) 1539*a05c9bdcSKaike Wan __field(u32, aeth) 1540*a05c9bdcSKaike Wan __field(u32, psn) 1541*a05c9bdcSKaike Wan __field(u32, req_psn) 1542*a05c9bdcSKaike Wan __field(u32, resync_psn) 1543*a05c9bdcSKaike Wan ), 1544*a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1545*a05c9bdcSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)) 1546*a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1547*a05c9bdcSKaike Wan __entry->aeth = aeth; 1548*a05c9bdcSKaike Wan __entry->psn = psn; 1549*a05c9bdcSKaike Wan __entry->req_psn = req_psn; 1550*a05c9bdcSKaike Wan __entry->resync_psn = resync_psn; 1551*a05c9bdcSKaike Wan ), 1552*a05c9bdcSKaike Wan TP_printk(/* print */ 1553*a05c9bdcSKaike Wan "[%s] qpn 0x%x aeth 0x%x psn 0x%x req_psn 0x%x resync_psn 0x%x", 1554*a05c9bdcSKaike Wan __get_str(dev), 1555*a05c9bdcSKaike Wan __entry->qpn, 1556*a05c9bdcSKaike Wan __entry->aeth, 1557*a05c9bdcSKaike Wan __entry->psn, 1558*a05c9bdcSKaike Wan __entry->req_psn, 1559*a05c9bdcSKaike Wan __entry->resync_psn 1560*a05c9bdcSKaike Wan ) 1561*a05c9bdcSKaike Wan ); 1562*a05c9bdcSKaike Wan 1563*a05c9bdcSKaike Wan DEFINE_EVENT(/* rcv_tid_ack */ 1564*a05c9bdcSKaike Wan hfi1_tid_ack_template, hfi1_rcv_tid_ack, 1565*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 aeth, u32 psn, 1566*a05c9bdcSKaike Wan u32 req_psn, u32 resync_psn), 1567*a05c9bdcSKaike Wan TP_ARGS(qp, aeth, psn, req_psn, resync_psn) 1568*a05c9bdcSKaike Wan ); 1569*a05c9bdcSKaike Wan 1570*a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* kdeth_eflags_error */ 1571*a05c9bdcSKaike Wan hfi1_kdeth_eflags_error_template, 1572*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u8 rcv_type, u8 rte, u32 psn), 1573*a05c9bdcSKaike Wan TP_ARGS(qp, rcv_type, rte, psn), 1574*a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1575*a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1576*a05c9bdcSKaike Wan __field(u32, qpn) 1577*a05c9bdcSKaike Wan __field(u8, rcv_type) 1578*a05c9bdcSKaike Wan __field(u8, rte) 1579*a05c9bdcSKaike Wan __field(u32, psn) 1580*a05c9bdcSKaike Wan ), 1581*a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1582*a05c9bdcSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 1583*a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1584*a05c9bdcSKaike Wan __entry->rcv_type = rcv_type; 1585*a05c9bdcSKaike Wan __entry->rte = rte; 1586*a05c9bdcSKaike Wan __entry->psn = psn; 1587*a05c9bdcSKaike Wan ), 1588*a05c9bdcSKaike Wan TP_printk(/* print */ 1589*a05c9bdcSKaike Wan KDETH_EFLAGS_ERR_PRN, 1590*a05c9bdcSKaike Wan __get_str(dev), 1591*a05c9bdcSKaike Wan __entry->qpn, 1592*a05c9bdcSKaike Wan __entry->rcv_type, 1593*a05c9bdcSKaike Wan __entry->rte, 1594*a05c9bdcSKaike Wan __entry->psn 1595*a05c9bdcSKaike Wan ) 1596*a05c9bdcSKaike Wan ); 1597*a05c9bdcSKaike Wan 1598*a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1599*a05c9bdcSKaike Wan hfi1_kdeth_eflags_error_template, hfi1_eflags_err_write, 1600*a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u8 rcv_type, u8 rte, u32 psn), 1601*a05c9bdcSKaike Wan TP_ARGS(qp, rcv_type, rte, psn) 1602*a05c9bdcSKaike Wan ); 1603*a05c9bdcSKaike Wan 1604a131d164SKaike Wan #endif /* __HFI1_TRACE_TID_H */ 1605a131d164SKaike Wan 1606a131d164SKaike Wan #undef TRACE_INCLUDE_PATH 1607a131d164SKaike Wan #undef TRACE_INCLUDE_FILE 1608a131d164SKaike Wan #define TRACE_INCLUDE_PATH . 1609a131d164SKaike Wan #define TRACE_INCLUDE_FILE trace_tid 1610a131d164SKaike Wan #include <trace/define_trace.h> 1611