1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright(c) 2015, 2016, 2017 Intel Corporation.
6 #if !defined(__HFI1_TRACE_RC_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __HFI1_TRACE_RC_H
9 #include <linux/tracepoint.h>
10 #include <linux/trace_seq.h>
15 #define TRACE_SYSTEM hfi1_rc
17 DECLARE_EVENT_CLASS(hfi1_rc_template
,
18 TP_PROTO(struct rvt_qp
*qp
, u32 psn
),
21 DD_DEV_ENTRY(dd_from_ibdev(qp
->ibqp
.device
))
26 __field(u32
, s_next_psn
)
27 __field(u32
, s_sending_psn
)
28 __field(u32
, s_sending_hpsn
)
32 DD_DEV_ASSIGN(dd_from_ibdev(qp
->ibqp
.device
));
33 __entry
->qpn
= qp
->ibqp
.qp_num
;
34 __entry
->s_flags
= qp
->s_flags
;
36 __entry
->s_psn
= qp
->s_psn
;
37 __entry
->s_next_psn
= qp
->s_next_psn
;
38 __entry
->s_sending_psn
= qp
->s_sending_psn
;
39 __entry
->s_sending_hpsn
= qp
->s_sending_hpsn
;
40 __entry
->r_psn
= qp
->r_psn
;
43 "[%s] qpn 0x%x s_flags 0x%x psn 0x%x s_psn 0x%x s_next_psn 0x%x s_sending_psn 0x%x sending_hpsn 0x%x r_psn 0x%x",
50 __entry
->s_sending_psn
,
51 __entry
->s_sending_hpsn
,
56 DEFINE_EVENT(hfi1_rc_template
, hfi1_sendcomplete
,
57 TP_PROTO(struct rvt_qp
*qp
, u32 psn
),
61 DEFINE_EVENT(hfi1_rc_template
, hfi1_ack
,
62 TP_PROTO(struct rvt_qp
*qp
, u32 psn
),
66 DEFINE_EVENT(hfi1_rc_template
, hfi1_rcv_error
,
67 TP_PROTO(struct rvt_qp
*qp
, u32 psn
),
71 DEFINE_EVENT(/* event */
72 hfi1_rc_template
, hfi1_rc_completion
,
73 TP_PROTO(struct rvt_qp
*qp
, u32 psn
),
77 DECLARE_EVENT_CLASS(/* rc_ack */
79 TP_PROTO(struct rvt_qp
*qp
, u32 aeth
, u32 psn
,
80 struct rvt_swqe
*wqe
),
81 TP_ARGS(qp
, aeth
, psn
, wqe
),
82 TP_STRUCT__entry(/* entry */
83 DD_DEV_ENTRY(dd_from_ibdev(qp
->ibqp
.device
))
91 TP_fast_assign(/* assign */
92 DD_DEV_ASSIGN(dd_from_ibdev(qp
->ibqp
.device
));
93 __entry
->qpn
= qp
->ibqp
.qp_num
;
96 __entry
->opcode
= wqe
->wr
.opcode
;
97 __entry
->spsn
= wqe
->psn
;
98 __entry
->lpsn
= wqe
->lpsn
;
100 TP_printk(/* print */
101 "[%s] qpn 0x%x aeth 0x%x psn 0x%x opcode 0x%x spsn 0x%x lpsn 0x%x",
112 DEFINE_EVENT(/* do_rc_ack */
113 hfi1_rc_ack_template
, hfi1_rc_ack_do
,
114 TP_PROTO(struct rvt_qp
*qp
, u32 aeth
, u32 psn
,
115 struct rvt_swqe
*wqe
),
116 TP_ARGS(qp
, aeth
, psn
, wqe
)
119 #endif /* __HFI1_TRACE_RC_H */
121 #undef TRACE_INCLUDE_PATH
122 #undef TRACE_INCLUDE_FILE
123 #define TRACE_INCLUDE_PATH .
124 #define TRACE_INCLUDE_FILE trace_rc
125 #include <trace/define_trace.h>