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_get_input, "GET input ") \
131 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
132 EM(rxrpc_call_get_notify_socket, "GET notify ") \
133 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
134 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
135 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
136 EM(rxrpc_call_get_send_ack, "GET send-ack") \
137 EM(rxrpc_call_get_timer, "GET timer ") \
138 EM(rxrpc_call_get_userid, "GET user-id ") \
139 EM(rxrpc_call_new_client, "NEW client ") \
140 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
141 EM(rxrpc_call_put_already_queued, "PUT alreadyq") \
142 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
143 EM(rxrpc_call_put_input, "PUT input ") \
144 EM(rxrpc_call_put_kernel, "PUT kernel ") \
145 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
146 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
147 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
148 EM(rxrpc_call_put_send_ack, "PUT send-ack") \
149 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
150 EM(rxrpc_call_put_timer, "PUT timer ") \
151 EM(rxrpc_call_put_timer_already, "PUT timer-al") \
152 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
153 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
154 EM(rxrpc_call_put_work, "PUT work ") \
155 EM(rxrpc_call_queue_abort, "QUE abort ") \
156 EM(rxrpc_call_queue_requeue, "QUE requeue ") \
157 EM(rxrpc_call_queue_resend, "QUE resend ") \
158 EM(rxrpc_call_queue_timer, "QUE timer ") \
159 EM(rxrpc_call_see_accept, "SEE accept ") \
160 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
161 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
162 EM(rxrpc_call_see_connected, "SEE connect ") \
163 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
164 EM(rxrpc_call_see_input, "SEE input ") \
165 EM(rxrpc_call_see_release, "SEE release ") \
166 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
167 E_(rxrpc_call_see_zap, "SEE zap ")
169 #define rxrpc_txqueue_traces \
170 EM(rxrpc_txqueue_await_reply, "AWR") \
171 EM(rxrpc_txqueue_dequeue, "DEQ") \
172 EM(rxrpc_txqueue_end, "END") \
173 EM(rxrpc_txqueue_queue, "QUE") \
174 EM(rxrpc_txqueue_queue_last, "QLS") \
175 EM(rxrpc_txqueue_rotate, "ROT") \
176 EM(rxrpc_txqueue_rotate_last, "RLS") \
177 E_(rxrpc_txqueue_wait, "WAI")
179 #define rxrpc_receive_traces \
180 EM(rxrpc_receive_end, "END") \
181 EM(rxrpc_receive_front, "FRN") \
182 EM(rxrpc_receive_incoming, "INC") \
183 EM(rxrpc_receive_queue, "QUE") \
184 EM(rxrpc_receive_queue_last, "QLS") \
185 EM(rxrpc_receive_queue_oos, "QUO") \
186 EM(rxrpc_receive_queue_oos_last, "QOL") \
187 EM(rxrpc_receive_oos, "OOS") \
188 EM(rxrpc_receive_oos_last, "OSL") \
189 EM(rxrpc_receive_rotate, "ROT") \
190 E_(rxrpc_receive_rotate_last, "RLS")
192 #define rxrpc_recvmsg_traces \
193 EM(rxrpc_recvmsg_cont, "CONT") \
194 EM(rxrpc_recvmsg_data_return, "DATA") \
195 EM(rxrpc_recvmsg_dequeue, "DEQU") \
196 EM(rxrpc_recvmsg_enter, "ENTR") \
197 EM(rxrpc_recvmsg_full, "FULL") \
198 EM(rxrpc_recvmsg_hole, "HOLE") \
199 EM(rxrpc_recvmsg_next, "NEXT") \
200 EM(rxrpc_recvmsg_requeue, "REQU") \
201 EM(rxrpc_recvmsg_return, "RETN") \
202 EM(rxrpc_recvmsg_terminal, "TERM") \
203 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
204 E_(rxrpc_recvmsg_wait, "WAIT")
206 #define rxrpc_rtt_tx_traces \
207 EM(rxrpc_rtt_tx_cancel, "CNCE") \
208 EM(rxrpc_rtt_tx_data, "DATA") \
209 EM(rxrpc_rtt_tx_no_slot, "FULL") \
210 E_(rxrpc_rtt_tx_ping, "PING")
212 #define rxrpc_rtt_rx_traces \
213 EM(rxrpc_rtt_rx_cancel, "CNCL") \
214 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
215 EM(rxrpc_rtt_rx_lost, "LOST") \
216 EM(rxrpc_rtt_rx_ping_response, "PONG") \
217 E_(rxrpc_rtt_rx_requested_ack, "RACK")
219 #define rxrpc_timer_traces \
220 EM(rxrpc_timer_begin, "Begin ") \
221 EM(rxrpc_timer_exp_ack, "ExpAck") \
222 EM(rxrpc_timer_exp_hard, "ExpHrd") \
223 EM(rxrpc_timer_exp_idle, "ExpIdl") \
224 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
225 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
226 EM(rxrpc_timer_exp_normal, "ExpNml") \
227 EM(rxrpc_timer_exp_ping, "ExpPng") \
228 EM(rxrpc_timer_exp_resend, "ExpRsn") \
229 EM(rxrpc_timer_init_for_reply, "IniRpl") \
230 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
231 EM(rxrpc_timer_restart, "Restrt") \
232 EM(rxrpc_timer_set_for_ack, "SetAck") \
233 EM(rxrpc_timer_set_for_hard, "SetHrd") \
234 EM(rxrpc_timer_set_for_idle, "SetIdl") \
235 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
236 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
237 EM(rxrpc_timer_set_for_normal, "SetNml") \
238 EM(rxrpc_timer_set_for_ping, "SetPng") \
239 EM(rxrpc_timer_set_for_resend, "SetRTx") \
240 E_(rxrpc_timer_set_for_send, "SetSnd")
242 #define rxrpc_propose_ack_traces \
243 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
244 EM(rxrpc_propose_ack_input_data, "DataIn ") \
245 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
246 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
247 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
248 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
249 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
250 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
251 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
252 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
253 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
254 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
255 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
256 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
258 #define rxrpc_congest_modes \
259 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
260 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
261 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
262 E_(RXRPC_CALL_SLOW_START, "SlowStart")
264 #define rxrpc_congest_changes \
265 EM(rxrpc_cong_begin_retransmission, " Retrans") \
266 EM(rxrpc_cong_cleared_nacks, " Cleared") \
267 EM(rxrpc_cong_new_low_nack, " NewLowN") \
268 EM(rxrpc_cong_no_change, " -") \
269 EM(rxrpc_cong_progress, " Progres") \
270 EM(rxrpc_cong_idle_reset, " IdleRes") \
271 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
272 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
273 E_(rxrpc_cong_saw_nack, " SawNack")
277 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
278 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
279 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
280 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
281 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
282 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
283 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
284 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
289 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
293 #define rxrpc_ack_names \
295 EM(RXRPC_ACK_REQUESTED, "REQ") \
296 EM(RXRPC_ACK_DUPLICATE, "DUP") \
297 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
298 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
299 EM(RXRPC_ACK_NOSPACE, "MEM") \
300 EM(RXRPC_ACK_PING, "PNG") \
301 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
302 EM(RXRPC_ACK_DELAY, "DLY") \
303 EM(RXRPC_ACK_IDLE, "IDL") \
304 E_(RXRPC_ACK__INVALID, "-?-")
306 #define rxrpc_completions \
307 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
308 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
309 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
310 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
311 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
313 #define rxrpc_tx_points \
314 EM(rxrpc_tx_point_call_abort, "CallAbort") \
315 EM(rxrpc_tx_point_call_ack, "CallAck") \
316 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
317 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
318 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
319 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
320 EM(rxrpc_tx_point_reject, "Reject") \
321 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
322 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
323 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
324 E_(rxrpc_tx_point_version_reply, "VerReply")
326 #define rxrpc_req_ack_traces \
327 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
328 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
329 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
330 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
331 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
332 EM(rxrpc_reqack_retrans, "RETRANS ") \
333 EM(rxrpc_reqack_slow_start, "SLOW-START") \
334 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
335 /* ---- Must update size of stat_why_req_ack[] if more are added! */
337 #define rxrpc_txbuf_traces \
338 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
339 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
340 EM(rxrpc_txbuf_free, "FREE ") \
341 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
342 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
343 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
344 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
345 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
346 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
347 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
348 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
349 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
350 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
351 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
354 * Generate enums for tracing information.
356 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
357 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
364 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
365 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
366 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
367 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
368 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
369 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
370 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
371 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
372 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
373 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
374 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
375 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
376 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
377 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
378 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
379 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
380 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
381 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
383 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
386 * Export enum symbols via userspace.
390 #define EM(a, b) TRACE_DEFINE_ENUM(a);
391 #define E_(a, b) TRACE_DEFINE_ENUM(a);
395 rxrpc_congest_changes;
399 rxrpc_propose_ack_traces;
400 rxrpc_receive_traces;
401 rxrpc_recvmsg_traces;
402 rxrpc_req_ack_traces;
409 rxrpc_txqueue_traces;
412 * Now redefine the EM() and E_() macros to map the enums to the strings that
413 * will be printed in the output.
417 #define EM(a, b) { a, b },
418 #define E_(a, b) { a, b }
420 TRACE_EVENT(rxrpc_local,
421 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
424 TP_ARGS(local_debug_id, op, ref, usage),
427 __field(unsigned int, local )
434 __entry->local = local_debug_id;
437 __entry->usage = usage;
440 TP_printk("L=%08x %s r=%d u=%d",
442 __print_symbolic(__entry->op, rxrpc_local_traces),
447 TRACE_EVENT(rxrpc_peer,
448 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
450 TP_ARGS(peer_debug_id, ref, why),
453 __field(unsigned int, peer )
459 __entry->peer = peer_debug_id;
464 TP_printk("P=%08x %s r=%d",
466 __print_symbolic(__entry->why, rxrpc_peer_traces),
470 TRACE_EVENT(rxrpc_conn,
471 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
473 TP_ARGS(conn_debug_id, ref, why),
476 __field(unsigned int, conn )
482 __entry->conn = conn_debug_id;
487 TP_printk("C=%08x %s r=%d",
489 __print_symbolic(__entry->why, rxrpc_conn_traces),
493 TRACE_EVENT(rxrpc_client,
494 TP_PROTO(struct rxrpc_connection *conn, int channel,
495 enum rxrpc_client_trace op),
497 TP_ARGS(conn, channel, op),
500 __field(unsigned int, conn )
502 __field(int, channel )
504 __field(enum rxrpc_client_trace, op )
508 __entry->conn = conn ? conn->debug_id : 0;
509 __entry->channel = channel;
510 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
512 __entry->cid = conn ? conn->proto.cid : 0;
515 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
518 __print_symbolic(__entry->op, rxrpc_client_traces),
523 TRACE_EVENT(rxrpc_call,
524 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
525 enum rxrpc_call_trace why),
527 TP_ARGS(call_debug_id, ref, aux, why),
530 __field(unsigned int, call )
533 __field(unsigned long, aux )
537 __entry->call = call_debug_id;
543 TP_printk("c=%08x %s r=%d a=%lx",
545 __print_symbolic(__entry->why, rxrpc_call_traces),
550 TRACE_EVENT(rxrpc_skb,
551 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
552 int usage, int mod_count, const void *where),
554 TP_ARGS(skb, op, usage, mod_count, where),
557 __field(struct sk_buff *, skb )
558 __field(enum rxrpc_skb_trace, op )
560 __field(int, mod_count )
561 __field(const void *, where )
567 __entry->usage = usage;
568 __entry->mod_count = mod_count;
569 __entry->where = where;
572 TP_printk("s=%p Rx %s u=%d m=%d p=%pSR",
574 __print_symbolic(__entry->op, rxrpc_skb_traces),
580 TRACE_EVENT(rxrpc_rx_packet,
581 TP_PROTO(struct rxrpc_skb_priv *sp),
586 __field_struct(struct rxrpc_host_header, hdr )
590 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
593 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
594 __entry->hdr.epoch, __entry->hdr.cid,
595 __entry->hdr.callNumber, __entry->hdr.serviceId,
596 __entry->hdr.serial, __entry->hdr.seq,
597 __entry->hdr.type, __entry->hdr.flags,
598 __entry->hdr.type <= 15 ?
599 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
602 TRACE_EVENT(rxrpc_rx_done,
603 TP_PROTO(int result, int abort_code),
605 TP_ARGS(result, abort_code),
608 __field(int, result )
609 __field(int, abort_code )
613 __entry->result = result;
614 __entry->abort_code = abort_code;
617 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
620 TRACE_EVENT(rxrpc_abort,
621 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
622 rxrpc_seq_t seq, int abort_code, int error),
624 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
627 __field(unsigned int, call_nr )
628 __array(char, why, 4 )
630 __field(u32, call_id )
631 __field(rxrpc_seq_t, seq )
632 __field(int, abort_code )
637 memcpy(__entry->why, why, 4);
638 __entry->call_nr = call_nr;
640 __entry->call_id = call_id;
641 __entry->abort_code = abort_code;
642 __entry->error = error;
646 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
648 __entry->cid, __entry->call_id, __entry->seq,
649 __entry->abort_code, __entry->error, __entry->why)
652 TRACE_EVENT(rxrpc_call_complete,
653 TP_PROTO(struct rxrpc_call *call),
658 __field(unsigned int, call )
659 __field(enum rxrpc_call_completion, compl )
661 __field(u32, abort_code )
665 __entry->call = call->debug_id;
666 __entry->compl = call->completion;
667 __entry->error = call->error;
668 __entry->abort_code = call->abort_code;
671 TP_printk("c=%08x %s r=%d ac=%d",
673 __print_symbolic(__entry->compl, rxrpc_completions),
678 TRACE_EVENT(rxrpc_txqueue,
679 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
684 __field(unsigned int, call )
685 __field(enum rxrpc_txqueue_trace, why )
686 __field(rxrpc_seq_t, acks_hard_ack )
687 __field(rxrpc_seq_t, tx_bottom )
688 __field(rxrpc_seq_t, tx_top )
689 __field(int, tx_winsize )
693 __entry->call = call->debug_id;
695 __entry->acks_hard_ack = call->acks_hard_ack;
696 __entry->tx_bottom = call->tx_bottom;
697 __entry->tx_top = call->tx_top;
698 __entry->tx_winsize = call->tx_winsize;
701 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
703 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
705 __entry->acks_hard_ack,
706 __entry->tx_top - __entry->tx_bottom,
707 __entry->tx_top - __entry->acks_hard_ack,
711 TRACE_EVENT(rxrpc_rx_data,
712 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
713 rxrpc_serial_t serial, u8 flags),
715 TP_ARGS(call, seq, serial, flags),
718 __field(unsigned int, call )
719 __field(rxrpc_seq_t, seq )
720 __field(rxrpc_serial_t, serial )
725 __entry->call = call;
727 __entry->serial = serial;
728 __entry->flags = flags;
731 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
738 TRACE_EVENT(rxrpc_rx_ack,
739 TP_PROTO(struct rxrpc_call *call,
740 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
741 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
743 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
746 __field(unsigned int, call )
747 __field(rxrpc_serial_t, serial )
748 __field(rxrpc_serial_t, ack_serial )
749 __field(rxrpc_seq_t, first )
750 __field(rxrpc_seq_t, prev )
756 __entry->call = call->debug_id;
757 __entry->serial = serial;
758 __entry->ack_serial = ack_serial;
759 __entry->first = first;
760 __entry->prev = prev;
761 __entry->reason = reason;
762 __entry->n_acks = n_acks;
765 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
768 __print_symbolic(__entry->reason, rxrpc_ack_names),
775 TRACE_EVENT(rxrpc_rx_abort,
776 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
779 TP_ARGS(call, serial, abort_code),
782 __field(unsigned int, call )
783 __field(rxrpc_serial_t, serial )
784 __field(u32, abort_code )
788 __entry->call = call->debug_id;
789 __entry->serial = serial;
790 __entry->abort_code = abort_code;
793 TP_printk("c=%08x ABORT %08x ac=%d",
799 TRACE_EVENT(rxrpc_rx_challenge,
800 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
801 u32 version, u32 nonce, u32 min_level),
803 TP_ARGS(conn, serial, version, nonce, min_level),
806 __field(unsigned int, conn )
807 __field(rxrpc_serial_t, serial )
808 __field(u32, version )
810 __field(u32, min_level )
814 __entry->conn = conn->debug_id;
815 __entry->serial = serial;
816 __entry->version = version;
817 __entry->nonce = nonce;
818 __entry->min_level = min_level;
821 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
829 TRACE_EVENT(rxrpc_rx_response,
830 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
831 u32 version, u32 kvno, u32 ticket_len),
833 TP_ARGS(conn, serial, version, kvno, ticket_len),
836 __field(unsigned int, conn )
837 __field(rxrpc_serial_t, serial )
838 __field(u32, version )
840 __field(u32, ticket_len )
844 __entry->conn = conn->debug_id;
845 __entry->serial = serial;
846 __entry->version = version;
847 __entry->kvno = kvno;
848 __entry->ticket_len = ticket_len;
851 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
859 TRACE_EVENT(rxrpc_rx_rwind_change,
860 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
861 u32 rwind, bool wake),
863 TP_ARGS(call, serial, rwind, wake),
866 __field(unsigned int, call )
867 __field(rxrpc_serial_t, serial )
873 __entry->call = call->debug_id;
874 __entry->serial = serial;
875 __entry->rwind = rwind;
876 __entry->wake = wake;
879 TP_printk("c=%08x %08x rw=%u%s",
883 __entry->wake ? " wake" : "")
886 TRACE_EVENT(rxrpc_tx_packet,
887 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
888 enum rxrpc_tx_point where),
890 TP_ARGS(call_id, whdr, where),
893 __field(unsigned int, call )
894 __field(enum rxrpc_tx_point, where )
895 __field_struct(struct rxrpc_wire_header, whdr )
899 __entry->call = call_id;
900 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
901 __entry->where = where;
904 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
906 ntohl(__entry->whdr.epoch),
907 ntohl(__entry->whdr.cid),
908 ntohl(__entry->whdr.callNumber),
909 ntohs(__entry->whdr.serviceId),
910 ntohl(__entry->whdr.serial),
911 ntohl(__entry->whdr.seq),
912 __entry->whdr.type, __entry->whdr.flags,
913 __entry->whdr.type <= 15 ?
914 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
915 __print_symbolic(__entry->where, rxrpc_tx_points))
918 TRACE_EVENT(rxrpc_tx_data,
919 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
920 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
922 TP_ARGS(call, seq, serial, flags, retrans, lose),
925 __field(unsigned int, call )
926 __field(rxrpc_seq_t, seq )
927 __field(rxrpc_serial_t, serial )
929 __field(u32, call_id )
931 __field(bool, retrans )
936 __entry->call = call->debug_id;
937 __entry->cid = call->cid;
938 __entry->call_id = call->call_id;
940 __entry->serial = serial;
941 __entry->flags = flags;
942 __entry->retrans = retrans;
943 __entry->lose = lose;
946 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
953 __entry->retrans ? " *RETRANS*" : "",
954 __entry->lose ? " *LOSE*" : "")
957 TRACE_EVENT(rxrpc_tx_ack,
958 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
959 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
960 u8 reason, u8 n_acks),
962 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
965 __field(unsigned int, call )
966 __field(rxrpc_serial_t, serial )
967 __field(rxrpc_seq_t, ack_first )
968 __field(rxrpc_serial_t, ack_serial )
974 __entry->call = call;
975 __entry->serial = serial;
976 __entry->ack_first = ack_first;
977 __entry->ack_serial = ack_serial;
978 __entry->reason = reason;
979 __entry->n_acks = n_acks;
982 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
985 __print_symbolic(__entry->reason, rxrpc_ack_names),
991 TRACE_EVENT(rxrpc_receive,
992 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
993 rxrpc_serial_t serial, rxrpc_seq_t seq),
995 TP_ARGS(call, why, serial, seq),
998 __field(unsigned int, call )
999 __field(enum rxrpc_receive_trace, why )
1000 __field(rxrpc_serial_t, serial )
1001 __field(rxrpc_seq_t, seq )
1002 __field(u64, window )
1006 __entry->call = call->debug_id;
1008 __entry->serial = serial;
1010 __entry->window = atomic64_read(&call->ackr_window);
1013 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1015 __print_symbolic(__entry->why, rxrpc_receive_traces),
1018 lower_32_bits(__entry->window),
1019 upper_32_bits(__entry->window))
1022 TRACE_EVENT(rxrpc_recvmsg,
1023 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1026 TP_ARGS(call, why, ret),
1029 __field(unsigned int, call )
1030 __field(enum rxrpc_recvmsg_trace, why )
1035 __entry->call = call ? call->debug_id : 0;
1040 TP_printk("c=%08x %s ret=%d",
1042 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1046 TRACE_EVENT(rxrpc_recvdata,
1047 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1048 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1051 TP_ARGS(call, why, seq, offset, len, ret),
1054 __field(unsigned int, call )
1055 __field(enum rxrpc_recvmsg_trace, why )
1056 __field(rxrpc_seq_t, seq )
1057 __field(unsigned int, offset )
1058 __field(unsigned int, len )
1063 __entry->call = call ? call->debug_id : 0;
1066 __entry->offset = offset;
1071 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1073 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1080 TRACE_EVENT(rxrpc_rtt_tx,
1081 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1082 int slot, rxrpc_serial_t send_serial),
1084 TP_ARGS(call, why, slot, send_serial),
1087 __field(unsigned int, call )
1088 __field(enum rxrpc_rtt_tx_trace, why )
1090 __field(rxrpc_serial_t, send_serial )
1094 __entry->call = call->debug_id;
1096 __entry->slot = slot;
1097 __entry->send_serial = send_serial;
1100 TP_printk("c=%08x [%d] %s sr=%08x",
1103 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1104 __entry->send_serial)
1107 TRACE_EVENT(rxrpc_rtt_rx,
1108 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1110 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1113 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1116 __field(unsigned int, call )
1117 __field(enum rxrpc_rtt_rx_trace, why )
1119 __field(rxrpc_serial_t, send_serial )
1120 __field(rxrpc_serial_t, resp_serial )
1126 __entry->call = call->debug_id;
1128 __entry->slot = slot;
1129 __entry->send_serial = send_serial;
1130 __entry->resp_serial = resp_serial;
1135 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1138 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1139 __entry->send_serial,
1140 __entry->resp_serial,
1145 TRACE_EVENT(rxrpc_timer,
1146 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1149 TP_ARGS(call, why, now),
1152 __field(unsigned int, call )
1153 __field(enum rxrpc_timer_trace, why )
1155 __field(long, ack_at )
1156 __field(long, ack_lost_at )
1157 __field(long, resend_at )
1158 __field(long, ping_at )
1159 __field(long, expect_rx_by )
1160 __field(long, expect_req_by )
1161 __field(long, expect_term_by )
1162 __field(long, timer )
1166 __entry->call = call->debug_id;
1169 __entry->ack_at = call->delay_ack_at;
1170 __entry->ack_lost_at = call->ack_lost_at;
1171 __entry->resend_at = call->resend_at;
1172 __entry->expect_rx_by = call->expect_rx_by;
1173 __entry->expect_req_by = call->expect_req_by;
1174 __entry->expect_term_by = call->expect_term_by;
1175 __entry->timer = call->timer.expires;
1178 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1180 __print_symbolic(__entry->why, rxrpc_timer_traces),
1181 __entry->ack_at - __entry->now,
1182 __entry->ack_lost_at - __entry->now,
1183 __entry->resend_at - __entry->now,
1184 __entry->expect_rx_by - __entry->now,
1185 __entry->expect_req_by - __entry->now,
1186 __entry->expect_term_by - __entry->now,
1187 __entry->timer - __entry->now)
1190 TRACE_EVENT(rxrpc_timer_expired,
1191 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1196 __field(unsigned int, call )
1198 __field(long, ack_at )
1199 __field(long, ack_lost_at )
1200 __field(long, resend_at )
1201 __field(long, ping_at )
1202 __field(long, expect_rx_by )
1203 __field(long, expect_req_by )
1204 __field(long, expect_term_by )
1205 __field(long, timer )
1209 __entry->call = call->debug_id;
1211 __entry->ack_at = call->delay_ack_at;
1212 __entry->ack_lost_at = call->ack_lost_at;
1213 __entry->resend_at = call->resend_at;
1214 __entry->expect_rx_by = call->expect_rx_by;
1215 __entry->expect_req_by = call->expect_req_by;
1216 __entry->expect_term_by = call->expect_term_by;
1217 __entry->timer = call->timer.expires;
1220 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1222 __entry->ack_at - __entry->now,
1223 __entry->ack_lost_at - __entry->now,
1224 __entry->resend_at - __entry->now,
1225 __entry->expect_rx_by - __entry->now,
1226 __entry->expect_req_by - __entry->now,
1227 __entry->expect_term_by - __entry->now,
1228 __entry->timer - __entry->now)
1231 TRACE_EVENT(rxrpc_rx_lose,
1232 TP_PROTO(struct rxrpc_skb_priv *sp),
1237 __field_struct(struct rxrpc_host_header, hdr )
1241 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1244 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1245 __entry->hdr.epoch, __entry->hdr.cid,
1246 __entry->hdr.callNumber, __entry->hdr.serviceId,
1247 __entry->hdr.serial, __entry->hdr.seq,
1248 __entry->hdr.type, __entry->hdr.flags,
1249 __entry->hdr.type <= 15 ?
1250 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1253 TRACE_EVENT(rxrpc_propose_ack,
1254 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1255 u8 ack_reason, rxrpc_serial_t serial),
1257 TP_ARGS(call, why, ack_reason, serial),
1260 __field(unsigned int, call )
1261 __field(enum rxrpc_propose_ack_trace, why )
1262 __field(rxrpc_serial_t, serial )
1263 __field(u8, ack_reason )
1267 __entry->call = call->debug_id;
1269 __entry->serial = serial;
1270 __entry->ack_reason = ack_reason;
1273 TP_printk("c=%08x %s %s r=%08x",
1275 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1276 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1280 TRACE_EVENT(rxrpc_send_ack,
1281 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1282 u8 ack_reason, rxrpc_serial_t serial),
1284 TP_ARGS(call, why, ack_reason, serial),
1287 __field(unsigned int, call )
1288 __field(enum rxrpc_propose_ack_trace, why )
1289 __field(rxrpc_serial_t, serial )
1290 __field(u8, ack_reason )
1294 __entry->call = call->debug_id;
1296 __entry->serial = serial;
1297 __entry->ack_reason = ack_reason;
1300 TP_printk("c=%08x %s %s r=%08x",
1302 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1303 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1307 TRACE_EVENT(rxrpc_drop_ack,
1308 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1309 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1311 TP_ARGS(call, why, ack_reason, serial, nobuf),
1314 __field(unsigned int, call )
1315 __field(enum rxrpc_propose_ack_trace, why )
1316 __field(rxrpc_serial_t, serial )
1317 __field(u8, ack_reason )
1318 __field(bool, nobuf )
1322 __entry->call = call->debug_id;
1324 __entry->serial = serial;
1325 __entry->ack_reason = ack_reason;
1326 __entry->nobuf = nobuf;
1329 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1331 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1332 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1333 __entry->serial, __entry->nobuf)
1336 TRACE_EVENT(rxrpc_retransmit,
1337 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1339 TP_ARGS(call, seq, expiry),
1342 __field(unsigned int, call )
1343 __field(rxrpc_seq_t, seq )
1344 __field(s64, expiry )
1348 __entry->call = call->debug_id;
1350 __entry->expiry = expiry;
1353 TP_printk("c=%08x q=%x xp=%lld",
1359 TRACE_EVENT(rxrpc_congest,
1360 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1361 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1363 TP_ARGS(call, summary, ack_serial, change),
1366 __field(unsigned int, call )
1367 __field(enum rxrpc_congest_change, change )
1368 __field(rxrpc_seq_t, hard_ack )
1369 __field(rxrpc_seq_t, top )
1370 __field(rxrpc_seq_t, lowest_nak )
1371 __field(rxrpc_serial_t, ack_serial )
1372 __field_struct(struct rxrpc_ack_summary, sum )
1376 __entry->call = call->debug_id;
1377 __entry->change = change;
1378 __entry->hard_ack = call->acks_hard_ack;
1379 __entry->top = call->tx_top;
1380 __entry->lowest_nak = call->acks_lowest_nak;
1381 __entry->ack_serial = ack_serial;
1382 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1385 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",
1387 __entry->ack_serial,
1388 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1390 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1392 __entry->sum.ssthresh,
1393 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1394 __entry->sum.nr_new_acks,
1395 __entry->sum.nr_rot_new_acks,
1396 __entry->top - __entry->hard_ack,
1397 __entry->sum.cumulative_acks,
1398 __entry->sum.dup_acks,
1399 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1400 __print_symbolic(__entry->change, rxrpc_congest_changes),
1401 __entry->sum.retrans_timeo ? " rTxTo" : "")
1404 TRACE_EVENT(rxrpc_disconnect_call,
1405 TP_PROTO(struct rxrpc_call *call),
1410 __field(unsigned int, call )
1411 __field(u32, abort_code )
1415 __entry->call = call->debug_id;
1416 __entry->abort_code = call->abort_code;
1419 TP_printk("c=%08x ab=%08x",
1421 __entry->abort_code)
1424 TRACE_EVENT(rxrpc_improper_term,
1425 TP_PROTO(struct rxrpc_call *call),
1430 __field(unsigned int, call )
1431 __field(u32, abort_code )
1435 __entry->call = call->debug_id;
1436 __entry->abort_code = call->abort_code;
1439 TP_printk("c=%08x ab=%08x",
1441 __entry->abort_code)
1444 TRACE_EVENT(rxrpc_rx_eproto,
1445 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1448 TP_ARGS(call, serial, why),
1451 __field(unsigned int, call )
1452 __field(rxrpc_serial_t, serial )
1453 __field(const char *, why )
1457 __entry->call = call ? call->debug_id : 0;
1458 __entry->serial = serial;
1462 TP_printk("c=%08x EPROTO %08x %s",
1468 TRACE_EVENT(rxrpc_connect_call,
1469 TP_PROTO(struct rxrpc_call *call),
1474 __field(unsigned int, call )
1475 __field(unsigned long, user_call_ID )
1477 __field(u32, call_id )
1481 __entry->call = call->debug_id;
1482 __entry->user_call_ID = call->user_call_ID;
1483 __entry->cid = call->cid;
1484 __entry->call_id = call->call_id;
1487 TP_printk("c=%08x u=%p %08x:%08x",
1489 (void *)__entry->user_call_ID,
1494 TRACE_EVENT(rxrpc_resend,
1495 TP_PROTO(struct rxrpc_call *call),
1500 __field(unsigned int, call )
1501 __field(rxrpc_seq_t, seq )
1505 __entry->call = call->debug_id;
1506 __entry->seq = call->acks_hard_ack;
1509 TP_printk("c=%08x q=%x",
1514 TRACE_EVENT(rxrpc_rx_icmp,
1515 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1516 struct sockaddr_rxrpc *srx),
1518 TP_ARGS(peer, ee, srx),
1521 __field(unsigned int, peer )
1522 __field_struct(struct sock_extended_err, ee )
1523 __field_struct(struct sockaddr_rxrpc, srx )
1527 __entry->peer = peer->debug_id;
1528 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1529 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1532 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1534 __entry->ee.ee_origin,
1535 __entry->ee.ee_type,
1536 __entry->ee.ee_code,
1537 __entry->ee.ee_info,
1538 __entry->ee.ee_data,
1539 __entry->ee.ee_errno,
1540 &__entry->srx.transport)
1543 TRACE_EVENT(rxrpc_tx_fail,
1544 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1545 enum rxrpc_tx_point where),
1547 TP_ARGS(debug_id, serial, ret, where),
1550 __field(unsigned int, debug_id )
1551 __field(rxrpc_serial_t, serial )
1553 __field(enum rxrpc_tx_point, where )
1557 __entry->debug_id = debug_id;
1558 __entry->serial = serial;
1560 __entry->where = where;
1563 TP_printk("c=%08x r=%x ret=%d %s",
1567 __print_symbolic(__entry->where, rxrpc_tx_points))
1570 TRACE_EVENT(rxrpc_call_reset,
1571 TP_PROTO(struct rxrpc_call *call),
1576 __field(unsigned int, debug_id )
1578 __field(u32, call_id )
1579 __field(rxrpc_serial_t, call_serial )
1580 __field(rxrpc_serial_t, conn_serial )
1581 __field(rxrpc_seq_t, tx_seq )
1582 __field(rxrpc_seq_t, rx_seq )
1586 __entry->debug_id = call->debug_id;
1587 __entry->cid = call->cid;
1588 __entry->call_id = call->call_id;
1589 __entry->call_serial = call->rx_serial;
1590 __entry->conn_serial = call->conn->hi_serial;
1591 __entry->tx_seq = call->acks_hard_ack;
1592 __entry->rx_seq = call->rx_highest_seq;
1595 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1597 __entry->cid, __entry->call_id,
1598 __entry->call_serial, __entry->conn_serial,
1599 __entry->tx_seq, __entry->rx_seq)
1602 TRACE_EVENT(rxrpc_notify_socket,
1603 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1605 TP_ARGS(debug_id, serial),
1608 __field(unsigned int, debug_id )
1609 __field(rxrpc_serial_t, serial )
1613 __entry->debug_id = debug_id;
1614 __entry->serial = serial;
1617 TP_printk("c=%08x r=%08x",
1622 TRACE_EVENT(rxrpc_rx_discard_ack,
1623 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1624 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1625 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1627 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1628 prev_pkt, call_ackr_prev),
1631 __field(unsigned int, debug_id )
1632 __field(rxrpc_serial_t, serial )
1633 __field(rxrpc_seq_t, first_soft_ack)
1634 __field(rxrpc_seq_t, call_ackr_first)
1635 __field(rxrpc_seq_t, prev_pkt)
1636 __field(rxrpc_seq_t, call_ackr_prev)
1640 __entry->debug_id = debug_id;
1641 __entry->serial = serial;
1642 __entry->first_soft_ack = first_soft_ack;
1643 __entry->call_ackr_first = call_ackr_first;
1644 __entry->prev_pkt = prev_pkt;
1645 __entry->call_ackr_prev = call_ackr_prev;
1648 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1651 __entry->first_soft_ack,
1652 __entry->call_ackr_first,
1654 __entry->call_ackr_prev)
1657 TRACE_EVENT(rxrpc_req_ack,
1658 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1659 enum rxrpc_req_ack_trace why),
1661 TP_ARGS(call_debug_id, seq, why),
1664 __field(unsigned int, call_debug_id )
1665 __field(rxrpc_seq_t, seq )
1666 __field(enum rxrpc_req_ack_trace, why )
1670 __entry->call_debug_id = call_debug_id;
1675 TP_printk("c=%08x q=%08x REQ-%s",
1676 __entry->call_debug_id,
1678 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1681 TRACE_EVENT(rxrpc_txbuf,
1682 TP_PROTO(unsigned int debug_id,
1683 unsigned int call_debug_id, rxrpc_seq_t seq,
1684 int ref, enum rxrpc_txbuf_trace what),
1686 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1689 __field(unsigned int, debug_id )
1690 __field(unsigned int, call_debug_id )
1691 __field(rxrpc_seq_t, seq )
1693 __field(enum rxrpc_txbuf_trace, what )
1697 __entry->debug_id = debug_id;
1698 __entry->call_debug_id = call_debug_id;
1701 __entry->what = what;
1704 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1706 __entry->call_debug_id,
1708 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1714 #endif /* _TRACE_RXRPC_H */
1716 /* This part must be outside protection */
1717 #include <trace/define_trace.h>