1 /* AF_RXRPC tracepoints
2 *
3 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11 #undef TRACE_SYSTEM
12 #define TRACE_SYSTEM rxrpc
14 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
15 #define _TRACE_RXRPC_H
17 #include <linux/tracepoint.h>
18 #include <linux/errqueue.h>
20 /*
21 * Define enums for tracing information.
22 *
23 * These should all be kept sorted, making it easier to match the string
24 * mapping tables further on.
25 */
26 #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
27 #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
29 enum rxrpc_skb_trace {
30 rxrpc_skb_rx_cleaned,
31 rxrpc_skb_rx_freed,
32 rxrpc_skb_rx_got,
33 rxrpc_skb_rx_lost,
34 rxrpc_skb_rx_purged,
35 rxrpc_skb_rx_received,
36 rxrpc_skb_rx_rotated,
37 rxrpc_skb_rx_seen,
38 rxrpc_skb_tx_cleaned,
39 rxrpc_skb_tx_freed,
40 rxrpc_skb_tx_got,
41 rxrpc_skb_tx_new,
42 rxrpc_skb_tx_rotated,
43 rxrpc_skb_tx_seen,
44 };
46 enum rxrpc_local_trace {
47 rxrpc_local_got,
48 rxrpc_local_new,
49 rxrpc_local_processing,
50 rxrpc_local_put,
51 rxrpc_local_queued,
52 };
54 enum rxrpc_peer_trace {
55 rxrpc_peer_got,
56 rxrpc_peer_new,
57 rxrpc_peer_processing,
58 rxrpc_peer_put,
59 };
61 enum rxrpc_conn_trace {
62 rxrpc_conn_got,
63 rxrpc_conn_new_client,
64 rxrpc_conn_new_service,
65 rxrpc_conn_put_client,
66 rxrpc_conn_put_service,
67 rxrpc_conn_queued,
68 rxrpc_conn_reap_service,
69 rxrpc_conn_seen,
70 };
72 enum rxrpc_client_trace {
73 rxrpc_client_activate_chans,
74 rxrpc_client_alloc,
75 rxrpc_client_chan_activate,
76 rxrpc_client_chan_disconnect,
77 rxrpc_client_chan_pass,
78 rxrpc_client_chan_unstarted,
79 rxrpc_client_cleanup,
80 rxrpc_client_count,
81 rxrpc_client_discard,
82 rxrpc_client_duplicate,
83 rxrpc_client_exposed,
84 rxrpc_client_replace,
85 rxrpc_client_to_active,
86 rxrpc_client_to_culled,
87 rxrpc_client_to_idle,
88 rxrpc_client_to_inactive,
89 rxrpc_client_to_upgrade,
90 rxrpc_client_to_waiting,
91 rxrpc_client_uncount,
92 };
94 enum rxrpc_call_trace {
95 rxrpc_call_connected,
96 rxrpc_call_error,
97 rxrpc_call_got,
98 rxrpc_call_got_kernel,
99 rxrpc_call_got_userid,
100 rxrpc_call_new_client,
101 rxrpc_call_new_service,
102 rxrpc_call_put,
103 rxrpc_call_put_kernel,
104 rxrpc_call_put_noqueue,
105 rxrpc_call_put_userid,
106 rxrpc_call_queued,
107 rxrpc_call_queued_ref,
108 rxrpc_call_release,
109 rxrpc_call_seen,
110 };
112 enum rxrpc_transmit_trace {
113 rxrpc_transmit_await_reply,
114 rxrpc_transmit_end,
115 rxrpc_transmit_queue,
116 rxrpc_transmit_queue_last,
117 rxrpc_transmit_rotate,
118 rxrpc_transmit_rotate_last,
119 rxrpc_transmit_wait,
120 };
122 enum rxrpc_receive_trace {
123 rxrpc_receive_end,
124 rxrpc_receive_front,
125 rxrpc_receive_incoming,
126 rxrpc_receive_queue,
127 rxrpc_receive_queue_last,
128 rxrpc_receive_rotate,
129 };
131 enum rxrpc_recvmsg_trace {
132 rxrpc_recvmsg_cont,
133 rxrpc_recvmsg_data_return,
134 rxrpc_recvmsg_dequeue,
135 rxrpc_recvmsg_enter,
136 rxrpc_recvmsg_full,
137 rxrpc_recvmsg_hole,
138 rxrpc_recvmsg_next,
139 rxrpc_recvmsg_requeue,
140 rxrpc_recvmsg_return,
141 rxrpc_recvmsg_terminal,
142 rxrpc_recvmsg_to_be_accepted,
143 rxrpc_recvmsg_wait,
144 };
146 enum rxrpc_rtt_tx_trace {
147 rxrpc_rtt_tx_data,
148 rxrpc_rtt_tx_ping,
149 };
151 enum rxrpc_rtt_rx_trace {
152 rxrpc_rtt_rx_ping_response,
153 rxrpc_rtt_rx_requested_ack,
154 };
156 enum rxrpc_timer_trace {
157 rxrpc_timer_begin,
158 rxrpc_timer_exp_ack,
159 rxrpc_timer_exp_hard,
160 rxrpc_timer_exp_idle,
161 rxrpc_timer_exp_keepalive,
162 rxrpc_timer_exp_lost_ack,
163 rxrpc_timer_exp_normal,
164 rxrpc_timer_exp_ping,
165 rxrpc_timer_exp_resend,
166 rxrpc_timer_expired,
167 rxrpc_timer_init_for_reply,
168 rxrpc_timer_init_for_send_reply,
169 rxrpc_timer_restart,
170 rxrpc_timer_set_for_ack,
171 rxrpc_timer_set_for_hard,
172 rxrpc_timer_set_for_idle,
173 rxrpc_timer_set_for_keepalive,
174 rxrpc_timer_set_for_lost_ack,
175 rxrpc_timer_set_for_normal,
176 rxrpc_timer_set_for_ping,
177 rxrpc_timer_set_for_resend,
178 rxrpc_timer_set_for_send,
179 };
181 enum rxrpc_propose_ack_trace {
182 rxrpc_propose_ack_client_tx_end,
183 rxrpc_propose_ack_input_data,
184 rxrpc_propose_ack_ping_for_keepalive,
185 rxrpc_propose_ack_ping_for_lost_ack,
186 rxrpc_propose_ack_ping_for_lost_reply,
187 rxrpc_propose_ack_ping_for_params,
188 rxrpc_propose_ack_processing_op,
189 rxrpc_propose_ack_respond_to_ack,
190 rxrpc_propose_ack_respond_to_ping,
191 rxrpc_propose_ack_retry_tx,
192 rxrpc_propose_ack_rotate_rx,
193 rxrpc_propose_ack_terminal_ack,
194 };
196 enum rxrpc_propose_ack_outcome {
197 rxrpc_propose_ack_subsume,
198 rxrpc_propose_ack_update,
199 rxrpc_propose_ack_use,
200 };
202 enum rxrpc_congest_change {
203 rxrpc_cong_begin_retransmission,
204 rxrpc_cong_cleared_nacks,
205 rxrpc_cong_new_low_nack,
206 rxrpc_cong_no_change,
207 rxrpc_cong_progress,
208 rxrpc_cong_retransmit_again,
209 rxrpc_cong_rtt_window_end,
210 rxrpc_cong_saw_nack,
211 };
213 enum rxrpc_tx_point {
214 rxrpc_tx_point_call_abort,
215 rxrpc_tx_point_call_ack,
216 rxrpc_tx_point_call_data_frag,
217 rxrpc_tx_point_call_data_nofrag,
218 rxrpc_tx_point_call_final_resend,
219 rxrpc_tx_point_conn_abort,
220 rxrpc_tx_point_rxkad_challenge,
221 rxrpc_tx_point_rxkad_response,
222 rxrpc_tx_point_reject,
223 rxrpc_tx_point_version_keepalive,
224 rxrpc_tx_point_version_reply,
225 };
227 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
229 /*
230 * Declare tracing information enums and their string mappings for display.
231 */
232 #define rxrpc_skb_traces \
233 EM(rxrpc_skb_rx_cleaned, "Rx CLN") \
234 EM(rxrpc_skb_rx_freed, "Rx FRE") \
235 EM(rxrpc_skb_rx_got, "Rx GOT") \
236 EM(rxrpc_skb_rx_lost, "Rx *L*") \
237 EM(rxrpc_skb_rx_purged, "Rx PUR") \
238 EM(rxrpc_skb_rx_received, "Rx RCV") \
239 EM(rxrpc_skb_rx_rotated, "Rx ROT") \
240 EM(rxrpc_skb_rx_seen, "Rx SEE") \
241 EM(rxrpc_skb_tx_cleaned, "Tx CLN") \
242 EM(rxrpc_skb_tx_freed, "Tx FRE") \
243 EM(rxrpc_skb_tx_got, "Tx GOT") \
244 EM(rxrpc_skb_tx_new, "Tx NEW") \
245 EM(rxrpc_skb_tx_rotated, "Tx ROT") \
246 E_(rxrpc_skb_tx_seen, "Tx SEE")
248 #define rxrpc_local_traces \
249 EM(rxrpc_local_got, "GOT") \
250 EM(rxrpc_local_new, "NEW") \
251 EM(rxrpc_local_processing, "PRO") \
252 EM(rxrpc_local_put, "PUT") \
253 E_(rxrpc_local_queued, "QUE")
255 #define rxrpc_peer_traces \
256 EM(rxrpc_peer_got, "GOT") \
257 EM(rxrpc_peer_new, "NEW") \
258 EM(rxrpc_peer_processing, "PRO") \
259 E_(rxrpc_peer_put, "PUT")
261 #define rxrpc_conn_traces \
262 EM(rxrpc_conn_got, "GOT") \
263 EM(rxrpc_conn_new_client, "NWc") \
264 EM(rxrpc_conn_new_service, "NWs") \
265 EM(rxrpc_conn_put_client, "PTc") \
266 EM(rxrpc_conn_put_service, "PTs") \
267 EM(rxrpc_conn_queued, "QUE") \
268 EM(rxrpc_conn_reap_service, "RPs") \
269 E_(rxrpc_conn_seen, "SEE")
271 #define rxrpc_client_traces \
272 EM(rxrpc_client_activate_chans, "Activa") \
273 EM(rxrpc_client_alloc, "Alloc ") \
274 EM(rxrpc_client_chan_activate, "ChActv") \
275 EM(rxrpc_client_chan_disconnect, "ChDisc") \
276 EM(rxrpc_client_chan_pass, "ChPass") \
277 EM(rxrpc_client_chan_unstarted, "ChUnst") \
278 EM(rxrpc_client_cleanup, "Clean ") \
279 EM(rxrpc_client_count, "Count ") \
280 EM(rxrpc_client_discard, "Discar") \
281 EM(rxrpc_client_duplicate, "Duplic") \
282 EM(rxrpc_client_exposed, "Expose") \
283 EM(rxrpc_client_replace, "Replac") \
284 EM(rxrpc_client_to_active, "->Actv") \
285 EM(rxrpc_client_to_culled, "->Cull") \
286 EM(rxrpc_client_to_idle, "->Idle") \
287 EM(rxrpc_client_to_inactive, "->Inac") \
288 EM(rxrpc_client_to_upgrade, "->Upgd") \
289 EM(rxrpc_client_to_waiting, "->Wait") \
290 E_(rxrpc_client_uncount, "Uncoun")
292 #define rxrpc_conn_cache_states \
293 EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \
294 EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \
295 EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \
296 EM(RXRPC_CONN_CLIENT_UPGRADE, "Upgd") \
297 EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \
298 E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \
300 #define rxrpc_call_traces \
301 EM(rxrpc_call_connected, "CON") \
302 EM(rxrpc_call_error, "*E*") \
303 EM(rxrpc_call_got, "GOT") \
304 EM(rxrpc_call_got_kernel, "Gke") \
305 EM(rxrpc_call_got_userid, "Gus") \
306 EM(rxrpc_call_new_client, "NWc") \
307 EM(rxrpc_call_new_service, "NWs") \
308 EM(rxrpc_call_put, "PUT") \
309 EM(rxrpc_call_put_kernel, "Pke") \
310 EM(rxrpc_call_put_noqueue, "PNQ") \
311 EM(rxrpc_call_put_userid, "Pus") \
312 EM(rxrpc_call_queued, "QUE") \
313 EM(rxrpc_call_queued_ref, "QUR") \
314 EM(rxrpc_call_release, "RLS") \
315 E_(rxrpc_call_seen, "SEE")
317 #define rxrpc_transmit_traces \
318 EM(rxrpc_transmit_await_reply, "AWR") \
319 EM(rxrpc_transmit_end, "END") \
320 EM(rxrpc_transmit_queue, "QUE") \
321 EM(rxrpc_transmit_queue_last, "QLS") \
322 EM(rxrpc_transmit_rotate, "ROT") \
323 EM(rxrpc_transmit_rotate_last, "RLS") \
324 E_(rxrpc_transmit_wait, "WAI")
326 #define rxrpc_receive_traces \
327 EM(rxrpc_receive_end, "END") \
328 EM(rxrpc_receive_front, "FRN") \
329 EM(rxrpc_receive_incoming, "INC") \
330 EM(rxrpc_receive_queue, "QUE") \
331 EM(rxrpc_receive_queue_last, "QLS") \
332 E_(rxrpc_receive_rotate, "ROT")
334 #define rxrpc_recvmsg_traces \
335 EM(rxrpc_recvmsg_cont, "CONT") \
336 EM(rxrpc_recvmsg_data_return, "DATA") \
337 EM(rxrpc_recvmsg_dequeue, "DEQU") \
338 EM(rxrpc_recvmsg_enter, "ENTR") \
339 EM(rxrpc_recvmsg_full, "FULL") \
340 EM(rxrpc_recvmsg_hole, "HOLE") \
341 EM(rxrpc_recvmsg_next, "NEXT") \
342 EM(rxrpc_recvmsg_requeue, "REQU") \
343 EM(rxrpc_recvmsg_return, "RETN") \
344 EM(rxrpc_recvmsg_terminal, "TERM") \
345 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
346 E_(rxrpc_recvmsg_wait, "WAIT")
348 #define rxrpc_rtt_tx_traces \
349 EM(rxrpc_rtt_tx_data, "DATA") \
350 E_(rxrpc_rtt_tx_ping, "PING")
352 #define rxrpc_rtt_rx_traces \
353 EM(rxrpc_rtt_rx_ping_response, "PONG") \
354 E_(rxrpc_rtt_rx_requested_ack, "RACK")
356 #define rxrpc_timer_traces \
357 EM(rxrpc_timer_begin, "Begin ") \
358 EM(rxrpc_timer_expired, "*EXPR*") \
359 EM(rxrpc_timer_exp_ack, "ExpAck") \
360 EM(rxrpc_timer_exp_hard, "ExpHrd") \
361 EM(rxrpc_timer_exp_idle, "ExpIdl") \
362 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
363 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
364 EM(rxrpc_timer_exp_normal, "ExpNml") \
365 EM(rxrpc_timer_exp_ping, "ExpPng") \
366 EM(rxrpc_timer_exp_resend, "ExpRsn") \
367 EM(rxrpc_timer_init_for_reply, "IniRpl") \
368 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
369 EM(rxrpc_timer_restart, "Restrt") \
370 EM(rxrpc_timer_set_for_ack, "SetAck") \
371 EM(rxrpc_timer_set_for_hard, "SetHrd") \
372 EM(rxrpc_timer_set_for_idle, "SetIdl") \
373 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
374 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
375 EM(rxrpc_timer_set_for_normal, "SetNml") \
376 EM(rxrpc_timer_set_for_ping, "SetPng") \
377 EM(rxrpc_timer_set_for_resend, "SetRTx") \
378 E_(rxrpc_timer_set_for_send, "SetSnd")
380 #define rxrpc_propose_ack_traces \
381 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
382 EM(rxrpc_propose_ack_input_data, "DataIn ") \
383 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
384 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
385 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
386 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
387 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
388 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
389 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
390 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
391 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
392 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
394 #define rxrpc_propose_ack_outcomes \
395 EM(rxrpc_propose_ack_subsume, " Subsume") \
396 EM(rxrpc_propose_ack_update, " Update") \
397 E_(rxrpc_propose_ack_use, " New")
399 #define rxrpc_congest_modes \
400 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
401 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
402 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
403 E_(RXRPC_CALL_SLOW_START, "SlowStart")
405 #define rxrpc_congest_changes \
406 EM(rxrpc_cong_begin_retransmission, " Retrans") \
407 EM(rxrpc_cong_cleared_nacks, " Cleared") \
408 EM(rxrpc_cong_new_low_nack, " NewLowN") \
409 EM(rxrpc_cong_no_change, "") \
410 EM(rxrpc_cong_progress, " Progres") \
411 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
412 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
413 E_(rxrpc_cong_saw_nack, " SawNack")
415 #define rxrpc_pkts \
416 EM(0, "?00") \
417 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
418 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
419 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
420 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
421 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
422 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
423 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
424 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
425 EM(9, "?09") \
426 EM(10, "?10") \
427 EM(11, "?11") \
428 EM(12, "?12") \
429 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
430 EM(14, "?14") \
431 E_(15, "?15")
433 #define rxrpc_ack_names \
434 EM(0, "-0-") \
435 EM(RXRPC_ACK_REQUESTED, "REQ") \
436 EM(RXRPC_ACK_DUPLICATE, "DUP") \
437 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
438 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
439 EM(RXRPC_ACK_NOSPACE, "MEM") \
440 EM(RXRPC_ACK_PING, "PNG") \
441 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
442 EM(RXRPC_ACK_DELAY, "DLY") \
443 EM(RXRPC_ACK_IDLE, "IDL") \
444 E_(RXRPC_ACK__INVALID, "-?-")
446 #define rxrpc_completions \
447 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
448 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
449 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
450 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
451 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
453 #define rxrpc_tx_points \
454 EM(rxrpc_tx_point_call_abort, "CallAbort") \
455 EM(rxrpc_tx_point_call_ack, "CallAck") \
456 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
457 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
458 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
459 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
460 EM(rxrpc_tx_point_reject, "Reject") \
461 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
462 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
463 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
464 E_(rxrpc_tx_point_version_reply, "VerReply")
466 /*
467 * Export enum symbols via userspace.
468 */
469 #undef EM
470 #undef E_
471 #define EM(a, b) TRACE_DEFINE_ENUM(a);
472 #define E_(a, b) TRACE_DEFINE_ENUM(a);
474 rxrpc_skb_traces;
475 rxrpc_local_traces;
476 rxrpc_conn_traces;
477 rxrpc_client_traces;
478 rxrpc_call_traces;
479 rxrpc_transmit_traces;
480 rxrpc_receive_traces;
481 rxrpc_recvmsg_traces;
482 rxrpc_rtt_tx_traces;
483 rxrpc_rtt_rx_traces;
484 rxrpc_timer_traces;
485 rxrpc_propose_ack_traces;
486 rxrpc_propose_ack_outcomes;
487 rxrpc_congest_modes;
488 rxrpc_congest_changes;
489 rxrpc_tx_points;
491 /*
492 * Now redefine the EM() and E_() macros to map the enums to the strings that
493 * will be printed in the output.
494 */
495 #undef EM
496 #undef E_
497 #define EM(a, b) { a, b },
498 #define E_(a, b) { a, b }
500 TRACE_EVENT(rxrpc_local,
501 TP_PROTO(struct rxrpc_local *local, enum rxrpc_local_trace op,
502 int usage, const void *where),
504 TP_ARGS(local, op, usage, where),
506 TP_STRUCT__entry(
507 __field(unsigned int, local )
508 __field(int, op )
509 __field(int, usage )
510 __field(const void *, where )
511 ),
513 TP_fast_assign(
514 __entry->local = local->debug_id;
515 __entry->op = op;
516 __entry->usage = usage;
517 __entry->where = where;
518 ),
520 TP_printk("L=%08x %s u=%d sp=%pSR",
521 __entry->local,
522 __print_symbolic(__entry->op, rxrpc_local_traces),
523 __entry->usage,
524 __entry->where)
525 );
527 TRACE_EVENT(rxrpc_peer,
528 TP_PROTO(struct rxrpc_peer *peer, enum rxrpc_peer_trace op,
529 int usage, const void *where),
531 TP_ARGS(peer, op, usage, where),
533 TP_STRUCT__entry(
534 __field(unsigned int, peer )
535 __field(int, op )
536 __field(int, usage )
537 __field(const void *, where )
538 ),
540 TP_fast_assign(
541 __entry->peer = peer->debug_id;
542 __entry->op = op;
543 __entry->usage = usage;
544 __entry->where = where;
545 ),
547 TP_printk("P=%08x %s u=%d sp=%pSR",
548 __entry->peer,
549 __print_symbolic(__entry->op, rxrpc_peer_traces),
550 __entry->usage,
551 __entry->where)
552 );
554 TRACE_EVENT(rxrpc_conn,
555 TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op,
556 int usage, const void *where),
558 TP_ARGS(conn, op, usage, where),
560 TP_STRUCT__entry(
561 __field(unsigned int, conn )
562 __field(int, op )
563 __field(int, usage )
564 __field(const void *, where )
565 ),
567 TP_fast_assign(
568 __entry->conn = conn->debug_id;
569 __entry->op = op;
570 __entry->usage = usage;
571 __entry->where = where;
572 ),
574 TP_printk("C=%08x %s u=%d sp=%pSR",
575 __entry->conn,
576 __print_symbolic(__entry->op, rxrpc_conn_traces),
577 __entry->usage,
578 __entry->where)
579 );
581 TRACE_EVENT(rxrpc_client,
582 TP_PROTO(struct rxrpc_connection *conn, int channel,
583 enum rxrpc_client_trace op),
585 TP_ARGS(conn, channel, op),
587 TP_STRUCT__entry(
588 __field(unsigned int, conn )
589 __field(u32, cid )
590 __field(int, channel )
591 __field(int, usage )
592 __field(enum rxrpc_client_trace, op )
593 __field(enum rxrpc_conn_cache_state, cs )
594 ),
596 TP_fast_assign(
597 __entry->conn = conn->debug_id;
598 __entry->channel = channel;
599 __entry->usage = atomic_read(&conn->usage);
600 __entry->op = op;
601 __entry->cid = conn->proto.cid;
602 __entry->cs = conn->cache_state;
603 ),
605 TP_printk("C=%08x h=%2d %s %s i=%08x u=%d",
606 __entry->conn,
607 __entry->channel,
608 __print_symbolic(__entry->op, rxrpc_client_traces),
609 __print_symbolic(__entry->cs, rxrpc_conn_cache_states),
610 __entry->cid,
611 __entry->usage)
612 );
614 TRACE_EVENT(rxrpc_call,
615 TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op,
616 int usage, const void *where, const void *aux),
618 TP_ARGS(call, op, usage, where, aux),
620 TP_STRUCT__entry(
621 __field(unsigned int, call )
622 __field(int, op )
623 __field(int, usage )
624 __field(const void *, where )
625 __field(const void *, aux )
626 ),
628 TP_fast_assign(
629 __entry->call = call->debug_id;
630 __entry->op = op;
631 __entry->usage = usage;
632 __entry->where = where;
633 __entry->aux = aux;
634 ),
636 TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
637 __entry->call,
638 __print_symbolic(__entry->op, rxrpc_call_traces),
639 __entry->usage,
640 __entry->where,
641 __entry->aux)
642 );
644 TRACE_EVENT(rxrpc_skb,
645 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
646 int usage, int mod_count, const void *where),
648 TP_ARGS(skb, op, usage, mod_count, where),
650 TP_STRUCT__entry(
651 __field(struct sk_buff *, skb )
652 __field(enum rxrpc_skb_trace, op )
653 __field(int, usage )
654 __field(int, mod_count )
655 __field(const void *, where )
656 ),
658 TP_fast_assign(
659 __entry->skb = skb;
660 __entry->op = op;
661 __entry->usage = usage;
662 __entry->mod_count = mod_count;
663 __entry->where = where;
664 ),
666 TP_printk("s=%p %s u=%d m=%d p=%pSR",
667 __entry->skb,
668 __print_symbolic(__entry->op, rxrpc_skb_traces),
669 __entry->usage,
670 __entry->mod_count,
671 __entry->where)
672 );
674 TRACE_EVENT(rxrpc_rx_packet,
675 TP_PROTO(struct rxrpc_skb_priv *sp),
677 TP_ARGS(sp),
679 TP_STRUCT__entry(
680 __field_struct(struct rxrpc_host_header, hdr )
681 ),
683 TP_fast_assign(
684 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
685 ),
687 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
688 __entry->hdr.epoch, __entry->hdr.cid,
689 __entry->hdr.callNumber, __entry->hdr.serviceId,
690 __entry->hdr.serial, __entry->hdr.seq,
691 __entry->hdr.type, __entry->hdr.flags,
692 __entry->hdr.type <= 15 ?
693 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
694 );
696 TRACE_EVENT(rxrpc_rx_done,
697 TP_PROTO(int result, int abort_code),
699 TP_ARGS(result, abort_code),
701 TP_STRUCT__entry(
702 __field(int, result )
703 __field(int, abort_code )
704 ),
706 TP_fast_assign(
707 __entry->result = result;
708 __entry->abort_code = abort_code;
709 ),
711 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
712 );
714 TRACE_EVENT(rxrpc_abort,
715 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
716 rxrpc_seq_t seq, int abort_code, int error),
718 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
720 TP_STRUCT__entry(
721 __field(unsigned int, call_nr )
722 __array(char, why, 4 )
723 __field(u32, cid )
724 __field(u32, call_id )
725 __field(rxrpc_seq_t, seq )
726 __field(int, abort_code )
727 __field(int, error )
728 ),
730 TP_fast_assign(
731 memcpy(__entry->why, why, 4);
732 __entry->call_nr = call_nr;
733 __entry->cid = cid;
734 __entry->call_id = call_id;
735 __entry->abort_code = abort_code;
736 __entry->error = error;
737 __entry->seq = seq;
738 ),
740 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
741 __entry->call_nr,
742 __entry->cid, __entry->call_id, __entry->seq,
743 __entry->abort_code, __entry->error, __entry->why)
744 );
746 TRACE_EVENT(rxrpc_call_complete,
747 TP_PROTO(struct rxrpc_call *call),
749 TP_ARGS(call),
751 TP_STRUCT__entry(
752 __field(unsigned int, call )
753 __field(enum rxrpc_call_completion, compl )
754 __field(int, error )
755 __field(u32, abort_code )
756 ),
758 TP_fast_assign(
759 __entry->call = call->debug_id;
760 __entry->compl = call->completion;
761 __entry->error = call->error;
762 __entry->abort_code = call->abort_code;
763 ),
765 TP_printk("c=%08x %s r=%d ac=%d",
766 __entry->call,
767 __print_symbolic(__entry->compl, rxrpc_completions),
768 __entry->error,
769 __entry->abort_code)
770 );
772 TRACE_EVENT(rxrpc_transmit,
773 TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
775 TP_ARGS(call, why),
777 TP_STRUCT__entry(
778 __field(unsigned int, call )
779 __field(enum rxrpc_transmit_trace, why )
780 __field(rxrpc_seq_t, tx_hard_ack )
781 __field(rxrpc_seq_t, tx_top )
782 __field(int, tx_winsize )
783 ),
785 TP_fast_assign(
786 __entry->call = call->debug_id;
787 __entry->why = why;
788 __entry->tx_hard_ack = call->tx_hard_ack;
789 __entry->tx_top = call->tx_top;
790 __entry->tx_winsize = call->tx_winsize;
791 ),
793 TP_printk("c=%08x %s f=%08x n=%u/%u",
794 __entry->call,
795 __print_symbolic(__entry->why, rxrpc_transmit_traces),
796 __entry->tx_hard_ack + 1,
797 __entry->tx_top - __entry->tx_hard_ack,
798 __entry->tx_winsize)
799 );
801 TRACE_EVENT(rxrpc_rx_data,
802 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
803 rxrpc_serial_t serial, u8 flags, u8 anno),
805 TP_ARGS(call, seq, serial, flags, anno),
807 TP_STRUCT__entry(
808 __field(unsigned int, call )
809 __field(rxrpc_seq_t, seq )
810 __field(rxrpc_serial_t, serial )
811 __field(u8, flags )
812 __field(u8, anno )
813 ),
815 TP_fast_assign(
816 __entry->call = call;
817 __entry->seq = seq;
818 __entry->serial = serial;
819 __entry->flags = flags;
820 __entry->anno = anno;
821 ),
823 TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x",
824 __entry->call,
825 __entry->serial,
826 __entry->seq,
827 __entry->flags,
828 __entry->anno)
829 );
831 TRACE_EVENT(rxrpc_rx_ack,
832 TP_PROTO(struct rxrpc_call *call,
833 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
834 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
836 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
838 TP_STRUCT__entry(
839 __field(unsigned int, call )
840 __field(rxrpc_serial_t, serial )
841 __field(rxrpc_serial_t, ack_serial )
842 __field(rxrpc_seq_t, first )
843 __field(rxrpc_seq_t, prev )
844 __field(u8, reason )
845 __field(u8, n_acks )
846 ),
848 TP_fast_assign(
849 __entry->call = call->debug_id;
850 __entry->serial = serial;
851 __entry->ack_serial = ack_serial;
852 __entry->first = first;
853 __entry->prev = prev;
854 __entry->reason = reason;
855 __entry->n_acks = n_acks;
856 ),
858 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
859 __entry->call,
860 __entry->serial,
861 __print_symbolic(__entry->reason, rxrpc_ack_names),
862 __entry->ack_serial,
863 __entry->first,
864 __entry->prev,
865 __entry->n_acks)
866 );
868 TRACE_EVENT(rxrpc_rx_abort,
869 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
870 u32 abort_code),
872 TP_ARGS(call, serial, abort_code),
874 TP_STRUCT__entry(
875 __field(unsigned int, call )
876 __field(rxrpc_serial_t, serial )
877 __field(u32, abort_code )
878 ),
880 TP_fast_assign(
881 __entry->call = call->debug_id;
882 __entry->serial = serial;
883 __entry->abort_code = abort_code;
884 ),
886 TP_printk("c=%08x ABORT %08x ac=%d",
887 __entry->call,
888 __entry->serial,
889 __entry->abort_code)
890 );
892 TRACE_EVENT(rxrpc_rx_rwind_change,
893 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
894 u32 rwind, bool wake),
896 TP_ARGS(call, serial, rwind, wake),
898 TP_STRUCT__entry(
899 __field(unsigned int, call )
900 __field(rxrpc_serial_t, serial )
901 __field(u32, rwind )
902 __field(bool, wake )
903 ),
905 TP_fast_assign(
906 __entry->call = call->debug_id;
907 __entry->serial = serial;
908 __entry->rwind = rwind;
909 __entry->wake = wake;
910 ),
912 TP_printk("c=%08x %08x rw=%u%s",
913 __entry->call,
914 __entry->serial,
915 __entry->rwind,
916 __entry->wake ? " wake" : "")
917 );
919 TRACE_EVENT(rxrpc_tx_packet,
920 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
921 enum rxrpc_tx_point where),
923 TP_ARGS(call_id, whdr, where),
925 TP_STRUCT__entry(
926 __field(unsigned int, call )
927 __field(enum rxrpc_tx_point, where )
928 __field_struct(struct rxrpc_wire_header, whdr )
929 ),
931 TP_fast_assign(
932 __entry->call = call_id;
933 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
934 ),
936 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
937 __entry->call,
938 ntohl(__entry->whdr.epoch),
939 ntohl(__entry->whdr.cid),
940 ntohl(__entry->whdr.callNumber),
941 ntohs(__entry->whdr.serviceId),
942 ntohl(__entry->whdr.serial),
943 ntohl(__entry->whdr.seq),
944 __entry->whdr.type, __entry->whdr.flags,
945 __entry->whdr.type <= 15 ?
946 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
947 __print_symbolic(__entry->where, rxrpc_tx_points))
948 );
950 TRACE_EVENT(rxrpc_tx_data,
951 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
952 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
954 TP_ARGS(call, seq, serial, flags, retrans, lose),
956 TP_STRUCT__entry(
957 __field(unsigned int, call )
958 __field(rxrpc_seq_t, seq )
959 __field(rxrpc_serial_t, serial )
960 __field(u32, cid )
961 __field(u32, call_id )
962 __field(u8, flags )
963 __field(bool, retrans )
964 __field(bool, lose )
965 ),
967 TP_fast_assign(
968 __entry->call = call->debug_id;
969 __entry->cid = call->cid;
970 __entry->call_id = call->call_id;
971 __entry->seq = seq;
972 __entry->serial = serial;
973 __entry->flags = flags;
974 __entry->retrans = retrans;
975 __entry->lose = lose;
976 ),
978 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
979 __entry->call,
980 __entry->cid,
981 __entry->call_id,
982 __entry->serial,
983 __entry->seq,
984 __entry->flags,
985 __entry->retrans ? " *RETRANS*" : "",
986 __entry->lose ? " *LOSE*" : "")
987 );
989 TRACE_EVENT(rxrpc_tx_ack,
990 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
991 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
992 u8 reason, u8 n_acks),
994 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
996 TP_STRUCT__entry(
997 __field(unsigned int, call )
998 __field(rxrpc_serial_t, serial )
999 __field(rxrpc_seq_t, ack_first )
1000 __field(rxrpc_serial_t, ack_serial )
1001 __field(u8, reason )
1002 __field(u8, n_acks )
1003 ),
1005 TP_fast_assign(
1006 __entry->call = call;
1007 __entry->serial = serial;
1008 __entry->ack_first = ack_first;
1009 __entry->ack_serial = ack_serial;
1010 __entry->reason = reason;
1011 __entry->n_acks = n_acks;
1012 ),
1014 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1015 __entry->call,
1016 __entry->serial,
1017 __print_symbolic(__entry->reason, rxrpc_ack_names),
1018 __entry->ack_first,
1019 __entry->ack_serial,
1020 __entry->n_acks)
1021 );
1023 TRACE_EVENT(rxrpc_receive,
1024 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1025 rxrpc_serial_t serial, rxrpc_seq_t seq),
1027 TP_ARGS(call, why, serial, seq),
1029 TP_STRUCT__entry(
1030 __field(unsigned int, call )
1031 __field(enum rxrpc_receive_trace, why )
1032 __field(rxrpc_serial_t, serial )
1033 __field(rxrpc_seq_t, seq )
1034 __field(rxrpc_seq_t, hard_ack )
1035 __field(rxrpc_seq_t, top )
1036 ),
1038 TP_fast_assign(
1039 __entry->call = call->debug_id;
1040 __entry->why = why;
1041 __entry->serial = serial;
1042 __entry->seq = seq;
1043 __entry->hard_ack = call->rx_hard_ack;
1044 __entry->top = call->rx_top;
1045 ),
1047 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1048 __entry->call,
1049 __print_symbolic(__entry->why, rxrpc_receive_traces),
1050 __entry->serial,
1051 __entry->seq,
1052 __entry->hard_ack,
1053 __entry->top)
1054 );
1056 TRACE_EVENT(rxrpc_recvmsg,
1057 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1058 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1059 int ret),
1061 TP_ARGS(call, why, seq, offset, len, ret),
1063 TP_STRUCT__entry(
1064 __field(unsigned int, call )
1065 __field(enum rxrpc_recvmsg_trace, why )
1066 __field(rxrpc_seq_t, seq )
1067 __field(unsigned int, offset )
1068 __field(unsigned int, len )
1069 __field(int, ret )
1070 ),
1072 TP_fast_assign(
1073 __entry->call = call->debug_id;
1074 __entry->why = why;
1075 __entry->seq = seq;
1076 __entry->offset = offset;
1077 __entry->len = len;
1078 __entry->ret = ret;
1079 ),
1081 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1082 __entry->call,
1083 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1084 __entry->seq,
1085 __entry->offset,
1086 __entry->len,
1087 __entry->ret)
1088 );
1090 TRACE_EVENT(rxrpc_rtt_tx,
1091 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1092 rxrpc_serial_t send_serial),
1094 TP_ARGS(call, why, send_serial),
1096 TP_STRUCT__entry(
1097 __field(unsigned int, call )
1098 __field(enum rxrpc_rtt_tx_trace, why )
1099 __field(rxrpc_serial_t, send_serial )
1100 ),
1102 TP_fast_assign(
1103 __entry->call = call->debug_id;
1104 __entry->why = why;
1105 __entry->send_serial = send_serial;
1106 ),
1108 TP_printk("c=%08x %s sr=%08x",
1109 __entry->call,
1110 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1111 __entry->send_serial)
1112 );
1114 TRACE_EVENT(rxrpc_rtt_rx,
1115 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1116 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1117 s64 rtt, u8 nr, s64 avg),
1119 TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg),
1121 TP_STRUCT__entry(
1122 __field(unsigned int, call )
1123 __field(enum rxrpc_rtt_rx_trace, why )
1124 __field(u8, nr )
1125 __field(rxrpc_serial_t, send_serial )
1126 __field(rxrpc_serial_t, resp_serial )
1127 __field(s64, rtt )
1128 __field(u64, avg )
1129 ),
1131 TP_fast_assign(
1132 __entry->call = call->debug_id;
1133 __entry->why = why;
1134 __entry->send_serial = send_serial;
1135 __entry->resp_serial = resp_serial;
1136 __entry->rtt = rtt;
1137 __entry->nr = nr;
1138 __entry->avg = avg;
1139 ),
1141 TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld",
1142 __entry->call,
1143 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1144 __entry->send_serial,
1145 __entry->resp_serial,
1146 __entry->rtt,
1147 __entry->nr,
1148 __entry->avg)
1149 );
1151 TRACE_EVENT(rxrpc_timer,
1152 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1153 unsigned long now),
1155 TP_ARGS(call, why, now),
1157 TP_STRUCT__entry(
1158 __field(unsigned int, call )
1159 __field(enum rxrpc_timer_trace, why )
1160 __field(long, now )
1161 __field(long, ack_at )
1162 __field(long, ack_lost_at )
1163 __field(long, resend_at )
1164 __field(long, ping_at )
1165 __field(long, expect_rx_by )
1166 __field(long, expect_req_by )
1167 __field(long, expect_term_by )
1168 __field(long, timer )
1169 ),
1171 TP_fast_assign(
1172 __entry->call = call->debug_id;
1173 __entry->why = why;
1174 __entry->now = now;
1175 __entry->ack_at = call->ack_at;
1176 __entry->ack_lost_at = call->ack_lost_at;
1177 __entry->resend_at = call->resend_at;
1178 __entry->expect_rx_by = call->expect_rx_by;
1179 __entry->expect_req_by = call->expect_req_by;
1180 __entry->expect_term_by = call->expect_term_by;
1181 __entry->timer = call->timer.expires;
1182 ),
1184 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1185 __entry->call,
1186 __print_symbolic(__entry->why, rxrpc_timer_traces),
1187 __entry->ack_at - __entry->now,
1188 __entry->ack_lost_at - __entry->now,
1189 __entry->resend_at - __entry->now,
1190 __entry->expect_rx_by - __entry->now,
1191 __entry->expect_req_by - __entry->now,
1192 __entry->expect_term_by - __entry->now,
1193 __entry->timer - __entry->now)
1194 );
1196 TRACE_EVENT(rxrpc_rx_lose,
1197 TP_PROTO(struct rxrpc_skb_priv *sp),
1199 TP_ARGS(sp),
1201 TP_STRUCT__entry(
1202 __field_struct(struct rxrpc_host_header, hdr )
1203 ),
1205 TP_fast_assign(
1206 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1207 ),
1209 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1210 __entry->hdr.epoch, __entry->hdr.cid,
1211 __entry->hdr.callNumber, __entry->hdr.serviceId,
1212 __entry->hdr.serial, __entry->hdr.seq,
1213 __entry->hdr.type, __entry->hdr.flags,
1214 __entry->hdr.type <= 15 ?
1215 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1216 );
1218 TRACE_EVENT(rxrpc_propose_ack,
1219 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1220 u8 ack_reason, rxrpc_serial_t serial, bool immediate,
1221 bool background, enum rxrpc_propose_ack_outcome outcome),
1223 TP_ARGS(call, why, ack_reason, serial, immediate, background,
1224 outcome),
1226 TP_STRUCT__entry(
1227 __field(unsigned int, call )
1228 __field(enum rxrpc_propose_ack_trace, why )
1229 __field(rxrpc_serial_t, serial )
1230 __field(u8, ack_reason )
1231 __field(bool, immediate )
1232 __field(bool, background )
1233 __field(enum rxrpc_propose_ack_outcome, outcome )
1234 ),
1236 TP_fast_assign(
1237 __entry->call = call->debug_id;
1238 __entry->why = why;
1239 __entry->serial = serial;
1240 __entry->ack_reason = ack_reason;
1241 __entry->immediate = immediate;
1242 __entry->background = background;
1243 __entry->outcome = outcome;
1244 ),
1246 TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s",
1247 __entry->call,
1248 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1249 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1250 __entry->serial,
1251 __entry->immediate,
1252 __entry->background,
1253 __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes))
1254 );
1256 TRACE_EVENT(rxrpc_retransmit,
1257 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation,
1258 s64 expiry),
1260 TP_ARGS(call, seq, annotation, expiry),
1262 TP_STRUCT__entry(
1263 __field(unsigned int, call )
1264 __field(rxrpc_seq_t, seq )
1265 __field(u8, annotation )
1266 __field(s64, expiry )
1267 ),
1269 TP_fast_assign(
1270 __entry->call = call->debug_id;
1271 __entry->seq = seq;
1272 __entry->annotation = annotation;
1273 __entry->expiry = expiry;
1274 ),
1276 TP_printk("c=%08x q=%x a=%02x xp=%lld",
1277 __entry->call,
1278 __entry->seq,
1279 __entry->annotation,
1280 __entry->expiry)
1281 );
1283 TRACE_EVENT(rxrpc_congest,
1284 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1285 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1287 TP_ARGS(call, summary, ack_serial, change),
1289 TP_STRUCT__entry(
1290 __field(unsigned int, call )
1291 __field(enum rxrpc_congest_change, change )
1292 __field(rxrpc_seq_t, hard_ack )
1293 __field(rxrpc_seq_t, top )
1294 __field(rxrpc_seq_t, lowest_nak )
1295 __field(rxrpc_serial_t, ack_serial )
1296 __field_struct(struct rxrpc_ack_summary, sum )
1297 ),
1299 TP_fast_assign(
1300 __entry->call = call->debug_id;
1301 __entry->change = change;
1302 __entry->hard_ack = call->tx_hard_ack;
1303 __entry->top = call->tx_top;
1304 __entry->lowest_nak = call->acks_lowest_nak;
1305 __entry->ack_serial = ack_serial;
1306 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1307 ),
1309 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",
1310 __entry->call,
1311 __entry->ack_serial,
1312 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1313 __entry->hard_ack,
1314 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1315 __entry->sum.cwnd,
1316 __entry->sum.ssthresh,
1317 __entry->sum.nr_acks, __entry->sum.nr_nacks,
1318 __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks,
1319 __entry->sum.nr_rot_new_acks,
1320 __entry->top - __entry->hard_ack,
1321 __entry->sum.cumulative_acks,
1322 __entry->sum.dup_acks,
1323 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1324 __print_symbolic(__entry->change, rxrpc_congest_changes),
1325 __entry->sum.retrans_timeo ? " rTxTo" : "")
1326 );
1328 TRACE_EVENT(rxrpc_disconnect_call,
1329 TP_PROTO(struct rxrpc_call *call),
1331 TP_ARGS(call),
1333 TP_STRUCT__entry(
1334 __field(unsigned int, call )
1335 __field(u32, abort_code )
1336 ),
1338 TP_fast_assign(
1339 __entry->call = call->debug_id;
1340 __entry->abort_code = call->abort_code;
1341 ),
1343 TP_printk("c=%08x ab=%08x",
1344 __entry->call,
1345 __entry->abort_code)
1346 );
1348 TRACE_EVENT(rxrpc_improper_term,
1349 TP_PROTO(struct rxrpc_call *call),
1351 TP_ARGS(call),
1353 TP_STRUCT__entry(
1354 __field(unsigned int, call )
1355 __field(u32, abort_code )
1356 ),
1358 TP_fast_assign(
1359 __entry->call = call->debug_id;
1360 __entry->abort_code = call->abort_code;
1361 ),
1363 TP_printk("c=%08x ab=%08x",
1364 __entry->call,
1365 __entry->abort_code)
1366 );
1368 TRACE_EVENT(rxrpc_rx_eproto,
1369 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1370 const char *why),
1372 TP_ARGS(call, serial, why),
1374 TP_STRUCT__entry(
1375 __field(unsigned int, call )
1376 __field(rxrpc_serial_t, serial )
1377 __field(const char *, why )
1378 ),
1380 TP_fast_assign(
1381 __entry->call = call->debug_id;
1382 __entry->serial = serial;
1383 __entry->why = why;
1384 ),
1386 TP_printk("c=%08x EPROTO %08x %s",
1387 __entry->call,
1388 __entry->serial,
1389 __entry->why)
1390 );
1392 TRACE_EVENT(rxrpc_connect_call,
1393 TP_PROTO(struct rxrpc_call *call),
1395 TP_ARGS(call),
1397 TP_STRUCT__entry(
1398 __field(unsigned int, call )
1399 __field(unsigned long, user_call_ID )
1400 __field(u32, cid )
1401 __field(u32, call_id )
1402 ),
1404 TP_fast_assign(
1405 __entry->call = call->debug_id;
1406 __entry->user_call_ID = call->user_call_ID;
1407 __entry->cid = call->cid;
1408 __entry->call_id = call->call_id;
1409 ),
1411 TP_printk("c=%08x u=%p %08x:%08x",
1412 __entry->call,
1413 (void *)__entry->user_call_ID,
1414 __entry->cid,
1415 __entry->call_id)
1416 );
1418 TRACE_EVENT(rxrpc_resend,
1419 TP_PROTO(struct rxrpc_call *call, int ix),
1421 TP_ARGS(call, ix),
1423 TP_STRUCT__entry(
1424 __field(unsigned int, call )
1425 __field(int, ix )
1426 __array(u8, anno, 64 )
1427 ),
1429 TP_fast_assign(
1430 __entry->call = call->debug_id;
1431 __entry->ix = ix;
1432 memcpy(__entry->anno, call->rxtx_annotations, 64);
1433 ),
1435 TP_printk("c=%08x ix=%u a=%64phN",
1436 __entry->call,
1437 __entry->ix,
1438 __entry->anno)
1439 );
1441 TRACE_EVENT(rxrpc_rx_icmp,
1442 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1443 struct sockaddr_rxrpc *srx),
1445 TP_ARGS(peer, ee, srx),
1447 TP_STRUCT__entry(
1448 __field(unsigned int, peer )
1449 __field_struct(struct sock_extended_err, ee )
1450 __field_struct(struct sockaddr_rxrpc, srx )
1451 ),
1453 TP_fast_assign(
1454 __entry->peer = peer->debug_id;
1455 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1456 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1457 ),
1459 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1460 __entry->peer,
1461 __entry->ee.ee_origin,
1462 __entry->ee.ee_type,
1463 __entry->ee.ee_code,
1464 __entry->ee.ee_info,
1465 __entry->ee.ee_data,
1466 __entry->ee.ee_errno,
1467 &__entry->srx.transport)
1468 );
1470 TRACE_EVENT(rxrpc_tx_fail,
1471 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1472 enum rxrpc_tx_point where),
1474 TP_ARGS(debug_id, serial, ret, where),
1476 TP_STRUCT__entry(
1477 __field(unsigned int, debug_id )
1478 __field(rxrpc_serial_t, serial )
1479 __field(int, ret )
1480 __field(enum rxrpc_tx_point, where )
1481 ),
1483 TP_fast_assign(
1484 __entry->debug_id = debug_id;
1485 __entry->serial = serial;
1486 __entry->ret = ret;
1487 __entry->where = where;
1488 ),
1490 TP_printk("c=%08x r=%x ret=%d %s",
1491 __entry->debug_id,
1492 __entry->serial,
1493 __entry->ret,
1494 __print_symbolic(__entry->where, rxrpc_tx_points))
1495 );
1497 TRACE_EVENT(rxrpc_call_reset,
1498 TP_PROTO(struct rxrpc_call *call),
1500 TP_ARGS(call),
1502 TP_STRUCT__entry(
1503 __field(unsigned int, debug_id )
1504 __field(u32, cid )
1505 __field(u32, call_id )
1506 __field(rxrpc_serial_t, call_serial )
1507 __field(rxrpc_serial_t, conn_serial )
1508 __field(rxrpc_seq_t, tx_seq )
1509 __field(rxrpc_seq_t, rx_seq )
1510 ),
1512 TP_fast_assign(
1513 __entry->debug_id = call->debug_id;
1514 __entry->cid = call->cid;
1515 __entry->call_id = call->call_id;
1516 __entry->call_serial = call->rx_serial;
1517 __entry->conn_serial = call->conn->hi_serial;
1518 __entry->tx_seq = call->tx_hard_ack;
1519 __entry->rx_seq = call->ackr_seen;
1520 ),
1522 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1523 __entry->debug_id,
1524 __entry->cid, __entry->call_id,
1525 __entry->call_serial, __entry->conn_serial,
1526 __entry->tx_seq, __entry->rx_seq)
1527 );
1529 TRACE_EVENT(rxrpc_notify_socket,
1530 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1532 TP_ARGS(debug_id, serial),
1534 TP_STRUCT__entry(
1535 __field(unsigned int, debug_id )
1536 __field(rxrpc_serial_t, serial )
1537 ),
1539 TP_fast_assign(
1540 __entry->debug_id = debug_id;
1541 __entry->serial = serial;
1542 ),
1544 TP_printk("c=%08x r=%08x",
1545 __entry->debug_id,
1546 __entry->serial)
1547 );
1549 #endif /* _TRACE_RXRPC_H */
1551 /* This part must be outside protection */
1552 #include <trace/define_trace.h>