1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* AF_RXRPC tracepoints
4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
8 #define TRACE_SYSTEM rxrpc
10 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
11 #define _TRACE_RXRPC_H
13 #include <linux/tracepoint.h>
14 #include <linux/errqueue.h>
17 * Declare tracing information enums and their string mappings for display.
19 #define rxrpc_skb_traces \
20 EM(rxrpc_skb_ack, "ACK") \
21 EM(rxrpc_skb_cleaned, "CLN") \
22 EM(rxrpc_skb_cloned_jumbo, "CLJ") \
23 EM(rxrpc_skb_freed, "FRE") \
24 EM(rxrpc_skb_got, "GOT") \
25 EM(rxrpc_skb_lost, "*L*") \
26 EM(rxrpc_skb_new, "NEW") \
27 EM(rxrpc_skb_purged, "PUR") \
28 EM(rxrpc_skb_received, "RCV") \
29 EM(rxrpc_skb_rotated, "ROT") \
30 EM(rxrpc_skb_seen, "SEE") \
31 EM(rxrpc_skb_unshared, "UNS") \
32 E_(rxrpc_skb_unshared_nomem, "US0")
34 #define rxrpc_local_traces \
35 EM(rxrpc_local_free, "FREE ") \
36 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
37 EM(rxrpc_local_get_for_use, "GET for-use ") \
38 EM(rxrpc_local_get_peer, "GET peer ") \
39 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
40 EM(rxrpc_local_get_queue, "GET queue ") \
41 EM(rxrpc_local_new, "NEW ") \
42 EM(rxrpc_local_processing, "PROCESSING ") \
43 EM(rxrpc_local_put_already_queued, "PUT alreadyq") \
44 EM(rxrpc_local_put_bind, "PUT bind ") \
45 EM(rxrpc_local_put_for_use, "PUT for-use ") \
46 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
47 EM(rxrpc_local_put_peer, "PUT peer ") \
48 EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \
49 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
50 EM(rxrpc_local_put_queue, "PUT queue ") \
51 EM(rxrpc_local_queued, "QUEUED ") \
52 EM(rxrpc_local_see_tx_ack, "SEE tx-ack ") \
53 EM(rxrpc_local_stop, "STOP ") \
54 EM(rxrpc_local_stopped, "STOPPED ") \
55 EM(rxrpc_local_unuse_bind, "UNU bind ") \
56 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
57 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
58 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
59 EM(rxrpc_local_unuse_work, "UNU work ") \
60 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
61 EM(rxrpc_local_use_lookup, "USE lookup ") \
62 EM(rxrpc_local_use_peer_keepalive, "USE peer-kpa") \
63 E_(rxrpc_local_use_work, "USE work ")
65 #define rxrpc_peer_traces \
66 EM(rxrpc_peer_free, "FREE ") \
67 EM(rxrpc_peer_get_accept, "GET accept ") \
68 EM(rxrpc_peer_get_activate_call, "GET act-call") \
69 EM(rxrpc_peer_get_bundle, "GET bundle ") \
70 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
71 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
72 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
73 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
74 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
75 EM(rxrpc_peer_new_client, "NEW client ") \
76 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
77 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
78 EM(rxrpc_peer_put_call, "PUT call ") \
79 EM(rxrpc_peer_put_conn, "PUT conn ") \
80 EM(rxrpc_peer_put_discard_tmp, "PUT disc-tmp") \
81 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
82 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
84 #define rxrpc_conn_traces \
85 EM(rxrpc_conn_free, "FREE ") \
86 EM(rxrpc_conn_get_activate_call, "GET act-call") \
87 EM(rxrpc_conn_get_call_input, "GET inp-call") \
88 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
89 EM(rxrpc_conn_get_idle, "GET idle ") \
90 EM(rxrpc_conn_get_poke, "GET poke ") \
91 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
92 EM(rxrpc_conn_new_client, "NEW client ") \
93 EM(rxrpc_conn_new_service, "NEW service ") \
94 EM(rxrpc_conn_put_already_queued, "PUT alreadyq") \
95 EM(rxrpc_conn_put_call, "PUT call ") \
96 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
97 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
98 EM(rxrpc_conn_put_discard, "PUT discard ") \
99 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
100 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
101 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
102 EM(rxrpc_conn_put_poke, "PUT poke ") \
103 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
104 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
105 EM(rxrpc_conn_put_work, "PUT work ") \
106 EM(rxrpc_conn_queue_challenge, "GQ chall ") \
107 EM(rxrpc_conn_queue_retry_work, "GQ retry-wk") \
108 EM(rxrpc_conn_queue_rx_work, "GQ rx-work ") \
109 EM(rxrpc_conn_queue_timer, "GQ timer ") \
110 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
111 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
112 E_(rxrpc_conn_see_work, "SEE work ")
114 #define rxrpc_client_traces \
115 EM(rxrpc_client_activate_chans, "Activa") \
116 EM(rxrpc_client_alloc, "Alloc ") \
117 EM(rxrpc_client_chan_activate, "ChActv") \
118 EM(rxrpc_client_chan_disconnect, "ChDisc") \
119 EM(rxrpc_client_chan_pass, "ChPass") \
120 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
121 EM(rxrpc_client_cleanup, "Clean ") \
122 EM(rxrpc_client_discard, "Discar") \
123 EM(rxrpc_client_duplicate, "Duplic") \
124 EM(rxrpc_client_exposed, "Expose") \
125 EM(rxrpc_client_replace, "Replac") \
126 EM(rxrpc_client_to_active, "->Actv") \
127 E_(rxrpc_client_to_idle, "->Idle")
129 #define rxrpc_call_traces \
130 EM(rxrpc_call_connected, "CON") \
131 EM(rxrpc_call_error, "*E*") \
132 EM(rxrpc_call_got, "GOT") \
133 EM(rxrpc_call_got_kernel, "Gke") \
134 EM(rxrpc_call_got_timer, "GTM") \
135 EM(rxrpc_call_got_tx, "Gtx") \
136 EM(rxrpc_call_got_userid, "Gus") \
137 EM(rxrpc_call_new_client, "NWc") \
138 EM(rxrpc_call_new_service, "NWs") \
139 EM(rxrpc_call_put, "PUT") \
140 EM(rxrpc_call_put_kernel, "Pke") \
141 EM(rxrpc_call_put_noqueue, "PnQ") \
142 EM(rxrpc_call_put_notimer, "PnT") \
143 EM(rxrpc_call_put_timer, "PTM") \
144 EM(rxrpc_call_put_tx, "Ptx") \
145 EM(rxrpc_call_put_userid, "Pus") \
146 EM(rxrpc_call_queued, "QUE") \
147 EM(rxrpc_call_queued_ref, "QUR") \
148 EM(rxrpc_call_release, "RLS") \
149 E_(rxrpc_call_seen, "SEE")
151 #define rxrpc_txqueue_traces \
152 EM(rxrpc_txqueue_await_reply, "AWR") \
153 EM(rxrpc_txqueue_dequeue, "DEQ") \
154 EM(rxrpc_txqueue_end, "END") \
155 EM(rxrpc_txqueue_queue, "QUE") \
156 EM(rxrpc_txqueue_queue_last, "QLS") \
157 EM(rxrpc_txqueue_rotate, "ROT") \
158 EM(rxrpc_txqueue_rotate_last, "RLS") \
159 E_(rxrpc_txqueue_wait, "WAI")
161 #define rxrpc_receive_traces \
162 EM(rxrpc_receive_end, "END") \
163 EM(rxrpc_receive_front, "FRN") \
164 EM(rxrpc_receive_incoming, "INC") \
165 EM(rxrpc_receive_queue, "QUE") \
166 EM(rxrpc_receive_queue_last, "QLS") \
167 EM(rxrpc_receive_queue_oos, "QUO") \
168 EM(rxrpc_receive_queue_oos_last, "QOL") \
169 EM(rxrpc_receive_oos, "OOS") \
170 EM(rxrpc_receive_oos_last, "OSL") \
171 EM(rxrpc_receive_rotate, "ROT") \
172 E_(rxrpc_receive_rotate_last, "RLS")
174 #define rxrpc_recvmsg_traces \
175 EM(rxrpc_recvmsg_cont, "CONT") \
176 EM(rxrpc_recvmsg_data_return, "DATA") \
177 EM(rxrpc_recvmsg_dequeue, "DEQU") \
178 EM(rxrpc_recvmsg_enter, "ENTR") \
179 EM(rxrpc_recvmsg_full, "FULL") \
180 EM(rxrpc_recvmsg_hole, "HOLE") \
181 EM(rxrpc_recvmsg_next, "NEXT") \
182 EM(rxrpc_recvmsg_requeue, "REQU") \
183 EM(rxrpc_recvmsg_return, "RETN") \
184 EM(rxrpc_recvmsg_terminal, "TERM") \
185 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
186 E_(rxrpc_recvmsg_wait, "WAIT")
188 #define rxrpc_rtt_tx_traces \
189 EM(rxrpc_rtt_tx_cancel, "CNCE") \
190 EM(rxrpc_rtt_tx_data, "DATA") \
191 EM(rxrpc_rtt_tx_no_slot, "FULL") \
192 E_(rxrpc_rtt_tx_ping, "PING")
194 #define rxrpc_rtt_rx_traces \
195 EM(rxrpc_rtt_rx_cancel, "CNCL") \
196 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
197 EM(rxrpc_rtt_rx_lost, "LOST") \
198 EM(rxrpc_rtt_rx_ping_response, "PONG") \
199 E_(rxrpc_rtt_rx_requested_ack, "RACK")
201 #define rxrpc_timer_traces \
202 EM(rxrpc_timer_begin, "Begin ") \
203 EM(rxrpc_timer_exp_ack, "ExpAck") \
204 EM(rxrpc_timer_exp_hard, "ExpHrd") \
205 EM(rxrpc_timer_exp_idle, "ExpIdl") \
206 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
207 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
208 EM(rxrpc_timer_exp_normal, "ExpNml") \
209 EM(rxrpc_timer_exp_ping, "ExpPng") \
210 EM(rxrpc_timer_exp_resend, "ExpRsn") \
211 EM(rxrpc_timer_init_for_reply, "IniRpl") \
212 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
213 EM(rxrpc_timer_restart, "Restrt") \
214 EM(rxrpc_timer_set_for_ack, "SetAck") \
215 EM(rxrpc_timer_set_for_hard, "SetHrd") \
216 EM(rxrpc_timer_set_for_idle, "SetIdl") \
217 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
218 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
219 EM(rxrpc_timer_set_for_normal, "SetNml") \
220 EM(rxrpc_timer_set_for_ping, "SetPng") \
221 EM(rxrpc_timer_set_for_resend, "SetRTx") \
222 E_(rxrpc_timer_set_for_send, "SetSnd")
224 #define rxrpc_propose_ack_traces \
225 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
226 EM(rxrpc_propose_ack_input_data, "DataIn ") \
227 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
228 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
229 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
230 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
231 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
232 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
233 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
234 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
235 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
236 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
237 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
238 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
240 #define rxrpc_congest_modes \
241 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
242 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
243 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
244 E_(RXRPC_CALL_SLOW_START, "SlowStart")
246 #define rxrpc_congest_changes \
247 EM(rxrpc_cong_begin_retransmission, " Retrans") \
248 EM(rxrpc_cong_cleared_nacks, " Cleared") \
249 EM(rxrpc_cong_new_low_nack, " NewLowN") \
250 EM(rxrpc_cong_no_change, " -") \
251 EM(rxrpc_cong_progress, " Progres") \
252 EM(rxrpc_cong_idle_reset, " IdleRes") \
253 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
254 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
255 E_(rxrpc_cong_saw_nack, " SawNack")
259 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
260 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
261 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
262 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
263 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
264 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
265 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
266 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
271 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
275 #define rxrpc_ack_names \
277 EM(RXRPC_ACK_REQUESTED, "REQ") \
278 EM(RXRPC_ACK_DUPLICATE, "DUP") \
279 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
280 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
281 EM(RXRPC_ACK_NOSPACE, "MEM") \
282 EM(RXRPC_ACK_PING, "PNG") \
283 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
284 EM(RXRPC_ACK_DELAY, "DLY") \
285 EM(RXRPC_ACK_IDLE, "IDL") \
286 E_(RXRPC_ACK__INVALID, "-?-")
288 #define rxrpc_completions \
289 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
290 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
291 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
292 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
293 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
295 #define rxrpc_tx_points \
296 EM(rxrpc_tx_point_call_abort, "CallAbort") \
297 EM(rxrpc_tx_point_call_ack, "CallAck") \
298 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
299 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
300 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
301 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
302 EM(rxrpc_tx_point_reject, "Reject") \
303 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
304 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
305 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
306 E_(rxrpc_tx_point_version_reply, "VerReply")
308 #define rxrpc_req_ack_traces \
309 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
310 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
311 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
312 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
313 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
314 EM(rxrpc_reqack_retrans, "RETRANS ") \
315 EM(rxrpc_reqack_slow_start, "SLOW-START") \
316 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
317 /* ---- Must update size of stat_why_req_ack[] if more are added! */
319 #define rxrpc_txbuf_traces \
320 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
321 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
322 EM(rxrpc_txbuf_free, "FREE ") \
323 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
324 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
325 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
326 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
327 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
328 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
329 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
330 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
331 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
332 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
333 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
336 * Generate enums for tracing information.
338 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
339 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
346 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
347 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
348 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
349 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
350 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
351 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
352 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
353 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
354 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
355 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
356 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
357 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
358 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
359 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
360 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
361 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
362 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
363 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
365 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
368 * Export enum symbols via userspace.
372 #define EM(a, b) TRACE_DEFINE_ENUM(a);
373 #define E_(a, b) TRACE_DEFINE_ENUM(a);
377 rxrpc_congest_changes;
381 rxrpc_propose_ack_traces;
382 rxrpc_receive_traces;
383 rxrpc_recvmsg_traces;
384 rxrpc_req_ack_traces;
391 rxrpc_txqueue_traces;
394 * Now redefine the EM() and E_() macros to map the enums to the strings that
395 * will be printed in the output.
399 #define EM(a, b) { a, b },
400 #define E_(a, b) { a, b }
402 TRACE_EVENT(rxrpc_local,
403 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
406 TP_ARGS(local_debug_id, op, ref, usage),
409 __field(unsigned int, local )
416 __entry->local = local_debug_id;
419 __entry->usage = usage;
422 TP_printk("L=%08x %s r=%d u=%d",
424 __print_symbolic(__entry->op, rxrpc_local_traces),
429 TRACE_EVENT(rxrpc_peer,
430 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
432 TP_ARGS(peer_debug_id, ref, why),
435 __field(unsigned int, peer )
441 __entry->peer = peer_debug_id;
446 TP_printk("P=%08x %s r=%d",
448 __print_symbolic(__entry->why, rxrpc_peer_traces),
452 TRACE_EVENT(rxrpc_conn,
453 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
455 TP_ARGS(conn_debug_id, ref, why),
458 __field(unsigned int, conn )
464 __entry->conn = conn_debug_id;
469 TP_printk("C=%08x %s r=%d",
471 __print_symbolic(__entry->why, rxrpc_conn_traces),
475 TRACE_EVENT(rxrpc_client,
476 TP_PROTO(struct rxrpc_connection *conn, int channel,
477 enum rxrpc_client_trace op),
479 TP_ARGS(conn, channel, op),
482 __field(unsigned int, conn )
484 __field(int, channel )
486 __field(enum rxrpc_client_trace, op )
490 __entry->conn = conn ? conn->debug_id : 0;
491 __entry->channel = channel;
492 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
494 __entry->cid = conn ? conn->proto.cid : 0;
497 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
500 __print_symbolic(__entry->op, rxrpc_client_traces),
505 TRACE_EVENT(rxrpc_call,
506 TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
507 int usage, const void *where, const void *aux),
509 TP_ARGS(call_debug_id, op, usage, where, aux),
512 __field(unsigned int, call )
515 __field(const void *, where )
516 __field(const void *, aux )
520 __entry->call = call_debug_id;
522 __entry->usage = usage;
523 __entry->where = where;
527 TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
529 __print_symbolic(__entry->op, rxrpc_call_traces),
535 TRACE_EVENT(rxrpc_skb,
536 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
537 int usage, int mod_count, const void *where),
539 TP_ARGS(skb, op, usage, mod_count, where),
542 __field(struct sk_buff *, skb )
543 __field(enum rxrpc_skb_trace, op )
545 __field(int, mod_count )
546 __field(const void *, where )
552 __entry->usage = usage;
553 __entry->mod_count = mod_count;
554 __entry->where = where;
557 TP_printk("s=%p Rx %s u=%d m=%d p=%pSR",
559 __print_symbolic(__entry->op, rxrpc_skb_traces),
565 TRACE_EVENT(rxrpc_rx_packet,
566 TP_PROTO(struct rxrpc_skb_priv *sp),
571 __field_struct(struct rxrpc_host_header, hdr )
575 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
578 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
579 __entry->hdr.epoch, __entry->hdr.cid,
580 __entry->hdr.callNumber, __entry->hdr.serviceId,
581 __entry->hdr.serial, __entry->hdr.seq,
582 __entry->hdr.type, __entry->hdr.flags,
583 __entry->hdr.type <= 15 ?
584 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
587 TRACE_EVENT(rxrpc_rx_done,
588 TP_PROTO(int result, int abort_code),
590 TP_ARGS(result, abort_code),
593 __field(int, result )
594 __field(int, abort_code )
598 __entry->result = result;
599 __entry->abort_code = abort_code;
602 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
605 TRACE_EVENT(rxrpc_abort,
606 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
607 rxrpc_seq_t seq, int abort_code, int error),
609 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
612 __field(unsigned int, call_nr )
613 __array(char, why, 4 )
615 __field(u32, call_id )
616 __field(rxrpc_seq_t, seq )
617 __field(int, abort_code )
622 memcpy(__entry->why, why, 4);
623 __entry->call_nr = call_nr;
625 __entry->call_id = call_id;
626 __entry->abort_code = abort_code;
627 __entry->error = error;
631 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
633 __entry->cid, __entry->call_id, __entry->seq,
634 __entry->abort_code, __entry->error, __entry->why)
637 TRACE_EVENT(rxrpc_call_complete,
638 TP_PROTO(struct rxrpc_call *call),
643 __field(unsigned int, call )
644 __field(enum rxrpc_call_completion, compl )
646 __field(u32, abort_code )
650 __entry->call = call->debug_id;
651 __entry->compl = call->completion;
652 __entry->error = call->error;
653 __entry->abort_code = call->abort_code;
656 TP_printk("c=%08x %s r=%d ac=%d",
658 __print_symbolic(__entry->compl, rxrpc_completions),
663 TRACE_EVENT(rxrpc_txqueue,
664 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
669 __field(unsigned int, call )
670 __field(enum rxrpc_txqueue_trace, why )
671 __field(rxrpc_seq_t, acks_hard_ack )
672 __field(rxrpc_seq_t, tx_bottom )
673 __field(rxrpc_seq_t, tx_top )
674 __field(int, tx_winsize )
678 __entry->call = call->debug_id;
680 __entry->acks_hard_ack = call->acks_hard_ack;
681 __entry->tx_bottom = call->tx_bottom;
682 __entry->tx_top = call->tx_top;
683 __entry->tx_winsize = call->tx_winsize;
686 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
688 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
690 __entry->acks_hard_ack,
691 __entry->tx_top - __entry->tx_bottom,
692 __entry->tx_top - __entry->acks_hard_ack,
696 TRACE_EVENT(rxrpc_rx_data,
697 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
698 rxrpc_serial_t serial, u8 flags),
700 TP_ARGS(call, seq, serial, flags),
703 __field(unsigned int, call )
704 __field(rxrpc_seq_t, seq )
705 __field(rxrpc_serial_t, serial )
710 __entry->call = call;
712 __entry->serial = serial;
713 __entry->flags = flags;
716 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
723 TRACE_EVENT(rxrpc_rx_ack,
724 TP_PROTO(struct rxrpc_call *call,
725 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
726 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
728 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
731 __field(unsigned int, call )
732 __field(rxrpc_serial_t, serial )
733 __field(rxrpc_serial_t, ack_serial )
734 __field(rxrpc_seq_t, first )
735 __field(rxrpc_seq_t, prev )
741 __entry->call = call->debug_id;
742 __entry->serial = serial;
743 __entry->ack_serial = ack_serial;
744 __entry->first = first;
745 __entry->prev = prev;
746 __entry->reason = reason;
747 __entry->n_acks = n_acks;
750 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
753 __print_symbolic(__entry->reason, rxrpc_ack_names),
760 TRACE_EVENT(rxrpc_rx_abort,
761 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
764 TP_ARGS(call, serial, abort_code),
767 __field(unsigned int, call )
768 __field(rxrpc_serial_t, serial )
769 __field(u32, abort_code )
773 __entry->call = call->debug_id;
774 __entry->serial = serial;
775 __entry->abort_code = abort_code;
778 TP_printk("c=%08x ABORT %08x ac=%d",
784 TRACE_EVENT(rxrpc_rx_challenge,
785 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
786 u32 version, u32 nonce, u32 min_level),
788 TP_ARGS(conn, serial, version, nonce, min_level),
791 __field(unsigned int, conn )
792 __field(rxrpc_serial_t, serial )
793 __field(u32, version )
795 __field(u32, min_level )
799 __entry->conn = conn->debug_id;
800 __entry->serial = serial;
801 __entry->version = version;
802 __entry->nonce = nonce;
803 __entry->min_level = min_level;
806 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
814 TRACE_EVENT(rxrpc_rx_response,
815 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
816 u32 version, u32 kvno, u32 ticket_len),
818 TP_ARGS(conn, serial, version, kvno, ticket_len),
821 __field(unsigned int, conn )
822 __field(rxrpc_serial_t, serial )
823 __field(u32, version )
825 __field(u32, ticket_len )
829 __entry->conn = conn->debug_id;
830 __entry->serial = serial;
831 __entry->version = version;
832 __entry->kvno = kvno;
833 __entry->ticket_len = ticket_len;
836 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
844 TRACE_EVENT(rxrpc_rx_rwind_change,
845 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
846 u32 rwind, bool wake),
848 TP_ARGS(call, serial, rwind, wake),
851 __field(unsigned int, call )
852 __field(rxrpc_serial_t, serial )
858 __entry->call = call->debug_id;
859 __entry->serial = serial;
860 __entry->rwind = rwind;
861 __entry->wake = wake;
864 TP_printk("c=%08x %08x rw=%u%s",
868 __entry->wake ? " wake" : "")
871 TRACE_EVENT(rxrpc_tx_packet,
872 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
873 enum rxrpc_tx_point where),
875 TP_ARGS(call_id, whdr, where),
878 __field(unsigned int, call )
879 __field(enum rxrpc_tx_point, where )
880 __field_struct(struct rxrpc_wire_header, whdr )
884 __entry->call = call_id;
885 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
886 __entry->where = where;
889 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
891 ntohl(__entry->whdr.epoch),
892 ntohl(__entry->whdr.cid),
893 ntohl(__entry->whdr.callNumber),
894 ntohs(__entry->whdr.serviceId),
895 ntohl(__entry->whdr.serial),
896 ntohl(__entry->whdr.seq),
897 __entry->whdr.type, __entry->whdr.flags,
898 __entry->whdr.type <= 15 ?
899 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
900 __print_symbolic(__entry->where, rxrpc_tx_points))
903 TRACE_EVENT(rxrpc_tx_data,
904 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
905 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
907 TP_ARGS(call, seq, serial, flags, retrans, lose),
910 __field(unsigned int, call )
911 __field(rxrpc_seq_t, seq )
912 __field(rxrpc_serial_t, serial )
914 __field(u32, call_id )
916 __field(bool, retrans )
921 __entry->call = call->debug_id;
922 __entry->cid = call->cid;
923 __entry->call_id = call->call_id;
925 __entry->serial = serial;
926 __entry->flags = flags;
927 __entry->retrans = retrans;
928 __entry->lose = lose;
931 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
938 __entry->retrans ? " *RETRANS*" : "",
939 __entry->lose ? " *LOSE*" : "")
942 TRACE_EVENT(rxrpc_tx_ack,
943 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
944 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
945 u8 reason, u8 n_acks),
947 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
950 __field(unsigned int, call )
951 __field(rxrpc_serial_t, serial )
952 __field(rxrpc_seq_t, ack_first )
953 __field(rxrpc_serial_t, ack_serial )
959 __entry->call = call;
960 __entry->serial = serial;
961 __entry->ack_first = ack_first;
962 __entry->ack_serial = ack_serial;
963 __entry->reason = reason;
964 __entry->n_acks = n_acks;
967 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
970 __print_symbolic(__entry->reason, rxrpc_ack_names),
976 TRACE_EVENT(rxrpc_receive,
977 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
978 rxrpc_serial_t serial, rxrpc_seq_t seq),
980 TP_ARGS(call, why, serial, seq),
983 __field(unsigned int, call )
984 __field(enum rxrpc_receive_trace, why )
985 __field(rxrpc_serial_t, serial )
986 __field(rxrpc_seq_t, seq )
987 __field(u64, window )
991 __entry->call = call->debug_id;
993 __entry->serial = serial;
995 __entry->window = atomic64_read(&call->ackr_window);
998 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1000 __print_symbolic(__entry->why, rxrpc_receive_traces),
1003 lower_32_bits(__entry->window),
1004 upper_32_bits(__entry->window))
1007 TRACE_EVENT(rxrpc_recvmsg,
1008 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1011 TP_ARGS(call, why, ret),
1014 __field(unsigned int, call )
1015 __field(enum rxrpc_recvmsg_trace, why )
1020 __entry->call = call ? call->debug_id : 0;
1025 TP_printk("c=%08x %s ret=%d",
1027 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1031 TRACE_EVENT(rxrpc_recvdata,
1032 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1033 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1036 TP_ARGS(call, why, seq, offset, len, ret),
1039 __field(unsigned int, call )
1040 __field(enum rxrpc_recvmsg_trace, why )
1041 __field(rxrpc_seq_t, seq )
1042 __field(unsigned int, offset )
1043 __field(unsigned int, len )
1048 __entry->call = call ? call->debug_id : 0;
1051 __entry->offset = offset;
1056 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1058 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1065 TRACE_EVENT(rxrpc_rtt_tx,
1066 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1067 int slot, rxrpc_serial_t send_serial),
1069 TP_ARGS(call, why, slot, send_serial),
1072 __field(unsigned int, call )
1073 __field(enum rxrpc_rtt_tx_trace, why )
1075 __field(rxrpc_serial_t, send_serial )
1079 __entry->call = call->debug_id;
1081 __entry->slot = slot;
1082 __entry->send_serial = send_serial;
1085 TP_printk("c=%08x [%d] %s sr=%08x",
1088 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1089 __entry->send_serial)
1092 TRACE_EVENT(rxrpc_rtt_rx,
1093 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1095 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1098 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1101 __field(unsigned int, call )
1102 __field(enum rxrpc_rtt_rx_trace, why )
1104 __field(rxrpc_serial_t, send_serial )
1105 __field(rxrpc_serial_t, resp_serial )
1111 __entry->call = call->debug_id;
1113 __entry->slot = slot;
1114 __entry->send_serial = send_serial;
1115 __entry->resp_serial = resp_serial;
1120 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1123 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1124 __entry->send_serial,
1125 __entry->resp_serial,
1130 TRACE_EVENT(rxrpc_timer,
1131 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1134 TP_ARGS(call, why, now),
1137 __field(unsigned int, call )
1138 __field(enum rxrpc_timer_trace, why )
1140 __field(long, ack_at )
1141 __field(long, ack_lost_at )
1142 __field(long, resend_at )
1143 __field(long, ping_at )
1144 __field(long, expect_rx_by )
1145 __field(long, expect_req_by )
1146 __field(long, expect_term_by )
1147 __field(long, timer )
1151 __entry->call = call->debug_id;
1154 __entry->ack_at = call->delay_ack_at;
1155 __entry->ack_lost_at = call->ack_lost_at;
1156 __entry->resend_at = call->resend_at;
1157 __entry->expect_rx_by = call->expect_rx_by;
1158 __entry->expect_req_by = call->expect_req_by;
1159 __entry->expect_term_by = call->expect_term_by;
1160 __entry->timer = call->timer.expires;
1163 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1165 __print_symbolic(__entry->why, rxrpc_timer_traces),
1166 __entry->ack_at - __entry->now,
1167 __entry->ack_lost_at - __entry->now,
1168 __entry->resend_at - __entry->now,
1169 __entry->expect_rx_by - __entry->now,
1170 __entry->expect_req_by - __entry->now,
1171 __entry->expect_term_by - __entry->now,
1172 __entry->timer - __entry->now)
1175 TRACE_EVENT(rxrpc_timer_expired,
1176 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1181 __field(unsigned int, call )
1183 __field(long, ack_at )
1184 __field(long, ack_lost_at )
1185 __field(long, resend_at )
1186 __field(long, ping_at )
1187 __field(long, expect_rx_by )
1188 __field(long, expect_req_by )
1189 __field(long, expect_term_by )
1190 __field(long, timer )
1194 __entry->call = call->debug_id;
1196 __entry->ack_at = call->delay_ack_at;
1197 __entry->ack_lost_at = call->ack_lost_at;
1198 __entry->resend_at = call->resend_at;
1199 __entry->expect_rx_by = call->expect_rx_by;
1200 __entry->expect_req_by = call->expect_req_by;
1201 __entry->expect_term_by = call->expect_term_by;
1202 __entry->timer = call->timer.expires;
1205 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1207 __entry->ack_at - __entry->now,
1208 __entry->ack_lost_at - __entry->now,
1209 __entry->resend_at - __entry->now,
1210 __entry->expect_rx_by - __entry->now,
1211 __entry->expect_req_by - __entry->now,
1212 __entry->expect_term_by - __entry->now,
1213 __entry->timer - __entry->now)
1216 TRACE_EVENT(rxrpc_rx_lose,
1217 TP_PROTO(struct rxrpc_skb_priv *sp),
1222 __field_struct(struct rxrpc_host_header, hdr )
1226 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1229 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1230 __entry->hdr.epoch, __entry->hdr.cid,
1231 __entry->hdr.callNumber, __entry->hdr.serviceId,
1232 __entry->hdr.serial, __entry->hdr.seq,
1233 __entry->hdr.type, __entry->hdr.flags,
1234 __entry->hdr.type <= 15 ?
1235 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1238 TRACE_EVENT(rxrpc_propose_ack,
1239 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1240 u8 ack_reason, rxrpc_serial_t serial),
1242 TP_ARGS(call, why, ack_reason, serial),
1245 __field(unsigned int, call )
1246 __field(enum rxrpc_propose_ack_trace, why )
1247 __field(rxrpc_serial_t, serial )
1248 __field(u8, ack_reason )
1252 __entry->call = call->debug_id;
1254 __entry->serial = serial;
1255 __entry->ack_reason = ack_reason;
1258 TP_printk("c=%08x %s %s r=%08x",
1260 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1261 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1265 TRACE_EVENT(rxrpc_send_ack,
1266 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1267 u8 ack_reason, rxrpc_serial_t serial),
1269 TP_ARGS(call, why, ack_reason, serial),
1272 __field(unsigned int, call )
1273 __field(enum rxrpc_propose_ack_trace, why )
1274 __field(rxrpc_serial_t, serial )
1275 __field(u8, ack_reason )
1279 __entry->call = call->debug_id;
1281 __entry->serial = serial;
1282 __entry->ack_reason = ack_reason;
1285 TP_printk("c=%08x %s %s r=%08x",
1287 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1288 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1292 TRACE_EVENT(rxrpc_drop_ack,
1293 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1294 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1296 TP_ARGS(call, why, ack_reason, serial, nobuf),
1299 __field(unsigned int, call )
1300 __field(enum rxrpc_propose_ack_trace, why )
1301 __field(rxrpc_serial_t, serial )
1302 __field(u8, ack_reason )
1303 __field(bool, nobuf )
1307 __entry->call = call->debug_id;
1309 __entry->serial = serial;
1310 __entry->ack_reason = ack_reason;
1311 __entry->nobuf = nobuf;
1314 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1316 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1317 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1318 __entry->serial, __entry->nobuf)
1321 TRACE_EVENT(rxrpc_retransmit,
1322 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1324 TP_ARGS(call, seq, expiry),
1327 __field(unsigned int, call )
1328 __field(rxrpc_seq_t, seq )
1329 __field(s64, expiry )
1333 __entry->call = call->debug_id;
1335 __entry->expiry = expiry;
1338 TP_printk("c=%08x q=%x xp=%lld",
1344 TRACE_EVENT(rxrpc_congest,
1345 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1346 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1348 TP_ARGS(call, summary, ack_serial, change),
1351 __field(unsigned int, call )
1352 __field(enum rxrpc_congest_change, change )
1353 __field(rxrpc_seq_t, hard_ack )
1354 __field(rxrpc_seq_t, top )
1355 __field(rxrpc_seq_t, lowest_nak )
1356 __field(rxrpc_serial_t, ack_serial )
1357 __field_struct(struct rxrpc_ack_summary, sum )
1361 __entry->call = call->debug_id;
1362 __entry->change = change;
1363 __entry->hard_ack = call->acks_hard_ack;
1364 __entry->top = call->tx_top;
1365 __entry->lowest_nak = call->acks_lowest_nak;
1366 __entry->ack_serial = ack_serial;
1367 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1370 TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nA=%u,%u+%u r=%u b=%u u=%u d=%u l=%x%s%s%s",
1372 __entry->ack_serial,
1373 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1375 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1377 __entry->sum.ssthresh,
1378 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1379 __entry->sum.nr_new_acks,
1380 __entry->sum.nr_rot_new_acks,
1381 __entry->top - __entry->hard_ack,
1382 __entry->sum.cumulative_acks,
1383 __entry->sum.dup_acks,
1384 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1385 __print_symbolic(__entry->change, rxrpc_congest_changes),
1386 __entry->sum.retrans_timeo ? " rTxTo" : "")
1389 TRACE_EVENT(rxrpc_disconnect_call,
1390 TP_PROTO(struct rxrpc_call *call),
1395 __field(unsigned int, call )
1396 __field(u32, abort_code )
1400 __entry->call = call->debug_id;
1401 __entry->abort_code = call->abort_code;
1404 TP_printk("c=%08x ab=%08x",
1406 __entry->abort_code)
1409 TRACE_EVENT(rxrpc_improper_term,
1410 TP_PROTO(struct rxrpc_call *call),
1415 __field(unsigned int, call )
1416 __field(u32, abort_code )
1420 __entry->call = call->debug_id;
1421 __entry->abort_code = call->abort_code;
1424 TP_printk("c=%08x ab=%08x",
1426 __entry->abort_code)
1429 TRACE_EVENT(rxrpc_rx_eproto,
1430 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1433 TP_ARGS(call, serial, why),
1436 __field(unsigned int, call )
1437 __field(rxrpc_serial_t, serial )
1438 __field(const char *, why )
1442 __entry->call = call ? call->debug_id : 0;
1443 __entry->serial = serial;
1447 TP_printk("c=%08x EPROTO %08x %s",
1453 TRACE_EVENT(rxrpc_connect_call,
1454 TP_PROTO(struct rxrpc_call *call),
1459 __field(unsigned int, call )
1460 __field(unsigned long, user_call_ID )
1462 __field(u32, call_id )
1466 __entry->call = call->debug_id;
1467 __entry->user_call_ID = call->user_call_ID;
1468 __entry->cid = call->cid;
1469 __entry->call_id = call->call_id;
1472 TP_printk("c=%08x u=%p %08x:%08x",
1474 (void *)__entry->user_call_ID,
1479 TRACE_EVENT(rxrpc_resend,
1480 TP_PROTO(struct rxrpc_call *call),
1485 __field(unsigned int, call )
1486 __field(rxrpc_seq_t, seq )
1490 __entry->call = call->debug_id;
1491 __entry->seq = call->acks_hard_ack;
1494 TP_printk("c=%08x q=%x",
1499 TRACE_EVENT(rxrpc_rx_icmp,
1500 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1501 struct sockaddr_rxrpc *srx),
1503 TP_ARGS(peer, ee, srx),
1506 __field(unsigned int, peer )
1507 __field_struct(struct sock_extended_err, ee )
1508 __field_struct(struct sockaddr_rxrpc, srx )
1512 __entry->peer = peer->debug_id;
1513 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1514 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1517 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1519 __entry->ee.ee_origin,
1520 __entry->ee.ee_type,
1521 __entry->ee.ee_code,
1522 __entry->ee.ee_info,
1523 __entry->ee.ee_data,
1524 __entry->ee.ee_errno,
1525 &__entry->srx.transport)
1528 TRACE_EVENT(rxrpc_tx_fail,
1529 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1530 enum rxrpc_tx_point where),
1532 TP_ARGS(debug_id, serial, ret, where),
1535 __field(unsigned int, debug_id )
1536 __field(rxrpc_serial_t, serial )
1538 __field(enum rxrpc_tx_point, where )
1542 __entry->debug_id = debug_id;
1543 __entry->serial = serial;
1545 __entry->where = where;
1548 TP_printk("c=%08x r=%x ret=%d %s",
1552 __print_symbolic(__entry->where, rxrpc_tx_points))
1555 TRACE_EVENT(rxrpc_call_reset,
1556 TP_PROTO(struct rxrpc_call *call),
1561 __field(unsigned int, debug_id )
1563 __field(u32, call_id )
1564 __field(rxrpc_serial_t, call_serial )
1565 __field(rxrpc_serial_t, conn_serial )
1566 __field(rxrpc_seq_t, tx_seq )
1567 __field(rxrpc_seq_t, rx_seq )
1571 __entry->debug_id = call->debug_id;
1572 __entry->cid = call->cid;
1573 __entry->call_id = call->call_id;
1574 __entry->call_serial = call->rx_serial;
1575 __entry->conn_serial = call->conn->hi_serial;
1576 __entry->tx_seq = call->acks_hard_ack;
1577 __entry->rx_seq = call->rx_highest_seq;
1580 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1582 __entry->cid, __entry->call_id,
1583 __entry->call_serial, __entry->conn_serial,
1584 __entry->tx_seq, __entry->rx_seq)
1587 TRACE_EVENT(rxrpc_notify_socket,
1588 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1590 TP_ARGS(debug_id, serial),
1593 __field(unsigned int, debug_id )
1594 __field(rxrpc_serial_t, serial )
1598 __entry->debug_id = debug_id;
1599 __entry->serial = serial;
1602 TP_printk("c=%08x r=%08x",
1607 TRACE_EVENT(rxrpc_rx_discard_ack,
1608 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1609 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1610 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1612 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1613 prev_pkt, call_ackr_prev),
1616 __field(unsigned int, debug_id )
1617 __field(rxrpc_serial_t, serial )
1618 __field(rxrpc_seq_t, first_soft_ack)
1619 __field(rxrpc_seq_t, call_ackr_first)
1620 __field(rxrpc_seq_t, prev_pkt)
1621 __field(rxrpc_seq_t, call_ackr_prev)
1625 __entry->debug_id = debug_id;
1626 __entry->serial = serial;
1627 __entry->first_soft_ack = first_soft_ack;
1628 __entry->call_ackr_first = call_ackr_first;
1629 __entry->prev_pkt = prev_pkt;
1630 __entry->call_ackr_prev = call_ackr_prev;
1633 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1636 __entry->first_soft_ack,
1637 __entry->call_ackr_first,
1639 __entry->call_ackr_prev)
1642 TRACE_EVENT(rxrpc_req_ack,
1643 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1644 enum rxrpc_req_ack_trace why),
1646 TP_ARGS(call_debug_id, seq, why),
1649 __field(unsigned int, call_debug_id )
1650 __field(rxrpc_seq_t, seq )
1651 __field(enum rxrpc_req_ack_trace, why )
1655 __entry->call_debug_id = call_debug_id;
1660 TP_printk("c=%08x q=%08x REQ-%s",
1661 __entry->call_debug_id,
1663 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1666 TRACE_EVENT(rxrpc_txbuf,
1667 TP_PROTO(unsigned int debug_id,
1668 unsigned int call_debug_id, rxrpc_seq_t seq,
1669 int ref, enum rxrpc_txbuf_trace what),
1671 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1674 __field(unsigned int, debug_id )
1675 __field(unsigned int, call_debug_id )
1676 __field(rxrpc_seq_t, seq )
1678 __field(enum rxrpc_txbuf_trace, what )
1682 __entry->debug_id = debug_id;
1683 __entry->call_debug_id = call_debug_id;
1686 __entry->what = what;
1689 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1691 __entry->call_debug_id,
1693 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1699 #endif /* _TRACE_RXRPC_H */
1701 /* This part must be outside protection */
1702 #include <trace/define_trace.h>