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_queue_tx_data, "QUE tx-data ") \
187 EM(rxrpc_call_see_accept, "SEE accept ") \
188 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
189 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
190 EM(rxrpc_call_see_connected, "SEE connect ") \
191 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
192 EM(rxrpc_call_see_input, "SEE input ") \
193 EM(rxrpc_call_see_release, "SEE release ") \
194 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
195 E_(rxrpc_call_see_zap, "SEE zap ")
197 #define rxrpc_txqueue_traces \
198 EM(rxrpc_txqueue_await_reply, "AWR") \
199 EM(rxrpc_txqueue_dequeue, "DEQ") \
200 EM(rxrpc_txqueue_end, "END") \
201 EM(rxrpc_txqueue_queue, "QUE") \
202 EM(rxrpc_txqueue_queue_last, "QLS") \
203 EM(rxrpc_txqueue_rotate, "ROT") \
204 EM(rxrpc_txqueue_rotate_last, "RLS") \
205 E_(rxrpc_txqueue_wait, "WAI")
207 #define rxrpc_receive_traces \
208 EM(rxrpc_receive_end, "END") \
209 EM(rxrpc_receive_front, "FRN") \
210 EM(rxrpc_receive_incoming, "INC") \
211 EM(rxrpc_receive_queue, "QUE") \
212 EM(rxrpc_receive_queue_last, "QLS") \
213 EM(rxrpc_receive_queue_oos, "QUO") \
214 EM(rxrpc_receive_queue_oos_last, "QOL") \
215 EM(rxrpc_receive_oos, "OOS") \
216 EM(rxrpc_receive_oos_last, "OSL") \
217 EM(rxrpc_receive_rotate, "ROT") \
218 E_(rxrpc_receive_rotate_last, "RLS")
220 #define rxrpc_recvmsg_traces \
221 EM(rxrpc_recvmsg_cont, "CONT") \
222 EM(rxrpc_recvmsg_data_return, "DATA") \
223 EM(rxrpc_recvmsg_dequeue, "DEQU") \
224 EM(rxrpc_recvmsg_enter, "ENTR") \
225 EM(rxrpc_recvmsg_full, "FULL") \
226 EM(rxrpc_recvmsg_hole, "HOLE") \
227 EM(rxrpc_recvmsg_next, "NEXT") \
228 EM(rxrpc_recvmsg_requeue, "REQU") \
229 EM(rxrpc_recvmsg_return, "RETN") \
230 EM(rxrpc_recvmsg_terminal, "TERM") \
231 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
232 E_(rxrpc_recvmsg_wait, "WAIT")
234 #define rxrpc_rtt_tx_traces \
235 EM(rxrpc_rtt_tx_cancel, "CNCE") \
236 EM(rxrpc_rtt_tx_data, "DATA") \
237 EM(rxrpc_rtt_tx_no_slot, "FULL") \
238 E_(rxrpc_rtt_tx_ping, "PING")
240 #define rxrpc_rtt_rx_traces \
241 EM(rxrpc_rtt_rx_cancel, "CNCL") \
242 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
243 EM(rxrpc_rtt_rx_lost, "LOST") \
244 EM(rxrpc_rtt_rx_ping_response, "PONG") \
245 E_(rxrpc_rtt_rx_requested_ack, "RACK")
247 #define rxrpc_timer_traces \
248 EM(rxrpc_timer_begin, "Begin ") \
249 EM(rxrpc_timer_exp_ack, "ExpAck") \
250 EM(rxrpc_timer_exp_hard, "ExpHrd") \
251 EM(rxrpc_timer_exp_idle, "ExpIdl") \
252 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
253 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
254 EM(rxrpc_timer_exp_normal, "ExpNml") \
255 EM(rxrpc_timer_exp_ping, "ExpPng") \
256 EM(rxrpc_timer_exp_resend, "ExpRsn") \
257 EM(rxrpc_timer_init_for_reply, "IniRpl") \
258 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
259 EM(rxrpc_timer_restart, "Restrt") \
260 EM(rxrpc_timer_set_for_ack, "SetAck") \
261 EM(rxrpc_timer_set_for_hard, "SetHrd") \
262 EM(rxrpc_timer_set_for_idle, "SetIdl") \
263 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
264 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
265 EM(rxrpc_timer_set_for_normal, "SetNml") \
266 EM(rxrpc_timer_set_for_ping, "SetPng") \
267 EM(rxrpc_timer_set_for_resend, "SetRTx") \
268 E_(rxrpc_timer_set_for_send, "SetSnd")
270 #define rxrpc_propose_ack_traces \
271 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
272 EM(rxrpc_propose_ack_input_data, "DataIn ") \
273 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
274 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
275 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
276 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
277 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
278 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
279 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
280 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
281 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
282 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
283 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
284 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
286 #define rxrpc_congest_modes \
287 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
288 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
289 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
290 E_(RXRPC_CALL_SLOW_START, "SlowStart")
292 #define rxrpc_congest_changes \
293 EM(rxrpc_cong_begin_retransmission, " Retrans") \
294 EM(rxrpc_cong_cleared_nacks, " Cleared") \
295 EM(rxrpc_cong_new_low_nack, " NewLowN") \
296 EM(rxrpc_cong_no_change, " -") \
297 EM(rxrpc_cong_progress, " Progres") \
298 EM(rxrpc_cong_idle_reset, " IdleRes") \
299 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
300 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
301 E_(rxrpc_cong_saw_nack, " SawNack")
305 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
306 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
307 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
308 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
309 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
310 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
311 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
312 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
317 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
321 #define rxrpc_ack_names \
323 EM(RXRPC_ACK_REQUESTED, "REQ") \
324 EM(RXRPC_ACK_DUPLICATE, "DUP") \
325 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
326 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
327 EM(RXRPC_ACK_NOSPACE, "MEM") \
328 EM(RXRPC_ACK_PING, "PNG") \
329 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
330 EM(RXRPC_ACK_DELAY, "DLY") \
331 EM(RXRPC_ACK_IDLE, "IDL") \
332 E_(RXRPC_ACK__INVALID, "-?-")
334 #define rxrpc_completions \
335 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
336 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
337 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
338 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
339 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
341 #define rxrpc_tx_points \
342 EM(rxrpc_tx_point_call_abort, "CallAbort") \
343 EM(rxrpc_tx_point_call_ack, "CallAck") \
344 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
345 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
346 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
347 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
348 EM(rxrpc_tx_point_reject, "Reject") \
349 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
350 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
351 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
352 E_(rxrpc_tx_point_version_reply, "VerReply")
354 #define rxrpc_req_ack_traces \
355 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
356 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
357 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
358 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
359 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
360 EM(rxrpc_reqack_retrans, "RETRANS ") \
361 EM(rxrpc_reqack_slow_start, "SLOW-START") \
362 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
363 /* ---- Must update size of stat_why_req_ack[] if more are added! */
365 #define rxrpc_txbuf_traces \
366 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
367 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
368 EM(rxrpc_txbuf_free, "FREE ") \
369 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
370 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
371 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
372 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
373 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
374 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
375 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
376 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
377 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
378 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
379 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
380 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
383 * Generate enums for tracing information.
385 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
386 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
393 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
394 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
395 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
396 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
397 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
398 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
399 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
400 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
401 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
402 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
403 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
404 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
405 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
406 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
407 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
408 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
409 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
410 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
411 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
412 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
414 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
417 * Export enum symbols via userspace.
421 #define EM(a, b) TRACE_DEFINE_ENUM(a);
422 #define E_(a, b) TRACE_DEFINE_ENUM(a);
425 rxrpc_call_poke_traces;
428 rxrpc_congest_changes;
432 rxrpc_propose_ack_traces;
433 rxrpc_receive_traces;
434 rxrpc_recvmsg_traces;
435 rxrpc_req_ack_traces;
442 rxrpc_txqueue_traces;
445 * Now redefine the EM() and E_() macros to map the enums to the strings that
446 * will be printed in the output.
450 #define EM(a, b) { a, b },
451 #define E_(a, b) { a, b }
453 TRACE_EVENT(rxrpc_local,
454 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
457 TP_ARGS(local_debug_id, op, ref, usage),
460 __field(unsigned int, local )
467 __entry->local = local_debug_id;
470 __entry->usage = usage;
473 TP_printk("L=%08x %s r=%d u=%d",
475 __print_symbolic(__entry->op, rxrpc_local_traces),
480 TRACE_EVENT(rxrpc_peer,
481 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
483 TP_ARGS(peer_debug_id, ref, why),
486 __field(unsigned int, peer )
492 __entry->peer = peer_debug_id;
497 TP_printk("P=%08x %s r=%d",
499 __print_symbolic(__entry->why, rxrpc_peer_traces),
503 TRACE_EVENT(rxrpc_bundle,
504 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
506 TP_ARGS(bundle_debug_id, ref, why),
509 __field(unsigned int, bundle )
515 __entry->bundle = bundle_debug_id;
520 TP_printk("CB=%08x %s r=%d",
522 __print_symbolic(__entry->why, rxrpc_bundle_traces),
526 TRACE_EVENT(rxrpc_conn,
527 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
529 TP_ARGS(conn_debug_id, ref, why),
532 __field(unsigned int, conn )
538 __entry->conn = conn_debug_id;
543 TP_printk("C=%08x %s r=%d",
545 __print_symbolic(__entry->why, rxrpc_conn_traces),
549 TRACE_EVENT(rxrpc_client,
550 TP_PROTO(struct rxrpc_connection *conn, int channel,
551 enum rxrpc_client_trace op),
553 TP_ARGS(conn, channel, op),
556 __field(unsigned int, conn )
558 __field(int, channel )
560 __field(enum rxrpc_client_trace, op )
564 __entry->conn = conn ? conn->debug_id : 0;
565 __entry->channel = channel;
566 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
568 __entry->cid = conn ? conn->proto.cid : 0;
571 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
574 __print_symbolic(__entry->op, rxrpc_client_traces),
579 TRACE_EVENT(rxrpc_call,
580 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
581 enum rxrpc_call_trace why),
583 TP_ARGS(call_debug_id, ref, aux, why),
586 __field(unsigned int, call )
589 __field(unsigned long, aux )
593 __entry->call = call_debug_id;
599 TP_printk("c=%08x %s r=%d a=%lx",
601 __print_symbolic(__entry->why, rxrpc_call_traces),
606 TRACE_EVENT(rxrpc_skb,
607 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
608 enum rxrpc_skb_trace why),
610 TP_ARGS(skb, usage, mod_count, why),
613 __field(struct sk_buff *, skb )
615 __field(int, mod_count )
616 __field(enum rxrpc_skb_trace, why )
621 __entry->usage = usage;
622 __entry->mod_count = mod_count;
626 TP_printk("s=%p Rx %s u=%d m=%d",
628 __print_symbolic(__entry->why, rxrpc_skb_traces),
633 TRACE_EVENT(rxrpc_rx_packet,
634 TP_PROTO(struct rxrpc_skb_priv *sp),
639 __field_struct(struct rxrpc_host_header, hdr )
643 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
646 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
647 __entry->hdr.epoch, __entry->hdr.cid,
648 __entry->hdr.callNumber, __entry->hdr.serviceId,
649 __entry->hdr.serial, __entry->hdr.seq,
650 __entry->hdr.type, __entry->hdr.flags,
651 __entry->hdr.type <= 15 ?
652 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
655 TRACE_EVENT(rxrpc_rx_done,
656 TP_PROTO(int result, int abort_code),
658 TP_ARGS(result, abort_code),
661 __field(int, result )
662 __field(int, abort_code )
666 __entry->result = result;
667 __entry->abort_code = abort_code;
670 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
673 TRACE_EVENT(rxrpc_abort,
674 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
675 rxrpc_seq_t seq, int abort_code, int error),
677 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
680 __field(unsigned int, call_nr )
681 __array(char, why, 4 )
683 __field(u32, call_id )
684 __field(rxrpc_seq_t, seq )
685 __field(int, abort_code )
690 memcpy(__entry->why, why, 4);
691 __entry->call_nr = call_nr;
693 __entry->call_id = call_id;
694 __entry->abort_code = abort_code;
695 __entry->error = error;
699 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
701 __entry->cid, __entry->call_id, __entry->seq,
702 __entry->abort_code, __entry->error, __entry->why)
705 TRACE_EVENT(rxrpc_call_complete,
706 TP_PROTO(struct rxrpc_call *call),
711 __field(unsigned int, call )
712 __field(enum rxrpc_call_completion, compl )
714 __field(u32, abort_code )
718 __entry->call = call->debug_id;
719 __entry->compl = call->completion;
720 __entry->error = call->error;
721 __entry->abort_code = call->abort_code;
724 TP_printk("c=%08x %s r=%d ac=%d",
726 __print_symbolic(__entry->compl, rxrpc_completions),
731 TRACE_EVENT(rxrpc_txqueue,
732 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
737 __field(unsigned int, call )
738 __field(enum rxrpc_txqueue_trace, why )
739 __field(rxrpc_seq_t, acks_hard_ack )
740 __field(rxrpc_seq_t, tx_bottom )
741 __field(rxrpc_seq_t, tx_top )
742 __field(rxrpc_seq_t, tx_prepared )
743 __field(int, tx_winsize )
747 __entry->call = call->debug_id;
749 __entry->acks_hard_ack = call->acks_hard_ack;
750 __entry->tx_bottom = call->tx_bottom;
751 __entry->tx_top = call->tx_top;
752 __entry->tx_prepared = call->tx_prepared;
753 __entry->tx_winsize = call->tx_winsize;
756 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
758 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
760 __entry->acks_hard_ack,
761 __entry->tx_top - __entry->tx_bottom,
762 __entry->tx_top - __entry->acks_hard_ack,
763 __entry->tx_prepared - __entry->tx_bottom,
767 TRACE_EVENT(rxrpc_rx_data,
768 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
769 rxrpc_serial_t serial, u8 flags),
771 TP_ARGS(call, seq, serial, flags),
774 __field(unsigned int, call )
775 __field(rxrpc_seq_t, seq )
776 __field(rxrpc_serial_t, serial )
781 __entry->call = call;
783 __entry->serial = serial;
784 __entry->flags = flags;
787 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
794 TRACE_EVENT(rxrpc_rx_ack,
795 TP_PROTO(struct rxrpc_call *call,
796 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
797 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
799 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
802 __field(unsigned int, call )
803 __field(rxrpc_serial_t, serial )
804 __field(rxrpc_serial_t, ack_serial )
805 __field(rxrpc_seq_t, first )
806 __field(rxrpc_seq_t, prev )
812 __entry->call = call->debug_id;
813 __entry->serial = serial;
814 __entry->ack_serial = ack_serial;
815 __entry->first = first;
816 __entry->prev = prev;
817 __entry->reason = reason;
818 __entry->n_acks = n_acks;
821 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
824 __print_symbolic(__entry->reason, rxrpc_ack_names),
831 TRACE_EVENT(rxrpc_rx_abort,
832 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
835 TP_ARGS(call, serial, abort_code),
838 __field(unsigned int, call )
839 __field(rxrpc_serial_t, serial )
840 __field(u32, abort_code )
844 __entry->call = call->debug_id;
845 __entry->serial = serial;
846 __entry->abort_code = abort_code;
849 TP_printk("c=%08x ABORT %08x ac=%d",
855 TRACE_EVENT(rxrpc_rx_challenge,
856 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
857 u32 version, u32 nonce, u32 min_level),
859 TP_ARGS(conn, serial, version, nonce, min_level),
862 __field(unsigned int, conn )
863 __field(rxrpc_serial_t, serial )
864 __field(u32, version )
866 __field(u32, min_level )
870 __entry->conn = conn->debug_id;
871 __entry->serial = serial;
872 __entry->version = version;
873 __entry->nonce = nonce;
874 __entry->min_level = min_level;
877 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
885 TRACE_EVENT(rxrpc_rx_response,
886 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
887 u32 version, u32 kvno, u32 ticket_len),
889 TP_ARGS(conn, serial, version, kvno, ticket_len),
892 __field(unsigned int, conn )
893 __field(rxrpc_serial_t, serial )
894 __field(u32, version )
896 __field(u32, ticket_len )
900 __entry->conn = conn->debug_id;
901 __entry->serial = serial;
902 __entry->version = version;
903 __entry->kvno = kvno;
904 __entry->ticket_len = ticket_len;
907 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
915 TRACE_EVENT(rxrpc_rx_rwind_change,
916 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
917 u32 rwind, bool wake),
919 TP_ARGS(call, serial, rwind, wake),
922 __field(unsigned int, call )
923 __field(rxrpc_serial_t, serial )
929 __entry->call = call->debug_id;
930 __entry->serial = serial;
931 __entry->rwind = rwind;
932 __entry->wake = wake;
935 TP_printk("c=%08x %08x rw=%u%s",
939 __entry->wake ? " wake" : "")
942 TRACE_EVENT(rxrpc_tx_packet,
943 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
944 enum rxrpc_tx_point where),
946 TP_ARGS(call_id, whdr, where),
949 __field(unsigned int, call )
950 __field(enum rxrpc_tx_point, where )
951 __field_struct(struct rxrpc_wire_header, whdr )
955 __entry->call = call_id;
956 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
957 __entry->where = where;
960 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
962 ntohl(__entry->whdr.epoch),
963 ntohl(__entry->whdr.cid),
964 ntohl(__entry->whdr.callNumber),
965 ntohs(__entry->whdr.serviceId),
966 ntohl(__entry->whdr.serial),
967 ntohl(__entry->whdr.seq),
968 __entry->whdr.type, __entry->whdr.flags,
969 __entry->whdr.type <= 15 ?
970 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
971 __print_symbolic(__entry->where, rxrpc_tx_points))
974 TRACE_EVENT(rxrpc_tx_data,
975 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
976 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
978 TP_ARGS(call, seq, serial, flags, retrans, lose),
981 __field(unsigned int, call )
982 __field(rxrpc_seq_t, seq )
983 __field(rxrpc_serial_t, serial )
985 __field(u32, call_id )
987 __field(bool, retrans )
992 __entry->call = call->debug_id;
993 __entry->cid = call->cid;
994 __entry->call_id = call->call_id;
996 __entry->serial = serial;
997 __entry->flags = flags;
998 __entry->retrans = retrans;
999 __entry->lose = lose;
1002 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1009 __entry->retrans ? " *RETRANS*" : "",
1010 __entry->lose ? " *LOSE*" : "")
1013 TRACE_EVENT(rxrpc_tx_ack,
1014 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1015 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1016 u8 reason, u8 n_acks),
1018 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1021 __field(unsigned int, call )
1022 __field(rxrpc_serial_t, serial )
1023 __field(rxrpc_seq_t, ack_first )
1024 __field(rxrpc_serial_t, ack_serial )
1025 __field(u8, reason )
1026 __field(u8, n_acks )
1030 __entry->call = call;
1031 __entry->serial = serial;
1032 __entry->ack_first = ack_first;
1033 __entry->ack_serial = ack_serial;
1034 __entry->reason = reason;
1035 __entry->n_acks = n_acks;
1038 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1041 __print_symbolic(__entry->reason, rxrpc_ack_names),
1043 __entry->ack_serial,
1047 TRACE_EVENT(rxrpc_receive,
1048 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1049 rxrpc_serial_t serial, rxrpc_seq_t seq),
1051 TP_ARGS(call, why, serial, seq),
1054 __field(unsigned int, call )
1055 __field(enum rxrpc_receive_trace, why )
1056 __field(rxrpc_serial_t, serial )
1057 __field(rxrpc_seq_t, seq )
1058 __field(u64, window )
1062 __entry->call = call->debug_id;
1064 __entry->serial = serial;
1066 __entry->window = atomic64_read(&call->ackr_window);
1069 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1071 __print_symbolic(__entry->why, rxrpc_receive_traces),
1074 lower_32_bits(__entry->window),
1075 upper_32_bits(__entry->window))
1078 TRACE_EVENT(rxrpc_recvmsg,
1079 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1082 TP_ARGS(call, why, ret),
1085 __field(unsigned int, call )
1086 __field(enum rxrpc_recvmsg_trace, why )
1091 __entry->call = call ? call->debug_id : 0;
1096 TP_printk("c=%08x %s ret=%d",
1098 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1102 TRACE_EVENT(rxrpc_recvdata,
1103 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1104 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1107 TP_ARGS(call, why, seq, offset, len, ret),
1110 __field(unsigned int, call )
1111 __field(enum rxrpc_recvmsg_trace, why )
1112 __field(rxrpc_seq_t, seq )
1113 __field(unsigned int, offset )
1114 __field(unsigned int, len )
1119 __entry->call = call ? call->debug_id : 0;
1122 __entry->offset = offset;
1127 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1129 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1136 TRACE_EVENT(rxrpc_rtt_tx,
1137 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1138 int slot, rxrpc_serial_t send_serial),
1140 TP_ARGS(call, why, slot, send_serial),
1143 __field(unsigned int, call )
1144 __field(enum rxrpc_rtt_tx_trace, why )
1146 __field(rxrpc_serial_t, send_serial )
1150 __entry->call = call->debug_id;
1152 __entry->slot = slot;
1153 __entry->send_serial = send_serial;
1156 TP_printk("c=%08x [%d] %s sr=%08x",
1159 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1160 __entry->send_serial)
1163 TRACE_EVENT(rxrpc_rtt_rx,
1164 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1166 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1169 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1172 __field(unsigned int, call )
1173 __field(enum rxrpc_rtt_rx_trace, why )
1175 __field(rxrpc_serial_t, send_serial )
1176 __field(rxrpc_serial_t, resp_serial )
1182 __entry->call = call->debug_id;
1184 __entry->slot = slot;
1185 __entry->send_serial = send_serial;
1186 __entry->resp_serial = resp_serial;
1191 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1194 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1195 __entry->send_serial,
1196 __entry->resp_serial,
1201 TRACE_EVENT(rxrpc_timer,
1202 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1205 TP_ARGS(call, why, now),
1208 __field(unsigned int, call )
1209 __field(enum rxrpc_timer_trace, why )
1211 __field(long, ack_at )
1212 __field(long, ack_lost_at )
1213 __field(long, resend_at )
1214 __field(long, ping_at )
1215 __field(long, expect_rx_by )
1216 __field(long, expect_req_by )
1217 __field(long, expect_term_by )
1218 __field(long, timer )
1222 __entry->call = call->debug_id;
1225 __entry->ack_at = call->delay_ack_at;
1226 __entry->ack_lost_at = call->ack_lost_at;
1227 __entry->resend_at = call->resend_at;
1228 __entry->expect_rx_by = call->expect_rx_by;
1229 __entry->expect_req_by = call->expect_req_by;
1230 __entry->expect_term_by = call->expect_term_by;
1231 __entry->timer = call->timer.expires;
1234 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1236 __print_symbolic(__entry->why, rxrpc_timer_traces),
1237 __entry->ack_at - __entry->now,
1238 __entry->ack_lost_at - __entry->now,
1239 __entry->resend_at - __entry->now,
1240 __entry->expect_rx_by - __entry->now,
1241 __entry->expect_req_by - __entry->now,
1242 __entry->expect_term_by - __entry->now,
1243 __entry->timer - __entry->now)
1246 TRACE_EVENT(rxrpc_timer_expired,
1247 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1252 __field(unsigned int, call )
1254 __field(long, ack_at )
1255 __field(long, ack_lost_at )
1256 __field(long, resend_at )
1257 __field(long, ping_at )
1258 __field(long, expect_rx_by )
1259 __field(long, expect_req_by )
1260 __field(long, expect_term_by )
1261 __field(long, timer )
1265 __entry->call = call->debug_id;
1267 __entry->ack_at = call->delay_ack_at;
1268 __entry->ack_lost_at = call->ack_lost_at;
1269 __entry->resend_at = call->resend_at;
1270 __entry->expect_rx_by = call->expect_rx_by;
1271 __entry->expect_req_by = call->expect_req_by;
1272 __entry->expect_term_by = call->expect_term_by;
1273 __entry->timer = call->timer.expires;
1276 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1278 __entry->ack_at - __entry->now,
1279 __entry->ack_lost_at - __entry->now,
1280 __entry->resend_at - __entry->now,
1281 __entry->expect_rx_by - __entry->now,
1282 __entry->expect_req_by - __entry->now,
1283 __entry->expect_term_by - __entry->now,
1284 __entry->timer - __entry->now)
1287 TRACE_EVENT(rxrpc_rx_lose,
1288 TP_PROTO(struct rxrpc_skb_priv *sp),
1293 __field_struct(struct rxrpc_host_header, hdr )
1297 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1300 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1301 __entry->hdr.epoch, __entry->hdr.cid,
1302 __entry->hdr.callNumber, __entry->hdr.serviceId,
1303 __entry->hdr.serial, __entry->hdr.seq,
1304 __entry->hdr.type, __entry->hdr.flags,
1305 __entry->hdr.type <= 15 ?
1306 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1309 TRACE_EVENT(rxrpc_propose_ack,
1310 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1311 u8 ack_reason, rxrpc_serial_t serial),
1313 TP_ARGS(call, why, ack_reason, serial),
1316 __field(unsigned int, call )
1317 __field(enum rxrpc_propose_ack_trace, why )
1318 __field(rxrpc_serial_t, serial )
1319 __field(u8, ack_reason )
1323 __entry->call = call->debug_id;
1325 __entry->serial = serial;
1326 __entry->ack_reason = ack_reason;
1329 TP_printk("c=%08x %s %s r=%08x",
1331 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1332 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1336 TRACE_EVENT(rxrpc_send_ack,
1337 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1338 u8 ack_reason, rxrpc_serial_t serial),
1340 TP_ARGS(call, why, ack_reason, serial),
1343 __field(unsigned int, call )
1344 __field(enum rxrpc_propose_ack_trace, why )
1345 __field(rxrpc_serial_t, serial )
1346 __field(u8, ack_reason )
1350 __entry->call = call->debug_id;
1352 __entry->serial = serial;
1353 __entry->ack_reason = ack_reason;
1356 TP_printk("c=%08x %s %s r=%08x",
1358 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1359 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1363 TRACE_EVENT(rxrpc_drop_ack,
1364 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1365 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1367 TP_ARGS(call, why, ack_reason, serial, nobuf),
1370 __field(unsigned int, call )
1371 __field(enum rxrpc_propose_ack_trace, why )
1372 __field(rxrpc_serial_t, serial )
1373 __field(u8, ack_reason )
1374 __field(bool, nobuf )
1378 __entry->call = call->debug_id;
1380 __entry->serial = serial;
1381 __entry->ack_reason = ack_reason;
1382 __entry->nobuf = nobuf;
1385 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1387 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1388 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1389 __entry->serial, __entry->nobuf)
1392 TRACE_EVENT(rxrpc_retransmit,
1393 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1395 TP_ARGS(call, seq, expiry),
1398 __field(unsigned int, call )
1399 __field(rxrpc_seq_t, seq )
1400 __field(s64, expiry )
1404 __entry->call = call->debug_id;
1406 __entry->expiry = expiry;
1409 TP_printk("c=%08x q=%x xp=%lld",
1415 TRACE_EVENT(rxrpc_congest,
1416 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1417 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1419 TP_ARGS(call, summary, ack_serial, change),
1422 __field(unsigned int, call )
1423 __field(enum rxrpc_congest_change, change )
1424 __field(rxrpc_seq_t, hard_ack )
1425 __field(rxrpc_seq_t, top )
1426 __field(rxrpc_seq_t, lowest_nak )
1427 __field(rxrpc_serial_t, ack_serial )
1428 __field_struct(struct rxrpc_ack_summary, sum )
1432 __entry->call = call->debug_id;
1433 __entry->change = change;
1434 __entry->hard_ack = call->acks_hard_ack;
1435 __entry->top = call->tx_top;
1436 __entry->lowest_nak = call->acks_lowest_nak;
1437 __entry->ack_serial = ack_serial;
1438 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1441 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",
1443 __entry->ack_serial,
1444 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1446 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1448 __entry->sum.ssthresh,
1449 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1450 __entry->sum.nr_new_acks,
1451 __entry->sum.nr_rot_new_acks,
1452 __entry->top - __entry->hard_ack,
1453 __entry->sum.cumulative_acks,
1454 __entry->sum.dup_acks,
1455 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1456 __print_symbolic(__entry->change, rxrpc_congest_changes),
1457 __entry->sum.retrans_timeo ? " rTxTo" : "")
1460 TRACE_EVENT(rxrpc_disconnect_call,
1461 TP_PROTO(struct rxrpc_call *call),
1466 __field(unsigned int, call )
1467 __field(u32, abort_code )
1471 __entry->call = call->debug_id;
1472 __entry->abort_code = call->abort_code;
1475 TP_printk("c=%08x ab=%08x",
1477 __entry->abort_code)
1480 TRACE_EVENT(rxrpc_improper_term,
1481 TP_PROTO(struct rxrpc_call *call),
1486 __field(unsigned int, call )
1487 __field(u32, abort_code )
1491 __entry->call = call->debug_id;
1492 __entry->abort_code = call->abort_code;
1495 TP_printk("c=%08x ab=%08x",
1497 __entry->abort_code)
1500 TRACE_EVENT(rxrpc_rx_eproto,
1501 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1504 TP_ARGS(call, serial, why),
1507 __field(unsigned int, call )
1508 __field(rxrpc_serial_t, serial )
1509 __field(const char *, why )
1513 __entry->call = call ? call->debug_id : 0;
1514 __entry->serial = serial;
1518 TP_printk("c=%08x EPROTO %08x %s",
1524 TRACE_EVENT(rxrpc_connect_call,
1525 TP_PROTO(struct rxrpc_call *call),
1530 __field(unsigned int, call )
1531 __field(unsigned long, user_call_ID )
1533 __field(u32, call_id )
1537 __entry->call = call->debug_id;
1538 __entry->user_call_ID = call->user_call_ID;
1539 __entry->cid = call->cid;
1540 __entry->call_id = call->call_id;
1543 TP_printk("c=%08x u=%p %08x:%08x",
1545 (void *)__entry->user_call_ID,
1550 TRACE_EVENT(rxrpc_resend,
1551 TP_PROTO(struct rxrpc_call *call),
1556 __field(unsigned int, call )
1557 __field(rxrpc_seq_t, seq )
1561 __entry->call = call->debug_id;
1562 __entry->seq = call->acks_hard_ack;
1565 TP_printk("c=%08x q=%x",
1570 TRACE_EVENT(rxrpc_rx_icmp,
1571 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1572 struct sockaddr_rxrpc *srx),
1574 TP_ARGS(peer, ee, srx),
1577 __field(unsigned int, peer )
1578 __field_struct(struct sock_extended_err, ee )
1579 __field_struct(struct sockaddr_rxrpc, srx )
1583 __entry->peer = peer->debug_id;
1584 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1585 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1588 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1590 __entry->ee.ee_origin,
1591 __entry->ee.ee_type,
1592 __entry->ee.ee_code,
1593 __entry->ee.ee_info,
1594 __entry->ee.ee_data,
1595 __entry->ee.ee_errno,
1596 &__entry->srx.transport)
1599 TRACE_EVENT(rxrpc_tx_fail,
1600 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1601 enum rxrpc_tx_point where),
1603 TP_ARGS(debug_id, serial, ret, where),
1606 __field(unsigned int, debug_id )
1607 __field(rxrpc_serial_t, serial )
1609 __field(enum rxrpc_tx_point, where )
1613 __entry->debug_id = debug_id;
1614 __entry->serial = serial;
1616 __entry->where = where;
1619 TP_printk("c=%08x r=%x ret=%d %s",
1623 __print_symbolic(__entry->where, rxrpc_tx_points))
1626 TRACE_EVENT(rxrpc_call_reset,
1627 TP_PROTO(struct rxrpc_call *call),
1632 __field(unsigned int, debug_id )
1634 __field(u32, call_id )
1635 __field(rxrpc_serial_t, call_serial )
1636 __field(rxrpc_serial_t, conn_serial )
1637 __field(rxrpc_seq_t, tx_seq )
1638 __field(rxrpc_seq_t, rx_seq )
1642 __entry->debug_id = call->debug_id;
1643 __entry->cid = call->cid;
1644 __entry->call_id = call->call_id;
1645 __entry->call_serial = call->rx_serial;
1646 __entry->conn_serial = call->conn->hi_serial;
1647 __entry->tx_seq = call->acks_hard_ack;
1648 __entry->rx_seq = call->rx_highest_seq;
1651 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1653 __entry->cid, __entry->call_id,
1654 __entry->call_serial, __entry->conn_serial,
1655 __entry->tx_seq, __entry->rx_seq)
1658 TRACE_EVENT(rxrpc_notify_socket,
1659 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1661 TP_ARGS(debug_id, serial),
1664 __field(unsigned int, debug_id )
1665 __field(rxrpc_serial_t, serial )
1669 __entry->debug_id = debug_id;
1670 __entry->serial = serial;
1673 TP_printk("c=%08x r=%08x",
1678 TRACE_EVENT(rxrpc_rx_discard_ack,
1679 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1680 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1681 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1683 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1684 prev_pkt, call_ackr_prev),
1687 __field(unsigned int, debug_id )
1688 __field(rxrpc_serial_t, serial )
1689 __field(rxrpc_seq_t, first_soft_ack)
1690 __field(rxrpc_seq_t, call_ackr_first)
1691 __field(rxrpc_seq_t, prev_pkt)
1692 __field(rxrpc_seq_t, call_ackr_prev)
1696 __entry->debug_id = debug_id;
1697 __entry->serial = serial;
1698 __entry->first_soft_ack = first_soft_ack;
1699 __entry->call_ackr_first = call_ackr_first;
1700 __entry->prev_pkt = prev_pkt;
1701 __entry->call_ackr_prev = call_ackr_prev;
1704 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1707 __entry->first_soft_ack,
1708 __entry->call_ackr_first,
1710 __entry->call_ackr_prev)
1713 TRACE_EVENT(rxrpc_req_ack,
1714 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1715 enum rxrpc_req_ack_trace why),
1717 TP_ARGS(call_debug_id, seq, why),
1720 __field(unsigned int, call_debug_id )
1721 __field(rxrpc_seq_t, seq )
1722 __field(enum rxrpc_req_ack_trace, why )
1726 __entry->call_debug_id = call_debug_id;
1731 TP_printk("c=%08x q=%08x REQ-%s",
1732 __entry->call_debug_id,
1734 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1737 TRACE_EVENT(rxrpc_txbuf,
1738 TP_PROTO(unsigned int debug_id,
1739 unsigned int call_debug_id, rxrpc_seq_t seq,
1740 int ref, enum rxrpc_txbuf_trace what),
1742 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1745 __field(unsigned int, debug_id )
1746 __field(unsigned int, call_debug_id )
1747 __field(rxrpc_seq_t, seq )
1749 __field(enum rxrpc_txbuf_trace, what )
1753 __entry->debug_id = debug_id;
1754 __entry->call_debug_id = call_debug_id;
1757 __entry->what = what;
1760 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1762 __entry->call_debug_id,
1764 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1768 TRACE_EVENT(rxrpc_poke_call,
1769 TP_PROTO(struct rxrpc_call *call, bool busy,
1770 enum rxrpc_call_poke_trace what),
1772 TP_ARGS(call, busy, what),
1775 __field(unsigned int, call_debug_id )
1776 __field(bool, busy )
1777 __field(enum rxrpc_call_poke_trace, what )
1781 __entry->call_debug_id = call->debug_id;
1782 __entry->busy = busy;
1783 __entry->what = what;
1786 TP_printk("c=%08x %s%s",
1787 __entry->call_debug_id,
1788 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1789 __entry->busy ? "!" : "")
1792 TRACE_EVENT(rxrpc_call_poked,
1793 TP_PROTO(struct rxrpc_call *call),
1798 __field(unsigned int, call_debug_id )
1802 __entry->call_debug_id = call->debug_id;
1806 __entry->call_debug_id)
1811 #endif /* _TRACE_RXRPC_H */
1813 /* This part must be outside protection */
1814 #include <trace/define_trace.h>