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 " \ 56b885d5beSKaike Wan "fpsn 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 " \ 59a05c9bdcSKaike 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 " \ 61a05c9bdcSKaike Wan "acked_tail %u state %u r_ack_psn 0x%x r_flow_psn 0x%x " \ 62a05c9bdcSKaike 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 69a05c9bdcSKaike Wan #define TID_WRITE_RSPDR_PRN "[%s] qpn 0x%x r_tid_head %u r_tid_tail %u " \ 70a05c9bdcSKaike Wan "r_tid_ack %u r_tid_alloc %u alloc_w_segs %u " \ 71a05c9bdcSKaike Wan "pending_tid_w_segs %u sync_pt %s " \ 72a05c9bdcSKaike Wan "ps_nak_psn 0x%x ps_nak_state 0x%x " \ 73a05c9bdcSKaike Wan "prnr_nak_state 0x%x hw_flow_index %u generation "\ 74b885d5beSKaike Wan "0x%x fpsn 0x%x resync %s" \ 75a05c9bdcSKaike Wan "r_next_psn_kdeth 0x%x" 76a05c9bdcSKaike Wan 77a05c9bdcSKaike Wan #define TID_WRITE_SENDER_PRN "[%s] qpn 0x%x newreq %u s_tid_cur %u " \ 78a05c9bdcSKaike Wan "s_tid_tail %u s_tid_head %u " \ 79a05c9bdcSKaike Wan "pending_tid_w_resp %u n_requests %u " \ 80a05c9bdcSKaike Wan "n_tid_requests %u s_flags 0x%x ps_flags 0x%x "\ 81a05c9bdcSKaike Wan "iow_flags 0x%lx s_state 0x%x s_retry %u" 82a05c9bdcSKaike Wan 83a05c9bdcSKaike Wan #define KDETH_EFLAGS_ERR_PRN "[%s] qpn 0x%x TID ERR: RcvType 0x%x " \ 84a05c9bdcSKaike Wan "RcvTypeError 0x%x PSN 0x%x" 85a05c9bdcSKaike 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) 14104ae87a5SPeter Zijlstra __field(unsigned long, pa) 14204ae87a5SPeter Zijlstra __field(u32, index) 14304ae87a5SPeter Zijlstra __field(u32, type) 14404ae87a5SPeter Zijlstra __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 402a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 403a05c9bdcSKaike Wan hfi1_msg_template, hfi1_msg_tid_timeout, 404a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 405a05c9bdcSKaike Wan TP_ARGS(qp, msg, more) 406a05c9bdcSKaike Wan ); 407a05c9bdcSKaike Wan 408a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 409a05c9bdcSKaike Wan hfi1_msg_template, hfi1_msg_tid_retry_timeout, 410a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u64 more), 411a05c9bdcSKaike Wan TP_ARGS(qp, msg, more) 412a05c9bdcSKaike Wan ); 413a05c9bdcSKaike 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 594a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 595a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_build_write_resp, 596a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 597a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 598a05c9bdcSKaike Wan ); 599a05c9bdcSKaike Wan 600a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 601a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_write_resp, 602a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 603a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 604a05c9bdcSKaike Wan ); 605a05c9bdcSKaike Wan 606a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 607a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_build_write_data, 608a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 609a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 610a05c9bdcSKaike Wan ); 611a05c9bdcSKaike Wan 612a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 613a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_tid_ack, 614a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 615a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 616a05c9bdcSKaike Wan ); 617a05c9bdcSKaike Wan 618a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 619a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_rcv_resync, 620a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 621a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 622a05c9bdcSKaike Wan ); 623a05c9bdcSKaike Wan 624a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 625a05c9bdcSKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_handle_kdeth_eflags, 626a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 627a05c9bdcSKaike Wan TP_ARGS(qp, index, flow) 628a05c9bdcSKaike Wan ); 629a05c9bdcSKaike Wan 630c05fc156SKaike Wan DEFINE_EVENT(/* event */ 631c05fc156SKaike Wan hfi1_tid_flow_template, hfi1_tid_flow_read_kdeth_eflags, 632c05fc156SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct tid_rdma_flow *flow), 633c05fc156SKaike Wan TP_ARGS(qp, index, flow) 634c05fc156SKaike Wan ); 635c05fc156SKaike Wan 63684f4a40dSKaike Wan DECLARE_EVENT_CLASS(/* tid_node */ 63784f4a40dSKaike Wan hfi1_tid_node_template, 63884f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u32 index, u32 base, 63984f4a40dSKaike Wan u8 map, u8 used, u8 cnt), 64084f4a40dSKaike Wan TP_ARGS(qp, msg, index, base, map, used, cnt), 64184f4a40dSKaike Wan TP_STRUCT__entry(/* entry */ 64284f4a40dSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 64384f4a40dSKaike Wan __field(u32, qpn) 64484f4a40dSKaike Wan __string(msg, msg) 64584f4a40dSKaike Wan __field(u32, index) 64684f4a40dSKaike Wan __field(u32, base) 64784f4a40dSKaike Wan __field(u8, map) 64884f4a40dSKaike Wan __field(u8, used) 64984f4a40dSKaike Wan __field(u8, cnt) 65084f4a40dSKaike Wan ), 65184f4a40dSKaike Wan TP_fast_assign(/* assign */ 65284f4a40dSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 65384f4a40dSKaike Wan __entry->qpn = qp->ibqp.qp_num; 65484f4a40dSKaike Wan __assign_str(msg, msg); 65584f4a40dSKaike Wan __entry->index = index; 65684f4a40dSKaike Wan __entry->base = base; 65784f4a40dSKaike Wan __entry->map = map; 65884f4a40dSKaike Wan __entry->used = used; 65984f4a40dSKaike Wan __entry->cnt = cnt; 66084f4a40dSKaike Wan ), 66184f4a40dSKaike Wan TP_printk(/* print */ 66284f4a40dSKaike Wan TID_NODE_PRN, 66384f4a40dSKaike Wan __get_str(dev), 66484f4a40dSKaike Wan __entry->qpn, 66584f4a40dSKaike Wan __get_str(msg), 66684f4a40dSKaike Wan __entry->index, 66784f4a40dSKaike Wan __entry->base, 66884f4a40dSKaike Wan __entry->map, 66984f4a40dSKaike Wan __entry->used, 67084f4a40dSKaike Wan __entry->cnt 67184f4a40dSKaike Wan ) 67284f4a40dSKaike Wan ); 67384f4a40dSKaike Wan 67484f4a40dSKaike Wan DEFINE_EVENT(/* event */ 67584f4a40dSKaike Wan hfi1_tid_node_template, hfi1_tid_node_add, 67684f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, const char *msg, u32 index, u32 base, 67784f4a40dSKaike Wan u8 map, u8 used, u8 cnt), 67884f4a40dSKaike Wan TP_ARGS(qp, msg, index, base, map, used, cnt) 67984f4a40dSKaike Wan ); 68084f4a40dSKaike Wan 68184f4a40dSKaike Wan DECLARE_EVENT_CLASS(/* tid_entry */ 68284f4a40dSKaike Wan hfi1_tid_entry_template, 68384f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 ent), 68484f4a40dSKaike Wan TP_ARGS(qp, index, ent), 68584f4a40dSKaike Wan TP_STRUCT__entry(/* entry */ 68684f4a40dSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 68784f4a40dSKaike Wan __field(u32, qpn) 68884f4a40dSKaike Wan __field(int, index) 68984f4a40dSKaike Wan __field(u8, ctrl) 69084f4a40dSKaike Wan __field(u16, idx) 69184f4a40dSKaike Wan __field(u16, len) 69284f4a40dSKaike Wan ), 69384f4a40dSKaike Wan TP_fast_assign(/* assign */ 69484f4a40dSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 69584f4a40dSKaike Wan __entry->qpn = qp->ibqp.qp_num; 69684f4a40dSKaike Wan __entry->index = index; 69784f4a40dSKaike Wan __entry->ctrl = hfi1_trace_get_tid_ctrl(ent); 69884f4a40dSKaike Wan __entry->idx = hfi1_trace_get_tid_idx(ent); 69984f4a40dSKaike Wan __entry->len = hfi1_trace_get_tid_len(ent); 70084f4a40dSKaike Wan ), 70184f4a40dSKaike Wan TP_printk(/* print */ 70284f4a40dSKaike Wan "[%s] qpn 0x%x TID entry %d: idx %u len %u ctrl 0x%x", 70384f4a40dSKaike Wan __get_str(dev), 70484f4a40dSKaike Wan __entry->qpn, 70584f4a40dSKaike Wan __entry->index, 70684f4a40dSKaike Wan __entry->idx, 70784f4a40dSKaike Wan __entry->len, 70884f4a40dSKaike Wan __entry->ctrl 70984f4a40dSKaike Wan ) 71084f4a40dSKaike Wan ); 71184f4a40dSKaike Wan 71284f4a40dSKaike Wan DEFINE_EVENT(/* event */ 71384f4a40dSKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_alloc, 71484f4a40dSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 entry), 71584f4a40dSKaike Wan TP_ARGS(qp, index, entry) 71684f4a40dSKaike Wan ); 71784f4a40dSKaike Wan 7183ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 7193ce5daa2SKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_build_read_resp, 7203ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 ent), 7213ce5daa2SKaike Wan TP_ARGS(qp, index, ent) 7223ce5daa2SKaike Wan ); 7233ce5daa2SKaike Wan 7243ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 7253ce5daa2SKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_rcv_read_req, 7263ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 ent), 7273ce5daa2SKaike Wan TP_ARGS(qp, index, ent) 7283ce5daa2SKaike Wan ); 7293ce5daa2SKaike Wan 730a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 731a05c9bdcSKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_rcv_write_resp, 732a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 entry), 733a05c9bdcSKaike Wan TP_ARGS(qp, index, entry) 734a05c9bdcSKaike Wan ); 735a05c9bdcSKaike Wan 736a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 737a05c9bdcSKaike Wan hfi1_tid_entry_template, hfi1_tid_entry_build_write_data, 738a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, int index, u32 entry), 739a05c9bdcSKaike Wan TP_ARGS(qp, index, entry) 740a05c9bdcSKaike Wan ); 741a05c9bdcSKaike Wan 7423ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* rsp_info */ 7433ce5daa2SKaike Wan hfi1_responder_info_template, 7443ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 7453ce5daa2SKaike Wan TP_ARGS(qp, psn), 7463ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 7473ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 7483ce5daa2SKaike Wan __field(u32, qpn) 7493ce5daa2SKaike Wan __field(u8, state) 7503ce5daa2SKaike Wan __field(u8, s_state) 7513ce5daa2SKaike Wan __field(u32, psn) 7523ce5daa2SKaike Wan __field(u32, r_psn) 7533ce5daa2SKaike Wan __field(u8, r_state) 7543ce5daa2SKaike Wan __field(u8, r_flags) 7553ce5daa2SKaike Wan __field(u8, r_head_ack_queue) 7563ce5daa2SKaike Wan __field(u8, s_tail_ack_queue) 7574f9264d1SKaike Wan __field(u8, s_acked_ack_queue) 7583ce5daa2SKaike Wan __field(u8, s_ack_state) 7593ce5daa2SKaike Wan __field(u8, s_nak_state) 7603ce5daa2SKaike Wan __field(u8, r_nak_state) 7613ce5daa2SKaike Wan __field(u32, s_flags) 7623ce5daa2SKaike Wan __field(u32, ps_flags) 7633ce5daa2SKaike Wan __field(unsigned long, iow_flags) 7643ce5daa2SKaike Wan ), 7653ce5daa2SKaike Wan TP_fast_assign(/* assign */ 7663ce5daa2SKaike Wan struct hfi1_qp_priv *priv = qp->priv; 7673ce5daa2SKaike Wan 7683ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 7693ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 7703ce5daa2SKaike Wan __entry->state = qp->state; 7713ce5daa2SKaike Wan __entry->s_state = qp->s_state; 7723ce5daa2SKaike Wan __entry->psn = psn; 7733ce5daa2SKaike Wan __entry->r_psn = qp->r_psn; 7743ce5daa2SKaike Wan __entry->r_state = qp->r_state; 7753ce5daa2SKaike Wan __entry->r_flags = qp->r_flags; 7763ce5daa2SKaike Wan __entry->r_head_ack_queue = qp->r_head_ack_queue; 7773ce5daa2SKaike Wan __entry->s_tail_ack_queue = qp->s_tail_ack_queue; 7784f9264d1SKaike Wan __entry->s_acked_ack_queue = qp->s_acked_ack_queue; 7793ce5daa2SKaike Wan __entry->s_ack_state = qp->s_ack_state; 7803ce5daa2SKaike Wan __entry->s_nak_state = qp->s_nak_state; 7813ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 7823ce5daa2SKaike Wan __entry->ps_flags = priv->s_flags; 7833ce5daa2SKaike Wan __entry->iow_flags = priv->s_iowait.flags; 7843ce5daa2SKaike Wan ), 7853ce5daa2SKaike Wan TP_printk(/* print */ 7863ce5daa2SKaike Wan RSP_INFO_PRN, 7873ce5daa2SKaike Wan __get_str(dev), 7883ce5daa2SKaike Wan __entry->qpn, 7893ce5daa2SKaike Wan __entry->state, 7903ce5daa2SKaike Wan __entry->s_state, 7913ce5daa2SKaike Wan __entry->psn, 7923ce5daa2SKaike Wan __entry->r_psn, 7933ce5daa2SKaike Wan __entry->r_state, 7943ce5daa2SKaike Wan __entry->r_flags, 7953ce5daa2SKaike Wan __entry->r_head_ack_queue, 7963ce5daa2SKaike Wan __entry->s_tail_ack_queue, 7974f9264d1SKaike Wan __entry->s_acked_ack_queue, 7983ce5daa2SKaike Wan __entry->s_ack_state, 7993ce5daa2SKaike Wan __entry->s_nak_state, 8003ce5daa2SKaike Wan __entry->s_flags, 8013ce5daa2SKaike Wan __entry->ps_flags, 8023ce5daa2SKaike Wan __entry->iow_flags 8033ce5daa2SKaike Wan ) 8043ce5daa2SKaike Wan ); 8053ce5daa2SKaike Wan 8063ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 8073ce5daa2SKaike Wan hfi1_responder_info_template, hfi1_rsp_make_rc_ack, 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_rcv_tid_read_req, 8143ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 8153ce5daa2SKaike Wan TP_ARGS(qp, psn) 8163ce5daa2SKaike Wan ); 8173ce5daa2SKaike Wan 8183ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 8193ce5daa2SKaike Wan hfi1_responder_info_template, hfi1_rsp_tid_rcv_error, 8203ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 8213ce5daa2SKaike Wan TP_ARGS(qp, psn) 8223ce5daa2SKaike Wan ); 8233ce5daa2SKaike Wan 824a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 825a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_tid_write_alloc_res, 826a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 827a05c9bdcSKaike Wan TP_ARGS(qp, psn) 828a05c9bdcSKaike Wan ); 829a05c9bdcSKaike Wan 830a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 831a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_rcv_tid_write_req, 832a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 833a05c9bdcSKaike Wan TP_ARGS(qp, psn) 834a05c9bdcSKaike Wan ); 835a05c9bdcSKaike Wan 836a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 837a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_build_tid_write_resp, 838a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 839a05c9bdcSKaike Wan TP_ARGS(qp, psn) 840a05c9bdcSKaike Wan ); 841a05c9bdcSKaike Wan 842a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 843a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_rcv_tid_write_data, 844a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 845a05c9bdcSKaike Wan TP_ARGS(qp, psn) 846a05c9bdcSKaike Wan ); 847a05c9bdcSKaike Wan 848a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 849a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_make_tid_ack, 850a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 851a05c9bdcSKaike Wan TP_ARGS(qp, psn) 852a05c9bdcSKaike Wan ); 853a05c9bdcSKaike Wan 854a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 855a05c9bdcSKaike Wan hfi1_responder_info_template, hfi1_rsp_handle_kdeth_eflags, 856a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 857a05c9bdcSKaike Wan TP_ARGS(qp, psn) 858a05c9bdcSKaike Wan ); 859a05c9bdcSKaike Wan 860c05fc156SKaike Wan DEFINE_EVENT(/* event */ 861c05fc156SKaike Wan hfi1_responder_info_template, hfi1_rsp_read_kdeth_eflags, 862c05fc156SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 psn), 863c05fc156SKaike Wan TP_ARGS(qp, psn) 864c05fc156SKaike Wan ); 865c05fc156SKaike Wan 8663ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* sender_info */ 8673ce5daa2SKaike Wan hfi1_sender_info_template, 8683ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 8693ce5daa2SKaike Wan TP_ARGS(qp), 8703ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 8713ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 8723ce5daa2SKaike Wan __field(u32, qpn) 8733ce5daa2SKaike Wan __field(u8, state) 8743ce5daa2SKaike Wan __field(u32, s_cur) 8753ce5daa2SKaike Wan __field(u32, s_tail) 8763ce5daa2SKaike Wan __field(u32, s_head) 8773ce5daa2SKaike Wan __field(u32, s_acked) 8783ce5daa2SKaike Wan __field(u32, s_last) 8793ce5daa2SKaike Wan __field(u32, s_psn) 8803ce5daa2SKaike Wan __field(u32, s_last_psn) 8813ce5daa2SKaike Wan __field(u32, s_flags) 8823ce5daa2SKaike Wan __field(u32, ps_flags) 8833ce5daa2SKaike Wan __field(unsigned long, iow_flags) 8843ce5daa2SKaike Wan __field(u8, s_state) 8853ce5daa2SKaike Wan __field(u8, s_num_rd) 8863ce5daa2SKaike Wan __field(u8, s_retry) 8873ce5daa2SKaike Wan ), 8883ce5daa2SKaike Wan TP_fast_assign(/* assign */ 889*78c14b38SJoe Perches DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 8903ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 8913ce5daa2SKaike Wan __entry->state = qp->state; 8923ce5daa2SKaike Wan __entry->s_cur = qp->s_cur; 8933ce5daa2SKaike Wan __entry->s_tail = qp->s_tail; 8943ce5daa2SKaike Wan __entry->s_head = qp->s_head; 8953ce5daa2SKaike Wan __entry->s_acked = qp->s_acked; 8963ce5daa2SKaike Wan __entry->s_last = qp->s_last; 8973ce5daa2SKaike Wan __entry->s_psn = qp->s_psn; 8983ce5daa2SKaike Wan __entry->s_last_psn = qp->s_last_psn; 8993ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 9003ce5daa2SKaike Wan __entry->ps_flags = ((struct hfi1_qp_priv *)qp->priv)->s_flags; 9013ce5daa2SKaike Wan __entry->iow_flags = 9023ce5daa2SKaike Wan ((struct hfi1_qp_priv *)qp->priv)->s_iowait.flags; 9033ce5daa2SKaike Wan __entry->s_state = qp->s_state; 9043ce5daa2SKaike Wan __entry->s_num_rd = qp->s_num_rd_atomic; 9053ce5daa2SKaike Wan __entry->s_retry = qp->s_retry; 9063ce5daa2SKaike Wan ), 9073ce5daa2SKaike Wan TP_printk(/* print */ 9083ce5daa2SKaike Wan SENDER_INFO_PRN, 9093ce5daa2SKaike Wan __get_str(dev), 9103ce5daa2SKaike Wan __entry->qpn, 9113ce5daa2SKaike Wan __entry->state, 9123ce5daa2SKaike Wan __entry->s_cur, 9133ce5daa2SKaike Wan __entry->s_tail, 9143ce5daa2SKaike Wan __entry->s_head, 9153ce5daa2SKaike Wan __entry->s_acked, 9163ce5daa2SKaike Wan __entry->s_last, 9173ce5daa2SKaike Wan __entry->s_psn, 9183ce5daa2SKaike Wan __entry->s_last_psn, 9193ce5daa2SKaike Wan __entry->s_flags, 9203ce5daa2SKaike Wan __entry->ps_flags, 9213ce5daa2SKaike Wan __entry->iow_flags, 9223ce5daa2SKaike Wan __entry->s_state, 9233ce5daa2SKaike Wan __entry->s_num_rd, 9243ce5daa2SKaike Wan __entry->s_retry 9253ce5daa2SKaike Wan ) 9263ce5daa2SKaike Wan ); 9273ce5daa2SKaike Wan 9283ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9293ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_make_rc_req, 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_reset_psn, 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_restart_rc, 9423ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9433ce5daa2SKaike Wan TP_ARGS(qp) 9443ce5daa2SKaike Wan ); 9453ce5daa2SKaike Wan 9463ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9473ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_do_rc_ack, 9483ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9493ce5daa2SKaike Wan TP_ARGS(qp) 9503ce5daa2SKaike Wan ); 9513ce5daa2SKaike Wan 9523ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 9533ce5daa2SKaike Wan hfi1_sender_info_template, hfi1_sender_rcv_tid_read_resp, 9543ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp), 9553ce5daa2SKaike Wan TP_ARGS(qp) 9563ce5daa2SKaike Wan ); 9573ce5daa2SKaike Wan 958a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 959a05c9bdcSKaike Wan hfi1_sender_info_template, hfi1_sender_rcv_tid_ack, 960a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 961a05c9bdcSKaike Wan TP_ARGS(qp) 962a05c9bdcSKaike Wan ); 963a05c9bdcSKaike Wan 964a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 965a05c9bdcSKaike Wan hfi1_sender_info_template, hfi1_sender_make_tid_pkt, 966a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 967a05c9bdcSKaike Wan TP_ARGS(qp) 968a05c9bdcSKaike Wan ); 969a05c9bdcSKaike Wan 970c05fc156SKaike Wan DEFINE_EVENT(/* event */ 971c05fc156SKaike Wan hfi1_sender_info_template, hfi1_sender_read_kdeth_eflags, 972c05fc156SKaike Wan TP_PROTO(struct rvt_qp *qp), 973c05fc156SKaike Wan TP_ARGS(qp) 974c05fc156SKaike Wan ); 975c05fc156SKaike Wan 9763ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* tid_read_sender */ 9773ce5daa2SKaike Wan hfi1_tid_read_sender_template, 9783ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 9793ce5daa2SKaike Wan TP_ARGS(qp, newreq), 9803ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 9813ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 9823ce5daa2SKaike Wan __field(u32, qpn) 9833ce5daa2SKaike Wan __field(char, newreq) 9843ce5daa2SKaike Wan __field(u32, tid_r_reqs) 9853ce5daa2SKaike Wan __field(u32, tid_r_comp) 9863ce5daa2SKaike Wan __field(u32, pending_tid_r_segs) 9873ce5daa2SKaike Wan __field(u32, s_flags) 9883ce5daa2SKaike Wan __field(u32, ps_flags) 9893ce5daa2SKaike Wan __field(unsigned long, iow_flags) 9909e93e967SKaike Wan __field(u8, s_state) 9913ce5daa2SKaike Wan __field(u32, hw_flow_index) 9923ce5daa2SKaike Wan __field(u32, generation) 9933ce5daa2SKaike Wan __field(u32, fpsn) 9943ce5daa2SKaike Wan ), 9953ce5daa2SKaike Wan TP_fast_assign(/* assign */ 9963ce5daa2SKaike Wan struct hfi1_qp_priv *priv = qp->priv; 9973ce5daa2SKaike Wan 9983ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 9993ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 10003ce5daa2SKaike Wan __entry->newreq = newreq; 10013ce5daa2SKaike Wan __entry->tid_r_reqs = priv->tid_r_reqs; 10023ce5daa2SKaike Wan __entry->tid_r_comp = priv->tid_r_comp; 10033ce5daa2SKaike Wan __entry->pending_tid_r_segs = priv->pending_tid_r_segs; 10043ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 10053ce5daa2SKaike Wan __entry->ps_flags = priv->s_flags; 10063ce5daa2SKaike Wan __entry->iow_flags = priv->s_iowait.flags; 10079e93e967SKaike Wan __entry->s_state = priv->s_state; 10083ce5daa2SKaike Wan __entry->hw_flow_index = priv->flow_state.index; 10093ce5daa2SKaike Wan __entry->generation = priv->flow_state.generation; 10103ce5daa2SKaike Wan __entry->fpsn = priv->flow_state.psn; 10113ce5daa2SKaike Wan ), 10123ce5daa2SKaike Wan TP_printk(/* print */ 10133ce5daa2SKaike Wan TID_READ_SENDER_PRN, 10143ce5daa2SKaike Wan __get_str(dev), 10153ce5daa2SKaike Wan __entry->qpn, 10163ce5daa2SKaike Wan __entry->newreq, 10173ce5daa2SKaike Wan __entry->tid_r_reqs, 10183ce5daa2SKaike Wan __entry->tid_r_comp, 10193ce5daa2SKaike Wan __entry->pending_tid_r_segs, 10203ce5daa2SKaike Wan __entry->s_flags, 10213ce5daa2SKaike Wan __entry->ps_flags, 10223ce5daa2SKaike Wan __entry->iow_flags, 10239e93e967SKaike Wan __entry->s_state, 10243ce5daa2SKaike Wan __entry->hw_flow_index, 10253ce5daa2SKaike Wan __entry->generation, 1026b885d5beSKaike Wan __entry->fpsn 10273ce5daa2SKaike Wan ) 10283ce5daa2SKaike Wan ); 10293ce5daa2SKaike Wan 10303ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 10313ce5daa2SKaike Wan hfi1_tid_read_sender_template, hfi1_tid_read_sender_make_req, 10323ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 10333ce5daa2SKaike Wan TP_ARGS(qp, newreq) 10343ce5daa2SKaike Wan ); 10353ce5daa2SKaike Wan 1036c05fc156SKaike Wan DEFINE_EVENT(/* event */ 1037c05fc156SKaike Wan hfi1_tid_read_sender_template, hfi1_tid_read_sender_kdeth_eflags, 1038c05fc156SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1039c05fc156SKaike Wan TP_ARGS(qp, newreq) 1040c05fc156SKaike Wan ); 1041c05fc156SKaike Wan 10423ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* tid_rdma_request */ 10433ce5daa2SKaike Wan hfi1_tid_rdma_request_template, 10443ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 10453ce5daa2SKaike Wan struct tid_rdma_request *req), 10463ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req), 10473ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 10483ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 10493ce5daa2SKaike Wan __field(u32, qpn) 10503ce5daa2SKaike Wan __field(char, newreq) 10513ce5daa2SKaike Wan __field(u8, opcode) 10523ce5daa2SKaike Wan __field(u32, psn) 10533ce5daa2SKaike Wan __field(u32, lpsn) 10543ce5daa2SKaike Wan __field(u32, cur_seg) 10553ce5daa2SKaike Wan __field(u32, comp_seg) 10563ce5daa2SKaike Wan __field(u32, ack_seg) 1057a05c9bdcSKaike Wan __field(u32, alloc_seg) 10583ce5daa2SKaike Wan __field(u32, total_segs) 10593ce5daa2SKaike Wan __field(u16, setup_head) 10603ce5daa2SKaike Wan __field(u16, clear_tail) 10613ce5daa2SKaike Wan __field(u16, flow_idx) 1062a05c9bdcSKaike Wan __field(u16, acked_tail) 10633ce5daa2SKaike Wan __field(u32, state) 1064a05c9bdcSKaike Wan __field(u32, r_ack_psn) 10653ce5daa2SKaike Wan __field(u32, r_flow_psn) 1066a05c9bdcSKaike Wan __field(u32, r_last_acked) 10673ce5daa2SKaike Wan __field(u32, s_next_psn) 10683ce5daa2SKaike Wan ), 10693ce5daa2SKaike Wan TP_fast_assign(/* assign */ 10703ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 10713ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 10723ce5daa2SKaike Wan __entry->newreq = newreq; 10733ce5daa2SKaike Wan __entry->opcode = opcode; 10743ce5daa2SKaike Wan __entry->psn = psn; 10753ce5daa2SKaike Wan __entry->lpsn = lpsn; 10763ce5daa2SKaike Wan __entry->cur_seg = req->cur_seg; 10773ce5daa2SKaike Wan __entry->comp_seg = req->comp_seg; 10783ce5daa2SKaike Wan __entry->ack_seg = req->ack_seg; 1079a05c9bdcSKaike Wan __entry->alloc_seg = req->alloc_seg; 10803ce5daa2SKaike Wan __entry->total_segs = req->total_segs; 10813ce5daa2SKaike Wan __entry->setup_head = req->setup_head; 10823ce5daa2SKaike Wan __entry->clear_tail = req->clear_tail; 10833ce5daa2SKaike Wan __entry->flow_idx = req->flow_idx; 1084a05c9bdcSKaike Wan __entry->acked_tail = req->acked_tail; 10853ce5daa2SKaike Wan __entry->state = req->state; 1086a05c9bdcSKaike Wan __entry->r_ack_psn = req->r_ack_psn; 10873ce5daa2SKaike Wan __entry->r_flow_psn = req->r_flow_psn; 1088a05c9bdcSKaike Wan __entry->r_last_acked = req->r_last_acked; 10893ce5daa2SKaike Wan __entry->s_next_psn = req->s_next_psn; 10903ce5daa2SKaike Wan ), 10913ce5daa2SKaike Wan TP_printk(/* print */ 10923ce5daa2SKaike Wan TID_REQ_PRN, 10933ce5daa2SKaike Wan __get_str(dev), 10943ce5daa2SKaike Wan __entry->qpn, 10953ce5daa2SKaike Wan __entry->newreq, 10963ce5daa2SKaike Wan __entry->opcode, 10973ce5daa2SKaike Wan __entry->psn, 10983ce5daa2SKaike Wan __entry->lpsn, 10993ce5daa2SKaike Wan __entry->cur_seg, 11003ce5daa2SKaike Wan __entry->comp_seg, 11013ce5daa2SKaike Wan __entry->ack_seg, 1102a05c9bdcSKaike Wan __entry->alloc_seg, 11033ce5daa2SKaike Wan __entry->total_segs, 11043ce5daa2SKaike Wan __entry->setup_head, 11053ce5daa2SKaike Wan __entry->clear_tail, 11063ce5daa2SKaike Wan __entry->flow_idx, 1107a05c9bdcSKaike Wan __entry->acked_tail, 11083ce5daa2SKaike Wan __entry->state, 1109a05c9bdcSKaike Wan __entry->r_ack_psn, 11103ce5daa2SKaike Wan __entry->r_flow_psn, 1111a05c9bdcSKaike Wan __entry->r_last_acked, 11123ce5daa2SKaike Wan __entry->s_next_psn 11133ce5daa2SKaike Wan ) 11143ce5daa2SKaike Wan ); 11153ce5daa2SKaike Wan 11163ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11173ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_req_read, 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_build_read_req, 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_rcv_read_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_rcv_read_resp, 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 11443ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11453ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_err, 11463ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11473ce5daa2SKaike Wan struct tid_rdma_request *req), 11483ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11493ce5daa2SKaike Wan ); 11503ce5daa2SKaike Wan 11513ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11523ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_restart_req, 11533ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11543ce5daa2SKaike Wan struct tid_rdma_request *req), 11553ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11563ce5daa2SKaike Wan ); 11573ce5daa2SKaike Wan 11583ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 11593ce5daa2SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_setup_tid_wqe, 11603ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 11613ce5daa2SKaike Wan struct tid_rdma_request *req), 11623ce5daa2SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 11633ce5daa2SKaike Wan ); 11643ce5daa2SKaike Wan 1165a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1166a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_write_alloc_res, 1167a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1168a05c9bdcSKaike Wan struct tid_rdma_request *req), 1169a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1170a05c9bdcSKaike Wan ); 1171a05c9bdcSKaike Wan 1172a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1173a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_write_req, 1174a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1175a05c9bdcSKaike Wan struct tid_rdma_request *req), 1176a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1177a05c9bdcSKaike Wan ); 1178a05c9bdcSKaike Wan 1179a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1180a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_build_write_resp, 1181a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1182a05c9bdcSKaike Wan struct tid_rdma_request *req), 1183a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1184a05c9bdcSKaike Wan ); 1185a05c9bdcSKaike Wan 1186a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1187a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_write_resp, 1188a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1189a05c9bdcSKaike Wan struct tid_rdma_request *req), 1190a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1191a05c9bdcSKaike Wan ); 1192a05c9bdcSKaike Wan 1193a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1194a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_write_data, 1195a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1196a05c9bdcSKaike Wan struct tid_rdma_request *req), 1197a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1198a05c9bdcSKaike Wan ); 1199a05c9bdcSKaike Wan 1200a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1201a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_tid_ack, 1202a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1203a05c9bdcSKaike Wan struct tid_rdma_request *req), 1204a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1205a05c9bdcSKaike Wan ); 1206a05c9bdcSKaike Wan 1207a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1208a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_tid_retry_timeout, 1209a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1210a05c9bdcSKaike Wan struct tid_rdma_request *req), 1211a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1212a05c9bdcSKaike Wan ); 1213a05c9bdcSKaike Wan 1214a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1215a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_rcv_resync, 1216a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1217a05c9bdcSKaike Wan struct tid_rdma_request *req), 1218a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1219a05c9bdcSKaike Wan ); 1220a05c9bdcSKaike Wan 1221a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1222a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_tid_pkt, 1223a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1224a05c9bdcSKaike Wan struct tid_rdma_request *req), 1225a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1226a05c9bdcSKaike Wan ); 1227a05c9bdcSKaike Wan 1228a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1229a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_tid_ack, 1230a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1231a05c9bdcSKaike Wan struct tid_rdma_request *req), 1232a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1233a05c9bdcSKaike Wan ); 1234a05c9bdcSKaike Wan 1235a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1236a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_handle_kdeth_eflags, 1237a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1238a05c9bdcSKaike Wan struct tid_rdma_request *req), 1239a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1240a05c9bdcSKaike Wan ); 1241a05c9bdcSKaike Wan 1242a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1243c05fc156SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_read_kdeth_eflags, 1244c05fc156SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1245c05fc156SKaike Wan struct tid_rdma_request *req), 1246c05fc156SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1247c05fc156SKaike Wan ); 1248c05fc156SKaike Wan 1249c05fc156SKaike Wan DEFINE_EVENT(/* event */ 1250a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_rc_ack_write, 1251a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1252a05c9bdcSKaike Wan struct tid_rdma_request *req), 1253a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1254a05c9bdcSKaike Wan ); 1255a05c9bdcSKaike Wan 1256a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1257a05c9bdcSKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_make_req_write, 1258a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1259a05c9bdcSKaike Wan struct tid_rdma_request *req), 1260a05c9bdcSKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1261a05c9bdcSKaike Wan ); 1262a05c9bdcSKaike Wan 1263c05fc156SKaike Wan DEFINE_EVENT(/* event */ 1264c05fc156SKaike Wan hfi1_tid_rdma_request_template, hfi1_tid_req_update_num_rd_atomic, 1265c05fc156SKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq, u8 opcode, u32 psn, u32 lpsn, 1266c05fc156SKaike Wan struct tid_rdma_request *req), 1267c05fc156SKaike Wan TP_ARGS(qp, newreq, opcode, psn, lpsn, req) 1268c05fc156SKaike Wan ); 1269c05fc156SKaike Wan 12703ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* rc_rcv_err */ 12713ce5daa2SKaike Wan hfi1_rc_rcv_err_template, 12723ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), 12733ce5daa2SKaike Wan TP_ARGS(qp, opcode, psn, diff), 12743ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 12753ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 12763ce5daa2SKaike Wan __field(u32, qpn) 12773ce5daa2SKaike Wan __field(u32, s_flags) 12783ce5daa2SKaike Wan __field(u8, state) 12794f9264d1SKaike Wan __field(u8, s_acked_ack_queue) 12803ce5daa2SKaike Wan __field(u8, s_tail_ack_queue) 12813ce5daa2SKaike Wan __field(u8, r_head_ack_queue) 12823ce5daa2SKaike Wan __field(u32, opcode) 12833ce5daa2SKaike Wan __field(u32, psn) 12843ce5daa2SKaike Wan __field(u32, r_psn) 12853ce5daa2SKaike Wan __field(int, diff) 12863ce5daa2SKaike Wan ), 12873ce5daa2SKaike Wan TP_fast_assign(/* assign */ 1288*78c14b38SJoe Perches DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 12893ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 12903ce5daa2SKaike Wan __entry->s_flags = qp->s_flags; 12913ce5daa2SKaike Wan __entry->state = qp->state; 12924f9264d1SKaike Wan __entry->s_acked_ack_queue = qp->s_acked_ack_queue; 12933ce5daa2SKaike Wan __entry->s_tail_ack_queue = qp->s_tail_ack_queue; 12943ce5daa2SKaike Wan __entry->r_head_ack_queue = qp->r_head_ack_queue; 12953ce5daa2SKaike Wan __entry->opcode = opcode; 12963ce5daa2SKaike Wan __entry->psn = psn; 12973ce5daa2SKaike Wan __entry->r_psn = qp->r_psn; 12983ce5daa2SKaike Wan __entry->diff = diff; 12993ce5daa2SKaike Wan ), 13003ce5daa2SKaike Wan TP_printk(/* print */ 13013ce5daa2SKaike Wan RCV_ERR_PRN, 13023ce5daa2SKaike Wan __get_str(dev), 13033ce5daa2SKaike Wan __entry->qpn, 13043ce5daa2SKaike Wan __entry->s_flags, 13053ce5daa2SKaike Wan __entry->state, 13064f9264d1SKaike Wan __entry->s_acked_ack_queue, 13073ce5daa2SKaike Wan __entry->s_tail_ack_queue, 13083ce5daa2SKaike Wan __entry->r_head_ack_queue, 13093ce5daa2SKaike Wan __entry->opcode, 13103ce5daa2SKaike Wan __entry->psn, 13113ce5daa2SKaike Wan __entry->r_psn, 13123ce5daa2SKaike Wan __entry->diff 13133ce5daa2SKaike Wan ) 13143ce5daa2SKaike Wan ); 13153ce5daa2SKaike Wan 13163ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 13173ce5daa2SKaike Wan hfi1_rc_rcv_err_template, hfi1_tid_rdma_rcv_err, 13183ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, u32 opcode, u32 psn, int diff), 13193ce5daa2SKaike Wan TP_ARGS(qp, opcode, psn, diff) 13203ce5daa2SKaike Wan ); 13213ce5daa2SKaike Wan 13223ce5daa2SKaike Wan DECLARE_EVENT_CLASS(/* sge */ 13233ce5daa2SKaike Wan hfi1_sge_template, 13243ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), 13253ce5daa2SKaike Wan TP_ARGS(qp, index, sge), 13263ce5daa2SKaike Wan TP_STRUCT__entry(/* entry */ 13273ce5daa2SKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 13283ce5daa2SKaike Wan __field(u32, qpn) 13293ce5daa2SKaike Wan __field(int, index) 13303ce5daa2SKaike Wan __field(u64, vaddr) 13313ce5daa2SKaike Wan __field(u32, sge_length) 13323ce5daa2SKaike Wan ), 13333ce5daa2SKaike Wan TP_fast_assign(/* assign */ 13343ce5daa2SKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 13353ce5daa2SKaike Wan __entry->qpn = qp->ibqp.qp_num; 13363ce5daa2SKaike Wan __entry->index = index; 13373ce5daa2SKaike Wan __entry->vaddr = (u64)sge->vaddr; 13383ce5daa2SKaike Wan __entry->sge_length = sge->sge_length; 13393ce5daa2SKaike Wan ), 13403ce5daa2SKaike Wan TP_printk(/* print */ 13413ce5daa2SKaike Wan "[%s] qpn 0x%x sge %d: vaddr 0x%llx sge_length %u", 13423ce5daa2SKaike Wan __get_str(dev), 13433ce5daa2SKaike Wan __entry->qpn, 13443ce5daa2SKaike Wan __entry->index, 13453ce5daa2SKaike Wan __entry->vaddr, 13463ce5daa2SKaike Wan __entry->sge_length 13473ce5daa2SKaike Wan ) 13483ce5daa2SKaike Wan ); 13493ce5daa2SKaike Wan 13503ce5daa2SKaike Wan DEFINE_EVENT(/* event */ 13513ce5daa2SKaike Wan hfi1_sge_template, hfi1_sge_check_align, 13523ce5daa2SKaike Wan TP_PROTO(struct rvt_qp *qp, int index, struct rvt_sge *sge), 13533ce5daa2SKaike Wan TP_ARGS(qp, index, sge) 13543ce5daa2SKaike Wan ); 13553ce5daa2SKaike Wan 1356a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* tid_write_sp */ 1357a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, 1358a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1359a05c9bdcSKaike Wan TP_ARGS(qp), 1360a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1361a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1362a05c9bdcSKaike Wan __field(u32, qpn) 1363a05c9bdcSKaike Wan __field(u32, r_tid_head) 1364a05c9bdcSKaike Wan __field(u32, r_tid_tail) 1365a05c9bdcSKaike Wan __field(u32, r_tid_ack) 1366a05c9bdcSKaike Wan __field(u32, r_tid_alloc) 1367a05c9bdcSKaike Wan __field(u32, alloc_w_segs) 1368a05c9bdcSKaike Wan __field(u32, pending_tid_w_segs) 1369a05c9bdcSKaike Wan __field(bool, sync_pt) 1370a05c9bdcSKaike Wan __field(u32, ps_nak_psn) 1371a05c9bdcSKaike Wan __field(u8, ps_nak_state) 1372a05c9bdcSKaike Wan __field(u8, prnr_nak_state) 1373a05c9bdcSKaike Wan __field(u32, hw_flow_index) 1374a05c9bdcSKaike Wan __field(u32, generation) 1375a05c9bdcSKaike Wan __field(u32, fpsn) 1376a05c9bdcSKaike Wan __field(bool, resync) 1377a05c9bdcSKaike Wan __field(u32, r_next_psn_kdeth) 1378a05c9bdcSKaike Wan ), 1379a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1380a05c9bdcSKaike Wan struct hfi1_qp_priv *priv = qp->priv; 1381a05c9bdcSKaike Wan 1382a05c9bdcSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 1383a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1384a05c9bdcSKaike Wan __entry->r_tid_head = priv->r_tid_head; 1385a05c9bdcSKaike Wan __entry->r_tid_tail = priv->r_tid_tail; 1386a05c9bdcSKaike Wan __entry->r_tid_ack = priv->r_tid_ack; 1387a05c9bdcSKaike Wan __entry->r_tid_alloc = priv->r_tid_alloc; 1388a05c9bdcSKaike Wan __entry->alloc_w_segs = priv->alloc_w_segs; 1389a05c9bdcSKaike Wan __entry->pending_tid_w_segs = priv->pending_tid_w_segs; 1390a05c9bdcSKaike Wan __entry->sync_pt = priv->sync_pt; 1391a05c9bdcSKaike Wan __entry->ps_nak_psn = priv->s_nak_psn; 1392a05c9bdcSKaike Wan __entry->ps_nak_state = priv->s_nak_state; 1393a05c9bdcSKaike Wan __entry->prnr_nak_state = priv->rnr_nak_state; 1394a05c9bdcSKaike Wan __entry->hw_flow_index = priv->flow_state.index; 1395a05c9bdcSKaike Wan __entry->generation = priv->flow_state.generation; 1396a05c9bdcSKaike Wan __entry->fpsn = priv->flow_state.psn; 1397a05c9bdcSKaike Wan __entry->resync = priv->resync; 1398a05c9bdcSKaike Wan __entry->r_next_psn_kdeth = priv->r_next_psn_kdeth; 1399a05c9bdcSKaike Wan ), 1400a05c9bdcSKaike Wan TP_printk(/* print */ 1401a05c9bdcSKaike Wan TID_WRITE_RSPDR_PRN, 1402a05c9bdcSKaike Wan __get_str(dev), 1403a05c9bdcSKaike Wan __entry->qpn, 1404a05c9bdcSKaike Wan __entry->r_tid_head, 1405a05c9bdcSKaike Wan __entry->r_tid_tail, 1406a05c9bdcSKaike Wan __entry->r_tid_ack, 1407a05c9bdcSKaike Wan __entry->r_tid_alloc, 1408a05c9bdcSKaike Wan __entry->alloc_w_segs, 1409a05c9bdcSKaike Wan __entry->pending_tid_w_segs, 1410a05c9bdcSKaike Wan __entry->sync_pt ? "yes" : "no", 1411a05c9bdcSKaike Wan __entry->ps_nak_psn, 1412a05c9bdcSKaike Wan __entry->ps_nak_state, 1413a05c9bdcSKaike Wan __entry->prnr_nak_state, 1414a05c9bdcSKaike Wan __entry->hw_flow_index, 1415a05c9bdcSKaike Wan __entry->generation, 1416a05c9bdcSKaike Wan __entry->fpsn, 1417a05c9bdcSKaike Wan __entry->resync ? "yes" : "no", 1418a05c9bdcSKaike Wan __entry->r_next_psn_kdeth 1419a05c9bdcSKaike Wan ) 1420a05c9bdcSKaike Wan ); 1421a05c9bdcSKaike Wan 1422a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1423a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_alloc_res, 1424a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1425a05c9bdcSKaike Wan TP_ARGS(qp) 1426a05c9bdcSKaike Wan ); 1427a05c9bdcSKaike Wan 1428a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1429a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_rcv_req, 1430a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1431a05c9bdcSKaike Wan TP_ARGS(qp) 1432a05c9bdcSKaike Wan ); 1433a05c9bdcSKaike Wan 1434a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1435a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_build_resp, 1436a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1437a05c9bdcSKaike Wan TP_ARGS(qp) 1438a05c9bdcSKaike Wan ); 1439a05c9bdcSKaike Wan 1440a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1441a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_rcv_data, 1442a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1443a05c9bdcSKaike Wan TP_ARGS(qp) 1444a05c9bdcSKaike Wan ); 1445a05c9bdcSKaike Wan 1446a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1447a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_rcv_resync, 1448a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1449a05c9bdcSKaike Wan TP_ARGS(qp) 1450a05c9bdcSKaike Wan ); 1451a05c9bdcSKaike Wan 1452a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1453a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_make_tid_ack, 1454a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1455a05c9bdcSKaike Wan TP_ARGS(qp) 1456a05c9bdcSKaike Wan ); 1457a05c9bdcSKaike Wan 1458a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1459a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_handle_kdeth_eflags, 1460a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1461a05c9bdcSKaike Wan TP_ARGS(qp) 1462a05c9bdcSKaike Wan ); 1463a05c9bdcSKaike Wan 1464a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1465a05c9bdcSKaike Wan hfi1_tid_write_rsp_template, hfi1_tid_write_rsp_make_rc_ack, 1466a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp), 1467a05c9bdcSKaike Wan TP_ARGS(qp) 1468a05c9bdcSKaike Wan ); 1469a05c9bdcSKaike Wan 1470a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* tid_write_sender */ 1471a05c9bdcSKaike Wan hfi1_tid_write_sender_template, 1472a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1473a05c9bdcSKaike Wan TP_ARGS(qp, newreq), 1474a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1475a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1476a05c9bdcSKaike Wan __field(u32, qpn) 1477a05c9bdcSKaike Wan __field(char, newreq) 1478a05c9bdcSKaike Wan __field(u32, s_tid_cur) 1479a05c9bdcSKaike Wan __field(u32, s_tid_tail) 1480a05c9bdcSKaike Wan __field(u32, s_tid_head) 1481a05c9bdcSKaike Wan __field(u32, pending_tid_w_resp) 1482a05c9bdcSKaike Wan __field(u32, n_requests) 1483a05c9bdcSKaike Wan __field(u32, n_tid_requests) 1484a05c9bdcSKaike Wan __field(u32, s_flags) 1485a05c9bdcSKaike Wan __field(u32, ps_flags) 1486a05c9bdcSKaike Wan __field(unsigned long, iow_flags) 1487a05c9bdcSKaike Wan __field(u8, s_state) 1488a05c9bdcSKaike Wan __field(u8, s_retry) 1489a05c9bdcSKaike Wan ), 1490a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1491a05c9bdcSKaike Wan struct hfi1_qp_priv *priv = qp->priv; 1492a05c9bdcSKaike Wan 1493a05c9bdcSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 1494a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1495a05c9bdcSKaike Wan __entry->newreq = newreq; 1496a05c9bdcSKaike Wan __entry->s_tid_cur = priv->s_tid_cur; 1497a05c9bdcSKaike Wan __entry->s_tid_tail = priv->s_tid_tail; 1498a05c9bdcSKaike Wan __entry->s_tid_head = priv->s_tid_head; 1499a05c9bdcSKaike Wan __entry->pending_tid_w_resp = priv->pending_tid_w_resp; 1500a05c9bdcSKaike Wan __entry->n_requests = atomic_read(&priv->n_requests); 1501a05c9bdcSKaike Wan __entry->n_tid_requests = atomic_read(&priv->n_tid_requests); 1502a05c9bdcSKaike Wan __entry->s_flags = qp->s_flags; 1503a05c9bdcSKaike Wan __entry->ps_flags = priv->s_flags; 1504a05c9bdcSKaike Wan __entry->iow_flags = priv->s_iowait.flags; 1505a05c9bdcSKaike Wan __entry->s_state = priv->s_state; 1506a05c9bdcSKaike Wan __entry->s_retry = priv->s_retry; 1507a05c9bdcSKaike Wan ), 1508a05c9bdcSKaike Wan TP_printk(/* print */ 1509a05c9bdcSKaike Wan TID_WRITE_SENDER_PRN, 1510a05c9bdcSKaike Wan __get_str(dev), 1511a05c9bdcSKaike Wan __entry->qpn, 1512a05c9bdcSKaike Wan __entry->newreq, 1513a05c9bdcSKaike Wan __entry->s_tid_cur, 1514a05c9bdcSKaike Wan __entry->s_tid_tail, 1515a05c9bdcSKaike Wan __entry->s_tid_head, 1516a05c9bdcSKaike Wan __entry->pending_tid_w_resp, 1517a05c9bdcSKaike Wan __entry->n_requests, 1518a05c9bdcSKaike Wan __entry->n_tid_requests, 1519a05c9bdcSKaike Wan __entry->s_flags, 1520a05c9bdcSKaike Wan __entry->ps_flags, 1521a05c9bdcSKaike Wan __entry->iow_flags, 1522a05c9bdcSKaike Wan __entry->s_state, 1523a05c9bdcSKaike Wan __entry->s_retry 1524a05c9bdcSKaike Wan ) 1525a05c9bdcSKaike Wan ); 1526a05c9bdcSKaike Wan 1527a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1528a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_rcv_resp, 1529a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1530a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1531a05c9bdcSKaike Wan ); 1532a05c9bdcSKaike Wan 1533a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1534a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_rcv_tid_ack, 1535a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1536a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1537a05c9bdcSKaike Wan ); 1538a05c9bdcSKaike Wan 1539a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1540a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_retry_timeout, 1541a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1542a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1543a05c9bdcSKaike Wan ); 1544a05c9bdcSKaike Wan 1545a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1546a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_make_tid_pkt, 1547a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1548a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1549a05c9bdcSKaike Wan ); 1550a05c9bdcSKaike Wan 1551a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1552a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_make_req, 1553a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1554a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1555a05c9bdcSKaike Wan ); 1556a05c9bdcSKaike Wan 1557a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1558a05c9bdcSKaike Wan hfi1_tid_write_sender_template, hfi1_tid_write_sender_restart_rc, 1559a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, char newreq), 1560a05c9bdcSKaike Wan TP_ARGS(qp, newreq) 1561a05c9bdcSKaike Wan ); 1562a05c9bdcSKaike Wan 1563a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* tid_ack */ 1564a05c9bdcSKaike Wan hfi1_tid_ack_template, 1565a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 aeth, u32 psn, 1566a05c9bdcSKaike Wan u32 req_psn, u32 resync_psn), 1567a05c9bdcSKaike Wan TP_ARGS(qp, aeth, psn, req_psn, resync_psn), 1568a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1569a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1570a05c9bdcSKaike Wan __field(u32, qpn) 1571a05c9bdcSKaike Wan __field(u32, aeth) 1572a05c9bdcSKaike Wan __field(u32, psn) 1573a05c9bdcSKaike Wan __field(u32, req_psn) 1574a05c9bdcSKaike Wan __field(u32, resync_psn) 1575a05c9bdcSKaike Wan ), 1576a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1577*78c14b38SJoe Perches DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 1578a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1579a05c9bdcSKaike Wan __entry->aeth = aeth; 1580a05c9bdcSKaike Wan __entry->psn = psn; 1581a05c9bdcSKaike Wan __entry->req_psn = req_psn; 1582a05c9bdcSKaike Wan __entry->resync_psn = resync_psn; 1583a05c9bdcSKaike Wan ), 1584a05c9bdcSKaike Wan TP_printk(/* print */ 1585a05c9bdcSKaike Wan "[%s] qpn 0x%x aeth 0x%x psn 0x%x req_psn 0x%x resync_psn 0x%x", 1586a05c9bdcSKaike Wan __get_str(dev), 1587a05c9bdcSKaike Wan __entry->qpn, 1588a05c9bdcSKaike Wan __entry->aeth, 1589a05c9bdcSKaike Wan __entry->psn, 1590a05c9bdcSKaike Wan __entry->req_psn, 1591a05c9bdcSKaike Wan __entry->resync_psn 1592a05c9bdcSKaike Wan ) 1593a05c9bdcSKaike Wan ); 1594a05c9bdcSKaike Wan 1595a05c9bdcSKaike Wan DEFINE_EVENT(/* rcv_tid_ack */ 1596a05c9bdcSKaike Wan hfi1_tid_ack_template, hfi1_rcv_tid_ack, 1597a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u32 aeth, u32 psn, 1598a05c9bdcSKaike Wan u32 req_psn, u32 resync_psn), 1599a05c9bdcSKaike Wan TP_ARGS(qp, aeth, psn, req_psn, resync_psn) 1600a05c9bdcSKaike Wan ); 1601a05c9bdcSKaike Wan 1602a05c9bdcSKaike Wan DECLARE_EVENT_CLASS(/* kdeth_eflags_error */ 1603a05c9bdcSKaike Wan hfi1_kdeth_eflags_error_template, 1604a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u8 rcv_type, u8 rte, u32 psn), 1605a05c9bdcSKaike Wan TP_ARGS(qp, rcv_type, rte, psn), 1606a05c9bdcSKaike Wan TP_STRUCT__entry(/* entry */ 1607a05c9bdcSKaike Wan DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) 1608a05c9bdcSKaike Wan __field(u32, qpn) 1609a05c9bdcSKaike Wan __field(u8, rcv_type) 1610a05c9bdcSKaike Wan __field(u8, rte) 1611a05c9bdcSKaike Wan __field(u32, psn) 1612a05c9bdcSKaike Wan ), 1613a05c9bdcSKaike Wan TP_fast_assign(/* assign */ 1614a05c9bdcSKaike Wan DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)); 1615a05c9bdcSKaike Wan __entry->qpn = qp->ibqp.qp_num; 1616a05c9bdcSKaike Wan __entry->rcv_type = rcv_type; 1617a05c9bdcSKaike Wan __entry->rte = rte; 1618a05c9bdcSKaike Wan __entry->psn = psn; 1619a05c9bdcSKaike Wan ), 1620a05c9bdcSKaike Wan TP_printk(/* print */ 1621a05c9bdcSKaike Wan KDETH_EFLAGS_ERR_PRN, 1622a05c9bdcSKaike Wan __get_str(dev), 1623a05c9bdcSKaike Wan __entry->qpn, 1624a05c9bdcSKaike Wan __entry->rcv_type, 1625a05c9bdcSKaike Wan __entry->rte, 1626a05c9bdcSKaike Wan __entry->psn 1627a05c9bdcSKaike Wan ) 1628a05c9bdcSKaike Wan ); 1629a05c9bdcSKaike Wan 1630a05c9bdcSKaike Wan DEFINE_EVENT(/* event */ 1631a05c9bdcSKaike Wan hfi1_kdeth_eflags_error_template, hfi1_eflags_err_write, 1632a05c9bdcSKaike Wan TP_PROTO(struct rvt_qp *qp, u8 rcv_type, u8 rte, u32 psn), 1633a05c9bdcSKaike Wan TP_ARGS(qp, rcv_type, rte, psn) 1634a05c9bdcSKaike Wan ); 1635a05c9bdcSKaike Wan 1636a131d164SKaike Wan #endif /* __HFI1_TRACE_TID_H */ 1637a131d164SKaike Wan 1638a131d164SKaike Wan #undef TRACE_INCLUDE_PATH 1639a131d164SKaike Wan #undef TRACE_INCLUDE_FILE 1640a131d164SKaike Wan #define TRACE_INCLUDE_PATH . 1641a131d164SKaike Wan #define TRACE_INCLUDE_FILE trace_tid 1642a131d164SKaike Wan #include <trace/define_trace.h> 1643