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_call_poke_traces \
20 EM(rxrpc_call_poke_error, "Error") \
21 EM(rxrpc_call_poke_idle, "Idle") \
22 EM(rxrpc_call_poke_start, "Start") \
23 EM(rxrpc_call_poke_timer, "Timer") \
24 E_(rxrpc_call_poke_timer_now, "Timer-now")
26 #define rxrpc_skb_traces \
27 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \
28 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \
29 EM(rxrpc_skb_get_ack, "GET ack ") \
30 EM(rxrpc_skb_get_conn_work, "GET conn-work") \
31 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
32 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
33 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
34 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
35 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
36 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
37 EM(rxrpc_skb_put_ack, "PUT ack ") \
38 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \
39 EM(rxrpc_skb_put_error_report, "PUT error-rep") \
40 EM(rxrpc_skb_put_input, "PUT input ") \
41 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \
42 EM(rxrpc_skb_put_lose, "PUT lose ") \
43 EM(rxrpc_skb_put_purge, "PUT purge ") \
44 EM(rxrpc_skb_put_rotate, "PUT rotate ") \
45 EM(rxrpc_skb_put_unknown, "PUT unknown ") \
46 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \
47 EM(rxrpc_skb_see_local_work, "SEE locl-work") \
48 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \
49 EM(rxrpc_skb_see_reject, "SEE reject ") \
50 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
51 E_(rxrpc_skb_see_version, "SEE version ")
53 #define rxrpc_local_traces \
54 EM(rxrpc_local_free, "FREE ") \
55 EM(rxrpc_local_get_call, "GET call ") \
56 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
57 EM(rxrpc_local_get_for_use, "GET for-use ") \
58 EM(rxrpc_local_get_peer, "GET peer ") \
59 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
60 EM(rxrpc_local_get_queue, "GET queue ") \
61 EM(rxrpc_local_new, "NEW ") \
62 EM(rxrpc_local_processing, "PROCESSING ") \
63 EM(rxrpc_local_put_already_queued, "PUT alreadyq") \
64 EM(rxrpc_local_put_bind, "PUT bind ") \
65 EM(rxrpc_local_put_call, "PUT call ") \
66 EM(rxrpc_local_put_for_use, "PUT for-use ") \
67 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
68 EM(rxrpc_local_put_peer, "PUT peer ") \
69 EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \
70 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
71 EM(rxrpc_local_put_queue, "PUT queue ") \
72 EM(rxrpc_local_queued, "QUEUED ") \
73 EM(rxrpc_local_see_tx_ack, "SEE tx-ack ") \
74 EM(rxrpc_local_stop, "STOP ") \
75 EM(rxrpc_local_stopped, "STOPPED ") \
76 EM(rxrpc_local_unuse_bind, "UNU bind ") \
77 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
78 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
79 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
80 EM(rxrpc_local_unuse_work, "UNU work ") \
81 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
82 EM(rxrpc_local_use_lookup, "USE lookup ") \
83 EM(rxrpc_local_use_peer_keepalive, "USE peer-kpa") \
84 E_(rxrpc_local_use_work, "USE work ")
86 #define rxrpc_peer_traces \
87 EM(rxrpc_peer_free, "FREE ") \
88 EM(rxrpc_peer_get_accept, "GET accept ") \
89 EM(rxrpc_peer_get_activate_call, "GET act-call") \
90 EM(rxrpc_peer_get_bundle, "GET bundle ") \
91 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
92 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
93 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
94 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
95 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
96 EM(rxrpc_peer_new_client, "NEW client ") \
97 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
98 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
99 EM(rxrpc_peer_put_call, "PUT call ") \
100 EM(rxrpc_peer_put_conn, "PUT conn ") \
101 EM(rxrpc_peer_put_discard_tmp, "PUT disc-tmp") \
102 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
103 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
105 #define rxrpc_bundle_traces \
106 EM(rxrpc_bundle_free, "FREE ") \
107 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
108 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
109 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
110 EM(rxrpc_bundle_put_conn, "PUT conn ") \
111 EM(rxrpc_bundle_put_discard, "PUT discard ") \
112 E_(rxrpc_bundle_new, "NEW ")
114 #define rxrpc_conn_traces \
115 EM(rxrpc_conn_free, "FREE ") \
116 EM(rxrpc_conn_get_activate_call, "GET act-call") \
117 EM(rxrpc_conn_get_call_input, "GET inp-call") \
118 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
119 EM(rxrpc_conn_get_idle, "GET idle ") \
120 EM(rxrpc_conn_get_poke, "GET poke ") \
121 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
122 EM(rxrpc_conn_new_client, "NEW client ") \
123 EM(rxrpc_conn_new_service, "NEW service ") \
124 EM(rxrpc_conn_put_call, "PUT call ") \
125 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
126 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
127 EM(rxrpc_conn_put_discard, "PUT discard ") \
128 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
129 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
130 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
131 EM(rxrpc_conn_put_poke, "PUT poke ") \
132 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \
133 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
134 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
135 EM(rxrpc_conn_queue_challenge, "QUE chall ") \
136 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
137 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
138 EM(rxrpc_conn_queue_timer, "QUE timer ") \
139 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
140 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
141 E_(rxrpc_conn_see_work, "SEE work ")
143 #define rxrpc_client_traces \
144 EM(rxrpc_client_activate_chans, "Activa") \
145 EM(rxrpc_client_alloc, "Alloc ") \
146 EM(rxrpc_client_chan_activate, "ChActv") \
147 EM(rxrpc_client_chan_disconnect, "ChDisc") \
148 EM(rxrpc_client_chan_pass, "ChPass") \
149 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
150 EM(rxrpc_client_cleanup, "Clean ") \
151 EM(rxrpc_client_discard, "Discar") \
152 EM(rxrpc_client_duplicate, "Duplic") \
153 EM(rxrpc_client_exposed, "Expose") \
154 EM(rxrpc_client_replace, "Replac") \
155 EM(rxrpc_client_to_active, "->Actv") \
156 E_(rxrpc_client_to_idle, "->Idle")
158 #define rxrpc_call_traces \
159 EM(rxrpc_call_get_input, "GET input ") \
160 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
161 EM(rxrpc_call_get_notify_socket, "GET notify ") \
162 EM(rxrpc_call_get_poke, "GET poke ") \
163 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
164 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
165 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
166 EM(rxrpc_call_get_send_ack, "GET send-ack") \
167 EM(rxrpc_call_get_userid, "GET user-id ") \
168 EM(rxrpc_call_new_client, "NEW client ") \
169 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
170 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
171 EM(rxrpc_call_put_discard_error, "PUT disc-err") \
172 EM(rxrpc_call_put_input, "PUT input ") \
173 EM(rxrpc_call_put_kernel, "PUT kernel ") \
174 EM(rxrpc_call_put_poke, "PUT poke ") \
175 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
176 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
177 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
178 EM(rxrpc_call_put_send_ack, "PUT send-ack") \
179 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
180 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
181 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
182 EM(rxrpc_call_queue_abort, "QUE abort ") \
183 EM(rxrpc_call_queue_requeue, "QUE requeue ") \
184 EM(rxrpc_call_queue_resend, "QUE resend ") \
185 EM(rxrpc_call_queue_timer, "QUE timer ") \
186 EM(rxrpc_call_see_accept, "SEE accept ") \
187 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
188 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
189 EM(rxrpc_call_see_connected, "SEE connect ") \
190 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
191 EM(rxrpc_call_see_input, "SEE input ") \
192 EM(rxrpc_call_see_release, "SEE release ") \
193 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
194 E_(rxrpc_call_see_zap, "SEE zap ")
196 #define rxrpc_txqueue_traces \
197 EM(rxrpc_txqueue_await_reply, "AWR") \
198 EM(rxrpc_txqueue_dequeue, "DEQ") \
199 EM(rxrpc_txqueue_end, "END") \
200 EM(rxrpc_txqueue_queue, "QUE") \
201 EM(rxrpc_txqueue_queue_last, "QLS") \
202 EM(rxrpc_txqueue_rotate, "ROT") \
203 EM(rxrpc_txqueue_rotate_last, "RLS") \
204 E_(rxrpc_txqueue_wait, "WAI")
206 #define rxrpc_receive_traces \
207 EM(rxrpc_receive_end, "END") \
208 EM(rxrpc_receive_front, "FRN") \
209 EM(rxrpc_receive_incoming, "INC") \
210 EM(rxrpc_receive_queue, "QUE") \
211 EM(rxrpc_receive_queue_last, "QLS") \
212 EM(rxrpc_receive_queue_oos, "QUO") \
213 EM(rxrpc_receive_queue_oos_last, "QOL") \
214 EM(rxrpc_receive_oos, "OOS") \
215 EM(rxrpc_receive_oos_last, "OSL") \
216 EM(rxrpc_receive_rotate, "ROT") \
217 E_(rxrpc_receive_rotate_last, "RLS")
219 #define rxrpc_recvmsg_traces \
220 EM(rxrpc_recvmsg_cont, "CONT") \
221 EM(rxrpc_recvmsg_data_return, "DATA") \
222 EM(rxrpc_recvmsg_dequeue, "DEQU") \
223 EM(rxrpc_recvmsg_enter, "ENTR") \
224 EM(rxrpc_recvmsg_full, "FULL") \
225 EM(rxrpc_recvmsg_hole, "HOLE") \
226 EM(rxrpc_recvmsg_next, "NEXT") \
227 EM(rxrpc_recvmsg_requeue, "REQU") \
228 EM(rxrpc_recvmsg_return, "RETN") \
229 EM(rxrpc_recvmsg_terminal, "TERM") \
230 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
231 E_(rxrpc_recvmsg_wait, "WAIT")
233 #define rxrpc_rtt_tx_traces \
234 EM(rxrpc_rtt_tx_cancel, "CNCE") \
235 EM(rxrpc_rtt_tx_data, "DATA") \
236 EM(rxrpc_rtt_tx_no_slot, "FULL") \
237 E_(rxrpc_rtt_tx_ping, "PING")
239 #define rxrpc_rtt_rx_traces \
240 EM(rxrpc_rtt_rx_cancel, "CNCL") \
241 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
242 EM(rxrpc_rtt_rx_lost, "LOST") \
243 EM(rxrpc_rtt_rx_ping_response, "PONG") \
244 E_(rxrpc_rtt_rx_requested_ack, "RACK")
246 #define rxrpc_timer_traces \
247 EM(rxrpc_timer_begin, "Begin ") \
248 EM(rxrpc_timer_exp_ack, "ExpAck") \
249 EM(rxrpc_timer_exp_hard, "ExpHrd") \
250 EM(rxrpc_timer_exp_idle, "ExpIdl") \
251 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
252 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
253 EM(rxrpc_timer_exp_normal, "ExpNml") \
254 EM(rxrpc_timer_exp_ping, "ExpPng") \
255 EM(rxrpc_timer_exp_resend, "ExpRsn") \
256 EM(rxrpc_timer_init_for_reply, "IniRpl") \
257 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
258 EM(rxrpc_timer_restart, "Restrt") \
259 EM(rxrpc_timer_set_for_ack, "SetAck") \
260 EM(rxrpc_timer_set_for_hard, "SetHrd") \
261 EM(rxrpc_timer_set_for_idle, "SetIdl") \
262 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
263 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
264 EM(rxrpc_timer_set_for_normal, "SetNml") \
265 EM(rxrpc_timer_set_for_ping, "SetPng") \
266 EM(rxrpc_timer_set_for_resend, "SetRTx") \
267 E_(rxrpc_timer_set_for_send, "SetSnd")
269 #define rxrpc_propose_ack_traces \
270 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
271 EM(rxrpc_propose_ack_input_data, "DataIn ") \
272 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
273 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
274 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
275 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
276 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
277 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
278 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
279 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
280 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
281 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
282 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
283 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
285 #define rxrpc_congest_modes \
286 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
287 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
288 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
289 E_(RXRPC_CALL_SLOW_START, "SlowStart")
291 #define rxrpc_congest_changes \
292 EM(rxrpc_cong_begin_retransmission, " Retrans") \
293 EM(rxrpc_cong_cleared_nacks, " Cleared") \
294 EM(rxrpc_cong_new_low_nack, " NewLowN") \
295 EM(rxrpc_cong_no_change, " -") \
296 EM(rxrpc_cong_progress, " Progres") \
297 EM(rxrpc_cong_idle_reset, " IdleRes") \
298 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
299 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
300 E_(rxrpc_cong_saw_nack, " SawNack")
304 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
305 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
306 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
307 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
308 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
309 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
310 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
311 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
316 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
320 #define rxrpc_ack_names \
322 EM(RXRPC_ACK_REQUESTED, "REQ") \
323 EM(RXRPC_ACK_DUPLICATE, "DUP") \
324 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
325 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
326 EM(RXRPC_ACK_NOSPACE, "MEM") \
327 EM(RXRPC_ACK_PING, "PNG") \
328 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
329 EM(RXRPC_ACK_DELAY, "DLY") \
330 EM(RXRPC_ACK_IDLE, "IDL") \
331 E_(RXRPC_ACK__INVALID, "-?-")
333 #define rxrpc_completions \
334 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
335 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
336 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
337 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
338 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
340 #define rxrpc_tx_points \
341 EM(rxrpc_tx_point_call_abort, "CallAbort") \
342 EM(rxrpc_tx_point_call_ack, "CallAck") \
343 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
344 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
345 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
346 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
347 EM(rxrpc_tx_point_reject, "Reject") \
348 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
349 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
350 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
351 E_(rxrpc_tx_point_version_reply, "VerReply")
353 #define rxrpc_req_ack_traces \
354 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
355 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
356 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
357 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
358 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
359 EM(rxrpc_reqack_retrans, "RETRANS ") \
360 EM(rxrpc_reqack_slow_start, "SLOW-START") \
361 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
362 /* ---- Must update size of stat_why_req_ack[] if more are added! */
364 #define rxrpc_txbuf_traces \
365 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
366 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
367 EM(rxrpc_txbuf_free, "FREE ") \
368 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
369 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
370 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
371 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
372 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
373 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
374 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
375 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
376 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
377 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
378 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
379 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
382 * Generate enums for tracing information.
384 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
385 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
392 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
393 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
394 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
395 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
396 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
397 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
398 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
399 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
400 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
401 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
402 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
403 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
404 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
405 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
406 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
407 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
408 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
409 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
410 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
411 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
413 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
416 * Export enum symbols via userspace.
420 #define EM(a, b) TRACE_DEFINE_ENUM(a);
421 #define E_(a, b) TRACE_DEFINE_ENUM(a);
424 rxrpc_call_poke_traces;
427 rxrpc_congest_changes;
431 rxrpc_propose_ack_traces;
432 rxrpc_receive_traces;
433 rxrpc_recvmsg_traces;
434 rxrpc_req_ack_traces;
441 rxrpc_txqueue_traces;
444 * Now redefine the EM() and E_() macros to map the enums to the strings that
445 * will be printed in the output.
449 #define EM(a, b) { a, b },
450 #define E_(a, b) { a, b }
452 TRACE_EVENT(rxrpc_local,
453 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
456 TP_ARGS(local_debug_id, op, ref, usage),
459 __field(unsigned int, local )
466 __entry->local = local_debug_id;
469 __entry->usage = usage;
472 TP_printk("L=%08x %s r=%d u=%d",
474 __print_symbolic(__entry->op, rxrpc_local_traces),
479 TRACE_EVENT(rxrpc_peer,
480 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
482 TP_ARGS(peer_debug_id, ref, why),
485 __field(unsigned int, peer )
491 __entry->peer = peer_debug_id;
496 TP_printk("P=%08x %s r=%d",
498 __print_symbolic(__entry->why, rxrpc_peer_traces),
502 TRACE_EVENT(rxrpc_bundle,
503 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
505 TP_ARGS(bundle_debug_id, ref, why),
508 __field(unsigned int, bundle )
514 __entry->bundle = bundle_debug_id;
519 TP_printk("CB=%08x %s r=%d",
521 __print_symbolic(__entry->why, rxrpc_bundle_traces),
525 TRACE_EVENT(rxrpc_conn,
526 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
528 TP_ARGS(conn_debug_id, ref, why),
531 __field(unsigned int, conn )
537 __entry->conn = conn_debug_id;
542 TP_printk("C=%08x %s r=%d",
544 __print_symbolic(__entry->why, rxrpc_conn_traces),
548 TRACE_EVENT(rxrpc_client,
549 TP_PROTO(struct rxrpc_connection *conn, int channel,
550 enum rxrpc_client_trace op),
552 TP_ARGS(conn, channel, op),
555 __field(unsigned int, conn )
557 __field(int, channel )
559 __field(enum rxrpc_client_trace, op )
563 __entry->conn = conn ? conn->debug_id : 0;
564 __entry->channel = channel;
565 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
567 __entry->cid = conn ? conn->proto.cid : 0;
570 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
573 __print_symbolic(__entry->op, rxrpc_client_traces),
578 TRACE_EVENT(rxrpc_call,
579 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
580 enum rxrpc_call_trace why),
582 TP_ARGS(call_debug_id, ref, aux, why),
585 __field(unsigned int, call )
588 __field(unsigned long, aux )
592 __entry->call = call_debug_id;
598 TP_printk("c=%08x %s r=%d a=%lx",
600 __print_symbolic(__entry->why, rxrpc_call_traces),
605 TRACE_EVENT(rxrpc_skb,
606 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
607 enum rxrpc_skb_trace why),
609 TP_ARGS(skb, usage, mod_count, why),
612 __field(struct sk_buff *, skb )
614 __field(int, mod_count )
615 __field(enum rxrpc_skb_trace, why )
620 __entry->usage = usage;
621 __entry->mod_count = mod_count;
625 TP_printk("s=%p Rx %s u=%d m=%d",
627 __print_symbolic(__entry->why, rxrpc_skb_traces),
632 TRACE_EVENT(rxrpc_rx_packet,
633 TP_PROTO(struct rxrpc_skb_priv *sp),
638 __field_struct(struct rxrpc_host_header, hdr )
642 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
645 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
646 __entry->hdr.epoch, __entry->hdr.cid,
647 __entry->hdr.callNumber, __entry->hdr.serviceId,
648 __entry->hdr.serial, __entry->hdr.seq,
649 __entry->hdr.type, __entry->hdr.flags,
650 __entry->hdr.type <= 15 ?
651 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
654 TRACE_EVENT(rxrpc_rx_done,
655 TP_PROTO(int result, int abort_code),
657 TP_ARGS(result, abort_code),
660 __field(int, result )
661 __field(int, abort_code )
665 __entry->result = result;
666 __entry->abort_code = abort_code;
669 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
672 TRACE_EVENT(rxrpc_abort,
673 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
674 rxrpc_seq_t seq, int abort_code, int error),
676 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
679 __field(unsigned int, call_nr )
680 __array(char, why, 4 )
682 __field(u32, call_id )
683 __field(rxrpc_seq_t, seq )
684 __field(int, abort_code )
689 memcpy(__entry->why, why, 4);
690 __entry->call_nr = call_nr;
692 __entry->call_id = call_id;
693 __entry->abort_code = abort_code;
694 __entry->error = error;
698 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
700 __entry->cid, __entry->call_id, __entry->seq,
701 __entry->abort_code, __entry->error, __entry->why)
704 TRACE_EVENT(rxrpc_call_complete,
705 TP_PROTO(struct rxrpc_call *call),
710 __field(unsigned int, call )
711 __field(enum rxrpc_call_completion, compl )
713 __field(u32, abort_code )
717 __entry->call = call->debug_id;
718 __entry->compl = call->completion;
719 __entry->error = call->error;
720 __entry->abort_code = call->abort_code;
723 TP_printk("c=%08x %s r=%d ac=%d",
725 __print_symbolic(__entry->compl, rxrpc_completions),
730 TRACE_EVENT(rxrpc_txqueue,
731 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
736 __field(unsigned int, call )
737 __field(enum rxrpc_txqueue_trace, why )
738 __field(rxrpc_seq_t, acks_hard_ack )
739 __field(rxrpc_seq_t, tx_bottom )
740 __field(rxrpc_seq_t, tx_top )
741 __field(int, tx_winsize )
745 __entry->call = call->debug_id;
747 __entry->acks_hard_ack = call->acks_hard_ack;
748 __entry->tx_bottom = call->tx_bottom;
749 __entry->tx_top = call->tx_top;
750 __entry->tx_winsize = call->tx_winsize;
753 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
755 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
757 __entry->acks_hard_ack,
758 __entry->tx_top - __entry->tx_bottom,
759 __entry->tx_top - __entry->acks_hard_ack,
763 TRACE_EVENT(rxrpc_rx_data,
764 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
765 rxrpc_serial_t serial, u8 flags),
767 TP_ARGS(call, seq, serial, flags),
770 __field(unsigned int, call )
771 __field(rxrpc_seq_t, seq )
772 __field(rxrpc_serial_t, serial )
777 __entry->call = call;
779 __entry->serial = serial;
780 __entry->flags = flags;
783 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
790 TRACE_EVENT(rxrpc_rx_ack,
791 TP_PROTO(struct rxrpc_call *call,
792 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
793 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
795 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
798 __field(unsigned int, call )
799 __field(rxrpc_serial_t, serial )
800 __field(rxrpc_serial_t, ack_serial )
801 __field(rxrpc_seq_t, first )
802 __field(rxrpc_seq_t, prev )
808 __entry->call = call->debug_id;
809 __entry->serial = serial;
810 __entry->ack_serial = ack_serial;
811 __entry->first = first;
812 __entry->prev = prev;
813 __entry->reason = reason;
814 __entry->n_acks = n_acks;
817 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
820 __print_symbolic(__entry->reason, rxrpc_ack_names),
827 TRACE_EVENT(rxrpc_rx_abort,
828 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
831 TP_ARGS(call, serial, abort_code),
834 __field(unsigned int, call )
835 __field(rxrpc_serial_t, serial )
836 __field(u32, abort_code )
840 __entry->call = call->debug_id;
841 __entry->serial = serial;
842 __entry->abort_code = abort_code;
845 TP_printk("c=%08x ABORT %08x ac=%d",
851 TRACE_EVENT(rxrpc_rx_challenge,
852 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
853 u32 version, u32 nonce, u32 min_level),
855 TP_ARGS(conn, serial, version, nonce, min_level),
858 __field(unsigned int, conn )
859 __field(rxrpc_serial_t, serial )
860 __field(u32, version )
862 __field(u32, min_level )
866 __entry->conn = conn->debug_id;
867 __entry->serial = serial;
868 __entry->version = version;
869 __entry->nonce = nonce;
870 __entry->min_level = min_level;
873 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
881 TRACE_EVENT(rxrpc_rx_response,
882 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
883 u32 version, u32 kvno, u32 ticket_len),
885 TP_ARGS(conn, serial, version, kvno, ticket_len),
888 __field(unsigned int, conn )
889 __field(rxrpc_serial_t, serial )
890 __field(u32, version )
892 __field(u32, ticket_len )
896 __entry->conn = conn->debug_id;
897 __entry->serial = serial;
898 __entry->version = version;
899 __entry->kvno = kvno;
900 __entry->ticket_len = ticket_len;
903 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
911 TRACE_EVENT(rxrpc_rx_rwind_change,
912 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
913 u32 rwind, bool wake),
915 TP_ARGS(call, serial, rwind, wake),
918 __field(unsigned int, call )
919 __field(rxrpc_serial_t, serial )
925 __entry->call = call->debug_id;
926 __entry->serial = serial;
927 __entry->rwind = rwind;
928 __entry->wake = wake;
931 TP_printk("c=%08x %08x rw=%u%s",
935 __entry->wake ? " wake" : "")
938 TRACE_EVENT(rxrpc_tx_packet,
939 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
940 enum rxrpc_tx_point where),
942 TP_ARGS(call_id, whdr, where),
945 __field(unsigned int, call )
946 __field(enum rxrpc_tx_point, where )
947 __field_struct(struct rxrpc_wire_header, whdr )
951 __entry->call = call_id;
952 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
953 __entry->where = where;
956 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
958 ntohl(__entry->whdr.epoch),
959 ntohl(__entry->whdr.cid),
960 ntohl(__entry->whdr.callNumber),
961 ntohs(__entry->whdr.serviceId),
962 ntohl(__entry->whdr.serial),
963 ntohl(__entry->whdr.seq),
964 __entry->whdr.type, __entry->whdr.flags,
965 __entry->whdr.type <= 15 ?
966 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
967 __print_symbolic(__entry->where, rxrpc_tx_points))
970 TRACE_EVENT(rxrpc_tx_data,
971 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
972 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
974 TP_ARGS(call, seq, serial, flags, retrans, lose),
977 __field(unsigned int, call )
978 __field(rxrpc_seq_t, seq )
979 __field(rxrpc_serial_t, serial )
981 __field(u32, call_id )
983 __field(bool, retrans )
988 __entry->call = call->debug_id;
989 __entry->cid = call->cid;
990 __entry->call_id = call->call_id;
992 __entry->serial = serial;
993 __entry->flags = flags;
994 __entry->retrans = retrans;
995 __entry->lose = lose;
998 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1005 __entry->retrans ? " *RETRANS*" : "",
1006 __entry->lose ? " *LOSE*" : "")
1009 TRACE_EVENT(rxrpc_tx_ack,
1010 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1011 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1012 u8 reason, u8 n_acks),
1014 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1017 __field(unsigned int, call )
1018 __field(rxrpc_serial_t, serial )
1019 __field(rxrpc_seq_t, ack_first )
1020 __field(rxrpc_serial_t, ack_serial )
1021 __field(u8, reason )
1022 __field(u8, n_acks )
1026 __entry->call = call;
1027 __entry->serial = serial;
1028 __entry->ack_first = ack_first;
1029 __entry->ack_serial = ack_serial;
1030 __entry->reason = reason;
1031 __entry->n_acks = n_acks;
1034 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1037 __print_symbolic(__entry->reason, rxrpc_ack_names),
1039 __entry->ack_serial,
1043 TRACE_EVENT(rxrpc_receive,
1044 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1045 rxrpc_serial_t serial, rxrpc_seq_t seq),
1047 TP_ARGS(call, why, serial, seq),
1050 __field(unsigned int, call )
1051 __field(enum rxrpc_receive_trace, why )
1052 __field(rxrpc_serial_t, serial )
1053 __field(rxrpc_seq_t, seq )
1054 __field(u64, window )
1058 __entry->call = call->debug_id;
1060 __entry->serial = serial;
1062 __entry->window = atomic64_read(&call->ackr_window);
1065 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1067 __print_symbolic(__entry->why, rxrpc_receive_traces),
1070 lower_32_bits(__entry->window),
1071 upper_32_bits(__entry->window))
1074 TRACE_EVENT(rxrpc_recvmsg,
1075 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1078 TP_ARGS(call, why, ret),
1081 __field(unsigned int, call )
1082 __field(enum rxrpc_recvmsg_trace, why )
1087 __entry->call = call ? call->debug_id : 0;
1092 TP_printk("c=%08x %s ret=%d",
1094 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1098 TRACE_EVENT(rxrpc_recvdata,
1099 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1100 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1103 TP_ARGS(call, why, seq, offset, len, ret),
1106 __field(unsigned int, call )
1107 __field(enum rxrpc_recvmsg_trace, why )
1108 __field(rxrpc_seq_t, seq )
1109 __field(unsigned int, offset )
1110 __field(unsigned int, len )
1115 __entry->call = call ? call->debug_id : 0;
1118 __entry->offset = offset;
1123 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1125 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1132 TRACE_EVENT(rxrpc_rtt_tx,
1133 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1134 int slot, rxrpc_serial_t send_serial),
1136 TP_ARGS(call, why, slot, send_serial),
1139 __field(unsigned int, call )
1140 __field(enum rxrpc_rtt_tx_trace, why )
1142 __field(rxrpc_serial_t, send_serial )
1146 __entry->call = call->debug_id;
1148 __entry->slot = slot;
1149 __entry->send_serial = send_serial;
1152 TP_printk("c=%08x [%d] %s sr=%08x",
1155 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1156 __entry->send_serial)
1159 TRACE_EVENT(rxrpc_rtt_rx,
1160 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1162 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1165 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1168 __field(unsigned int, call )
1169 __field(enum rxrpc_rtt_rx_trace, why )
1171 __field(rxrpc_serial_t, send_serial )
1172 __field(rxrpc_serial_t, resp_serial )
1178 __entry->call = call->debug_id;
1180 __entry->slot = slot;
1181 __entry->send_serial = send_serial;
1182 __entry->resp_serial = resp_serial;
1187 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1190 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1191 __entry->send_serial,
1192 __entry->resp_serial,
1197 TRACE_EVENT(rxrpc_timer,
1198 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1201 TP_ARGS(call, why, now),
1204 __field(unsigned int, call )
1205 __field(enum rxrpc_timer_trace, why )
1207 __field(long, ack_at )
1208 __field(long, ack_lost_at )
1209 __field(long, resend_at )
1210 __field(long, ping_at )
1211 __field(long, expect_rx_by )
1212 __field(long, expect_req_by )
1213 __field(long, expect_term_by )
1214 __field(long, timer )
1218 __entry->call = call->debug_id;
1221 __entry->ack_at = call->delay_ack_at;
1222 __entry->ack_lost_at = call->ack_lost_at;
1223 __entry->resend_at = call->resend_at;
1224 __entry->expect_rx_by = call->expect_rx_by;
1225 __entry->expect_req_by = call->expect_req_by;
1226 __entry->expect_term_by = call->expect_term_by;
1227 __entry->timer = call->timer.expires;
1230 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1232 __print_symbolic(__entry->why, rxrpc_timer_traces),
1233 __entry->ack_at - __entry->now,
1234 __entry->ack_lost_at - __entry->now,
1235 __entry->resend_at - __entry->now,
1236 __entry->expect_rx_by - __entry->now,
1237 __entry->expect_req_by - __entry->now,
1238 __entry->expect_term_by - __entry->now,
1239 __entry->timer - __entry->now)
1242 TRACE_EVENT(rxrpc_timer_expired,
1243 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1248 __field(unsigned int, call )
1250 __field(long, ack_at )
1251 __field(long, ack_lost_at )
1252 __field(long, resend_at )
1253 __field(long, ping_at )
1254 __field(long, expect_rx_by )
1255 __field(long, expect_req_by )
1256 __field(long, expect_term_by )
1257 __field(long, timer )
1261 __entry->call = call->debug_id;
1263 __entry->ack_at = call->delay_ack_at;
1264 __entry->ack_lost_at = call->ack_lost_at;
1265 __entry->resend_at = call->resend_at;
1266 __entry->expect_rx_by = call->expect_rx_by;
1267 __entry->expect_req_by = call->expect_req_by;
1268 __entry->expect_term_by = call->expect_term_by;
1269 __entry->timer = call->timer.expires;
1272 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1274 __entry->ack_at - __entry->now,
1275 __entry->ack_lost_at - __entry->now,
1276 __entry->resend_at - __entry->now,
1277 __entry->expect_rx_by - __entry->now,
1278 __entry->expect_req_by - __entry->now,
1279 __entry->expect_term_by - __entry->now,
1280 __entry->timer - __entry->now)
1283 TRACE_EVENT(rxrpc_rx_lose,
1284 TP_PROTO(struct rxrpc_skb_priv *sp),
1289 __field_struct(struct rxrpc_host_header, hdr )
1293 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1296 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1297 __entry->hdr.epoch, __entry->hdr.cid,
1298 __entry->hdr.callNumber, __entry->hdr.serviceId,
1299 __entry->hdr.serial, __entry->hdr.seq,
1300 __entry->hdr.type, __entry->hdr.flags,
1301 __entry->hdr.type <= 15 ?
1302 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1305 TRACE_EVENT(rxrpc_propose_ack,
1306 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1307 u8 ack_reason, rxrpc_serial_t serial),
1309 TP_ARGS(call, why, ack_reason, serial),
1312 __field(unsigned int, call )
1313 __field(enum rxrpc_propose_ack_trace, why )
1314 __field(rxrpc_serial_t, serial )
1315 __field(u8, ack_reason )
1319 __entry->call = call->debug_id;
1321 __entry->serial = serial;
1322 __entry->ack_reason = ack_reason;
1325 TP_printk("c=%08x %s %s r=%08x",
1327 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1328 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1332 TRACE_EVENT(rxrpc_send_ack,
1333 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1334 u8 ack_reason, rxrpc_serial_t serial),
1336 TP_ARGS(call, why, ack_reason, serial),
1339 __field(unsigned int, call )
1340 __field(enum rxrpc_propose_ack_trace, why )
1341 __field(rxrpc_serial_t, serial )
1342 __field(u8, ack_reason )
1346 __entry->call = call->debug_id;
1348 __entry->serial = serial;
1349 __entry->ack_reason = ack_reason;
1352 TP_printk("c=%08x %s %s r=%08x",
1354 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1355 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1359 TRACE_EVENT(rxrpc_drop_ack,
1360 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1361 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1363 TP_ARGS(call, why, ack_reason, serial, nobuf),
1366 __field(unsigned int, call )
1367 __field(enum rxrpc_propose_ack_trace, why )
1368 __field(rxrpc_serial_t, serial )
1369 __field(u8, ack_reason )
1370 __field(bool, nobuf )
1374 __entry->call = call->debug_id;
1376 __entry->serial = serial;
1377 __entry->ack_reason = ack_reason;
1378 __entry->nobuf = nobuf;
1381 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1383 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1384 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1385 __entry->serial, __entry->nobuf)
1388 TRACE_EVENT(rxrpc_retransmit,
1389 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1391 TP_ARGS(call, seq, expiry),
1394 __field(unsigned int, call )
1395 __field(rxrpc_seq_t, seq )
1396 __field(s64, expiry )
1400 __entry->call = call->debug_id;
1402 __entry->expiry = expiry;
1405 TP_printk("c=%08x q=%x xp=%lld",
1411 TRACE_EVENT(rxrpc_congest,
1412 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1413 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1415 TP_ARGS(call, summary, ack_serial, change),
1418 __field(unsigned int, call )
1419 __field(enum rxrpc_congest_change, change )
1420 __field(rxrpc_seq_t, hard_ack )
1421 __field(rxrpc_seq_t, top )
1422 __field(rxrpc_seq_t, lowest_nak )
1423 __field(rxrpc_serial_t, ack_serial )
1424 __field_struct(struct rxrpc_ack_summary, sum )
1428 __entry->call = call->debug_id;
1429 __entry->change = change;
1430 __entry->hard_ack = call->acks_hard_ack;
1431 __entry->top = call->tx_top;
1432 __entry->lowest_nak = call->acks_lowest_nak;
1433 __entry->ack_serial = ack_serial;
1434 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1437 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",
1439 __entry->ack_serial,
1440 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1442 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1444 __entry->sum.ssthresh,
1445 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1446 __entry->sum.nr_new_acks,
1447 __entry->sum.nr_rot_new_acks,
1448 __entry->top - __entry->hard_ack,
1449 __entry->sum.cumulative_acks,
1450 __entry->sum.dup_acks,
1451 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1452 __print_symbolic(__entry->change, rxrpc_congest_changes),
1453 __entry->sum.retrans_timeo ? " rTxTo" : "")
1456 TRACE_EVENT(rxrpc_disconnect_call,
1457 TP_PROTO(struct rxrpc_call *call),
1462 __field(unsigned int, call )
1463 __field(u32, abort_code )
1467 __entry->call = call->debug_id;
1468 __entry->abort_code = call->abort_code;
1471 TP_printk("c=%08x ab=%08x",
1473 __entry->abort_code)
1476 TRACE_EVENT(rxrpc_improper_term,
1477 TP_PROTO(struct rxrpc_call *call),
1482 __field(unsigned int, call )
1483 __field(u32, abort_code )
1487 __entry->call = call->debug_id;
1488 __entry->abort_code = call->abort_code;
1491 TP_printk("c=%08x ab=%08x",
1493 __entry->abort_code)
1496 TRACE_EVENT(rxrpc_rx_eproto,
1497 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1500 TP_ARGS(call, serial, why),
1503 __field(unsigned int, call )
1504 __field(rxrpc_serial_t, serial )
1505 __field(const char *, why )
1509 __entry->call = call ? call->debug_id : 0;
1510 __entry->serial = serial;
1514 TP_printk("c=%08x EPROTO %08x %s",
1520 TRACE_EVENT(rxrpc_connect_call,
1521 TP_PROTO(struct rxrpc_call *call),
1526 __field(unsigned int, call )
1527 __field(unsigned long, user_call_ID )
1529 __field(u32, call_id )
1533 __entry->call = call->debug_id;
1534 __entry->user_call_ID = call->user_call_ID;
1535 __entry->cid = call->cid;
1536 __entry->call_id = call->call_id;
1539 TP_printk("c=%08x u=%p %08x:%08x",
1541 (void *)__entry->user_call_ID,
1546 TRACE_EVENT(rxrpc_resend,
1547 TP_PROTO(struct rxrpc_call *call),
1552 __field(unsigned int, call )
1553 __field(rxrpc_seq_t, seq )
1557 __entry->call = call->debug_id;
1558 __entry->seq = call->acks_hard_ack;
1561 TP_printk("c=%08x q=%x",
1566 TRACE_EVENT(rxrpc_rx_icmp,
1567 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1568 struct sockaddr_rxrpc *srx),
1570 TP_ARGS(peer, ee, srx),
1573 __field(unsigned int, peer )
1574 __field_struct(struct sock_extended_err, ee )
1575 __field_struct(struct sockaddr_rxrpc, srx )
1579 __entry->peer = peer->debug_id;
1580 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1581 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1584 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1586 __entry->ee.ee_origin,
1587 __entry->ee.ee_type,
1588 __entry->ee.ee_code,
1589 __entry->ee.ee_info,
1590 __entry->ee.ee_data,
1591 __entry->ee.ee_errno,
1592 &__entry->srx.transport)
1595 TRACE_EVENT(rxrpc_tx_fail,
1596 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1597 enum rxrpc_tx_point where),
1599 TP_ARGS(debug_id, serial, ret, where),
1602 __field(unsigned int, debug_id )
1603 __field(rxrpc_serial_t, serial )
1605 __field(enum rxrpc_tx_point, where )
1609 __entry->debug_id = debug_id;
1610 __entry->serial = serial;
1612 __entry->where = where;
1615 TP_printk("c=%08x r=%x ret=%d %s",
1619 __print_symbolic(__entry->where, rxrpc_tx_points))
1622 TRACE_EVENT(rxrpc_call_reset,
1623 TP_PROTO(struct rxrpc_call *call),
1628 __field(unsigned int, debug_id )
1630 __field(u32, call_id )
1631 __field(rxrpc_serial_t, call_serial )
1632 __field(rxrpc_serial_t, conn_serial )
1633 __field(rxrpc_seq_t, tx_seq )
1634 __field(rxrpc_seq_t, rx_seq )
1638 __entry->debug_id = call->debug_id;
1639 __entry->cid = call->cid;
1640 __entry->call_id = call->call_id;
1641 __entry->call_serial = call->rx_serial;
1642 __entry->conn_serial = call->conn->hi_serial;
1643 __entry->tx_seq = call->acks_hard_ack;
1644 __entry->rx_seq = call->rx_highest_seq;
1647 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1649 __entry->cid, __entry->call_id,
1650 __entry->call_serial, __entry->conn_serial,
1651 __entry->tx_seq, __entry->rx_seq)
1654 TRACE_EVENT(rxrpc_notify_socket,
1655 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1657 TP_ARGS(debug_id, serial),
1660 __field(unsigned int, debug_id )
1661 __field(rxrpc_serial_t, serial )
1665 __entry->debug_id = debug_id;
1666 __entry->serial = serial;
1669 TP_printk("c=%08x r=%08x",
1674 TRACE_EVENT(rxrpc_rx_discard_ack,
1675 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1676 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1677 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1679 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1680 prev_pkt, call_ackr_prev),
1683 __field(unsigned int, debug_id )
1684 __field(rxrpc_serial_t, serial )
1685 __field(rxrpc_seq_t, first_soft_ack)
1686 __field(rxrpc_seq_t, call_ackr_first)
1687 __field(rxrpc_seq_t, prev_pkt)
1688 __field(rxrpc_seq_t, call_ackr_prev)
1692 __entry->debug_id = debug_id;
1693 __entry->serial = serial;
1694 __entry->first_soft_ack = first_soft_ack;
1695 __entry->call_ackr_first = call_ackr_first;
1696 __entry->prev_pkt = prev_pkt;
1697 __entry->call_ackr_prev = call_ackr_prev;
1700 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1703 __entry->first_soft_ack,
1704 __entry->call_ackr_first,
1706 __entry->call_ackr_prev)
1709 TRACE_EVENT(rxrpc_req_ack,
1710 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1711 enum rxrpc_req_ack_trace why),
1713 TP_ARGS(call_debug_id, seq, why),
1716 __field(unsigned int, call_debug_id )
1717 __field(rxrpc_seq_t, seq )
1718 __field(enum rxrpc_req_ack_trace, why )
1722 __entry->call_debug_id = call_debug_id;
1727 TP_printk("c=%08x q=%08x REQ-%s",
1728 __entry->call_debug_id,
1730 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1733 TRACE_EVENT(rxrpc_txbuf,
1734 TP_PROTO(unsigned int debug_id,
1735 unsigned int call_debug_id, rxrpc_seq_t seq,
1736 int ref, enum rxrpc_txbuf_trace what),
1738 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1741 __field(unsigned int, debug_id )
1742 __field(unsigned int, call_debug_id )
1743 __field(rxrpc_seq_t, seq )
1745 __field(enum rxrpc_txbuf_trace, what )
1749 __entry->debug_id = debug_id;
1750 __entry->call_debug_id = call_debug_id;
1753 __entry->what = what;
1756 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1758 __entry->call_debug_id,
1760 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1764 TRACE_EVENT(rxrpc_poke_call,
1765 TP_PROTO(struct rxrpc_call *call, bool busy,
1766 enum rxrpc_call_poke_trace what),
1768 TP_ARGS(call, busy, what),
1771 __field(unsigned int, call_debug_id )
1772 __field(bool, busy )
1773 __field(enum rxrpc_call_poke_trace, what )
1777 __entry->call_debug_id = call->debug_id;
1778 __entry->busy = busy;
1779 __entry->what = what;
1782 TP_printk("c=%08x %s%s",
1783 __entry->call_debug_id,
1784 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1785 __entry->busy ? "!" : "")
1788 TRACE_EVENT(rxrpc_call_poked,
1789 TP_PROTO(struct rxrpc_call *call),
1794 __field(unsigned int, call_debug_id )
1798 __entry->call_debug_id = call->debug_id;
1802 __entry->call_debug_id)
1807 #endif /* _TRACE_RXRPC_H */
1809 /* This part must be outside protection */
1810 #include <trace/define_trace.h>