xref: /openbmc/linux/include/trace/events/rxrpc.h (revision 996a7208)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* AF_RXRPC tracepoints
3  *
4  * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
5  * Written by David Howells (dhowells@redhat.com)
6  */
7 #undef TRACE_SYSTEM
8 #define TRACE_SYSTEM rxrpc
9 
10 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
11 #define _TRACE_RXRPC_H
12 
13 #include <linux/tracepoint.h>
14 #include <linux/errqueue.h>
15 
16 /*
17  * Declare tracing information enums and their string mappings for display.
18  */
19 #define rxrpc_abort_reasons \
20 	/* AFS errors */						\
21 	EM(afs_abort_general_error,		"afs-error")		\
22 	EM(afs_abort_interrupted,		"afs-intr")		\
23 	EM(afs_abort_oom,			"afs-oom")		\
24 	EM(afs_abort_op_not_supported,		"afs-op-notsupp")	\
25 	EM(afs_abort_probeuuid_negative,	"afs-probeuuid-neg")	\
26 	EM(afs_abort_send_data_error,		"afs-send-data")	\
27 	EM(afs_abort_unmarshal_error,		"afs-unmarshal")	\
28 	/* rxperf errors */						\
29 	EM(rxperf_abort_general_error,		"rxperf-error")		\
30 	EM(rxperf_abort_oom,			"rxperf-oom")		\
31 	EM(rxperf_abort_op_not_supported,	"rxperf-op-notsupp")	\
32 	EM(rxperf_abort_unmarshal_error,	"rxperf-unmarshal")	\
33 	/* RxKAD security errors */					\
34 	EM(rxkad_abort_1_short_check,		"rxkad1-short-check")	\
35 	EM(rxkad_abort_1_short_data,		"rxkad1-short-data")	\
36 	EM(rxkad_abort_1_short_encdata,		"rxkad1-short-encdata")	\
37 	EM(rxkad_abort_1_short_header,		"rxkad1-short-hdr")	\
38 	EM(rxkad_abort_2_short_check,		"rxkad2-short-check")	\
39 	EM(rxkad_abort_2_short_data,		"rxkad2-short-data")	\
40 	EM(rxkad_abort_2_short_header,		"rxkad2-short-hdr")	\
41 	EM(rxkad_abort_2_short_len,		"rxkad2-short-len")	\
42 	EM(rxkad_abort_bad_checksum,		"rxkad2-bad-cksum")	\
43 	EM(rxkad_abort_chall_key_expired,	"rxkad-chall-key-exp")	\
44 	EM(rxkad_abort_chall_level,		"rxkad-chall-level")	\
45 	EM(rxkad_abort_chall_no_key,		"rxkad-chall-nokey")	\
46 	EM(rxkad_abort_chall_short,		"rxkad-chall-short")	\
47 	EM(rxkad_abort_chall_version,		"rxkad-chall-version")	\
48 	EM(rxkad_abort_resp_bad_callid,		"rxkad-resp-bad-callid") \
49 	EM(rxkad_abort_resp_bad_checksum,	"rxkad-resp-bad-cksum")	\
50 	EM(rxkad_abort_resp_bad_param,		"rxkad-resp-bad-param")	\
51 	EM(rxkad_abort_resp_call_ctr,		"rxkad-resp-call-ctr") \
52 	EM(rxkad_abort_resp_call_state,		"rxkad-resp-call-state") \
53 	EM(rxkad_abort_resp_key_expired,	"rxkad-resp-key-exp")	\
54 	EM(rxkad_abort_resp_key_rejected,	"rxkad-resp-key-rej")	\
55 	EM(rxkad_abort_resp_level,		"rxkad-resp-level")	\
56 	EM(rxkad_abort_resp_nokey,		"rxkad-resp-nokey")	\
57 	EM(rxkad_abort_resp_ooseq,		"rxkad-resp-ooseq")	\
58 	EM(rxkad_abort_resp_short,		"rxkad-resp-short")	\
59 	EM(rxkad_abort_resp_short_tkt,		"rxkad-resp-short-tkt")	\
60 	EM(rxkad_abort_resp_tkt_aname,		"rxkad-resp-tk-aname")	\
61 	EM(rxkad_abort_resp_tkt_expired,	"rxkad-resp-tk-exp")	\
62 	EM(rxkad_abort_resp_tkt_future,		"rxkad-resp-tk-future")	\
63 	EM(rxkad_abort_resp_tkt_inst,		"rxkad-resp-tk-inst")	\
64 	EM(rxkad_abort_resp_tkt_len,		"rxkad-resp-tk-len")	\
65 	EM(rxkad_abort_resp_tkt_realm,		"rxkad-resp-tk-realm")	\
66 	EM(rxkad_abort_resp_tkt_short,		"rxkad-resp-tk-short")	\
67 	EM(rxkad_abort_resp_tkt_sinst,		"rxkad-resp-tk-sinst")	\
68 	EM(rxkad_abort_resp_tkt_sname,		"rxkad-resp-tk-sname")	\
69 	EM(rxkad_abort_resp_unknown_tkt,	"rxkad-resp-unknown-tkt") \
70 	EM(rxkad_abort_resp_version,		"rxkad-resp-version")	\
71 	/* rxrpc errors */						\
72 	EM(rxrpc_abort_call_improper_term,	"call-improper-term")	\
73 	EM(rxrpc_abort_call_reset,		"call-reset")		\
74 	EM(rxrpc_abort_call_sendmsg,		"call-sendmsg")		\
75 	EM(rxrpc_abort_call_sock_release,	"call-sock-rel")	\
76 	EM(rxrpc_abort_call_sock_release_tba,	"call-sock-rel-tba")	\
77 	EM(rxrpc_abort_call_timeout,		"call-timeout")		\
78 	EM(rxrpc_abort_no_service_key,		"no-serv-key")		\
79 	EM(rxrpc_abort_nomem,			"nomem")		\
80 	EM(rxrpc_abort_service_not_offered,	"serv-not-offered")	\
81 	EM(rxrpc_abort_shut_down,		"shut-down")		\
82 	EM(rxrpc_abort_unsupported_security,	"unsup-sec")		\
83 	EM(rxrpc_badmsg_bad_abort,		"bad-abort")		\
84 	EM(rxrpc_badmsg_bad_jumbo,		"bad-jumbo")		\
85 	EM(rxrpc_badmsg_short_ack,		"short-ack")		\
86 	EM(rxrpc_badmsg_short_ack_trailer,	"short-ack-trailer")	\
87 	EM(rxrpc_badmsg_short_hdr,		"short-hdr")		\
88 	EM(rxrpc_badmsg_unsupported_packet,	"unsup-pkt")		\
89 	EM(rxrpc_badmsg_zero_call,		"zero-call")		\
90 	EM(rxrpc_badmsg_zero_seq,		"zero-seq")		\
91 	EM(rxrpc_badmsg_zero_service,		"zero-service")		\
92 	EM(rxrpc_eproto_ackr_outside_window,	"ackr-out-win")		\
93 	EM(rxrpc_eproto_ackr_sack_overflow,	"ackr-sack-over")	\
94 	EM(rxrpc_eproto_ackr_short_sack,	"ackr-short-sack")	\
95 	EM(rxrpc_eproto_ackr_zero,		"ackr-zero")		\
96 	EM(rxrpc_eproto_bad_upgrade,		"bad-upgrade")		\
97 	EM(rxrpc_eproto_data_after_last,	"data-after-last")	\
98 	EM(rxrpc_eproto_different_last,		"diff-last")		\
99 	EM(rxrpc_eproto_early_reply,		"early-reply")		\
100 	EM(rxrpc_eproto_improper_term,		"improper-term")	\
101 	EM(rxrpc_eproto_no_client_call,		"no-cl-call")		\
102 	EM(rxrpc_eproto_no_client_conn,		"no-cl-conn")		\
103 	EM(rxrpc_eproto_no_service_call,	"no-sv-call")		\
104 	EM(rxrpc_eproto_reupgrade,		"re-upgrade")		\
105 	EM(rxrpc_eproto_rxnull_challenge,	"rxnull-chall")		\
106 	EM(rxrpc_eproto_rxnull_response,	"rxnull-resp")		\
107 	EM(rxrpc_eproto_tx_rot_last,		"tx-rot-last")		\
108 	EM(rxrpc_eproto_unexpected_ack,		"unex-ack")		\
109 	EM(rxrpc_eproto_unexpected_ackall,	"unex-ackall")		\
110 	EM(rxrpc_eproto_unexpected_implicit_end, "unex-impl-end")	\
111 	EM(rxrpc_eproto_unexpected_reply,	"unex-reply")		\
112 	EM(rxrpc_eproto_wrong_security,		"wrong-sec")		\
113 	EM(rxrpc_recvmsg_excess_data,		"recvmsg-excess")	\
114 	EM(rxrpc_recvmsg_short_data,		"recvmsg-short")	\
115 	E_(rxrpc_sendmsg_late_send,		"sendmsg-late")
116 
117 #define rxrpc_call_poke_traces \
118 	EM(rxrpc_call_poke_abort,		"Abort")	\
119 	EM(rxrpc_call_poke_complete,		"Compl")	\
120 	EM(rxrpc_call_poke_error,		"Error")	\
121 	EM(rxrpc_call_poke_idle,		"Idle")		\
122 	EM(rxrpc_call_poke_start,		"Start")	\
123 	EM(rxrpc_call_poke_timer,		"Timer")	\
124 	E_(rxrpc_call_poke_timer_now,		"Timer-now")
125 
126 #define rxrpc_skb_traces \
127 	EM(rxrpc_skb_eaten_by_unshare,		"ETN unshare  ") \
128 	EM(rxrpc_skb_eaten_by_unshare_nomem,	"ETN unshar-nm") \
129 	EM(rxrpc_skb_get_conn_secured,		"GET conn-secd") \
130 	EM(rxrpc_skb_get_conn_work,		"GET conn-work") \
131 	EM(rxrpc_skb_get_last_nack,		"GET last-nack") \
132 	EM(rxrpc_skb_get_local_work,		"GET locl-work") \
133 	EM(rxrpc_skb_get_reject_work,		"GET rej-work ") \
134 	EM(rxrpc_skb_get_to_recvmsg,		"GET to-recv  ") \
135 	EM(rxrpc_skb_get_to_recvmsg_oos,	"GET to-recv-o") \
136 	EM(rxrpc_skb_new_encap_rcv,		"NEW encap-rcv") \
137 	EM(rxrpc_skb_new_error_report,		"NEW error-rpt") \
138 	EM(rxrpc_skb_new_jumbo_subpacket,	"NEW jumbo-sub") \
139 	EM(rxrpc_skb_new_unshared,		"NEW unshared ") \
140 	EM(rxrpc_skb_put_conn_secured,		"PUT conn-secd") \
141 	EM(rxrpc_skb_put_conn_work,		"PUT conn-work") \
142 	EM(rxrpc_skb_put_error_report,		"PUT error-rep") \
143 	EM(rxrpc_skb_put_input,			"PUT input    ") \
144 	EM(rxrpc_skb_put_jumbo_subpacket,	"PUT jumbo-sub") \
145 	EM(rxrpc_skb_put_last_nack,		"PUT last-nack") \
146 	EM(rxrpc_skb_put_purge,			"PUT purge    ") \
147 	EM(rxrpc_skb_put_rotate,		"PUT rotate   ") \
148 	EM(rxrpc_skb_put_unknown,		"PUT unknown  ") \
149 	EM(rxrpc_skb_see_conn_work,		"SEE conn-work") \
150 	EM(rxrpc_skb_see_recvmsg,		"SEE recvmsg  ") \
151 	EM(rxrpc_skb_see_reject,		"SEE reject   ") \
152 	EM(rxrpc_skb_see_rotate,		"SEE rotate   ") \
153 	E_(rxrpc_skb_see_version,		"SEE version  ")
154 
155 #define rxrpc_local_traces \
156 	EM(rxrpc_local_free,			"FREE        ") \
157 	EM(rxrpc_local_get_call,		"GET call    ") \
158 	EM(rxrpc_local_get_client_conn,		"GET conn-cln") \
159 	EM(rxrpc_local_get_for_use,		"GET for-use ") \
160 	EM(rxrpc_local_get_peer,		"GET peer    ") \
161 	EM(rxrpc_local_get_prealloc_conn,	"GET conn-pre") \
162 	EM(rxrpc_local_new,			"NEW         ") \
163 	EM(rxrpc_local_put_bind,		"PUT bind    ") \
164 	EM(rxrpc_local_put_call,		"PUT call    ") \
165 	EM(rxrpc_local_put_for_use,		"PUT for-use ") \
166 	EM(rxrpc_local_put_kill_conn,		"PUT conn-kil") \
167 	EM(rxrpc_local_put_peer,		"PUT peer    ") \
168 	EM(rxrpc_local_put_prealloc_peer,	"PUT peer-pre") \
169 	EM(rxrpc_local_put_release_sock,	"PUT rel-sock") \
170 	EM(rxrpc_local_stop,			"STOP        ") \
171 	EM(rxrpc_local_stopped,			"STOPPED     ") \
172 	EM(rxrpc_local_unuse_bind,		"UNU bind    ") \
173 	EM(rxrpc_local_unuse_conn_work,		"UNU conn-wrk") \
174 	EM(rxrpc_local_unuse_peer_keepalive,	"UNU peer-kpa") \
175 	EM(rxrpc_local_unuse_release_sock,	"UNU rel-sock") \
176 	EM(rxrpc_local_use_conn_work,		"USE conn-wrk") \
177 	EM(rxrpc_local_use_lookup,		"USE lookup  ") \
178 	E_(rxrpc_local_use_peer_keepalive,	"USE peer-kpa")
179 
180 #define rxrpc_peer_traces \
181 	EM(rxrpc_peer_free,			"FREE        ") \
182 	EM(rxrpc_peer_get_accept,		"GET accept  ") \
183 	EM(rxrpc_peer_get_bundle,		"GET bundle  ") \
184 	EM(rxrpc_peer_get_client_conn,		"GET cln-conn") \
185 	EM(rxrpc_peer_get_input,		"GET input   ") \
186 	EM(rxrpc_peer_get_input_error,		"GET inpt-err") \
187 	EM(rxrpc_peer_get_keepalive,		"GET keepaliv") \
188 	EM(rxrpc_peer_get_lookup_client,	"GET look-cln") \
189 	EM(rxrpc_peer_get_service_conn,		"GET srv-conn") \
190 	EM(rxrpc_peer_new_client,		"NEW client  ") \
191 	EM(rxrpc_peer_new_prealloc,		"NEW prealloc") \
192 	EM(rxrpc_peer_put_bundle,		"PUT bundle  ") \
193 	EM(rxrpc_peer_put_call,			"PUT call    ") \
194 	EM(rxrpc_peer_put_conn,			"PUT conn    ") \
195 	EM(rxrpc_peer_put_input,		"PUT input   ") \
196 	EM(rxrpc_peer_put_input_error,		"PUT inpt-err") \
197 	E_(rxrpc_peer_put_keepalive,		"PUT keepaliv")
198 
199 #define rxrpc_bundle_traces \
200 	EM(rxrpc_bundle_free,			"FREE        ") \
201 	EM(rxrpc_bundle_get_client_call,	"GET clt-call") \
202 	EM(rxrpc_bundle_get_client_conn,	"GET clt-conn") \
203 	EM(rxrpc_bundle_get_service_conn,	"GET svc-conn") \
204 	EM(rxrpc_bundle_put_call,		"PUT call    ") \
205 	EM(rxrpc_bundle_put_conn,		"PUT conn    ") \
206 	EM(rxrpc_bundle_put_discard,		"PUT discard ") \
207 	E_(rxrpc_bundle_new,			"NEW         ")
208 
209 #define rxrpc_conn_traces \
210 	EM(rxrpc_conn_free,			"FREE        ") \
211 	EM(rxrpc_conn_get_activate_call,	"GET act-call") \
212 	EM(rxrpc_conn_get_call_input,		"GET inp-call") \
213 	EM(rxrpc_conn_get_conn_input,		"GET inp-conn") \
214 	EM(rxrpc_conn_get_idle,			"GET idle    ") \
215 	EM(rxrpc_conn_get_poke_abort,		"GET pk-abort") \
216 	EM(rxrpc_conn_get_poke_timer,		"GET poke    ") \
217 	EM(rxrpc_conn_get_service_conn,		"GET svc-conn") \
218 	EM(rxrpc_conn_new_client,		"NEW client  ") \
219 	EM(rxrpc_conn_new_service,		"NEW service ") \
220 	EM(rxrpc_conn_put_call,			"PUT call    ") \
221 	EM(rxrpc_conn_put_call_input,		"PUT inp-call") \
222 	EM(rxrpc_conn_put_conn_input,		"PUT inp-conn") \
223 	EM(rxrpc_conn_put_discard_idle,		"PUT disc-idl") \
224 	EM(rxrpc_conn_put_local_dead,		"PUT loc-dead") \
225 	EM(rxrpc_conn_put_noreuse,		"PUT noreuse ") \
226 	EM(rxrpc_conn_put_poke,			"PUT poke    ") \
227 	EM(rxrpc_conn_put_service_reaped,	"PUT svc-reap") \
228 	EM(rxrpc_conn_put_unbundle,		"PUT unbundle") \
229 	EM(rxrpc_conn_put_unidle,		"PUT unidle  ") \
230 	EM(rxrpc_conn_put_work,			"PUT work    ") \
231 	EM(rxrpc_conn_queue_challenge,		"QUE chall   ") \
232 	EM(rxrpc_conn_queue_retry_work,		"QUE retry-wk") \
233 	EM(rxrpc_conn_queue_rx_work,		"QUE rx-work ") \
234 	EM(rxrpc_conn_see_new_service_conn,	"SEE new-svc ") \
235 	EM(rxrpc_conn_see_reap_service,		"SEE reap-svc") \
236 	E_(rxrpc_conn_see_work,			"SEE work    ")
237 
238 #define rxrpc_client_traces \
239 	EM(rxrpc_client_activate_chans,		"Activa") \
240 	EM(rxrpc_client_alloc,			"Alloc ") \
241 	EM(rxrpc_client_chan_activate,		"ChActv") \
242 	EM(rxrpc_client_chan_disconnect,	"ChDisc") \
243 	EM(rxrpc_client_chan_pass,		"ChPass") \
244 	EM(rxrpc_client_cleanup,		"Clean ") \
245 	EM(rxrpc_client_discard,		"Discar") \
246 	EM(rxrpc_client_exposed,		"Expose") \
247 	EM(rxrpc_client_replace,		"Replac") \
248 	EM(rxrpc_client_queue_new_call,		"Q-Call") \
249 	EM(rxrpc_client_to_active,		"->Actv") \
250 	E_(rxrpc_client_to_idle,		"->Idle")
251 
252 #define rxrpc_call_traces \
253 	EM(rxrpc_call_get_io_thread,		"GET iothread") \
254 	EM(rxrpc_call_get_input,		"GET input   ") \
255 	EM(rxrpc_call_get_kernel_service,	"GET krnl-srv") \
256 	EM(rxrpc_call_get_notify_socket,	"GET notify  ") \
257 	EM(rxrpc_call_get_poke,			"GET poke    ") \
258 	EM(rxrpc_call_get_recvmsg,		"GET recvmsg ") \
259 	EM(rxrpc_call_get_release_sock,		"GET rel-sock") \
260 	EM(rxrpc_call_get_sendmsg,		"GET sendmsg ") \
261 	EM(rxrpc_call_get_userid,		"GET user-id ") \
262 	EM(rxrpc_call_new_client,		"NEW client  ") \
263 	EM(rxrpc_call_new_prealloc_service,	"NEW prealloc") \
264 	EM(rxrpc_call_put_discard_prealloc,	"PUT disc-pre") \
265 	EM(rxrpc_call_put_discard_error,	"PUT disc-err") \
266 	EM(rxrpc_call_put_io_thread,		"PUT iothread") \
267 	EM(rxrpc_call_put_input,		"PUT input   ") \
268 	EM(rxrpc_call_put_kernel,		"PUT kernel  ") \
269 	EM(rxrpc_call_put_poke,			"PUT poke    ") \
270 	EM(rxrpc_call_put_recvmsg,		"PUT recvmsg ") \
271 	EM(rxrpc_call_put_release_sock,		"PUT rls-sock") \
272 	EM(rxrpc_call_put_release_sock_tba,	"PUT rls-sk-a") \
273 	EM(rxrpc_call_put_sendmsg,		"PUT sendmsg ") \
274 	EM(rxrpc_call_put_unnotify,		"PUT unnotify") \
275 	EM(rxrpc_call_put_userid_exists,	"PUT u-exists") \
276 	EM(rxrpc_call_put_userid,		"PUT user-id ") \
277 	EM(rxrpc_call_see_accept,		"SEE accept  ") \
278 	EM(rxrpc_call_see_activate_client,	"SEE act-clnt") \
279 	EM(rxrpc_call_see_connect_failed,	"SEE con-fail") \
280 	EM(rxrpc_call_see_connected,		"SEE connect ") \
281 	EM(rxrpc_call_see_disconnected,		"SEE disconn ") \
282 	EM(rxrpc_call_see_distribute_error,	"SEE dist-err") \
283 	EM(rxrpc_call_see_input,		"SEE input   ") \
284 	EM(rxrpc_call_see_release,		"SEE release ") \
285 	EM(rxrpc_call_see_userid_exists,	"SEE u-exists") \
286 	EM(rxrpc_call_see_waiting_call,		"SEE q-conn  ") \
287 	E_(rxrpc_call_see_zap,			"SEE zap     ")
288 
289 #define rxrpc_txqueue_traces \
290 	EM(rxrpc_txqueue_await_reply,		"AWR") \
291 	EM(rxrpc_txqueue_dequeue,		"DEQ") \
292 	EM(rxrpc_txqueue_end,			"END") \
293 	EM(rxrpc_txqueue_queue,			"QUE") \
294 	EM(rxrpc_txqueue_queue_last,		"QLS") \
295 	EM(rxrpc_txqueue_rotate,		"ROT") \
296 	EM(rxrpc_txqueue_rotate_last,		"RLS") \
297 	E_(rxrpc_txqueue_wait,			"WAI")
298 
299 #define rxrpc_receive_traces \
300 	EM(rxrpc_receive_end,			"END") \
301 	EM(rxrpc_receive_front,			"FRN") \
302 	EM(rxrpc_receive_incoming,		"INC") \
303 	EM(rxrpc_receive_queue,			"QUE") \
304 	EM(rxrpc_receive_queue_last,		"QLS") \
305 	EM(rxrpc_receive_queue_oos,		"QUO") \
306 	EM(rxrpc_receive_queue_oos_last,	"QOL") \
307 	EM(rxrpc_receive_oos,			"OOS") \
308 	EM(rxrpc_receive_oos_last,		"OSL") \
309 	EM(rxrpc_receive_rotate,		"ROT") \
310 	E_(rxrpc_receive_rotate_last,		"RLS")
311 
312 #define rxrpc_recvmsg_traces \
313 	EM(rxrpc_recvmsg_cont,			"CONT") \
314 	EM(rxrpc_recvmsg_data_return,		"DATA") \
315 	EM(rxrpc_recvmsg_dequeue,		"DEQU") \
316 	EM(rxrpc_recvmsg_enter,			"ENTR") \
317 	EM(rxrpc_recvmsg_full,			"FULL") \
318 	EM(rxrpc_recvmsg_hole,			"HOLE") \
319 	EM(rxrpc_recvmsg_next,			"NEXT") \
320 	EM(rxrpc_recvmsg_requeue,		"REQU") \
321 	EM(rxrpc_recvmsg_return,		"RETN") \
322 	EM(rxrpc_recvmsg_terminal,		"TERM") \
323 	EM(rxrpc_recvmsg_to_be_accepted,	"TBAC") \
324 	EM(rxrpc_recvmsg_unqueue,		"UNQU") \
325 	E_(rxrpc_recvmsg_wait,			"WAIT")
326 
327 #define rxrpc_rtt_tx_traces \
328 	EM(rxrpc_rtt_tx_cancel,			"CNCE") \
329 	EM(rxrpc_rtt_tx_data,			"DATA") \
330 	EM(rxrpc_rtt_tx_no_slot,		"FULL") \
331 	E_(rxrpc_rtt_tx_ping,			"PING")
332 
333 #define rxrpc_rtt_rx_traces \
334 	EM(rxrpc_rtt_rx_other_ack,		"OACK") \
335 	EM(rxrpc_rtt_rx_obsolete,		"OBSL") \
336 	EM(rxrpc_rtt_rx_lost,			"LOST") \
337 	EM(rxrpc_rtt_rx_ping_response,		"PONG") \
338 	E_(rxrpc_rtt_rx_requested_ack,		"RACK")
339 
340 #define rxrpc_timer_traces \
341 	EM(rxrpc_timer_begin,			"Begin ") \
342 	EM(rxrpc_timer_exp_ack,			"ExpAck") \
343 	EM(rxrpc_timer_exp_hard,		"ExpHrd") \
344 	EM(rxrpc_timer_exp_idle,		"ExpIdl") \
345 	EM(rxrpc_timer_exp_keepalive,		"ExpKA ") \
346 	EM(rxrpc_timer_exp_lost_ack,		"ExpLoA") \
347 	EM(rxrpc_timer_exp_normal,		"ExpNml") \
348 	EM(rxrpc_timer_exp_ping,		"ExpPng") \
349 	EM(rxrpc_timer_exp_resend,		"ExpRsn") \
350 	EM(rxrpc_timer_init_for_reply,		"IniRpl") \
351 	EM(rxrpc_timer_init_for_send_reply,	"SndRpl") \
352 	EM(rxrpc_timer_restart,			"Restrt") \
353 	EM(rxrpc_timer_set_for_ack,		"SetAck") \
354 	EM(rxrpc_timer_set_for_hard,		"SetHrd") \
355 	EM(rxrpc_timer_set_for_idle,		"SetIdl") \
356 	EM(rxrpc_timer_set_for_keepalive,	"KeepAl") \
357 	EM(rxrpc_timer_set_for_lost_ack,	"SetLoA") \
358 	EM(rxrpc_timer_set_for_normal,		"SetNml") \
359 	EM(rxrpc_timer_set_for_ping,		"SetPng") \
360 	EM(rxrpc_timer_set_for_resend,		"SetRTx") \
361 	E_(rxrpc_timer_set_for_send,		"SetSnd")
362 
363 #define rxrpc_propose_ack_traces \
364 	EM(rxrpc_propose_ack_client_tx_end,	"ClTxEnd") \
365 	EM(rxrpc_propose_ack_input_data,	"DataIn ") \
366 	EM(rxrpc_propose_ack_input_data_hole,	"DataInH") \
367 	EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
368 	EM(rxrpc_propose_ack_ping_for_lost_ack,	"LostAck") \
369 	EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
370 	EM(rxrpc_propose_ack_ping_for_old_rtt,	"OldRtt ") \
371 	EM(rxrpc_propose_ack_ping_for_params,	"Params ") \
372 	EM(rxrpc_propose_ack_ping_for_rtt,	"Rtt    ") \
373 	EM(rxrpc_propose_ack_processing_op,	"ProcOp ") \
374 	EM(rxrpc_propose_ack_respond_to_ack,	"Rsp2Ack") \
375 	EM(rxrpc_propose_ack_respond_to_ping,	"Rsp2Png") \
376 	EM(rxrpc_propose_ack_retry_tx,		"RetryTx") \
377 	EM(rxrpc_propose_ack_rotate_rx,		"RxAck  ") \
378 	EM(rxrpc_propose_ack_rx_idle,		"RxIdle ") \
379 	E_(rxrpc_propose_ack_terminal_ack,	"ClTerm ")
380 
381 #define rxrpc_congest_modes \
382 	EM(RXRPC_CALL_CONGEST_AVOIDANCE,	"CongAvoid") \
383 	EM(RXRPC_CALL_FAST_RETRANSMIT,		"FastReTx ") \
384 	EM(RXRPC_CALL_PACKET_LOSS,		"PktLoss  ") \
385 	E_(RXRPC_CALL_SLOW_START,		"SlowStart")
386 
387 #define rxrpc_congest_changes \
388 	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
389 	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
390 	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
391 	EM(rxrpc_cong_no_change,		" -") \
392 	EM(rxrpc_cong_progress,			" Progres") \
393 	EM(rxrpc_cong_idle_reset,		" IdleRes") \
394 	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
395 	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \
396 	E_(rxrpc_cong_saw_nack,			" SawNack")
397 
398 #define rxrpc_pkts \
399 	EM(0,					"?00") \
400 	EM(RXRPC_PACKET_TYPE_DATA,		"DATA") \
401 	EM(RXRPC_PACKET_TYPE_ACK,		"ACK") \
402 	EM(RXRPC_PACKET_TYPE_BUSY,		"BUSY") \
403 	EM(RXRPC_PACKET_TYPE_ABORT,		"ABORT") \
404 	EM(RXRPC_PACKET_TYPE_ACKALL,		"ACKALL") \
405 	EM(RXRPC_PACKET_TYPE_CHALLENGE,		"CHALL") \
406 	EM(RXRPC_PACKET_TYPE_RESPONSE,		"RESP") \
407 	EM(RXRPC_PACKET_TYPE_DEBUG,		"DEBUG") \
408 	EM(9,					"?09") \
409 	EM(10,					"?10") \
410 	EM(11,					"?11") \
411 	EM(12,					"?12") \
412 	EM(RXRPC_PACKET_TYPE_VERSION,		"VERSION") \
413 	EM(14,					"?14") \
414 	E_(15,					"?15")
415 
416 #define rxrpc_ack_names \
417 	EM(0,					"-0-") \
418 	EM(RXRPC_ACK_REQUESTED,			"REQ") \
419 	EM(RXRPC_ACK_DUPLICATE,			"DUP") \
420 	EM(RXRPC_ACK_OUT_OF_SEQUENCE,		"OOS") \
421 	EM(RXRPC_ACK_EXCEEDS_WINDOW,		"WIN") \
422 	EM(RXRPC_ACK_NOSPACE,			"MEM") \
423 	EM(RXRPC_ACK_PING,			"PNG") \
424 	EM(RXRPC_ACK_PING_RESPONSE,		"PNR") \
425 	EM(RXRPC_ACK_DELAY,			"DLY") \
426 	EM(RXRPC_ACK_IDLE,			"IDL") \
427 	E_(RXRPC_ACK__INVALID,			"-?-")
428 
429 #define rxrpc_sack_traces \
430 	EM(rxrpc_sack_advance,			"ADV")	\
431 	EM(rxrpc_sack_fill,			"FIL")	\
432 	EM(rxrpc_sack_nack,			"NAK")	\
433 	EM(rxrpc_sack_none,			"---")	\
434 	E_(rxrpc_sack_oos,			"OOS")
435 
436 #define rxrpc_completions \
437 	EM(RXRPC_CALL_SUCCEEDED,		"Succeeded") \
438 	EM(RXRPC_CALL_REMOTELY_ABORTED,		"RemoteAbort") \
439 	EM(RXRPC_CALL_LOCALLY_ABORTED,		"LocalAbort") \
440 	EM(RXRPC_CALL_LOCAL_ERROR,		"LocalError") \
441 	E_(RXRPC_CALL_NETWORK_ERROR,		"NetError")
442 
443 #define rxrpc_tx_points \
444 	EM(rxrpc_tx_point_call_abort,		"CallAbort") \
445 	EM(rxrpc_tx_point_call_ack,		"CallAck") \
446 	EM(rxrpc_tx_point_call_data_frag,	"CallDataFrag") \
447 	EM(rxrpc_tx_point_call_data_nofrag,	"CallDataNofrag") \
448 	EM(rxrpc_tx_point_call_final_resend,	"CallFinalResend") \
449 	EM(rxrpc_tx_point_conn_abort,		"ConnAbort") \
450 	EM(rxrpc_tx_point_reject,		"Reject") \
451 	EM(rxrpc_tx_point_rxkad_challenge,	"RxkadChall") \
452 	EM(rxrpc_tx_point_rxkad_response,	"RxkadResp") \
453 	EM(rxrpc_tx_point_version_keepalive,	"VerKeepalive") \
454 	E_(rxrpc_tx_point_version_reply,	"VerReply")
455 
456 #define rxrpc_req_ack_traces \
457 	EM(rxrpc_reqack_ack_lost,		"ACK-LOST  ")	\
458 	EM(rxrpc_reqack_already_on,		"ALREADY-ON")	\
459 	EM(rxrpc_reqack_more_rtt,		"MORE-RTT  ")	\
460 	EM(rxrpc_reqack_no_srv_last,		"NO-SRVLAST")	\
461 	EM(rxrpc_reqack_old_rtt,		"OLD-RTT   ")	\
462 	EM(rxrpc_reqack_retrans,		"RETRANS   ")	\
463 	EM(rxrpc_reqack_slow_start,		"SLOW-START")	\
464 	E_(rxrpc_reqack_small_txwin,		"SMALL-TXWN")
465 /* ---- Must update size of stat_why_req_ack[] if more are added! */
466 
467 #define rxrpc_txbuf_traces \
468 	EM(rxrpc_txbuf_alloc_ack,		"ALLOC ACK  ")	\
469 	EM(rxrpc_txbuf_alloc_data,		"ALLOC DATA ")	\
470 	EM(rxrpc_txbuf_free,			"FREE       ")	\
471 	EM(rxrpc_txbuf_get_buffer,		"GET BUFFER ")	\
472 	EM(rxrpc_txbuf_get_trans,		"GET TRANS  ")	\
473 	EM(rxrpc_txbuf_get_retrans,		"GET RETRANS")	\
474 	EM(rxrpc_txbuf_put_ack_tx,		"PUT ACK TX ")	\
475 	EM(rxrpc_txbuf_put_cleaned,		"PUT CLEANED")	\
476 	EM(rxrpc_txbuf_put_nomem,		"PUT NOMEM  ")	\
477 	EM(rxrpc_txbuf_put_rotated,		"PUT ROTATED")	\
478 	EM(rxrpc_txbuf_put_send_aborted,	"PUT SEND-X ")	\
479 	EM(rxrpc_txbuf_put_trans,		"PUT TRANS  ")	\
480 	EM(rxrpc_txbuf_see_out_of_step,		"OUT-OF-STEP")	\
481 	EM(rxrpc_txbuf_see_send_more,		"SEE SEND+  ")	\
482 	E_(rxrpc_txbuf_see_unacked,		"SEE UNACKED")
483 
484 /*
485  * Generate enums for tracing information.
486  */
487 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
488 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
489 
490 #undef EM
491 #undef E_
492 #define EM(a, b) a,
493 #define E_(a, b) a
494 
495 enum rxrpc_abort_reason		{ rxrpc_abort_reasons } __mode(byte);
496 enum rxrpc_bundle_trace		{ rxrpc_bundle_traces } __mode(byte);
497 enum rxrpc_call_poke_trace	{ rxrpc_call_poke_traces } __mode(byte);
498 enum rxrpc_call_trace		{ rxrpc_call_traces } __mode(byte);
499 enum rxrpc_client_trace		{ rxrpc_client_traces } __mode(byte);
500 enum rxrpc_congest_change	{ rxrpc_congest_changes } __mode(byte);
501 enum rxrpc_conn_trace		{ rxrpc_conn_traces } __mode(byte);
502 enum rxrpc_local_trace		{ rxrpc_local_traces } __mode(byte);
503 enum rxrpc_peer_trace		{ rxrpc_peer_traces } __mode(byte);
504 enum rxrpc_propose_ack_outcome	{ rxrpc_propose_ack_outcomes } __mode(byte);
505 enum rxrpc_propose_ack_trace	{ rxrpc_propose_ack_traces } __mode(byte);
506 enum rxrpc_receive_trace	{ rxrpc_receive_traces } __mode(byte);
507 enum rxrpc_recvmsg_trace	{ rxrpc_recvmsg_traces } __mode(byte);
508 enum rxrpc_req_ack_trace	{ rxrpc_req_ack_traces } __mode(byte);
509 enum rxrpc_rtt_rx_trace		{ rxrpc_rtt_rx_traces } __mode(byte);
510 enum rxrpc_rtt_tx_trace		{ rxrpc_rtt_tx_traces } __mode(byte);
511 enum rxrpc_sack_trace		{ rxrpc_sack_traces } __mode(byte);
512 enum rxrpc_skb_trace		{ rxrpc_skb_traces } __mode(byte);
513 enum rxrpc_timer_trace		{ rxrpc_timer_traces } __mode(byte);
514 enum rxrpc_tx_point		{ rxrpc_tx_points } __mode(byte);
515 enum rxrpc_txbuf_trace		{ rxrpc_txbuf_traces } __mode(byte);
516 enum rxrpc_txqueue_trace	{ rxrpc_txqueue_traces } __mode(byte);
517 
518 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
519 
520 /*
521  * Export enum symbols via userspace.
522  */
523 #undef EM
524 #undef E_
525 
526 #ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS
527 
528 #define EM(a, b) TRACE_DEFINE_ENUM(a);
529 #define E_(a, b) TRACE_DEFINE_ENUM(a);
530 
531 rxrpc_abort_reasons;
532 rxrpc_bundle_traces;
533 rxrpc_call_poke_traces;
534 rxrpc_call_traces;
535 rxrpc_client_traces;
536 rxrpc_congest_changes;
537 rxrpc_congest_modes;
538 rxrpc_conn_traces;
539 rxrpc_local_traces;
540 rxrpc_propose_ack_traces;
541 rxrpc_receive_traces;
542 rxrpc_recvmsg_traces;
543 rxrpc_req_ack_traces;
544 rxrpc_rtt_rx_traces;
545 rxrpc_rtt_tx_traces;
546 rxrpc_sack_traces;
547 rxrpc_skb_traces;
548 rxrpc_timer_traces;
549 rxrpc_tx_points;
550 rxrpc_txbuf_traces;
551 rxrpc_txqueue_traces;
552 
553 /*
554  * Now redefine the EM() and E_() macros to map the enums to the strings that
555  * will be printed in the output.
556  */
557 #undef EM
558 #undef E_
559 #define EM(a, b)	{ a, b },
560 #define E_(a, b)	{ a, b }
561 
562 TRACE_EVENT(rxrpc_local,
563 	    TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
564 		     int ref, int usage),
565 
566 	    TP_ARGS(local_debug_id, op, ref, usage),
567 
568 	    TP_STRUCT__entry(
569 		    __field(unsigned int,	local)
570 		    __field(int,		op)
571 		    __field(int,		ref)
572 		    __field(int,		usage)
573 			     ),
574 
575 	    TP_fast_assign(
576 		    __entry->local = local_debug_id;
577 		    __entry->op = op;
578 		    __entry->ref = ref;
579 		    __entry->usage = usage;
580 			   ),
581 
582 	    TP_printk("L=%08x %s r=%d u=%d",
583 		      __entry->local,
584 		      __print_symbolic(__entry->op, rxrpc_local_traces),
585 		      __entry->ref,
586 		      __entry->usage)
587 	    );
588 
589 TRACE_EVENT(rxrpc_peer,
590 	    TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
591 
592 	    TP_ARGS(peer_debug_id, ref, why),
593 
594 	    TP_STRUCT__entry(
595 		    __field(unsigned int,	peer)
596 		    __field(int,		ref)
597 		    __field(enum rxrpc_peer_trace, why)
598 			     ),
599 
600 	    TP_fast_assign(
601 		    __entry->peer = peer_debug_id;
602 		    __entry->ref = ref;
603 		    __entry->why = why;
604 			   ),
605 
606 	    TP_printk("P=%08x %s r=%d",
607 		      __entry->peer,
608 		      __print_symbolic(__entry->why, rxrpc_peer_traces),
609 		      __entry->ref)
610 	    );
611 
612 TRACE_EVENT(rxrpc_bundle,
613 	    TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
614 
615 	    TP_ARGS(bundle_debug_id, ref, why),
616 
617 	    TP_STRUCT__entry(
618 		    __field(unsigned int,	bundle)
619 		    __field(int,		ref)
620 		    __field(int,		why)
621 			     ),
622 
623 	    TP_fast_assign(
624 		    __entry->bundle = bundle_debug_id;
625 		    __entry->ref = ref;
626 		    __entry->why = why;
627 			   ),
628 
629 	    TP_printk("CB=%08x %s r=%d",
630 		      __entry->bundle,
631 		      __print_symbolic(__entry->why, rxrpc_bundle_traces),
632 		      __entry->ref)
633 	    );
634 
635 TRACE_EVENT(rxrpc_conn,
636 	    TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
637 
638 	    TP_ARGS(conn_debug_id, ref, why),
639 
640 	    TP_STRUCT__entry(
641 		    __field(unsigned int,	conn)
642 		    __field(int,		ref)
643 		    __field(int,		why)
644 			     ),
645 
646 	    TP_fast_assign(
647 		    __entry->conn = conn_debug_id;
648 		    __entry->ref = ref;
649 		    __entry->why = why;
650 			   ),
651 
652 	    TP_printk("C=%08x %s r=%d",
653 		      __entry->conn,
654 		      __print_symbolic(__entry->why, rxrpc_conn_traces),
655 		      __entry->ref)
656 	    );
657 
658 TRACE_EVENT(rxrpc_client,
659 	    TP_PROTO(struct rxrpc_connection *conn, int channel,
660 		     enum rxrpc_client_trace op),
661 
662 	    TP_ARGS(conn, channel, op),
663 
664 	    TP_STRUCT__entry(
665 		    __field(unsigned int,		conn)
666 		    __field(u32,			cid)
667 		    __field(int,			channel)
668 		    __field(int,			usage)
669 		    __field(enum rxrpc_client_trace,	op)
670 			     ),
671 
672 	    TP_fast_assign(
673 		    __entry->conn = conn ? conn->debug_id : 0;
674 		    __entry->channel = channel;
675 		    __entry->usage = conn ? refcount_read(&conn->ref) : -2;
676 		    __entry->op = op;
677 		    __entry->cid = conn ? conn->proto.cid : 0;
678 			   ),
679 
680 	    TP_printk("C=%08x h=%2d %s i=%08x u=%d",
681 		      __entry->conn,
682 		      __entry->channel,
683 		      __print_symbolic(__entry->op, rxrpc_client_traces),
684 		      __entry->cid,
685 		      __entry->usage)
686 	    );
687 
688 TRACE_EVENT(rxrpc_call,
689 	    TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
690 		     enum rxrpc_call_trace why),
691 
692 	    TP_ARGS(call_debug_id, ref, aux, why),
693 
694 	    TP_STRUCT__entry(
695 		    __field(unsigned int,	call)
696 		    __field(int,		ref)
697 		    __field(int,		why)
698 		    __field(unsigned long,	aux)
699 			     ),
700 
701 	    TP_fast_assign(
702 		    __entry->call = call_debug_id;
703 		    __entry->ref = ref;
704 		    __entry->why = why;
705 		    __entry->aux = aux;
706 			   ),
707 
708 	    TP_printk("c=%08x %s r=%d a=%lx",
709 		      __entry->call,
710 		      __print_symbolic(__entry->why, rxrpc_call_traces),
711 		      __entry->ref,
712 		      __entry->aux)
713 	    );
714 
715 TRACE_EVENT(rxrpc_skb,
716 	    TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
717 		     enum rxrpc_skb_trace why),
718 
719 	    TP_ARGS(skb, usage, mod_count, why),
720 
721 	    TP_STRUCT__entry(
722 		    __field(struct sk_buff *,		skb)
723 		    __field(int,			usage)
724 		    __field(int,			mod_count)
725 		    __field(enum rxrpc_skb_trace,	why)
726 			     ),
727 
728 	    TP_fast_assign(
729 		    __entry->skb = skb;
730 		    __entry->usage = usage;
731 		    __entry->mod_count = mod_count;
732 		    __entry->why = why;
733 			   ),
734 
735 	    TP_printk("s=%p Rx %s u=%d m=%d",
736 		      __entry->skb,
737 		      __print_symbolic(__entry->why, rxrpc_skb_traces),
738 		      __entry->usage,
739 		      __entry->mod_count)
740 	    );
741 
742 TRACE_EVENT(rxrpc_rx_packet,
743 	    TP_PROTO(struct rxrpc_skb_priv *sp),
744 
745 	    TP_ARGS(sp),
746 
747 	    TP_STRUCT__entry(
748 		    __field_struct(struct rxrpc_host_header,	hdr)
749 			     ),
750 
751 	    TP_fast_assign(
752 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
753 			   ),
754 
755 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
756 		      __entry->hdr.epoch, __entry->hdr.cid,
757 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
758 		      __entry->hdr.serial, __entry->hdr.seq,
759 		      __entry->hdr.securityIndex, __entry->hdr.flags,
760 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts))
761 	    );
762 
763 TRACE_EVENT(rxrpc_rx_done,
764 	    TP_PROTO(int result, int abort_code),
765 
766 	    TP_ARGS(result, abort_code),
767 
768 	    TP_STRUCT__entry(
769 		    __field(int,	result)
770 		    __field(int,	abort_code)
771 			     ),
772 
773 	    TP_fast_assign(
774 		    __entry->result = result;
775 		    __entry->abort_code = abort_code;
776 			   ),
777 
778 	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
779 	    );
780 
781 TRACE_EVENT(rxrpc_abort,
782 	    TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why,
783 		     u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error),
784 
785 	    TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
786 
787 	    TP_STRUCT__entry(
788 		    __field(unsigned int,		call_nr)
789 		    __field(enum rxrpc_abort_reason,	why)
790 		    __field(u32,			cid)
791 		    __field(u32,			call_id)
792 		    __field(rxrpc_seq_t,		seq)
793 		    __field(int,			abort_code)
794 		    __field(int,			error)
795 			     ),
796 
797 	    TP_fast_assign(
798 		    __entry->call_nr = call_nr;
799 		    __entry->why = why;
800 		    __entry->cid = cid;
801 		    __entry->call_id = call_id;
802 		    __entry->abort_code = abort_code;
803 		    __entry->error = error;
804 		    __entry->seq = seq;
805 			   ),
806 
807 	    TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
808 		      __entry->call_nr,
809 		      __entry->cid, __entry->call_id, __entry->seq,
810 		      __entry->abort_code, __entry->error,
811 		      __print_symbolic(__entry->why, rxrpc_abort_reasons))
812 	    );
813 
814 TRACE_EVENT(rxrpc_call_complete,
815 	    TP_PROTO(struct rxrpc_call *call),
816 
817 	    TP_ARGS(call),
818 
819 	    TP_STRUCT__entry(
820 		    __field(unsigned int,		call)
821 		    __field(enum rxrpc_call_completion,	compl)
822 		    __field(int,			error)
823 		    __field(u32,			abort_code)
824 			     ),
825 
826 	    TP_fast_assign(
827 		    __entry->call = call->debug_id;
828 		    __entry->compl = call->completion;
829 		    __entry->error = call->error;
830 		    __entry->abort_code = call->abort_code;
831 			   ),
832 
833 	    TP_printk("c=%08x %s r=%d ac=%d",
834 		      __entry->call,
835 		      __print_symbolic(__entry->compl, rxrpc_completions),
836 		      __entry->error,
837 		      __entry->abort_code)
838 	    );
839 
840 TRACE_EVENT(rxrpc_txqueue,
841 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
842 
843 	    TP_ARGS(call, why),
844 
845 	    TP_STRUCT__entry(
846 		    __field(unsigned int,		call)
847 		    __field(enum rxrpc_txqueue_trace,	why)
848 		    __field(rxrpc_seq_t,		acks_hard_ack)
849 		    __field(rxrpc_seq_t,		tx_bottom)
850 		    __field(rxrpc_seq_t,		tx_top)
851 		    __field(rxrpc_seq_t,		tx_prepared)
852 		    __field(int,			tx_winsize)
853 			     ),
854 
855 	    TP_fast_assign(
856 		    __entry->call = call->debug_id;
857 		    __entry->why = why;
858 		    __entry->acks_hard_ack = call->acks_hard_ack;
859 		    __entry->tx_bottom = call->tx_bottom;
860 		    __entry->tx_top = call->tx_top;
861 		    __entry->tx_prepared = call->tx_prepared;
862 		    __entry->tx_winsize = call->tx_winsize;
863 			   ),
864 
865 	    TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
866 		      __entry->call,
867 		      __print_symbolic(__entry->why, rxrpc_txqueue_traces),
868 		      __entry->tx_bottom,
869 		      __entry->acks_hard_ack,
870 		      __entry->tx_top - __entry->tx_bottom,
871 		      __entry->tx_top - __entry->acks_hard_ack,
872 		      __entry->tx_prepared - __entry->tx_bottom,
873 		      __entry->tx_winsize)
874 	    );
875 
876 TRACE_EVENT(rxrpc_rx_data,
877 	    TP_PROTO(unsigned int call, rxrpc_seq_t seq,
878 		     rxrpc_serial_t serial, u8 flags),
879 
880 	    TP_ARGS(call, seq, serial, flags),
881 
882 	    TP_STRUCT__entry(
883 		    __field(unsigned int,	call)
884 		    __field(rxrpc_seq_t,	seq)
885 		    __field(rxrpc_serial_t,	serial)
886 		    __field(u8,			flags)
887 			     ),
888 
889 	    TP_fast_assign(
890 		    __entry->call = call;
891 		    __entry->seq = seq;
892 		    __entry->serial = serial;
893 		    __entry->flags = flags;
894 			   ),
895 
896 	    TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
897 		      __entry->call,
898 		      __entry->serial,
899 		      __entry->seq,
900 		      __entry->flags)
901 	    );
902 
903 TRACE_EVENT(rxrpc_rx_ack,
904 	    TP_PROTO(struct rxrpc_call *call,
905 		     rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
906 		     rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
907 
908 	    TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
909 
910 	    TP_STRUCT__entry(
911 		    __field(unsigned int,	call)
912 		    __field(rxrpc_serial_t,	serial)
913 		    __field(rxrpc_serial_t,	ack_serial)
914 		    __field(rxrpc_seq_t,	first)
915 		    __field(rxrpc_seq_t,	prev)
916 		    __field(u8,			reason)
917 		    __field(u8,			n_acks)
918 			     ),
919 
920 	    TP_fast_assign(
921 		    __entry->call = call->debug_id;
922 		    __entry->serial = serial;
923 		    __entry->ack_serial = ack_serial;
924 		    __entry->first = first;
925 		    __entry->prev = prev;
926 		    __entry->reason = reason;
927 		    __entry->n_acks = n_acks;
928 			   ),
929 
930 	    TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
931 		      __entry->call,
932 		      __entry->serial,
933 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
934 		      __entry->ack_serial,
935 		      __entry->first,
936 		      __entry->prev,
937 		      __entry->n_acks)
938 	    );
939 
940 TRACE_EVENT(rxrpc_rx_abort,
941 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
942 		     u32 abort_code),
943 
944 	    TP_ARGS(call, serial, abort_code),
945 
946 	    TP_STRUCT__entry(
947 		    __field(unsigned int,	call)
948 		    __field(rxrpc_serial_t,	serial)
949 		    __field(u32,		abort_code)
950 			     ),
951 
952 	    TP_fast_assign(
953 		    __entry->call = call->debug_id;
954 		    __entry->serial = serial;
955 		    __entry->abort_code = abort_code;
956 			   ),
957 
958 	    TP_printk("c=%08x ABORT %08x ac=%d",
959 		      __entry->call,
960 		      __entry->serial,
961 		      __entry->abort_code)
962 	    );
963 
964 TRACE_EVENT(rxrpc_rx_challenge,
965 	    TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
966 		     u32 version, u32 nonce, u32 min_level),
967 
968 	    TP_ARGS(conn, serial, version, nonce, min_level),
969 
970 	    TP_STRUCT__entry(
971 		    __field(unsigned int,	conn)
972 		    __field(rxrpc_serial_t,	serial)
973 		    __field(u32,		version)
974 		    __field(u32,		nonce)
975 		    __field(u32,		min_level)
976 			     ),
977 
978 	    TP_fast_assign(
979 		    __entry->conn = conn->debug_id;
980 		    __entry->serial = serial;
981 		    __entry->version = version;
982 		    __entry->nonce = nonce;
983 		    __entry->min_level = min_level;
984 			   ),
985 
986 	    TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
987 		      __entry->conn,
988 		      __entry->serial,
989 		      __entry->version,
990 		      __entry->nonce,
991 		      __entry->min_level)
992 	    );
993 
994 TRACE_EVENT(rxrpc_rx_response,
995 	    TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
996 		     u32 version, u32 kvno, u32 ticket_len),
997 
998 	    TP_ARGS(conn, serial, version, kvno, ticket_len),
999 
1000 	    TP_STRUCT__entry(
1001 		    __field(unsigned int,	conn)
1002 		    __field(rxrpc_serial_t,	serial)
1003 		    __field(u32,		version)
1004 		    __field(u32,		kvno)
1005 		    __field(u32,		ticket_len)
1006 			     ),
1007 
1008 	    TP_fast_assign(
1009 		    __entry->conn = conn->debug_id;
1010 		    __entry->serial = serial;
1011 		    __entry->version = version;
1012 		    __entry->kvno = kvno;
1013 		    __entry->ticket_len = ticket_len;
1014 			   ),
1015 
1016 	    TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
1017 		      __entry->conn,
1018 		      __entry->serial,
1019 		      __entry->version,
1020 		      __entry->kvno,
1021 		      __entry->ticket_len)
1022 	    );
1023 
1024 TRACE_EVENT(rxrpc_rx_rwind_change,
1025 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1026 		     u32 rwind, bool wake),
1027 
1028 	    TP_ARGS(call, serial, rwind, wake),
1029 
1030 	    TP_STRUCT__entry(
1031 		    __field(unsigned int,	call)
1032 		    __field(rxrpc_serial_t,	serial)
1033 		    __field(u32,		rwind)
1034 		    __field(bool,		wake)
1035 			     ),
1036 
1037 	    TP_fast_assign(
1038 		    __entry->call = call->debug_id;
1039 		    __entry->serial = serial;
1040 		    __entry->rwind = rwind;
1041 		    __entry->wake = wake;
1042 			   ),
1043 
1044 	    TP_printk("c=%08x %08x rw=%u%s",
1045 		      __entry->call,
1046 		      __entry->serial,
1047 		      __entry->rwind,
1048 		      __entry->wake ? " wake" : "")
1049 	    );
1050 
1051 TRACE_EVENT(rxrpc_tx_packet,
1052 	    TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
1053 		     enum rxrpc_tx_point where),
1054 
1055 	    TP_ARGS(call_id, whdr, where),
1056 
1057 	    TP_STRUCT__entry(
1058 		    __field(unsigned int,			call)
1059 		    __field(enum rxrpc_tx_point,		where)
1060 		    __field_struct(struct rxrpc_wire_header,	whdr)
1061 			     ),
1062 
1063 	    TP_fast_assign(
1064 		    __entry->call = call_id;
1065 		    memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
1066 		    __entry->where = where;
1067 			   ),
1068 
1069 	    TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
1070 		      __entry->call,
1071 		      ntohl(__entry->whdr.epoch),
1072 		      ntohl(__entry->whdr.cid),
1073 		      ntohl(__entry->whdr.callNumber),
1074 		      ntohs(__entry->whdr.serviceId),
1075 		      ntohl(__entry->whdr.serial),
1076 		      ntohl(__entry->whdr.seq),
1077 		      __entry->whdr.type, __entry->whdr.flags,
1078 		      __entry->whdr.type <= 15 ?
1079 		      __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
1080 		      __print_symbolic(__entry->where, rxrpc_tx_points))
1081 	    );
1082 
1083 TRACE_EVENT(rxrpc_tx_data,
1084 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1085 		     rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
1086 
1087 	    TP_ARGS(call, seq, serial, flags, retrans, lose),
1088 
1089 	    TP_STRUCT__entry(
1090 		    __field(unsigned int,	call)
1091 		    __field(rxrpc_seq_t,	seq)
1092 		    __field(rxrpc_serial_t,	serial)
1093 		    __field(u32,		cid)
1094 		    __field(u32,		call_id)
1095 		    __field(u8,			flags)
1096 		    __field(bool,		retrans)
1097 		    __field(bool,		lose)
1098 			     ),
1099 
1100 	    TP_fast_assign(
1101 		    __entry->call = call->debug_id;
1102 		    __entry->cid = call->cid;
1103 		    __entry->call_id = call->call_id;
1104 		    __entry->seq = seq;
1105 		    __entry->serial = serial;
1106 		    __entry->flags = flags;
1107 		    __entry->retrans = retrans;
1108 		    __entry->lose = lose;
1109 			   ),
1110 
1111 	    TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1112 		      __entry->call,
1113 		      __entry->cid,
1114 		      __entry->call_id,
1115 		      __entry->serial,
1116 		      __entry->seq,
1117 		      __entry->flags,
1118 		      __entry->retrans ? " *RETRANS*" : "",
1119 		      __entry->lose ? " *LOSE*" : "")
1120 	    );
1121 
1122 TRACE_EVENT(rxrpc_tx_ack,
1123 	    TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1124 		     rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1125 		     u8 reason, u8 n_acks, u16 rwind),
1126 
1127 	    TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks, rwind),
1128 
1129 	    TP_STRUCT__entry(
1130 		    __field(unsigned int,	call)
1131 		    __field(rxrpc_serial_t,	serial)
1132 		    __field(rxrpc_seq_t,	ack_first)
1133 		    __field(rxrpc_serial_t,	ack_serial)
1134 		    __field(u8,			reason)
1135 		    __field(u8,			n_acks)
1136 		    __field(u16,		rwind)
1137 			     ),
1138 
1139 	    TP_fast_assign(
1140 		    __entry->call = call;
1141 		    __entry->serial = serial;
1142 		    __entry->ack_first = ack_first;
1143 		    __entry->ack_serial = ack_serial;
1144 		    __entry->reason = reason;
1145 		    __entry->n_acks = n_acks;
1146 		    __entry->rwind = rwind;
1147 			   ),
1148 
1149 	    TP_printk(" c=%08x ACK  %08x %s f=%08x r=%08x n=%u rw=%u",
1150 		      __entry->call,
1151 		      __entry->serial,
1152 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
1153 		      __entry->ack_first,
1154 		      __entry->ack_serial,
1155 		      __entry->n_acks,
1156 		      __entry->rwind)
1157 	    );
1158 
1159 TRACE_EVENT(rxrpc_receive,
1160 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1161 		     rxrpc_serial_t serial, rxrpc_seq_t seq),
1162 
1163 	    TP_ARGS(call, why, serial, seq),
1164 
1165 	    TP_STRUCT__entry(
1166 		    __field(unsigned int,		call)
1167 		    __field(enum rxrpc_receive_trace,	why)
1168 		    __field(rxrpc_serial_t,		serial)
1169 		    __field(rxrpc_seq_t,		seq)
1170 		    __field(rxrpc_seq_t,		window)
1171 		    __field(rxrpc_seq_t,		wtop)
1172 			     ),
1173 
1174 	    TP_fast_assign(
1175 		    __entry->call = call->debug_id;
1176 		    __entry->why = why;
1177 		    __entry->serial = serial;
1178 		    __entry->seq = seq;
1179 		    __entry->window = call->ackr_window;
1180 		    __entry->wtop = call->ackr_wtop;
1181 			   ),
1182 
1183 	    TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1184 		      __entry->call,
1185 		      __print_symbolic(__entry->why, rxrpc_receive_traces),
1186 		      __entry->serial,
1187 		      __entry->seq,
1188 		      __entry->window,
1189 		      __entry->wtop)
1190 	    );
1191 
1192 TRACE_EVENT(rxrpc_recvmsg,
1193 	    TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why,
1194 		     int ret),
1195 
1196 	    TP_ARGS(call_debug_id, why, ret),
1197 
1198 	    TP_STRUCT__entry(
1199 		    __field(unsigned int,		call)
1200 		    __field(enum rxrpc_recvmsg_trace,	why)
1201 		    __field(int,			ret)
1202 			     ),
1203 
1204 	    TP_fast_assign(
1205 		    __entry->call = call_debug_id;
1206 		    __entry->why = why;
1207 		    __entry->ret = ret;
1208 			   ),
1209 
1210 	    TP_printk("c=%08x %s ret=%d",
1211 		      __entry->call,
1212 		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1213 		      __entry->ret)
1214 	    );
1215 
1216 TRACE_EVENT(rxrpc_recvdata,
1217 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1218 		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1219 		     int ret),
1220 
1221 	    TP_ARGS(call, why, seq, offset, len, ret),
1222 
1223 	    TP_STRUCT__entry(
1224 		    __field(unsigned int,		call)
1225 		    __field(enum rxrpc_recvmsg_trace,	why)
1226 		    __field(rxrpc_seq_t,		seq)
1227 		    __field(unsigned int,		offset)
1228 		    __field(unsigned int,		len)
1229 		    __field(int,			ret)
1230 			     ),
1231 
1232 	    TP_fast_assign(
1233 		    __entry->call = call ? call->debug_id : 0;
1234 		    __entry->why = why;
1235 		    __entry->seq = seq;
1236 		    __entry->offset = offset;
1237 		    __entry->len = len;
1238 		    __entry->ret = ret;
1239 			   ),
1240 
1241 	    TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1242 		      __entry->call,
1243 		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1244 		      __entry->seq,
1245 		      __entry->offset,
1246 		      __entry->len,
1247 		      __entry->ret)
1248 	    );
1249 
1250 TRACE_EVENT(rxrpc_rtt_tx,
1251 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1252 		     int slot, rxrpc_serial_t send_serial),
1253 
1254 	    TP_ARGS(call, why, slot, send_serial),
1255 
1256 	    TP_STRUCT__entry(
1257 		    __field(unsigned int,		call)
1258 		    __field(enum rxrpc_rtt_tx_trace,	why)
1259 		    __field(int,			slot)
1260 		    __field(rxrpc_serial_t,		send_serial)
1261 			     ),
1262 
1263 	    TP_fast_assign(
1264 		    __entry->call = call->debug_id;
1265 		    __entry->why = why;
1266 		    __entry->slot = slot;
1267 		    __entry->send_serial = send_serial;
1268 			   ),
1269 
1270 	    TP_printk("c=%08x [%d] %s sr=%08x",
1271 		      __entry->call,
1272 		      __entry->slot,
1273 		      __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1274 		      __entry->send_serial)
1275 	    );
1276 
1277 TRACE_EVENT(rxrpc_rtt_rx,
1278 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1279 		     int slot,
1280 		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1281 		     u32 rtt, u32 rto),
1282 
1283 	    TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1284 
1285 	    TP_STRUCT__entry(
1286 		    __field(unsigned int,		call)
1287 		    __field(enum rxrpc_rtt_rx_trace,	why)
1288 		    __field(int,			slot)
1289 		    __field(rxrpc_serial_t,		send_serial)
1290 		    __field(rxrpc_serial_t,		resp_serial)
1291 		    __field(u32,			rtt)
1292 		    __field(u32,			rto)
1293 			     ),
1294 
1295 	    TP_fast_assign(
1296 		    __entry->call = call->debug_id;
1297 		    __entry->why = why;
1298 		    __entry->slot = slot;
1299 		    __entry->send_serial = send_serial;
1300 		    __entry->resp_serial = resp_serial;
1301 		    __entry->rtt = rtt;
1302 		    __entry->rto = rto;
1303 			   ),
1304 
1305 	    TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1306 		      __entry->call,
1307 		      __entry->slot,
1308 		      __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1309 		      __entry->send_serial,
1310 		      __entry->resp_serial,
1311 		      __entry->rtt,
1312 		      __entry->rto)
1313 	    );
1314 
1315 TRACE_EVENT(rxrpc_timer,
1316 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1317 		     unsigned long now),
1318 
1319 	    TP_ARGS(call, why, now),
1320 
1321 	    TP_STRUCT__entry(
1322 		    __field(unsigned int,		call)
1323 		    __field(enum rxrpc_timer_trace,	why)
1324 		    __field(long,			now)
1325 		    __field(long,			ack_at)
1326 		    __field(long,			ack_lost_at)
1327 		    __field(long,			resend_at)
1328 		    __field(long,			ping_at)
1329 		    __field(long,			expect_rx_by)
1330 		    __field(long,			expect_req_by)
1331 		    __field(long,			expect_term_by)
1332 		    __field(long,			timer)
1333 			     ),
1334 
1335 	    TP_fast_assign(
1336 		    __entry->call		= call->debug_id;
1337 		    __entry->why		= why;
1338 		    __entry->now		= now;
1339 		    __entry->ack_at		= call->delay_ack_at;
1340 		    __entry->ack_lost_at	= call->ack_lost_at;
1341 		    __entry->resend_at		= call->resend_at;
1342 		    __entry->expect_rx_by	= call->expect_rx_by;
1343 		    __entry->expect_req_by	= call->expect_req_by;
1344 		    __entry->expect_term_by	= call->expect_term_by;
1345 		    __entry->timer		= call->timer.expires;
1346 			   ),
1347 
1348 	    TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1349 		      __entry->call,
1350 		      __print_symbolic(__entry->why, rxrpc_timer_traces),
1351 		      __entry->ack_at - __entry->now,
1352 		      __entry->ack_lost_at - __entry->now,
1353 		      __entry->resend_at - __entry->now,
1354 		      __entry->expect_rx_by - __entry->now,
1355 		      __entry->expect_req_by - __entry->now,
1356 		      __entry->expect_term_by - __entry->now,
1357 		      __entry->timer - __entry->now)
1358 	    );
1359 
1360 TRACE_EVENT(rxrpc_timer_expired,
1361 	    TP_PROTO(struct rxrpc_call *call, unsigned long now),
1362 
1363 	    TP_ARGS(call, now),
1364 
1365 	    TP_STRUCT__entry(
1366 		    __field(unsigned int,	call)
1367 		    __field(long,		now)
1368 		    __field(long,		ack_at)
1369 		    __field(long,		ack_lost_at)
1370 		    __field(long,		resend_at)
1371 		    __field(long,		ping_at)
1372 		    __field(long,		expect_rx_by)
1373 		    __field(long,		expect_req_by)
1374 		    __field(long,		expect_term_by)
1375 		    __field(long,		timer)
1376 			     ),
1377 
1378 	    TP_fast_assign(
1379 		    __entry->call		= call->debug_id;
1380 		    __entry->now		= now;
1381 		    __entry->ack_at		= call->delay_ack_at;
1382 		    __entry->ack_lost_at	= call->ack_lost_at;
1383 		    __entry->resend_at		= call->resend_at;
1384 		    __entry->expect_rx_by	= call->expect_rx_by;
1385 		    __entry->expect_req_by	= call->expect_req_by;
1386 		    __entry->expect_term_by	= call->expect_term_by;
1387 		    __entry->timer		= call->timer.expires;
1388 			   ),
1389 
1390 	    TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1391 		      __entry->call,
1392 		      __entry->ack_at - __entry->now,
1393 		      __entry->ack_lost_at - __entry->now,
1394 		      __entry->resend_at - __entry->now,
1395 		      __entry->expect_rx_by - __entry->now,
1396 		      __entry->expect_req_by - __entry->now,
1397 		      __entry->expect_term_by - __entry->now,
1398 		      __entry->timer - __entry->now)
1399 	    );
1400 
1401 TRACE_EVENT(rxrpc_rx_lose,
1402 	    TP_PROTO(struct rxrpc_skb_priv *sp),
1403 
1404 	    TP_ARGS(sp),
1405 
1406 	    TP_STRUCT__entry(
1407 		    __field_struct(struct rxrpc_host_header,	hdr)
1408 			     ),
1409 
1410 	    TP_fast_assign(
1411 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1412 			   ),
1413 
1414 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1415 		      __entry->hdr.epoch, __entry->hdr.cid,
1416 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
1417 		      __entry->hdr.serial, __entry->hdr.seq,
1418 		      __entry->hdr.type, __entry->hdr.flags,
1419 		      __entry->hdr.type <= 15 ?
1420 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1421 	    );
1422 
1423 TRACE_EVENT(rxrpc_propose_ack,
1424 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1425 		     u8 ack_reason, rxrpc_serial_t serial),
1426 
1427 	    TP_ARGS(call, why, ack_reason, serial),
1428 
1429 	    TP_STRUCT__entry(
1430 		    __field(unsigned int,			call)
1431 		    __field(enum rxrpc_propose_ack_trace,	why)
1432 		    __field(rxrpc_serial_t,			serial)
1433 		    __field(u8,					ack_reason)
1434 			     ),
1435 
1436 	    TP_fast_assign(
1437 		    __entry->call	= call->debug_id;
1438 		    __entry->why	= why;
1439 		    __entry->serial	= serial;
1440 		    __entry->ack_reason	= ack_reason;
1441 			   ),
1442 
1443 	    TP_printk("c=%08x %s %s r=%08x",
1444 		      __entry->call,
1445 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1446 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1447 		      __entry->serial)
1448 	    );
1449 
1450 TRACE_EVENT(rxrpc_send_ack,
1451 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1452 		     u8 ack_reason, rxrpc_serial_t serial),
1453 
1454 	    TP_ARGS(call, why, ack_reason, serial),
1455 
1456 	    TP_STRUCT__entry(
1457 		    __field(unsigned int,			call)
1458 		    __field(enum rxrpc_propose_ack_trace,	why)
1459 		    __field(rxrpc_serial_t,			serial)
1460 		    __field(u8,					ack_reason)
1461 			     ),
1462 
1463 	    TP_fast_assign(
1464 		    __entry->call	= call->debug_id;
1465 		    __entry->why	= why;
1466 		    __entry->serial	= serial;
1467 		    __entry->ack_reason	= ack_reason;
1468 			   ),
1469 
1470 	    TP_printk("c=%08x %s %s r=%08x",
1471 		      __entry->call,
1472 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1473 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1474 		      __entry->serial)
1475 	    );
1476 
1477 TRACE_EVENT(rxrpc_drop_ack,
1478 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1479 		     u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1480 
1481 	    TP_ARGS(call, why, ack_reason, serial, nobuf),
1482 
1483 	    TP_STRUCT__entry(
1484 		    __field(unsigned int,			call)
1485 		    __field(enum rxrpc_propose_ack_trace,	why)
1486 		    __field(rxrpc_serial_t,			serial)
1487 		    __field(u8,					ack_reason)
1488 		    __field(bool,				nobuf)
1489 			     ),
1490 
1491 	    TP_fast_assign(
1492 		    __entry->call	= call->debug_id;
1493 		    __entry->why	= why;
1494 		    __entry->serial	= serial;
1495 		    __entry->ack_reason	= ack_reason;
1496 		    __entry->nobuf	= nobuf;
1497 			   ),
1498 
1499 	    TP_printk("c=%08x %s %s r=%08x nbf=%u",
1500 		      __entry->call,
1501 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1502 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1503 		      __entry->serial, __entry->nobuf)
1504 	    );
1505 
1506 TRACE_EVENT(rxrpc_retransmit,
1507 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1508 
1509 	    TP_ARGS(call, seq, expiry),
1510 
1511 	    TP_STRUCT__entry(
1512 		    __field(unsigned int,	call)
1513 		    __field(rxrpc_seq_t,	seq)
1514 		    __field(s64,		expiry)
1515 			     ),
1516 
1517 	    TP_fast_assign(
1518 		    __entry->call = call->debug_id;
1519 		    __entry->seq = seq;
1520 		    __entry->expiry = expiry;
1521 			   ),
1522 
1523 	    TP_printk("c=%08x q=%x xp=%lld",
1524 		      __entry->call,
1525 		      __entry->seq,
1526 		      __entry->expiry)
1527 	    );
1528 
1529 TRACE_EVENT(rxrpc_congest,
1530 	    TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1531 		     rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1532 
1533 	    TP_ARGS(call, summary, ack_serial, change),
1534 
1535 	    TP_STRUCT__entry(
1536 		    __field(unsigned int,			call)
1537 		    __field(enum rxrpc_congest_change,		change)
1538 		    __field(rxrpc_seq_t,			hard_ack)
1539 		    __field(rxrpc_seq_t,			top)
1540 		    __field(rxrpc_seq_t,			lowest_nak)
1541 		    __field(rxrpc_serial_t,			ack_serial)
1542 		    __field_struct(struct rxrpc_ack_summary,	sum)
1543 			     ),
1544 
1545 	    TP_fast_assign(
1546 		    __entry->call	= call->debug_id;
1547 		    __entry->change	= change;
1548 		    __entry->hard_ack	= call->acks_hard_ack;
1549 		    __entry->top	= call->tx_top;
1550 		    __entry->lowest_nak	= call->acks_lowest_nak;
1551 		    __entry->ack_serial	= ack_serial;
1552 		    memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1553 			   ),
1554 
1555 	    TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nA=%u,%u+%u,%u b=%u u=%u d=%u l=%x%s%s%s",
1556 		      __entry->call,
1557 		      __entry->ack_serial,
1558 		      __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1559 		      __entry->hard_ack,
1560 		      __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1561 		      __entry->sum.cwnd,
1562 		      __entry->sum.ssthresh,
1563 		      __entry->sum.nr_acks, __entry->sum.nr_retained_nacks,
1564 		      __entry->sum.nr_new_acks,
1565 		      __entry->sum.nr_new_nacks,
1566 		      __entry->top - __entry->hard_ack,
1567 		      __entry->sum.cumulative_acks,
1568 		      __entry->sum.dup_acks,
1569 		      __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1570 		      __print_symbolic(__entry->change, rxrpc_congest_changes),
1571 		      __entry->sum.retrans_timeo ? " rTxTo" : "")
1572 	    );
1573 
1574 TRACE_EVENT(rxrpc_reset_cwnd,
1575 	    TP_PROTO(struct rxrpc_call *call, ktime_t now),
1576 
1577 	    TP_ARGS(call, now),
1578 
1579 	    TP_STRUCT__entry(
1580 		    __field(unsigned int,		call)
1581 		    __field(enum rxrpc_congest_mode,	mode)
1582 		    __field(unsigned short,		cwnd)
1583 		    __field(unsigned short,		extra)
1584 		    __field(rxrpc_seq_t,		hard_ack)
1585 		    __field(rxrpc_seq_t,		prepared)
1586 		    __field(ktime_t,			since_last_tx)
1587 		    __field(bool,			has_data)
1588 			     ),
1589 
1590 	    TP_fast_assign(
1591 		    __entry->call	= call->debug_id;
1592 		    __entry->mode	= call->cong_mode;
1593 		    __entry->cwnd	= call->cong_cwnd;
1594 		    __entry->extra	= call->cong_extra;
1595 		    __entry->hard_ack	= call->acks_hard_ack;
1596 		    __entry->prepared	= call->tx_prepared - call->tx_bottom;
1597 		    __entry->since_last_tx = ktime_sub(now, call->tx_last_sent);
1598 		    __entry->has_data	= !list_empty(&call->tx_sendmsg);
1599 			   ),
1600 
1601 	    TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u",
1602 		      __entry->call,
1603 		      __entry->hard_ack,
1604 		      __print_symbolic(__entry->mode, rxrpc_congest_modes),
1605 		      __entry->cwnd,
1606 		      __entry->extra,
1607 		      __entry->prepared,
1608 		      ktime_to_ns(__entry->since_last_tx),
1609 		      __entry->has_data)
1610 	    );
1611 
1612 TRACE_EVENT(rxrpc_disconnect_call,
1613 	    TP_PROTO(struct rxrpc_call *call),
1614 
1615 	    TP_ARGS(call),
1616 
1617 	    TP_STRUCT__entry(
1618 		    __field(unsigned int,	call)
1619 		    __field(u32,		abort_code)
1620 			     ),
1621 
1622 	    TP_fast_assign(
1623 		    __entry->call = call->debug_id;
1624 		    __entry->abort_code = call->abort_code;
1625 			   ),
1626 
1627 	    TP_printk("c=%08x ab=%08x",
1628 		      __entry->call,
1629 		      __entry->abort_code)
1630 	    );
1631 
1632 TRACE_EVENT(rxrpc_improper_term,
1633 	    TP_PROTO(struct rxrpc_call *call),
1634 
1635 	    TP_ARGS(call),
1636 
1637 	    TP_STRUCT__entry(
1638 		    __field(unsigned int,	call)
1639 		    __field(u32,		abort_code)
1640 			     ),
1641 
1642 	    TP_fast_assign(
1643 		    __entry->call = call->debug_id;
1644 		    __entry->abort_code = call->abort_code;
1645 			   ),
1646 
1647 	    TP_printk("c=%08x ab=%08x",
1648 		      __entry->call,
1649 		      __entry->abort_code)
1650 	    );
1651 
1652 TRACE_EVENT(rxrpc_connect_call,
1653 	    TP_PROTO(struct rxrpc_call *call),
1654 
1655 	    TP_ARGS(call),
1656 
1657 	    TP_STRUCT__entry(
1658 		    __field(unsigned int,		call)
1659 		    __field(unsigned long,		user_call_ID)
1660 		    __field(u32,			cid)
1661 		    __field(u32,			call_id)
1662 		    __field_struct(struct sockaddr_rxrpc, srx)
1663 			     ),
1664 
1665 	    TP_fast_assign(
1666 		    __entry->call = call->debug_id;
1667 		    __entry->user_call_ID = call->user_call_ID;
1668 		    __entry->cid = call->cid;
1669 		    __entry->call_id = call->call_id;
1670 		    __entry->srx = call->dest_srx;
1671 			   ),
1672 
1673 	    TP_printk("c=%08x u=%p %08x:%08x dst=%pISp",
1674 		      __entry->call,
1675 		      (void *)__entry->user_call_ID,
1676 		      __entry->cid,
1677 		      __entry->call_id,
1678 		      &__entry->srx.transport)
1679 	    );
1680 
1681 TRACE_EVENT(rxrpc_resend,
1682 	    TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack),
1683 
1684 	    TP_ARGS(call, ack),
1685 
1686 	    TP_STRUCT__entry(
1687 		    __field(unsigned int,	call)
1688 		    __field(rxrpc_seq_t,	seq)
1689 		    __field(rxrpc_seq_t,	transmitted)
1690 		    __field(rxrpc_serial_t,	ack_serial)
1691 			     ),
1692 
1693 	    TP_fast_assign(
1694 		    struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL;
1695 		    __entry->call = call->debug_id;
1696 		    __entry->seq = call->acks_hard_ack;
1697 		    __entry->transmitted = call->tx_transmitted;
1698 		    __entry->ack_serial = sp ? sp->hdr.serial : 0;
1699 			   ),
1700 
1701 	    TP_printk("c=%08x r=%x q=%x tq=%x",
1702 		      __entry->call,
1703 		      __entry->ack_serial,
1704 		      __entry->seq,
1705 		      __entry->transmitted)
1706 	    );
1707 
1708 TRACE_EVENT(rxrpc_rx_icmp,
1709 	    TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1710 		     struct sockaddr_rxrpc *srx),
1711 
1712 	    TP_ARGS(peer, ee, srx),
1713 
1714 	    TP_STRUCT__entry(
1715 		    __field(unsigned int,			peer)
1716 		    __field_struct(struct sock_extended_err,	ee)
1717 		    __field_struct(struct sockaddr_rxrpc,	srx)
1718 			     ),
1719 
1720 	    TP_fast_assign(
1721 		    __entry->peer = peer->debug_id;
1722 		    memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1723 		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1724 			   ),
1725 
1726 	    TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1727 		      __entry->peer,
1728 		      __entry->ee.ee_origin,
1729 		      __entry->ee.ee_type,
1730 		      __entry->ee.ee_code,
1731 		      __entry->ee.ee_info,
1732 		      __entry->ee.ee_data,
1733 		      __entry->ee.ee_errno,
1734 		      &__entry->srx.transport)
1735 	    );
1736 
1737 TRACE_EVENT(rxrpc_tx_fail,
1738 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1739 		     enum rxrpc_tx_point where),
1740 
1741 	    TP_ARGS(debug_id, serial, ret, where),
1742 
1743 	    TP_STRUCT__entry(
1744 		    __field(unsigned int,		debug_id)
1745 		    __field(rxrpc_serial_t,		serial)
1746 		    __field(int,			ret)
1747 		    __field(enum rxrpc_tx_point,	where)
1748 			     ),
1749 
1750 	    TP_fast_assign(
1751 		    __entry->debug_id = debug_id;
1752 		    __entry->serial = serial;
1753 		    __entry->ret = ret;
1754 		    __entry->where = where;
1755 			   ),
1756 
1757 	    TP_printk("c=%08x r=%x ret=%d %s",
1758 		      __entry->debug_id,
1759 		      __entry->serial,
1760 		      __entry->ret,
1761 		      __print_symbolic(__entry->where, rxrpc_tx_points))
1762 	    );
1763 
1764 TRACE_EVENT(rxrpc_call_reset,
1765 	    TP_PROTO(struct rxrpc_call *call),
1766 
1767 	    TP_ARGS(call),
1768 
1769 	    TP_STRUCT__entry(
1770 		    __field(unsigned int,	debug_id)
1771 		    __field(u32,		cid)
1772 		    __field(u32,		call_id)
1773 		    __field(rxrpc_serial_t,	call_serial)
1774 		    __field(rxrpc_serial_t,	conn_serial)
1775 		    __field(rxrpc_seq_t,	tx_seq)
1776 		    __field(rxrpc_seq_t,	rx_seq)
1777 			     ),
1778 
1779 	    TP_fast_assign(
1780 		    __entry->debug_id = call->debug_id;
1781 		    __entry->cid = call->cid;
1782 		    __entry->call_id = call->call_id;
1783 		    __entry->call_serial = call->rx_serial;
1784 		    __entry->conn_serial = call->conn->hi_serial;
1785 		    __entry->tx_seq = call->acks_hard_ack;
1786 		    __entry->rx_seq = call->rx_highest_seq;
1787 			   ),
1788 
1789 	    TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1790 		      __entry->debug_id,
1791 		      __entry->cid, __entry->call_id,
1792 		      __entry->call_serial, __entry->conn_serial,
1793 		      __entry->tx_seq, __entry->rx_seq)
1794 	    );
1795 
1796 TRACE_EVENT(rxrpc_notify_socket,
1797 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1798 
1799 	    TP_ARGS(debug_id, serial),
1800 
1801 	    TP_STRUCT__entry(
1802 		    __field(unsigned int,	debug_id)
1803 		    __field(rxrpc_serial_t,	serial)
1804 			     ),
1805 
1806 	    TP_fast_assign(
1807 		    __entry->debug_id = debug_id;
1808 		    __entry->serial = serial;
1809 			   ),
1810 
1811 	    TP_printk("c=%08x r=%08x",
1812 		      __entry->debug_id,
1813 		      __entry->serial)
1814 	    );
1815 
1816 TRACE_EVENT(rxrpc_rx_discard_ack,
1817 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1818 		     rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1819 		     rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1820 
1821 	    TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1822 		    prev_pkt, call_ackr_prev),
1823 
1824 	    TP_STRUCT__entry(
1825 		    __field(unsigned int,	debug_id)
1826 		    __field(rxrpc_serial_t,	serial)
1827 		    __field(rxrpc_seq_t,	first_soft_ack)
1828 		    __field(rxrpc_seq_t,	call_ackr_first)
1829 		    __field(rxrpc_seq_t,	prev_pkt)
1830 		    __field(rxrpc_seq_t,	call_ackr_prev)
1831 			     ),
1832 
1833 	    TP_fast_assign(
1834 		    __entry->debug_id		= debug_id;
1835 		    __entry->serial		= serial;
1836 		    __entry->first_soft_ack	= first_soft_ack;
1837 		    __entry->call_ackr_first	= call_ackr_first;
1838 		    __entry->prev_pkt		= prev_pkt;
1839 		    __entry->call_ackr_prev	= call_ackr_prev;
1840 			   ),
1841 
1842 	    TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1843 		      __entry->debug_id,
1844 		      __entry->serial,
1845 		      __entry->first_soft_ack,
1846 		      __entry->call_ackr_first,
1847 		      __entry->prev_pkt,
1848 		      __entry->call_ackr_prev)
1849 	    );
1850 
1851 TRACE_EVENT(rxrpc_req_ack,
1852 	    TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1853 		     enum rxrpc_req_ack_trace why),
1854 
1855 	    TP_ARGS(call_debug_id, seq, why),
1856 
1857 	    TP_STRUCT__entry(
1858 		    __field(unsigned int,		call_debug_id)
1859 		    __field(rxrpc_seq_t,		seq)
1860 		    __field(enum rxrpc_req_ack_trace,	why)
1861 			     ),
1862 
1863 	    TP_fast_assign(
1864 		    __entry->call_debug_id = call_debug_id;
1865 		    __entry->seq = seq;
1866 		    __entry->why = why;
1867 			   ),
1868 
1869 	    TP_printk("c=%08x q=%08x REQ-%s",
1870 		      __entry->call_debug_id,
1871 		      __entry->seq,
1872 		      __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1873 	    );
1874 
1875 TRACE_EVENT(rxrpc_txbuf,
1876 	    TP_PROTO(unsigned int debug_id,
1877 		     unsigned int call_debug_id, rxrpc_seq_t seq,
1878 		     int ref, enum rxrpc_txbuf_trace what),
1879 
1880 	    TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1881 
1882 	    TP_STRUCT__entry(
1883 		    __field(unsigned int,		debug_id)
1884 		    __field(unsigned int,		call_debug_id)
1885 		    __field(rxrpc_seq_t,		seq)
1886 		    __field(int,			ref)
1887 		    __field(enum rxrpc_txbuf_trace,	what)
1888 			     ),
1889 
1890 	    TP_fast_assign(
1891 		    __entry->debug_id = debug_id;
1892 		    __entry->call_debug_id = call_debug_id;
1893 		    __entry->seq = seq;
1894 		    __entry->ref = ref;
1895 		    __entry->what = what;
1896 			   ),
1897 
1898 	    TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1899 		      __entry->debug_id,
1900 		      __entry->call_debug_id,
1901 		      __entry->seq,
1902 		      __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1903 		      __entry->ref)
1904 	    );
1905 
1906 TRACE_EVENT(rxrpc_poke_call,
1907 	    TP_PROTO(struct rxrpc_call *call, bool busy,
1908 		     enum rxrpc_call_poke_trace what),
1909 
1910 	    TP_ARGS(call, busy, what),
1911 
1912 	    TP_STRUCT__entry(
1913 		    __field(unsigned int,		call_debug_id)
1914 		    __field(bool,			busy)
1915 		    __field(enum rxrpc_call_poke_trace,	what)
1916 			     ),
1917 
1918 	    TP_fast_assign(
1919 		    __entry->call_debug_id = call->debug_id;
1920 		    __entry->busy = busy;
1921 		    __entry->what = what;
1922 			   ),
1923 
1924 	    TP_printk("c=%08x %s%s",
1925 		      __entry->call_debug_id,
1926 		      __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1927 		      __entry->busy ? "!" : "")
1928 	    );
1929 
1930 TRACE_EVENT(rxrpc_call_poked,
1931 	    TP_PROTO(struct rxrpc_call *call),
1932 
1933 	    TP_ARGS(call),
1934 
1935 	    TP_STRUCT__entry(
1936 		    __field(unsigned int,	call_debug_id)
1937 			     ),
1938 
1939 	    TP_fast_assign(
1940 		    __entry->call_debug_id = call->debug_id;
1941 			   ),
1942 
1943 	    TP_printk("c=%08x",
1944 		      __entry->call_debug_id)
1945 	    );
1946 
1947 TRACE_EVENT(rxrpc_sack,
1948 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1949 		     unsigned int sack, enum rxrpc_sack_trace what),
1950 
1951 	    TP_ARGS(call, seq, sack, what),
1952 
1953 	    TP_STRUCT__entry(
1954 		    __field(unsigned int,		call_debug_id)
1955 		    __field(rxrpc_seq_t,		seq)
1956 		    __field(unsigned int,		sack)
1957 		    __field(enum rxrpc_sack_trace,	what)
1958 			     ),
1959 
1960 	    TP_fast_assign(
1961 		    __entry->call_debug_id = call->debug_id;
1962 		    __entry->seq = seq;
1963 		    __entry->sack = sack;
1964 		    __entry->what = what;
1965 			   ),
1966 
1967 	    TP_printk("c=%08x q=%08x %s k=%x",
1968 		      __entry->call_debug_id,
1969 		      __entry->seq,
1970 		      __print_symbolic(__entry->what, rxrpc_sack_traces),
1971 		      __entry->sack)
1972 	    );
1973 
1974 #undef EM
1975 #undef E_
1976 
1977 #endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */
1978 #endif /* _TRACE_RXRPC_H */
1979 
1980 /* This part must be outside protection */
1981 #include <trace/define_trace.h>
1982