1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 #if !defined(__RVT_TRACE_QP_H) || defined(TRACE_HEADER_MULTI_READ)
48 #define __RVT_TRACE_QP_H
49
50 #include <linux/tracepoint.h>
51 #include <linux/trace_seq.h>
52
53 #include <rdma/ib_verbs.h>
54 #include <rdma/rdmavt_qp.h>
55
56 #undef TRACE_SYSTEM
57 #define TRACE_SYSTEM rvt_qp
58
59 DECLARE_EVENT_CLASS(rvt_qphash_template,
60 TP_PROTO(struct rvt_qp *qp, u32 bucket),
61 TP_ARGS(qp, bucket),
62 TP_STRUCT__entry(
63 RDI_DEV_ENTRY(ib_to_rvt(qp->ibqp.device))
64 __field(u32, qpn)
65 __field(u32, bucket)
66 ),
67 TP_fast_assign(
68 RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device))
69 __entry->qpn = qp->ibqp.qp_num;
70 __entry->bucket = bucket;
71 ),
72 TP_printk(
73 "[%s] qpn 0x%x bucket %u",
74 __get_str(dev),
75 __entry->qpn,
76 __entry->bucket
77 )
78 );
79
80 DEFINE_EVENT(rvt_qphash_template, rvt_qpinsert,
81 TP_PROTO(struct rvt_qp *qp, u32 bucket),
82 TP_ARGS(qp, bucket));
83
84 DEFINE_EVENT(rvt_qphash_template, rvt_qpremove,
85 TP_PROTO(struct rvt_qp *qp, u32 bucket),
86 TP_ARGS(qp, bucket));
87
88 DECLARE_EVENT_CLASS(
89 rvt_rnrnak_template,
90 TP_PROTO(struct rvt_qp *qp, u32 to),
91 TP_ARGS(qp, to),
92 TP_STRUCT__entry(
93 RDI_DEV_ENTRY(ib_to_rvt(qp->ibqp.device))
94 __field(u32, qpn)
95 __field(void *, hrtimer)
96 __field(u32, s_flags)
97 __field(u32, to)
98 ),
99 TP_fast_assign(
100 RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device))
101 __entry->qpn = qp->ibqp.qp_num;
102 __entry->hrtimer = &qp->s_rnr_timer;
103 __entry->s_flags = qp->s_flags;
104 __entry->to = to;
105 ),
106 TP_printk(
107 "[%s] qpn 0x%x hrtimer 0x%p s_flags 0x%x timeout %u us",
108 __get_str(dev),
109 __entry->qpn,
110 __entry->hrtimer,
111 __entry->s_flags,
112 __entry->to
113 )
114 );
115
116 DEFINE_EVENT(
117 rvt_rnrnak_template, rvt_rnrnak_add,
118 TP_PROTO(struct rvt_qp *qp, u32 to),
119 TP_ARGS(qp, to));
120
121 DEFINE_EVENT(
122 rvt_rnrnak_template, rvt_rnrnak_timeout,
123 TP_PROTO(struct rvt_qp *qp, u32 to),
124 TP_ARGS(qp, to));
125
126 DEFINE_EVENT(
127 rvt_rnrnak_template, rvt_rnrnak_stop,
128 TP_PROTO(struct rvt_qp *qp, u32 to),
129 TP_ARGS(qp, to));
130
131 #endif
132
133 #undef TRACE_INCLUDE_PATH
134 #undef TRACE_INCLUDE_FILE
135 #define TRACE_INCLUDE_PATH .
136 #define TRACE_INCLUDE_FILE trace_qp
137 #include <trace/define_trace.h>
138