xref: /openbmc/linux/include/trace/events/rxrpc.h (revision 7fc96d71)
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_skb_traces \
20 	EM(rxrpc_skb_cleaned,			"CLN") \
21 	EM(rxrpc_skb_freed,			"FRE") \
22 	EM(rxrpc_skb_got,			"GOT") \
23 	EM(rxrpc_skb_lost,			"*L*") \
24 	EM(rxrpc_skb_new,			"NEW") \
25 	EM(rxrpc_skb_purged,			"PUR") \
26 	EM(rxrpc_skb_received,			"RCV") \
27 	EM(rxrpc_skb_rotated,			"ROT") \
28 	EM(rxrpc_skb_seen,			"SEE") \
29 	EM(rxrpc_skb_unshared,			"UNS") \
30 	E_(rxrpc_skb_unshared_nomem,		"US0")
31 
32 #define rxrpc_local_traces \
33 	EM(rxrpc_local_got,			"GOT") \
34 	EM(rxrpc_local_new,			"NEW") \
35 	EM(rxrpc_local_processing,		"PRO") \
36 	EM(rxrpc_local_put,			"PUT") \
37 	E_(rxrpc_local_queued,			"QUE")
38 
39 #define rxrpc_peer_traces \
40 	EM(rxrpc_peer_got,			"GOT") \
41 	EM(rxrpc_peer_new,			"NEW") \
42 	EM(rxrpc_peer_processing,		"PRO") \
43 	E_(rxrpc_peer_put,			"PUT")
44 
45 #define rxrpc_conn_traces \
46 	EM(rxrpc_conn_got,			"GOT") \
47 	EM(rxrpc_conn_new_client,		"NWc") \
48 	EM(rxrpc_conn_new_service,		"NWs") \
49 	EM(rxrpc_conn_put_client,		"PTc") \
50 	EM(rxrpc_conn_put_service,		"PTs") \
51 	EM(rxrpc_conn_queued,			"QUE") \
52 	EM(rxrpc_conn_reap_service,		"RPs") \
53 	E_(rxrpc_conn_seen,			"SEE")
54 
55 #define rxrpc_client_traces \
56 	EM(rxrpc_client_activate_chans,		"Activa") \
57 	EM(rxrpc_client_alloc,			"Alloc ") \
58 	EM(rxrpc_client_chan_activate,		"ChActv") \
59 	EM(rxrpc_client_chan_disconnect,	"ChDisc") \
60 	EM(rxrpc_client_chan_pass,		"ChPass") \
61 	EM(rxrpc_client_chan_wait_failed,	"ChWtFl") \
62 	EM(rxrpc_client_cleanup,		"Clean ") \
63 	EM(rxrpc_client_discard,		"Discar") \
64 	EM(rxrpc_client_duplicate,		"Duplic") \
65 	EM(rxrpc_client_exposed,		"Expose") \
66 	EM(rxrpc_client_replace,		"Replac") \
67 	EM(rxrpc_client_to_active,		"->Actv") \
68 	E_(rxrpc_client_to_idle,		"->Idle")
69 
70 #define rxrpc_call_traces \
71 	EM(rxrpc_call_connected,		"CON") \
72 	EM(rxrpc_call_error,			"*E*") \
73 	EM(rxrpc_call_got,			"GOT") \
74 	EM(rxrpc_call_got_kernel,		"Gke") \
75 	EM(rxrpc_call_got_timer,		"GTM") \
76 	EM(rxrpc_call_got_userid,		"Gus") \
77 	EM(rxrpc_call_new_client,		"NWc") \
78 	EM(rxrpc_call_new_service,		"NWs") \
79 	EM(rxrpc_call_put,			"PUT") \
80 	EM(rxrpc_call_put_kernel,		"Pke") \
81 	EM(rxrpc_call_put_noqueue,		"PnQ") \
82 	EM(rxrpc_call_put_notimer,		"PnT") \
83 	EM(rxrpc_call_put_timer,		"PTM") \
84 	EM(rxrpc_call_put_userid,		"Pus") \
85 	EM(rxrpc_call_queued,			"QUE") \
86 	EM(rxrpc_call_queued_ref,		"QUR") \
87 	EM(rxrpc_call_release,			"RLS") \
88 	E_(rxrpc_call_seen,			"SEE")
89 
90 #define rxrpc_transmit_traces \
91 	EM(rxrpc_transmit_await_reply,		"AWR") \
92 	EM(rxrpc_transmit_end,			"END") \
93 	EM(rxrpc_transmit_queue,		"QUE") \
94 	EM(rxrpc_transmit_queue_last,		"QLS") \
95 	EM(rxrpc_transmit_rotate,		"ROT") \
96 	EM(rxrpc_transmit_rotate_last,		"RLS") \
97 	E_(rxrpc_transmit_wait,			"WAI")
98 
99 #define rxrpc_receive_traces \
100 	EM(rxrpc_receive_end,			"END") \
101 	EM(rxrpc_receive_front,			"FRN") \
102 	EM(rxrpc_receive_incoming,		"INC") \
103 	EM(rxrpc_receive_queue,			"QUE") \
104 	EM(rxrpc_receive_queue_last,		"QLS") \
105 	E_(rxrpc_receive_rotate,		"ROT")
106 
107 #define rxrpc_recvmsg_traces \
108 	EM(rxrpc_recvmsg_cont,			"CONT") \
109 	EM(rxrpc_recvmsg_data_return,		"DATA") \
110 	EM(rxrpc_recvmsg_dequeue,		"DEQU") \
111 	EM(rxrpc_recvmsg_enter,			"ENTR") \
112 	EM(rxrpc_recvmsg_full,			"FULL") \
113 	EM(rxrpc_recvmsg_hole,			"HOLE") \
114 	EM(rxrpc_recvmsg_next,			"NEXT") \
115 	EM(rxrpc_recvmsg_requeue,		"REQU") \
116 	EM(rxrpc_recvmsg_return,		"RETN") \
117 	EM(rxrpc_recvmsg_terminal,		"TERM") \
118 	EM(rxrpc_recvmsg_to_be_accepted,	"TBAC") \
119 	E_(rxrpc_recvmsg_wait,			"WAIT")
120 
121 #define rxrpc_rtt_tx_traces \
122 	EM(rxrpc_rtt_tx_cancel,			"CNCE") \
123 	EM(rxrpc_rtt_tx_data,			"DATA") \
124 	EM(rxrpc_rtt_tx_no_slot,		"FULL") \
125 	E_(rxrpc_rtt_tx_ping,			"PING")
126 
127 #define rxrpc_rtt_rx_traces \
128 	EM(rxrpc_rtt_rx_cancel,			"CNCL") \
129 	EM(rxrpc_rtt_rx_obsolete,		"OBSL") \
130 	EM(rxrpc_rtt_rx_lost,			"LOST") \
131 	EM(rxrpc_rtt_rx_ping_response,		"PONG") \
132 	E_(rxrpc_rtt_rx_requested_ack,		"RACK")
133 
134 #define rxrpc_timer_traces \
135 	EM(rxrpc_timer_begin,			"Begin ") \
136 	EM(rxrpc_timer_expired,			"*EXPR*") \
137 	EM(rxrpc_timer_exp_ack,			"ExpAck") \
138 	EM(rxrpc_timer_exp_hard,		"ExpHrd") \
139 	EM(rxrpc_timer_exp_idle,		"ExpIdl") \
140 	EM(rxrpc_timer_exp_keepalive,		"ExpKA ") \
141 	EM(rxrpc_timer_exp_lost_ack,		"ExpLoA") \
142 	EM(rxrpc_timer_exp_normal,		"ExpNml") \
143 	EM(rxrpc_timer_exp_ping,		"ExpPng") \
144 	EM(rxrpc_timer_exp_resend,		"ExpRsn") \
145 	EM(rxrpc_timer_init_for_reply,		"IniRpl") \
146 	EM(rxrpc_timer_init_for_send_reply,	"SndRpl") \
147 	EM(rxrpc_timer_restart,			"Restrt") \
148 	EM(rxrpc_timer_set_for_ack,		"SetAck") \
149 	EM(rxrpc_timer_set_for_hard,		"SetHrd") \
150 	EM(rxrpc_timer_set_for_idle,		"SetIdl") \
151 	EM(rxrpc_timer_set_for_keepalive,	"KeepAl") \
152 	EM(rxrpc_timer_set_for_lost_ack,	"SetLoA") \
153 	EM(rxrpc_timer_set_for_normal,		"SetNml") \
154 	EM(rxrpc_timer_set_for_ping,		"SetPng") \
155 	EM(rxrpc_timer_set_for_resend,		"SetRTx") \
156 	E_(rxrpc_timer_set_for_send,		"SetSnd")
157 
158 #define rxrpc_propose_ack_traces \
159 	EM(rxrpc_propose_ack_client_tx_end,	"ClTxEnd") \
160 	EM(rxrpc_propose_ack_input_data,	"DataIn ") \
161 	EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
162 	EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
163 	EM(rxrpc_propose_ack_ping_for_lost_ack,	"LostAck") \
164 	EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
165 	EM(rxrpc_propose_ack_ping_for_params,	"Params ") \
166 	EM(rxrpc_propose_ack_processing_op,	"ProcOp ") \
167 	EM(rxrpc_propose_ack_respond_to_ack,	"Rsp2Ack") \
168 	EM(rxrpc_propose_ack_respond_to_ping,	"Rsp2Png") \
169 	EM(rxrpc_propose_ack_retry_tx,		"RetryTx") \
170 	EM(rxrpc_propose_ack_rotate_rx,		"RxAck  ") \
171 	E_(rxrpc_propose_ack_terminal_ack,	"ClTerm ")
172 
173 #define rxrpc_propose_ack_outcomes \
174 	EM(rxrpc_propose_ack_subsume,		" Subsume") \
175 	EM(rxrpc_propose_ack_update,		" Update") \
176 	E_(rxrpc_propose_ack_use,		" New")
177 
178 #define rxrpc_congest_modes \
179 	EM(RXRPC_CALL_CONGEST_AVOIDANCE,	"CongAvoid") \
180 	EM(RXRPC_CALL_FAST_RETRANSMIT,		"FastReTx ") \
181 	EM(RXRPC_CALL_PACKET_LOSS,		"PktLoss  ") \
182 	E_(RXRPC_CALL_SLOW_START,		"SlowStart")
183 
184 #define rxrpc_congest_changes \
185 	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
186 	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
187 	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
188 	EM(rxrpc_cong_no_change,		" -") \
189 	EM(rxrpc_cong_progress,			" Progres") \
190 	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
191 	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \
192 	E_(rxrpc_cong_saw_nack,			" SawNack")
193 
194 #define rxrpc_pkts \
195 	EM(0,					"?00") \
196 	EM(RXRPC_PACKET_TYPE_DATA,		"DATA") \
197 	EM(RXRPC_PACKET_TYPE_ACK,		"ACK") \
198 	EM(RXRPC_PACKET_TYPE_BUSY,		"BUSY") \
199 	EM(RXRPC_PACKET_TYPE_ABORT,		"ABORT") \
200 	EM(RXRPC_PACKET_TYPE_ACKALL,		"ACKALL") \
201 	EM(RXRPC_PACKET_TYPE_CHALLENGE,		"CHALL") \
202 	EM(RXRPC_PACKET_TYPE_RESPONSE,		"RESP") \
203 	EM(RXRPC_PACKET_TYPE_DEBUG,		"DEBUG") \
204 	EM(9,					"?09") \
205 	EM(10,					"?10") \
206 	EM(11,					"?11") \
207 	EM(12,					"?12") \
208 	EM(RXRPC_PACKET_TYPE_VERSION,		"VERSION") \
209 	EM(14,					"?14") \
210 	E_(15,					"?15")
211 
212 #define rxrpc_ack_names \
213 	EM(0,					"-0-") \
214 	EM(RXRPC_ACK_REQUESTED,			"REQ") \
215 	EM(RXRPC_ACK_DUPLICATE,			"DUP") \
216 	EM(RXRPC_ACK_OUT_OF_SEQUENCE,		"OOS") \
217 	EM(RXRPC_ACK_EXCEEDS_WINDOW,		"WIN") \
218 	EM(RXRPC_ACK_NOSPACE,			"MEM") \
219 	EM(RXRPC_ACK_PING,			"PNG") \
220 	EM(RXRPC_ACK_PING_RESPONSE,		"PNR") \
221 	EM(RXRPC_ACK_DELAY,			"DLY") \
222 	EM(RXRPC_ACK_IDLE,			"IDL") \
223 	E_(RXRPC_ACK__INVALID,			"-?-")
224 
225 #define rxrpc_completions \
226 	EM(RXRPC_CALL_SUCCEEDED,		"Succeeded") \
227 	EM(RXRPC_CALL_REMOTELY_ABORTED,		"RemoteAbort") \
228 	EM(RXRPC_CALL_LOCALLY_ABORTED,		"LocalAbort") \
229 	EM(RXRPC_CALL_LOCAL_ERROR,		"LocalError") \
230 	E_(RXRPC_CALL_NETWORK_ERROR,		"NetError")
231 
232 #define rxrpc_tx_points \
233 	EM(rxrpc_tx_point_call_abort,		"CallAbort") \
234 	EM(rxrpc_tx_point_call_ack,		"CallAck") \
235 	EM(rxrpc_tx_point_call_data_frag,	"CallDataFrag") \
236 	EM(rxrpc_tx_point_call_data_nofrag,	"CallDataNofrag") \
237 	EM(rxrpc_tx_point_call_final_resend,	"CallFinalResend") \
238 	EM(rxrpc_tx_point_conn_abort,		"ConnAbort") \
239 	EM(rxrpc_tx_point_reject,		"Reject") \
240 	EM(rxrpc_tx_point_rxkad_challenge,	"RxkadChall") \
241 	EM(rxrpc_tx_point_rxkad_response,	"RxkadResp") \
242 	EM(rxrpc_tx_point_version_keepalive,	"VerKeepalive") \
243 	E_(rxrpc_tx_point_version_reply,	"VerReply")
244 
245 /*
246  * Generate enums for tracing information.
247  */
248 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
249 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
250 
251 #undef EM
252 #undef E_
253 #define EM(a, b) a,
254 #define E_(a, b) a
255 
256 enum rxrpc_call_trace		{ rxrpc_call_traces } __mode(byte);
257 enum rxrpc_client_trace		{ rxrpc_client_traces } __mode(byte);
258 enum rxrpc_congest_change	{ rxrpc_congest_changes } __mode(byte);
259 enum rxrpc_conn_trace		{ rxrpc_conn_traces } __mode(byte);
260 enum rxrpc_local_trace		{ rxrpc_local_traces } __mode(byte);
261 enum rxrpc_peer_trace		{ rxrpc_peer_traces } __mode(byte);
262 enum rxrpc_propose_ack_outcome	{ rxrpc_propose_ack_outcomes } __mode(byte);
263 enum rxrpc_propose_ack_trace	{ rxrpc_propose_ack_traces } __mode(byte);
264 enum rxrpc_receive_trace	{ rxrpc_receive_traces } __mode(byte);
265 enum rxrpc_recvmsg_trace	{ rxrpc_recvmsg_traces } __mode(byte);
266 enum rxrpc_rtt_rx_trace		{ rxrpc_rtt_rx_traces } __mode(byte);
267 enum rxrpc_rtt_tx_trace		{ rxrpc_rtt_tx_traces } __mode(byte);
268 enum rxrpc_skb_trace		{ rxrpc_skb_traces } __mode(byte);
269 enum rxrpc_timer_trace		{ rxrpc_timer_traces } __mode(byte);
270 enum rxrpc_transmit_trace	{ rxrpc_transmit_traces } __mode(byte);
271 enum rxrpc_tx_point		{ rxrpc_tx_points } __mode(byte);
272 
273 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
274 
275 /*
276  * Export enum symbols via userspace.
277  */
278 #undef EM
279 #undef E_
280 #define EM(a, b) TRACE_DEFINE_ENUM(a);
281 #define E_(a, b) TRACE_DEFINE_ENUM(a);
282 
283 rxrpc_call_traces;
284 rxrpc_client_traces;
285 rxrpc_congest_changes;
286 rxrpc_congest_modes;
287 rxrpc_conn_traces;
288 rxrpc_local_traces;
289 rxrpc_propose_ack_outcomes;
290 rxrpc_propose_ack_traces;
291 rxrpc_receive_traces;
292 rxrpc_recvmsg_traces;
293 rxrpc_rtt_rx_traces;
294 rxrpc_rtt_tx_traces;
295 rxrpc_skb_traces;
296 rxrpc_timer_traces;
297 rxrpc_transmit_traces;
298 rxrpc_tx_points;
299 
300 /*
301  * Now redefine the EM() and E_() macros to map the enums to the strings that
302  * will be printed in the output.
303  */
304 #undef EM
305 #undef E_
306 #define EM(a, b)	{ a, b },
307 #define E_(a, b)	{ a, b }
308 
309 TRACE_EVENT(rxrpc_local,
310 	    TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
311 		     int usage, const void *where),
312 
313 	    TP_ARGS(local_debug_id, op, usage, where),
314 
315 	    TP_STRUCT__entry(
316 		    __field(unsigned int,	local		)
317 		    __field(int,		op		)
318 		    __field(int,		usage		)
319 		    __field(const void *,	where		)
320 			     ),
321 
322 	    TP_fast_assign(
323 		    __entry->local = local_debug_id;
324 		    __entry->op = op;
325 		    __entry->usage = usage;
326 		    __entry->where = where;
327 			   ),
328 
329 	    TP_printk("L=%08x %s u=%d sp=%pSR",
330 		      __entry->local,
331 		      __print_symbolic(__entry->op, rxrpc_local_traces),
332 		      __entry->usage,
333 		      __entry->where)
334 	    );
335 
336 TRACE_EVENT(rxrpc_peer,
337 	    TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op,
338 		     int usage, const void *where),
339 
340 	    TP_ARGS(peer_debug_id, op, usage, where),
341 
342 	    TP_STRUCT__entry(
343 		    __field(unsigned int,	peer		)
344 		    __field(int,		op		)
345 		    __field(int,		usage		)
346 		    __field(const void *,	where		)
347 			     ),
348 
349 	    TP_fast_assign(
350 		    __entry->peer = peer_debug_id;
351 		    __entry->op = op;
352 		    __entry->usage = usage;
353 		    __entry->where = where;
354 			   ),
355 
356 	    TP_printk("P=%08x %s u=%d sp=%pSR",
357 		      __entry->peer,
358 		      __print_symbolic(__entry->op, rxrpc_peer_traces),
359 		      __entry->usage,
360 		      __entry->where)
361 	    );
362 
363 TRACE_EVENT(rxrpc_conn,
364 	    TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op,
365 		     int usage, const void *where),
366 
367 	    TP_ARGS(conn_debug_id, op, usage, where),
368 
369 	    TP_STRUCT__entry(
370 		    __field(unsigned int,	conn		)
371 		    __field(int,		op		)
372 		    __field(int,		usage		)
373 		    __field(const void *,	where		)
374 			     ),
375 
376 	    TP_fast_assign(
377 		    __entry->conn = conn_debug_id;
378 		    __entry->op = op;
379 		    __entry->usage = usage;
380 		    __entry->where = where;
381 			   ),
382 
383 	    TP_printk("C=%08x %s u=%d sp=%pSR",
384 		      __entry->conn,
385 		      __print_symbolic(__entry->op, rxrpc_conn_traces),
386 		      __entry->usage,
387 		      __entry->where)
388 	    );
389 
390 TRACE_EVENT(rxrpc_client,
391 	    TP_PROTO(struct rxrpc_connection *conn, int channel,
392 		     enum rxrpc_client_trace op),
393 
394 	    TP_ARGS(conn, channel, op),
395 
396 	    TP_STRUCT__entry(
397 		    __field(unsigned int,		conn		)
398 		    __field(u32,			cid		)
399 		    __field(int,			channel		)
400 		    __field(int,			usage		)
401 		    __field(enum rxrpc_client_trace,	op		)
402 			     ),
403 
404 	    TP_fast_assign(
405 		    __entry->conn = conn ? conn->debug_id : 0;
406 		    __entry->channel = channel;
407 		    __entry->usage = conn ? refcount_read(&conn->ref) : -2;
408 		    __entry->op = op;
409 		    __entry->cid = conn ? conn->proto.cid : 0;
410 			   ),
411 
412 	    TP_printk("C=%08x h=%2d %s i=%08x u=%d",
413 		      __entry->conn,
414 		      __entry->channel,
415 		      __print_symbolic(__entry->op, rxrpc_client_traces),
416 		      __entry->cid,
417 		      __entry->usage)
418 	    );
419 
420 TRACE_EVENT(rxrpc_call,
421 	    TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
422 		     int usage, const void *where, const void *aux),
423 
424 	    TP_ARGS(call_debug_id, op, usage, where, aux),
425 
426 	    TP_STRUCT__entry(
427 		    __field(unsigned int,		call		)
428 		    __field(int,			op		)
429 		    __field(int,			usage		)
430 		    __field(const void *,		where		)
431 		    __field(const void *,		aux		)
432 			     ),
433 
434 	    TP_fast_assign(
435 		    __entry->call = call_debug_id;
436 		    __entry->op = op;
437 		    __entry->usage = usage;
438 		    __entry->where = where;
439 		    __entry->aux = aux;
440 			   ),
441 
442 	    TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
443 		      __entry->call,
444 		      __print_symbolic(__entry->op, rxrpc_call_traces),
445 		      __entry->usage,
446 		      __entry->where,
447 		      __entry->aux)
448 	    );
449 
450 TRACE_EVENT(rxrpc_skb,
451 	    TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
452 		     int usage, int mod_count, u8 flags,    const void *where),
453 
454 	    TP_ARGS(skb, op, usage, mod_count, flags, where),
455 
456 	    TP_STRUCT__entry(
457 		    __field(struct sk_buff *,		skb		)
458 		    __field(enum rxrpc_skb_trace,	op		)
459 		    __field(u8,				flags		)
460 		    __field(int,			usage		)
461 		    __field(int,			mod_count	)
462 		    __field(const void *,		where		)
463 			     ),
464 
465 	    TP_fast_assign(
466 		    __entry->skb = skb;
467 		    __entry->flags = flags;
468 		    __entry->op = op;
469 		    __entry->usage = usage;
470 		    __entry->mod_count = mod_count;
471 		    __entry->where = where;
472 			   ),
473 
474 	    TP_printk("s=%p %cx %s u=%d m=%d p=%pSR",
475 		      __entry->skb,
476 		      __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R',
477 		      __print_symbolic(__entry->op, rxrpc_skb_traces),
478 		      __entry->usage,
479 		      __entry->mod_count,
480 		      __entry->where)
481 	    );
482 
483 TRACE_EVENT(rxrpc_rx_packet,
484 	    TP_PROTO(struct rxrpc_skb_priv *sp),
485 
486 	    TP_ARGS(sp),
487 
488 	    TP_STRUCT__entry(
489 		    __field_struct(struct rxrpc_host_header,	hdr		)
490 			     ),
491 
492 	    TP_fast_assign(
493 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
494 			   ),
495 
496 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
497 		      __entry->hdr.epoch, __entry->hdr.cid,
498 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
499 		      __entry->hdr.serial, __entry->hdr.seq,
500 		      __entry->hdr.type, __entry->hdr.flags,
501 		      __entry->hdr.type <= 15 ?
502 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
503 	    );
504 
505 TRACE_EVENT(rxrpc_rx_done,
506 	    TP_PROTO(int result, int abort_code),
507 
508 	    TP_ARGS(result, abort_code),
509 
510 	    TP_STRUCT__entry(
511 		    __field(int,			result		)
512 		    __field(int,			abort_code	)
513 			     ),
514 
515 	    TP_fast_assign(
516 		    __entry->result = result;
517 		    __entry->abort_code = abort_code;
518 			   ),
519 
520 	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
521 	    );
522 
523 TRACE_EVENT(rxrpc_abort,
524 	    TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
525 		     rxrpc_seq_t seq, int abort_code, int error),
526 
527 	    TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
528 
529 	    TP_STRUCT__entry(
530 		    __field(unsigned int,		call_nr		)
531 		    __array(char,			why, 4		)
532 		    __field(u32,			cid		)
533 		    __field(u32,			call_id		)
534 		    __field(rxrpc_seq_t,		seq		)
535 		    __field(int,			abort_code	)
536 		    __field(int,			error		)
537 			     ),
538 
539 	    TP_fast_assign(
540 		    memcpy(__entry->why, why, 4);
541 		    __entry->call_nr = call_nr;
542 		    __entry->cid = cid;
543 		    __entry->call_id = call_id;
544 		    __entry->abort_code = abort_code;
545 		    __entry->error = error;
546 		    __entry->seq = seq;
547 			   ),
548 
549 	    TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
550 		      __entry->call_nr,
551 		      __entry->cid, __entry->call_id, __entry->seq,
552 		      __entry->abort_code, __entry->error, __entry->why)
553 	    );
554 
555 TRACE_EVENT(rxrpc_call_complete,
556 	    TP_PROTO(struct rxrpc_call *call),
557 
558 	    TP_ARGS(call),
559 
560 	    TP_STRUCT__entry(
561 		    __field(unsigned int,		call		)
562 		    __field(enum rxrpc_call_completion,	compl		)
563 		    __field(int,			error		)
564 		    __field(u32,			abort_code	)
565 			     ),
566 
567 	    TP_fast_assign(
568 		    __entry->call = call->debug_id;
569 		    __entry->compl = call->completion;
570 		    __entry->error = call->error;
571 		    __entry->abort_code = call->abort_code;
572 			   ),
573 
574 	    TP_printk("c=%08x %s r=%d ac=%d",
575 		      __entry->call,
576 		      __print_symbolic(__entry->compl, rxrpc_completions),
577 		      __entry->error,
578 		      __entry->abort_code)
579 	    );
580 
581 TRACE_EVENT(rxrpc_transmit,
582 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
583 
584 	    TP_ARGS(call, why),
585 
586 	    TP_STRUCT__entry(
587 		    __field(unsigned int,		call		)
588 		    __field(enum rxrpc_transmit_trace,	why		)
589 		    __field(rxrpc_seq_t,		tx_hard_ack	)
590 		    __field(rxrpc_seq_t,		tx_top		)
591 		    __field(int,			tx_winsize	)
592 			     ),
593 
594 	    TP_fast_assign(
595 		    __entry->call = call->debug_id;
596 		    __entry->why = why;
597 		    __entry->tx_hard_ack = call->tx_hard_ack;
598 		    __entry->tx_top = call->tx_top;
599 		    __entry->tx_winsize = call->tx_winsize;
600 			   ),
601 
602 	    TP_printk("c=%08x %s f=%08x n=%u/%u",
603 		      __entry->call,
604 		      __print_symbolic(__entry->why, rxrpc_transmit_traces),
605 		      __entry->tx_hard_ack + 1,
606 		      __entry->tx_top - __entry->tx_hard_ack,
607 		      __entry->tx_winsize)
608 	    );
609 
610 TRACE_EVENT(rxrpc_rx_data,
611 	    TP_PROTO(unsigned int call, rxrpc_seq_t seq,
612 		     rxrpc_serial_t serial, u8 flags, u8 anno),
613 
614 	    TP_ARGS(call, seq, serial, flags, anno),
615 
616 	    TP_STRUCT__entry(
617 		    __field(unsigned int,		call		)
618 		    __field(rxrpc_seq_t,		seq		)
619 		    __field(rxrpc_serial_t,		serial		)
620 		    __field(u8,				flags		)
621 		    __field(u8,				anno		)
622 			     ),
623 
624 	    TP_fast_assign(
625 		    __entry->call = call;
626 		    __entry->seq = seq;
627 		    __entry->serial = serial;
628 		    __entry->flags = flags;
629 		    __entry->anno = anno;
630 			   ),
631 
632 	    TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x",
633 		      __entry->call,
634 		      __entry->serial,
635 		      __entry->seq,
636 		      __entry->flags,
637 		      __entry->anno)
638 	    );
639 
640 TRACE_EVENT(rxrpc_rx_ack,
641 	    TP_PROTO(struct rxrpc_call *call,
642 		     rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
643 		     rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
644 
645 	    TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
646 
647 	    TP_STRUCT__entry(
648 		    __field(unsigned int,		call		)
649 		    __field(rxrpc_serial_t,		serial		)
650 		    __field(rxrpc_serial_t,		ack_serial	)
651 		    __field(rxrpc_seq_t,		first		)
652 		    __field(rxrpc_seq_t,		prev		)
653 		    __field(u8,				reason		)
654 		    __field(u8,				n_acks		)
655 			     ),
656 
657 	    TP_fast_assign(
658 		    __entry->call = call->debug_id;
659 		    __entry->serial = serial;
660 		    __entry->ack_serial = ack_serial;
661 		    __entry->first = first;
662 		    __entry->prev = prev;
663 		    __entry->reason = reason;
664 		    __entry->n_acks = n_acks;
665 			   ),
666 
667 	    TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
668 		      __entry->call,
669 		      __entry->serial,
670 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
671 		      __entry->ack_serial,
672 		      __entry->first,
673 		      __entry->prev,
674 		      __entry->n_acks)
675 	    );
676 
677 TRACE_EVENT(rxrpc_rx_abort,
678 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
679 		     u32 abort_code),
680 
681 	    TP_ARGS(call, serial, abort_code),
682 
683 	    TP_STRUCT__entry(
684 		    __field(unsigned int,		call		)
685 		    __field(rxrpc_serial_t,		serial		)
686 		    __field(u32,			abort_code	)
687 			     ),
688 
689 	    TP_fast_assign(
690 		    __entry->call = call->debug_id;
691 		    __entry->serial = serial;
692 		    __entry->abort_code = abort_code;
693 			   ),
694 
695 	    TP_printk("c=%08x ABORT %08x ac=%d",
696 		      __entry->call,
697 		      __entry->serial,
698 		      __entry->abort_code)
699 	    );
700 
701 TRACE_EVENT(rxrpc_rx_rwind_change,
702 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
703 		     u32 rwind, bool wake),
704 
705 	    TP_ARGS(call, serial, rwind, wake),
706 
707 	    TP_STRUCT__entry(
708 		    __field(unsigned int,		call		)
709 		    __field(rxrpc_serial_t,		serial		)
710 		    __field(u32,			rwind		)
711 		    __field(bool,			wake		)
712 			     ),
713 
714 	    TP_fast_assign(
715 		    __entry->call = call->debug_id;
716 		    __entry->serial = serial;
717 		    __entry->rwind = rwind;
718 		    __entry->wake = wake;
719 			   ),
720 
721 	    TP_printk("c=%08x %08x rw=%u%s",
722 		      __entry->call,
723 		      __entry->serial,
724 		      __entry->rwind,
725 		      __entry->wake ? " wake" : "")
726 	    );
727 
728 TRACE_EVENT(rxrpc_tx_packet,
729 	    TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
730 		     enum rxrpc_tx_point where),
731 
732 	    TP_ARGS(call_id, whdr, where),
733 
734 	    TP_STRUCT__entry(
735 		    __field(unsigned int,			call	)
736 		    __field(enum rxrpc_tx_point,		where	)
737 		    __field_struct(struct rxrpc_wire_header,	whdr	)
738 			     ),
739 
740 	    TP_fast_assign(
741 		    __entry->call = call_id;
742 		    memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
743 		    __entry->where = where;
744 			   ),
745 
746 	    TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
747 		      __entry->call,
748 		      ntohl(__entry->whdr.epoch),
749 		      ntohl(__entry->whdr.cid),
750 		      ntohl(__entry->whdr.callNumber),
751 		      ntohs(__entry->whdr.serviceId),
752 		      ntohl(__entry->whdr.serial),
753 		      ntohl(__entry->whdr.seq),
754 		      __entry->whdr.type, __entry->whdr.flags,
755 		      __entry->whdr.type <= 15 ?
756 		      __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
757 		      __print_symbolic(__entry->where, rxrpc_tx_points))
758 	    );
759 
760 TRACE_EVENT(rxrpc_tx_data,
761 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
762 		     rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
763 
764 	    TP_ARGS(call, seq, serial, flags, retrans, lose),
765 
766 	    TP_STRUCT__entry(
767 		    __field(unsigned int,		call		)
768 		    __field(rxrpc_seq_t,		seq		)
769 		    __field(rxrpc_serial_t,		serial		)
770 		    __field(u32,			cid		)
771 		    __field(u32,			call_id		)
772 		    __field(u8,				flags		)
773 		    __field(bool,			retrans		)
774 		    __field(bool,			lose		)
775 			     ),
776 
777 	    TP_fast_assign(
778 		    __entry->call = call->debug_id;
779 		    __entry->cid = call->cid;
780 		    __entry->call_id = call->call_id;
781 		    __entry->seq = seq;
782 		    __entry->serial = serial;
783 		    __entry->flags = flags;
784 		    __entry->retrans = retrans;
785 		    __entry->lose = lose;
786 			   ),
787 
788 	    TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
789 		      __entry->call,
790 		      __entry->cid,
791 		      __entry->call_id,
792 		      __entry->serial,
793 		      __entry->seq,
794 		      __entry->flags,
795 		      __entry->retrans ? " *RETRANS*" : "",
796 		      __entry->lose ? " *LOSE*" : "")
797 	    );
798 
799 TRACE_EVENT(rxrpc_tx_ack,
800 	    TP_PROTO(unsigned int call, rxrpc_serial_t serial,
801 		     rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
802 		     u8 reason, u8 n_acks),
803 
804 	    TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
805 
806 	    TP_STRUCT__entry(
807 		    __field(unsigned int,		call		)
808 		    __field(rxrpc_serial_t,		serial		)
809 		    __field(rxrpc_seq_t,		ack_first	)
810 		    __field(rxrpc_serial_t,		ack_serial	)
811 		    __field(u8,				reason		)
812 		    __field(u8,				n_acks		)
813 			     ),
814 
815 	    TP_fast_assign(
816 		    __entry->call = call;
817 		    __entry->serial = serial;
818 		    __entry->ack_first = ack_first;
819 		    __entry->ack_serial = ack_serial;
820 		    __entry->reason = reason;
821 		    __entry->n_acks = n_acks;
822 			   ),
823 
824 	    TP_printk(" c=%08x ACK  %08x %s f=%08x r=%08x n=%u",
825 		      __entry->call,
826 		      __entry->serial,
827 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
828 		      __entry->ack_first,
829 		      __entry->ack_serial,
830 		      __entry->n_acks)
831 	    );
832 
833 TRACE_EVENT(rxrpc_receive,
834 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
835 		     rxrpc_serial_t serial, rxrpc_seq_t seq),
836 
837 	    TP_ARGS(call, why, serial, seq),
838 
839 	    TP_STRUCT__entry(
840 		    __field(unsigned int,		call		)
841 		    __field(enum rxrpc_receive_trace,	why		)
842 		    __field(rxrpc_serial_t,		serial		)
843 		    __field(rxrpc_seq_t,		seq		)
844 		    __field(rxrpc_seq_t,		hard_ack	)
845 		    __field(rxrpc_seq_t,		top		)
846 			     ),
847 
848 	    TP_fast_assign(
849 		    __entry->call = call->debug_id;
850 		    __entry->why = why;
851 		    __entry->serial = serial;
852 		    __entry->seq = seq;
853 		    __entry->hard_ack = call->rx_hard_ack;
854 		    __entry->top = call->rx_top;
855 			   ),
856 
857 	    TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
858 		      __entry->call,
859 		      __print_symbolic(__entry->why, rxrpc_receive_traces),
860 		      __entry->serial,
861 		      __entry->seq,
862 		      __entry->hard_ack,
863 		      __entry->top)
864 	    );
865 
866 TRACE_EVENT(rxrpc_recvmsg,
867 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
868 		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
869 		     int ret),
870 
871 	    TP_ARGS(call, why, seq, offset, len, ret),
872 
873 	    TP_STRUCT__entry(
874 		    __field(unsigned int,		call		)
875 		    __field(enum rxrpc_recvmsg_trace,	why		)
876 		    __field(rxrpc_seq_t,		seq		)
877 		    __field(unsigned int,		offset		)
878 		    __field(unsigned int,		len		)
879 		    __field(int,			ret		)
880 			     ),
881 
882 	    TP_fast_assign(
883 		    __entry->call = call ? call->debug_id : 0;
884 		    __entry->why = why;
885 		    __entry->seq = seq;
886 		    __entry->offset = offset;
887 		    __entry->len = len;
888 		    __entry->ret = ret;
889 			   ),
890 
891 	    TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
892 		      __entry->call,
893 		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
894 		      __entry->seq,
895 		      __entry->offset,
896 		      __entry->len,
897 		      __entry->ret)
898 	    );
899 
900 TRACE_EVENT(rxrpc_rtt_tx,
901 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
902 		     int slot, rxrpc_serial_t send_serial),
903 
904 	    TP_ARGS(call, why, slot, send_serial),
905 
906 	    TP_STRUCT__entry(
907 		    __field(unsigned int,		call		)
908 		    __field(enum rxrpc_rtt_tx_trace,	why		)
909 		    __field(int,			slot		)
910 		    __field(rxrpc_serial_t,		send_serial	)
911 			     ),
912 
913 	    TP_fast_assign(
914 		    __entry->call = call->debug_id;
915 		    __entry->why = why;
916 		    __entry->slot = slot;
917 		    __entry->send_serial = send_serial;
918 			   ),
919 
920 	    TP_printk("c=%08x [%d] %s sr=%08x",
921 		      __entry->call,
922 		      __entry->slot,
923 		      __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
924 		      __entry->send_serial)
925 	    );
926 
927 TRACE_EVENT(rxrpc_rtt_rx,
928 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
929 		     int slot,
930 		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
931 		     u32 rtt, u32 rto),
932 
933 	    TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
934 
935 	    TP_STRUCT__entry(
936 		    __field(unsigned int,		call		)
937 		    __field(enum rxrpc_rtt_rx_trace,	why		)
938 		    __field(int,			slot		)
939 		    __field(rxrpc_serial_t,		send_serial	)
940 		    __field(rxrpc_serial_t,		resp_serial	)
941 		    __field(u32,			rtt		)
942 		    __field(u32,			rto		)
943 			     ),
944 
945 	    TP_fast_assign(
946 		    __entry->call = call->debug_id;
947 		    __entry->why = why;
948 		    __entry->slot = slot;
949 		    __entry->send_serial = send_serial;
950 		    __entry->resp_serial = resp_serial;
951 		    __entry->rtt = rtt;
952 		    __entry->rto = rto;
953 			   ),
954 
955 	    TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
956 		      __entry->call,
957 		      __entry->slot,
958 		      __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
959 		      __entry->send_serial,
960 		      __entry->resp_serial,
961 		      __entry->rtt,
962 		      __entry->rto)
963 	    );
964 
965 TRACE_EVENT(rxrpc_timer,
966 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
967 		     unsigned long now),
968 
969 	    TP_ARGS(call, why, now),
970 
971 	    TP_STRUCT__entry(
972 		    __field(unsigned int,			call		)
973 		    __field(enum rxrpc_timer_trace,		why		)
974 		    __field(long,				now		)
975 		    __field(long,				ack_at		)
976 		    __field(long,				ack_lost_at	)
977 		    __field(long,				resend_at	)
978 		    __field(long,				ping_at		)
979 		    __field(long,				expect_rx_by	)
980 		    __field(long,				expect_req_by	)
981 		    __field(long,				expect_term_by	)
982 		    __field(long,				timer		)
983 			     ),
984 
985 	    TP_fast_assign(
986 		    __entry->call		= call->debug_id;
987 		    __entry->why		= why;
988 		    __entry->now		= now;
989 		    __entry->ack_at		= call->ack_at;
990 		    __entry->ack_lost_at	= call->ack_lost_at;
991 		    __entry->resend_at		= call->resend_at;
992 		    __entry->expect_rx_by	= call->expect_rx_by;
993 		    __entry->expect_req_by	= call->expect_req_by;
994 		    __entry->expect_term_by	= call->expect_term_by;
995 		    __entry->timer		= call->timer.expires;
996 			   ),
997 
998 	    TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
999 		      __entry->call,
1000 		      __print_symbolic(__entry->why, rxrpc_timer_traces),
1001 		      __entry->ack_at - __entry->now,
1002 		      __entry->ack_lost_at - __entry->now,
1003 		      __entry->resend_at - __entry->now,
1004 		      __entry->expect_rx_by - __entry->now,
1005 		      __entry->expect_req_by - __entry->now,
1006 		      __entry->expect_term_by - __entry->now,
1007 		      __entry->timer - __entry->now)
1008 	    );
1009 
1010 TRACE_EVENT(rxrpc_rx_lose,
1011 	    TP_PROTO(struct rxrpc_skb_priv *sp),
1012 
1013 	    TP_ARGS(sp),
1014 
1015 	    TP_STRUCT__entry(
1016 		    __field_struct(struct rxrpc_host_header,	hdr		)
1017 			     ),
1018 
1019 	    TP_fast_assign(
1020 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1021 			   ),
1022 
1023 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1024 		      __entry->hdr.epoch, __entry->hdr.cid,
1025 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
1026 		      __entry->hdr.serial, __entry->hdr.seq,
1027 		      __entry->hdr.type, __entry->hdr.flags,
1028 		      __entry->hdr.type <= 15 ?
1029 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1030 	    );
1031 
1032 TRACE_EVENT(rxrpc_propose_ack,
1033 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1034 		     u8 ack_reason, rxrpc_serial_t serial, bool immediate,
1035 		     bool background, enum rxrpc_propose_ack_outcome outcome),
1036 
1037 	    TP_ARGS(call, why, ack_reason, serial, immediate, background,
1038 		    outcome),
1039 
1040 	    TP_STRUCT__entry(
1041 		    __field(unsigned int,			call		)
1042 		    __field(enum rxrpc_propose_ack_trace,	why		)
1043 		    __field(rxrpc_serial_t,			serial		)
1044 		    __field(u8,					ack_reason	)
1045 		    __field(bool,				immediate	)
1046 		    __field(bool,				background	)
1047 		    __field(enum rxrpc_propose_ack_outcome,	outcome		)
1048 			     ),
1049 
1050 	    TP_fast_assign(
1051 		    __entry->call	= call->debug_id;
1052 		    __entry->why	= why;
1053 		    __entry->serial	= serial;
1054 		    __entry->ack_reason	= ack_reason;
1055 		    __entry->immediate	= immediate;
1056 		    __entry->background	= background;
1057 		    __entry->outcome	= outcome;
1058 			   ),
1059 
1060 	    TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s",
1061 		      __entry->call,
1062 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1063 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1064 		      __entry->serial,
1065 		      __entry->immediate,
1066 		      __entry->background,
1067 		      __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes))
1068 	    );
1069 
1070 TRACE_EVENT(rxrpc_retransmit,
1071 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation,
1072 		     s64 expiry),
1073 
1074 	    TP_ARGS(call, seq, annotation, expiry),
1075 
1076 	    TP_STRUCT__entry(
1077 		    __field(unsigned int,		call		)
1078 		    __field(rxrpc_seq_t,		seq		)
1079 		    __field(u8,				annotation	)
1080 		    __field(s64,			expiry		)
1081 			     ),
1082 
1083 	    TP_fast_assign(
1084 		    __entry->call = call->debug_id;
1085 		    __entry->seq = seq;
1086 		    __entry->annotation = annotation;
1087 		    __entry->expiry = expiry;
1088 			   ),
1089 
1090 	    TP_printk("c=%08x q=%x a=%02x xp=%lld",
1091 		      __entry->call,
1092 		      __entry->seq,
1093 		      __entry->annotation,
1094 		      __entry->expiry)
1095 	    );
1096 
1097 TRACE_EVENT(rxrpc_congest,
1098 	    TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1099 		     rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1100 
1101 	    TP_ARGS(call, summary, ack_serial, change),
1102 
1103 	    TP_STRUCT__entry(
1104 		    __field(unsigned int,			call		)
1105 		    __field(enum rxrpc_congest_change,		change		)
1106 		    __field(rxrpc_seq_t,			hard_ack	)
1107 		    __field(rxrpc_seq_t,			top		)
1108 		    __field(rxrpc_seq_t,			lowest_nak	)
1109 		    __field(rxrpc_serial_t,			ack_serial	)
1110 		    __field_struct(struct rxrpc_ack_summary,	sum		)
1111 			     ),
1112 
1113 	    TP_fast_assign(
1114 		    __entry->call	= call->debug_id;
1115 		    __entry->change	= change;
1116 		    __entry->hard_ack	= call->tx_hard_ack;
1117 		    __entry->top	= call->tx_top;
1118 		    __entry->lowest_nak	= call->acks_lowest_nak;
1119 		    __entry->ack_serial	= ack_serial;
1120 		    memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1121 			   ),
1122 
1123 	    TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s",
1124 		      __entry->call,
1125 		      __entry->ack_serial,
1126 		      __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1127 		      __entry->hard_ack,
1128 		      __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1129 		      __entry->sum.cwnd,
1130 		      __entry->sum.ssthresh,
1131 		      __entry->sum.nr_acks, __entry->sum.nr_nacks,
1132 		      __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks,
1133 		      __entry->sum.nr_rot_new_acks,
1134 		      __entry->top - __entry->hard_ack,
1135 		      __entry->sum.cumulative_acks,
1136 		      __entry->sum.dup_acks,
1137 		      __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1138 		      __print_symbolic(__entry->change, rxrpc_congest_changes),
1139 		      __entry->sum.retrans_timeo ? " rTxTo" : "")
1140 	    );
1141 
1142 TRACE_EVENT(rxrpc_disconnect_call,
1143 	    TP_PROTO(struct rxrpc_call *call),
1144 
1145 	    TP_ARGS(call),
1146 
1147 	    TP_STRUCT__entry(
1148 		    __field(unsigned int,		call		)
1149 		    __field(u32,			abort_code	)
1150 			     ),
1151 
1152 	    TP_fast_assign(
1153 		    __entry->call = call->debug_id;
1154 		    __entry->abort_code = call->abort_code;
1155 			   ),
1156 
1157 	    TP_printk("c=%08x ab=%08x",
1158 		      __entry->call,
1159 		      __entry->abort_code)
1160 	    );
1161 
1162 TRACE_EVENT(rxrpc_improper_term,
1163 	    TP_PROTO(struct rxrpc_call *call),
1164 
1165 	    TP_ARGS(call),
1166 
1167 	    TP_STRUCT__entry(
1168 		    __field(unsigned int,		call		)
1169 		    __field(u32,			abort_code	)
1170 			     ),
1171 
1172 	    TP_fast_assign(
1173 		    __entry->call = call->debug_id;
1174 		    __entry->abort_code = call->abort_code;
1175 			   ),
1176 
1177 	    TP_printk("c=%08x ab=%08x",
1178 		      __entry->call,
1179 		      __entry->abort_code)
1180 	    );
1181 
1182 TRACE_EVENT(rxrpc_rx_eproto,
1183 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1184 		     const char *why),
1185 
1186 	    TP_ARGS(call, serial, why),
1187 
1188 	    TP_STRUCT__entry(
1189 		    __field(unsigned int,		call		)
1190 		    __field(rxrpc_serial_t,		serial		)
1191 		    __field(const char *,		why		)
1192 			     ),
1193 
1194 	    TP_fast_assign(
1195 		    __entry->call = call ? call->debug_id : 0;
1196 		    __entry->serial = serial;
1197 		    __entry->why = why;
1198 			   ),
1199 
1200 	    TP_printk("c=%08x EPROTO %08x %s",
1201 		      __entry->call,
1202 		      __entry->serial,
1203 		      __entry->why)
1204 	    );
1205 
1206 TRACE_EVENT(rxrpc_connect_call,
1207 	    TP_PROTO(struct rxrpc_call *call),
1208 
1209 	    TP_ARGS(call),
1210 
1211 	    TP_STRUCT__entry(
1212 		    __field(unsigned int,		call		)
1213 		    __field(unsigned long,		user_call_ID	)
1214 		    __field(u32,			cid		)
1215 		    __field(u32,			call_id		)
1216 			     ),
1217 
1218 	    TP_fast_assign(
1219 		    __entry->call = call->debug_id;
1220 		    __entry->user_call_ID = call->user_call_ID;
1221 		    __entry->cid = call->cid;
1222 		    __entry->call_id = call->call_id;
1223 			   ),
1224 
1225 	    TP_printk("c=%08x u=%p %08x:%08x",
1226 		      __entry->call,
1227 		      (void *)__entry->user_call_ID,
1228 		      __entry->cid,
1229 		      __entry->call_id)
1230 	    );
1231 
1232 TRACE_EVENT(rxrpc_resend,
1233 	    TP_PROTO(struct rxrpc_call *call, int ix),
1234 
1235 	    TP_ARGS(call, ix),
1236 
1237 	    TP_STRUCT__entry(
1238 		    __field(unsigned int,		call		)
1239 		    __field(int,			ix		)
1240 		    __array(u8,				anno, 64	)
1241 			     ),
1242 
1243 	    TP_fast_assign(
1244 		    __entry->call = call->debug_id;
1245 		    __entry->ix = ix;
1246 		    memcpy(__entry->anno, call->rxtx_annotations, 64);
1247 			   ),
1248 
1249 	    TP_printk("c=%08x ix=%u a=%64phN",
1250 		      __entry->call,
1251 		      __entry->ix,
1252 		      __entry->anno)
1253 	    );
1254 
1255 TRACE_EVENT(rxrpc_rx_icmp,
1256 	    TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1257 		     struct sockaddr_rxrpc *srx),
1258 
1259 	    TP_ARGS(peer, ee, srx),
1260 
1261 	    TP_STRUCT__entry(
1262 		    __field(unsigned int,			peer	)
1263 		    __field_struct(struct sock_extended_err,	ee	)
1264 		    __field_struct(struct sockaddr_rxrpc,	srx	)
1265 			     ),
1266 
1267 	    TP_fast_assign(
1268 		    __entry->peer = peer->debug_id;
1269 		    memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1270 		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1271 			   ),
1272 
1273 	    TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1274 		      __entry->peer,
1275 		      __entry->ee.ee_origin,
1276 		      __entry->ee.ee_type,
1277 		      __entry->ee.ee_code,
1278 		      __entry->ee.ee_info,
1279 		      __entry->ee.ee_data,
1280 		      __entry->ee.ee_errno,
1281 		      &__entry->srx.transport)
1282 	    );
1283 
1284 TRACE_EVENT(rxrpc_tx_fail,
1285 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1286 		     enum rxrpc_tx_point where),
1287 
1288 	    TP_ARGS(debug_id, serial, ret, where),
1289 
1290 	    TP_STRUCT__entry(
1291 		    __field(unsigned int,		debug_id	)
1292 		    __field(rxrpc_serial_t,		serial		)
1293 		    __field(int,			ret		)
1294 		    __field(enum rxrpc_tx_point,	where		)
1295 			     ),
1296 
1297 	    TP_fast_assign(
1298 		    __entry->debug_id = debug_id;
1299 		    __entry->serial = serial;
1300 		    __entry->ret = ret;
1301 		    __entry->where = where;
1302 			   ),
1303 
1304 	    TP_printk("c=%08x r=%x ret=%d %s",
1305 		      __entry->debug_id,
1306 		      __entry->serial,
1307 		      __entry->ret,
1308 		      __print_symbolic(__entry->where, rxrpc_tx_points))
1309 	    );
1310 
1311 TRACE_EVENT(rxrpc_call_reset,
1312 	    TP_PROTO(struct rxrpc_call *call),
1313 
1314 	    TP_ARGS(call),
1315 
1316 	    TP_STRUCT__entry(
1317 		    __field(unsigned int,		debug_id	)
1318 		    __field(u32,			cid		)
1319 		    __field(u32,			call_id		)
1320 		    __field(rxrpc_serial_t,		call_serial	)
1321 		    __field(rxrpc_serial_t,		conn_serial	)
1322 		    __field(rxrpc_seq_t,		tx_seq		)
1323 		    __field(rxrpc_seq_t,		rx_seq		)
1324 			     ),
1325 
1326 	    TP_fast_assign(
1327 		    __entry->debug_id = call->debug_id;
1328 		    __entry->cid = call->cid;
1329 		    __entry->call_id = call->call_id;
1330 		    __entry->call_serial = call->rx_serial;
1331 		    __entry->conn_serial = call->conn->hi_serial;
1332 		    __entry->tx_seq = call->tx_hard_ack;
1333 		    __entry->rx_seq = call->rx_hard_ack;
1334 			   ),
1335 
1336 	    TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1337 		      __entry->debug_id,
1338 		      __entry->cid, __entry->call_id,
1339 		      __entry->call_serial, __entry->conn_serial,
1340 		      __entry->tx_seq, __entry->rx_seq)
1341 	    );
1342 
1343 TRACE_EVENT(rxrpc_notify_socket,
1344 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1345 
1346 	    TP_ARGS(debug_id, serial),
1347 
1348 	    TP_STRUCT__entry(
1349 		    __field(unsigned int,		debug_id	)
1350 		    __field(rxrpc_serial_t,		serial		)
1351 			     ),
1352 
1353 	    TP_fast_assign(
1354 		    __entry->debug_id = debug_id;
1355 		    __entry->serial = serial;
1356 			   ),
1357 
1358 	    TP_printk("c=%08x r=%08x",
1359 		      __entry->debug_id,
1360 		      __entry->serial)
1361 	    );
1362 
1363 TRACE_EVENT(rxrpc_rx_discard_ack,
1364 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1365 		     rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1366 		     rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1367 
1368 	    TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1369 		    prev_pkt, call_ackr_prev),
1370 
1371 	    TP_STRUCT__entry(
1372 		    __field(unsigned int,	debug_id	)
1373 		    __field(rxrpc_serial_t,	serial		)
1374 		    __field(rxrpc_seq_t,	first_soft_ack)
1375 		    __field(rxrpc_seq_t,	call_ackr_first)
1376 		    __field(rxrpc_seq_t,	prev_pkt)
1377 		    __field(rxrpc_seq_t,	call_ackr_prev)
1378 			     ),
1379 
1380 	    TP_fast_assign(
1381 		    __entry->debug_id		= debug_id;
1382 		    __entry->serial		= serial;
1383 		    __entry->first_soft_ack	= first_soft_ack;
1384 		    __entry->call_ackr_first	= call_ackr_first;
1385 		    __entry->prev_pkt		= prev_pkt;
1386 		    __entry->call_ackr_prev	= call_ackr_prev;
1387 			   ),
1388 
1389 	    TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1390 		      __entry->debug_id,
1391 		      __entry->serial,
1392 		      __entry->first_soft_ack,
1393 		      __entry->call_ackr_first,
1394 		      __entry->prev_pkt,
1395 		      __entry->call_ackr_prev)
1396 	    );
1397 
1398 #undef EM
1399 #undef E_
1400 #endif /* _TRACE_RXRPC_H */
1401 
1402 /* This part must be outside protection */
1403 #include <trace/define_trace.h>
1404