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_conn_work, "GET conn-work") \
30 EM(rxrpc_skb_get_local_work, "GET locl-work") \
31 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \
32 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
33 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
34 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
35 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
36 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
37 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
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_purge, "PUT purge ") \
43 EM(rxrpc_skb_put_rotate, "PUT rotate ") \
44 EM(rxrpc_skb_put_unknown, "PUT unknown ") \
45 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \
46 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \
47 EM(rxrpc_skb_see_reject, "SEE reject ") \
48 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
49 E_(rxrpc_skb_see_version, "SEE version ")
51 #define rxrpc_local_traces \
52 EM(rxrpc_local_free, "FREE ") \
53 EM(rxrpc_local_get_call, "GET call ") \
54 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
55 EM(rxrpc_local_get_for_use, "GET for-use ") \
56 EM(rxrpc_local_get_peer, "GET peer ") \
57 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
58 EM(rxrpc_local_new, "NEW ") \
59 EM(rxrpc_local_put_bind, "PUT bind ") \
60 EM(rxrpc_local_put_call, "PUT call ") \
61 EM(rxrpc_local_put_for_use, "PUT for-use ") \
62 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
63 EM(rxrpc_local_put_peer, "PUT peer ") \
64 EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \
65 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
66 EM(rxrpc_local_stop, "STOP ") \
67 EM(rxrpc_local_stopped, "STOPPED ") \
68 EM(rxrpc_local_unuse_bind, "UNU bind ") \
69 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
70 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
71 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
72 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
73 EM(rxrpc_local_use_lookup, "USE lookup ") \
74 E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa")
76 #define rxrpc_peer_traces \
77 EM(rxrpc_peer_free, "FREE ") \
78 EM(rxrpc_peer_get_accept, "GET accept ") \
79 EM(rxrpc_peer_get_activate_call, "GET act-call") \
80 EM(rxrpc_peer_get_bundle, "GET bundle ") \
81 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
82 EM(rxrpc_peer_get_input, "GET input ") \
83 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
84 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
85 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
86 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
87 EM(rxrpc_peer_new_client, "NEW client ") \
88 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
89 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
90 EM(rxrpc_peer_put_call, "PUT call ") \
91 EM(rxrpc_peer_put_conn, "PUT conn ") \
92 EM(rxrpc_peer_put_discard_tmp, "PUT disc-tmp") \
93 EM(rxrpc_peer_put_input, "PUT input ") \
94 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
95 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
97 #define rxrpc_bundle_traces \
98 EM(rxrpc_bundle_free, "FREE ") \
99 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
100 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
101 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
102 EM(rxrpc_bundle_put_conn, "PUT conn ") \
103 EM(rxrpc_bundle_put_discard, "PUT discard ") \
104 E_(rxrpc_bundle_new, "NEW ")
106 #define rxrpc_conn_traces \
107 EM(rxrpc_conn_free, "FREE ") \
108 EM(rxrpc_conn_get_activate_call, "GET act-call") \
109 EM(rxrpc_conn_get_call_input, "GET inp-call") \
110 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
111 EM(rxrpc_conn_get_idle, "GET idle ") \
112 EM(rxrpc_conn_get_poke, "GET poke ") \
113 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
114 EM(rxrpc_conn_new_client, "NEW client ") \
115 EM(rxrpc_conn_new_service, "NEW service ") \
116 EM(rxrpc_conn_put_call, "PUT call ") \
117 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
118 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
119 EM(rxrpc_conn_put_discard, "PUT discard ") \
120 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
121 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
122 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
123 EM(rxrpc_conn_put_poke, "PUT poke ") \
124 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \
125 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
126 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
127 EM(rxrpc_conn_queue_challenge, "QUE chall ") \
128 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
129 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
130 EM(rxrpc_conn_queue_timer, "QUE timer ") \
131 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
132 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
133 E_(rxrpc_conn_see_work, "SEE work ")
135 #define rxrpc_client_traces \
136 EM(rxrpc_client_activate_chans, "Activa") \
137 EM(rxrpc_client_alloc, "Alloc ") \
138 EM(rxrpc_client_chan_activate, "ChActv") \
139 EM(rxrpc_client_chan_disconnect, "ChDisc") \
140 EM(rxrpc_client_chan_pass, "ChPass") \
141 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
142 EM(rxrpc_client_cleanup, "Clean ") \
143 EM(rxrpc_client_discard, "Discar") \
144 EM(rxrpc_client_duplicate, "Duplic") \
145 EM(rxrpc_client_exposed, "Expose") \
146 EM(rxrpc_client_replace, "Replac") \
147 EM(rxrpc_client_to_active, "->Actv") \
148 E_(rxrpc_client_to_idle, "->Idle")
150 #define rxrpc_call_traces \
151 EM(rxrpc_call_get_input, "GET input ") \
152 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
153 EM(rxrpc_call_get_notify_socket, "GET notify ") \
154 EM(rxrpc_call_get_poke, "GET poke ") \
155 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
156 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
157 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
158 EM(rxrpc_call_get_userid, "GET user-id ") \
159 EM(rxrpc_call_new_client, "NEW client ") \
160 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
161 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
162 EM(rxrpc_call_put_discard_error, "PUT disc-err") \
163 EM(rxrpc_call_put_input, "PUT input ") \
164 EM(rxrpc_call_put_kernel, "PUT kernel ") \
165 EM(rxrpc_call_put_poke, "PUT poke ") \
166 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
167 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
168 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
169 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
170 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
171 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
172 EM(rxrpc_call_see_accept, "SEE accept ") \
173 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
174 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
175 EM(rxrpc_call_see_connected, "SEE connect ") \
176 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
177 EM(rxrpc_call_see_input, "SEE input ") \
178 EM(rxrpc_call_see_release, "SEE release ") \
179 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
180 E_(rxrpc_call_see_zap, "SEE zap ")
182 #define rxrpc_txqueue_traces \
183 EM(rxrpc_txqueue_await_reply, "AWR") \
184 EM(rxrpc_txqueue_dequeue, "DEQ") \
185 EM(rxrpc_txqueue_end, "END") \
186 EM(rxrpc_txqueue_queue, "QUE") \
187 EM(rxrpc_txqueue_queue_last, "QLS") \
188 EM(rxrpc_txqueue_rotate, "ROT") \
189 EM(rxrpc_txqueue_rotate_last, "RLS") \
190 E_(rxrpc_txqueue_wait, "WAI")
192 #define rxrpc_receive_traces \
193 EM(rxrpc_receive_end, "END") \
194 EM(rxrpc_receive_front, "FRN") \
195 EM(rxrpc_receive_incoming, "INC") \
196 EM(rxrpc_receive_queue, "QUE") \
197 EM(rxrpc_receive_queue_last, "QLS") \
198 EM(rxrpc_receive_queue_oos, "QUO") \
199 EM(rxrpc_receive_queue_oos_last, "QOL") \
200 EM(rxrpc_receive_oos, "OOS") \
201 EM(rxrpc_receive_oos_last, "OSL") \
202 EM(rxrpc_receive_rotate, "ROT") \
203 E_(rxrpc_receive_rotate_last, "RLS")
205 #define rxrpc_recvmsg_traces \
206 EM(rxrpc_recvmsg_cont, "CONT") \
207 EM(rxrpc_recvmsg_data_return, "DATA") \
208 EM(rxrpc_recvmsg_dequeue, "DEQU") \
209 EM(rxrpc_recvmsg_enter, "ENTR") \
210 EM(rxrpc_recvmsg_full, "FULL") \
211 EM(rxrpc_recvmsg_hole, "HOLE") \
212 EM(rxrpc_recvmsg_next, "NEXT") \
213 EM(rxrpc_recvmsg_requeue, "REQU") \
214 EM(rxrpc_recvmsg_return, "RETN") \
215 EM(rxrpc_recvmsg_terminal, "TERM") \
216 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
217 E_(rxrpc_recvmsg_wait, "WAIT")
219 #define rxrpc_rtt_tx_traces \
220 EM(rxrpc_rtt_tx_cancel, "CNCE") \
221 EM(rxrpc_rtt_tx_data, "DATA") \
222 EM(rxrpc_rtt_tx_no_slot, "FULL") \
223 E_(rxrpc_rtt_tx_ping, "PING")
225 #define rxrpc_rtt_rx_traces \
226 EM(rxrpc_rtt_rx_cancel, "CNCL") \
227 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
228 EM(rxrpc_rtt_rx_lost, "LOST") \
229 EM(rxrpc_rtt_rx_ping_response, "PONG") \
230 E_(rxrpc_rtt_rx_requested_ack, "RACK")
232 #define rxrpc_timer_traces \
233 EM(rxrpc_timer_begin, "Begin ") \
234 EM(rxrpc_timer_exp_ack, "ExpAck") \
235 EM(rxrpc_timer_exp_hard, "ExpHrd") \
236 EM(rxrpc_timer_exp_idle, "ExpIdl") \
237 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
238 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
239 EM(rxrpc_timer_exp_normal, "ExpNml") \
240 EM(rxrpc_timer_exp_ping, "ExpPng") \
241 EM(rxrpc_timer_exp_resend, "ExpRsn") \
242 EM(rxrpc_timer_init_for_reply, "IniRpl") \
243 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
244 EM(rxrpc_timer_restart, "Restrt") \
245 EM(rxrpc_timer_set_for_ack, "SetAck") \
246 EM(rxrpc_timer_set_for_hard, "SetHrd") \
247 EM(rxrpc_timer_set_for_idle, "SetIdl") \
248 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
249 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
250 EM(rxrpc_timer_set_for_normal, "SetNml") \
251 EM(rxrpc_timer_set_for_ping, "SetPng") \
252 EM(rxrpc_timer_set_for_resend, "SetRTx") \
253 E_(rxrpc_timer_set_for_send, "SetSnd")
255 #define rxrpc_propose_ack_traces \
256 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
257 EM(rxrpc_propose_ack_input_data, "DataIn ") \
258 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
259 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
260 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
261 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
262 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
263 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
264 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
265 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
266 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
267 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
268 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
269 EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \
270 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
272 #define rxrpc_congest_modes \
273 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
274 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
275 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
276 E_(RXRPC_CALL_SLOW_START, "SlowStart")
278 #define rxrpc_congest_changes \
279 EM(rxrpc_cong_begin_retransmission, " Retrans") \
280 EM(rxrpc_cong_cleared_nacks, " Cleared") \
281 EM(rxrpc_cong_new_low_nack, " NewLowN") \
282 EM(rxrpc_cong_no_change, " -") \
283 EM(rxrpc_cong_progress, " Progres") \
284 EM(rxrpc_cong_idle_reset, " IdleRes") \
285 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
286 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
287 E_(rxrpc_cong_saw_nack, " SawNack")
291 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
292 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
293 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
294 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
295 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
296 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
297 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
298 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
303 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
307 #define rxrpc_ack_names \
309 EM(RXRPC_ACK_REQUESTED, "REQ") \
310 EM(RXRPC_ACK_DUPLICATE, "DUP") \
311 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
312 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
313 EM(RXRPC_ACK_NOSPACE, "MEM") \
314 EM(RXRPC_ACK_PING, "PNG") \
315 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
316 EM(RXRPC_ACK_DELAY, "DLY") \
317 EM(RXRPC_ACK_IDLE, "IDL") \
318 E_(RXRPC_ACK__INVALID, "-?-")
320 #define rxrpc_completions \
321 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
322 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
323 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
324 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
325 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
327 #define rxrpc_tx_points \
328 EM(rxrpc_tx_point_call_abort, "CallAbort") \
329 EM(rxrpc_tx_point_call_ack, "CallAck") \
330 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
331 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
332 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
333 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
334 EM(rxrpc_tx_point_reject, "Reject") \
335 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
336 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
337 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
338 E_(rxrpc_tx_point_version_reply, "VerReply")
340 #define rxrpc_req_ack_traces \
341 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
342 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
343 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
344 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
345 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
346 EM(rxrpc_reqack_retrans, "RETRANS ") \
347 EM(rxrpc_reqack_slow_start, "SLOW-START") \
348 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
349 /* ---- Must update size of stat_why_req_ack[] if more are added! */
351 #define rxrpc_txbuf_traces \
352 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
353 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
354 EM(rxrpc_txbuf_free, "FREE ") \
355 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
356 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
357 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
358 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
359 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
360 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
361 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
362 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
363 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
364 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
365 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
366 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
369 * Generate enums for tracing information.
371 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
372 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
379 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
380 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
381 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
382 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
383 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
384 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
385 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
386 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
387 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
388 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
389 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
390 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
391 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
392 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
393 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
394 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
395 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
396 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
397 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
398 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
400 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
403 * Export enum symbols via userspace.
407 #define EM(a, b) TRACE_DEFINE_ENUM(a);
408 #define E_(a, b) TRACE_DEFINE_ENUM(a);
411 rxrpc_call_poke_traces;
414 rxrpc_congest_changes;
418 rxrpc_propose_ack_traces;
419 rxrpc_receive_traces;
420 rxrpc_recvmsg_traces;
421 rxrpc_req_ack_traces;
428 rxrpc_txqueue_traces;
431 * Now redefine the EM() and E_() macros to map the enums to the strings that
432 * will be printed in the output.
436 #define EM(a, b) { a, b },
437 #define E_(a, b) { a, b }
439 TRACE_EVENT(rxrpc_local,
440 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
443 TP_ARGS(local_debug_id, op, ref, usage),
446 __field(unsigned int, local )
453 __entry->local = local_debug_id;
456 __entry->usage = usage;
459 TP_printk("L=%08x %s r=%d u=%d",
461 __print_symbolic(__entry->op, rxrpc_local_traces),
466 TRACE_EVENT(rxrpc_peer,
467 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
469 TP_ARGS(peer_debug_id, ref, why),
472 __field(unsigned int, peer )
474 __field(enum rxrpc_peer_trace, why )
478 __entry->peer = peer_debug_id;
483 TP_printk("P=%08x %s r=%d",
485 __print_symbolic(__entry->why, rxrpc_peer_traces),
489 TRACE_EVENT(rxrpc_bundle,
490 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
492 TP_ARGS(bundle_debug_id, ref, why),
495 __field(unsigned int, bundle )
501 __entry->bundle = bundle_debug_id;
506 TP_printk("CB=%08x %s r=%d",
508 __print_symbolic(__entry->why, rxrpc_bundle_traces),
512 TRACE_EVENT(rxrpc_conn,
513 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
515 TP_ARGS(conn_debug_id, ref, why),
518 __field(unsigned int, conn )
524 __entry->conn = conn_debug_id;
529 TP_printk("C=%08x %s r=%d",
531 __print_symbolic(__entry->why, rxrpc_conn_traces),
535 TRACE_EVENT(rxrpc_client,
536 TP_PROTO(struct rxrpc_connection *conn, int channel,
537 enum rxrpc_client_trace op),
539 TP_ARGS(conn, channel, op),
542 __field(unsigned int, conn )
544 __field(int, channel )
546 __field(enum rxrpc_client_trace, op )
550 __entry->conn = conn ? conn->debug_id : 0;
551 __entry->channel = channel;
552 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
554 __entry->cid = conn ? conn->proto.cid : 0;
557 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
560 __print_symbolic(__entry->op, rxrpc_client_traces),
565 TRACE_EVENT(rxrpc_call,
566 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
567 enum rxrpc_call_trace why),
569 TP_ARGS(call_debug_id, ref, aux, why),
572 __field(unsigned int, call )
575 __field(unsigned long, aux )
579 __entry->call = call_debug_id;
585 TP_printk("c=%08x %s r=%d a=%lx",
587 __print_symbolic(__entry->why, rxrpc_call_traces),
592 TRACE_EVENT(rxrpc_skb,
593 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
594 enum rxrpc_skb_trace why),
596 TP_ARGS(skb, usage, mod_count, why),
599 __field(struct sk_buff *, skb )
601 __field(int, mod_count )
602 __field(enum rxrpc_skb_trace, why )
607 __entry->usage = usage;
608 __entry->mod_count = mod_count;
612 TP_printk("s=%p Rx %s u=%d m=%d",
614 __print_symbolic(__entry->why, rxrpc_skb_traces),
619 TRACE_EVENT(rxrpc_rx_packet,
620 TP_PROTO(struct rxrpc_skb_priv *sp),
625 __field_struct(struct rxrpc_host_header, hdr )
629 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
632 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
633 __entry->hdr.epoch, __entry->hdr.cid,
634 __entry->hdr.callNumber, __entry->hdr.serviceId,
635 __entry->hdr.serial, __entry->hdr.seq,
636 __entry->hdr.type, __entry->hdr.flags,
637 __entry->hdr.type <= 15 ?
638 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
641 TRACE_EVENT(rxrpc_rx_done,
642 TP_PROTO(int result, int abort_code),
644 TP_ARGS(result, abort_code),
647 __field(int, result )
648 __field(int, abort_code )
652 __entry->result = result;
653 __entry->abort_code = abort_code;
656 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
659 TRACE_EVENT(rxrpc_abort,
660 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
661 rxrpc_seq_t seq, int abort_code, int error),
663 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
666 __field(unsigned int, call_nr )
667 __array(char, why, 4 )
669 __field(u32, call_id )
670 __field(rxrpc_seq_t, seq )
671 __field(int, abort_code )
676 memcpy(__entry->why, why, 4);
677 __entry->call_nr = call_nr;
679 __entry->call_id = call_id;
680 __entry->abort_code = abort_code;
681 __entry->error = error;
685 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
687 __entry->cid, __entry->call_id, __entry->seq,
688 __entry->abort_code, __entry->error, __entry->why)
691 TRACE_EVENT(rxrpc_call_complete,
692 TP_PROTO(struct rxrpc_call *call),
697 __field(unsigned int, call )
698 __field(enum rxrpc_call_completion, compl )
700 __field(u32, abort_code )
704 __entry->call = call->debug_id;
705 __entry->compl = call->completion;
706 __entry->error = call->error;
707 __entry->abort_code = call->abort_code;
710 TP_printk("c=%08x %s r=%d ac=%d",
712 __print_symbolic(__entry->compl, rxrpc_completions),
717 TRACE_EVENT(rxrpc_txqueue,
718 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
723 __field(unsigned int, call )
724 __field(enum rxrpc_txqueue_trace, why )
725 __field(rxrpc_seq_t, acks_hard_ack )
726 __field(rxrpc_seq_t, tx_bottom )
727 __field(rxrpc_seq_t, tx_top )
728 __field(rxrpc_seq_t, tx_prepared )
729 __field(int, tx_winsize )
733 __entry->call = call->debug_id;
735 __entry->acks_hard_ack = call->acks_hard_ack;
736 __entry->tx_bottom = call->tx_bottom;
737 __entry->tx_top = call->tx_top;
738 __entry->tx_prepared = call->tx_prepared;
739 __entry->tx_winsize = call->tx_winsize;
742 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
744 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
746 __entry->acks_hard_ack,
747 __entry->tx_top - __entry->tx_bottom,
748 __entry->tx_top - __entry->acks_hard_ack,
749 __entry->tx_prepared - __entry->tx_bottom,
753 TRACE_EVENT(rxrpc_rx_data,
754 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
755 rxrpc_serial_t serial, u8 flags),
757 TP_ARGS(call, seq, serial, flags),
760 __field(unsigned int, call )
761 __field(rxrpc_seq_t, seq )
762 __field(rxrpc_serial_t, serial )
767 __entry->call = call;
769 __entry->serial = serial;
770 __entry->flags = flags;
773 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
780 TRACE_EVENT(rxrpc_rx_ack,
781 TP_PROTO(struct rxrpc_call *call,
782 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
783 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
785 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
788 __field(unsigned int, call )
789 __field(rxrpc_serial_t, serial )
790 __field(rxrpc_serial_t, ack_serial )
791 __field(rxrpc_seq_t, first )
792 __field(rxrpc_seq_t, prev )
798 __entry->call = call->debug_id;
799 __entry->serial = serial;
800 __entry->ack_serial = ack_serial;
801 __entry->first = first;
802 __entry->prev = prev;
803 __entry->reason = reason;
804 __entry->n_acks = n_acks;
807 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
810 __print_symbolic(__entry->reason, rxrpc_ack_names),
817 TRACE_EVENT(rxrpc_rx_abort,
818 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
821 TP_ARGS(call, serial, abort_code),
824 __field(unsigned int, call )
825 __field(rxrpc_serial_t, serial )
826 __field(u32, abort_code )
830 __entry->call = call->debug_id;
831 __entry->serial = serial;
832 __entry->abort_code = abort_code;
835 TP_printk("c=%08x ABORT %08x ac=%d",
841 TRACE_EVENT(rxrpc_rx_challenge,
842 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
843 u32 version, u32 nonce, u32 min_level),
845 TP_ARGS(conn, serial, version, nonce, min_level),
848 __field(unsigned int, conn )
849 __field(rxrpc_serial_t, serial )
850 __field(u32, version )
852 __field(u32, min_level )
856 __entry->conn = conn->debug_id;
857 __entry->serial = serial;
858 __entry->version = version;
859 __entry->nonce = nonce;
860 __entry->min_level = min_level;
863 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
871 TRACE_EVENT(rxrpc_rx_response,
872 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
873 u32 version, u32 kvno, u32 ticket_len),
875 TP_ARGS(conn, serial, version, kvno, ticket_len),
878 __field(unsigned int, conn )
879 __field(rxrpc_serial_t, serial )
880 __field(u32, version )
882 __field(u32, ticket_len )
886 __entry->conn = conn->debug_id;
887 __entry->serial = serial;
888 __entry->version = version;
889 __entry->kvno = kvno;
890 __entry->ticket_len = ticket_len;
893 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
901 TRACE_EVENT(rxrpc_rx_rwind_change,
902 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
903 u32 rwind, bool wake),
905 TP_ARGS(call, serial, rwind, wake),
908 __field(unsigned int, call )
909 __field(rxrpc_serial_t, serial )
915 __entry->call = call->debug_id;
916 __entry->serial = serial;
917 __entry->rwind = rwind;
918 __entry->wake = wake;
921 TP_printk("c=%08x %08x rw=%u%s",
925 __entry->wake ? " wake" : "")
928 TRACE_EVENT(rxrpc_tx_packet,
929 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
930 enum rxrpc_tx_point where),
932 TP_ARGS(call_id, whdr, where),
935 __field(unsigned int, call )
936 __field(enum rxrpc_tx_point, where )
937 __field_struct(struct rxrpc_wire_header, whdr )
941 __entry->call = call_id;
942 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
943 __entry->where = where;
946 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
948 ntohl(__entry->whdr.epoch),
949 ntohl(__entry->whdr.cid),
950 ntohl(__entry->whdr.callNumber),
951 ntohs(__entry->whdr.serviceId),
952 ntohl(__entry->whdr.serial),
953 ntohl(__entry->whdr.seq),
954 __entry->whdr.type, __entry->whdr.flags,
955 __entry->whdr.type <= 15 ?
956 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
957 __print_symbolic(__entry->where, rxrpc_tx_points))
960 TRACE_EVENT(rxrpc_tx_data,
961 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
962 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
964 TP_ARGS(call, seq, serial, flags, retrans, lose),
967 __field(unsigned int, call )
968 __field(rxrpc_seq_t, seq )
969 __field(rxrpc_serial_t, serial )
971 __field(u32, call_id )
973 __field(bool, retrans )
978 __entry->call = call->debug_id;
979 __entry->cid = call->cid;
980 __entry->call_id = call->call_id;
982 __entry->serial = serial;
983 __entry->flags = flags;
984 __entry->retrans = retrans;
985 __entry->lose = lose;
988 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
995 __entry->retrans ? " *RETRANS*" : "",
996 __entry->lose ? " *LOSE*" : "")
999 TRACE_EVENT(rxrpc_tx_ack,
1000 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1001 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1002 u8 reason, u8 n_acks),
1004 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1007 __field(unsigned int, call )
1008 __field(rxrpc_serial_t, serial )
1009 __field(rxrpc_seq_t, ack_first )
1010 __field(rxrpc_serial_t, ack_serial )
1011 __field(u8, reason )
1012 __field(u8, n_acks )
1016 __entry->call = call;
1017 __entry->serial = serial;
1018 __entry->ack_first = ack_first;
1019 __entry->ack_serial = ack_serial;
1020 __entry->reason = reason;
1021 __entry->n_acks = n_acks;
1024 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1027 __print_symbolic(__entry->reason, rxrpc_ack_names),
1029 __entry->ack_serial,
1033 TRACE_EVENT(rxrpc_receive,
1034 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1035 rxrpc_serial_t serial, rxrpc_seq_t seq),
1037 TP_ARGS(call, why, serial, seq),
1040 __field(unsigned int, call )
1041 __field(enum rxrpc_receive_trace, why )
1042 __field(rxrpc_serial_t, serial )
1043 __field(rxrpc_seq_t, seq )
1044 __field(u64, window )
1048 __entry->call = call->debug_id;
1050 __entry->serial = serial;
1052 __entry->window = atomic64_read(&call->ackr_window);
1055 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1057 __print_symbolic(__entry->why, rxrpc_receive_traces),
1060 lower_32_bits(__entry->window),
1061 upper_32_bits(__entry->window))
1064 TRACE_EVENT(rxrpc_recvmsg,
1065 TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why,
1068 TP_ARGS(call_debug_id, why, ret),
1071 __field(unsigned int, call )
1072 __field(enum rxrpc_recvmsg_trace, why )
1077 __entry->call = call_debug_id;
1082 TP_printk("c=%08x %s ret=%d",
1084 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1088 TRACE_EVENT(rxrpc_recvdata,
1089 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1090 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1093 TP_ARGS(call, why, seq, offset, len, ret),
1096 __field(unsigned int, call )
1097 __field(enum rxrpc_recvmsg_trace, why )
1098 __field(rxrpc_seq_t, seq )
1099 __field(unsigned int, offset )
1100 __field(unsigned int, len )
1105 __entry->call = call ? call->debug_id : 0;
1108 __entry->offset = offset;
1113 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1115 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1122 TRACE_EVENT(rxrpc_rtt_tx,
1123 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1124 int slot, rxrpc_serial_t send_serial),
1126 TP_ARGS(call, why, slot, send_serial),
1129 __field(unsigned int, call )
1130 __field(enum rxrpc_rtt_tx_trace, why )
1132 __field(rxrpc_serial_t, send_serial )
1136 __entry->call = call->debug_id;
1138 __entry->slot = slot;
1139 __entry->send_serial = send_serial;
1142 TP_printk("c=%08x [%d] %s sr=%08x",
1145 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1146 __entry->send_serial)
1149 TRACE_EVENT(rxrpc_rtt_rx,
1150 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1152 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1155 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1158 __field(unsigned int, call )
1159 __field(enum rxrpc_rtt_rx_trace, why )
1161 __field(rxrpc_serial_t, send_serial )
1162 __field(rxrpc_serial_t, resp_serial )
1168 __entry->call = call->debug_id;
1170 __entry->slot = slot;
1171 __entry->send_serial = send_serial;
1172 __entry->resp_serial = resp_serial;
1177 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1180 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1181 __entry->send_serial,
1182 __entry->resp_serial,
1187 TRACE_EVENT(rxrpc_timer,
1188 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1191 TP_ARGS(call, why, now),
1194 __field(unsigned int, call )
1195 __field(enum rxrpc_timer_trace, why )
1197 __field(long, ack_at )
1198 __field(long, ack_lost_at )
1199 __field(long, resend_at )
1200 __field(long, ping_at )
1201 __field(long, expect_rx_by )
1202 __field(long, expect_req_by )
1203 __field(long, expect_term_by )
1204 __field(long, timer )
1208 __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 %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1222 __print_symbolic(__entry->why, rxrpc_timer_traces),
1223 __entry->ack_at - __entry->now,
1224 __entry->ack_lost_at - __entry->now,
1225 __entry->resend_at - __entry->now,
1226 __entry->expect_rx_by - __entry->now,
1227 __entry->expect_req_by - __entry->now,
1228 __entry->expect_term_by - __entry->now,
1229 __entry->timer - __entry->now)
1232 TRACE_EVENT(rxrpc_timer_expired,
1233 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1238 __field(unsigned int, call )
1240 __field(long, ack_at )
1241 __field(long, ack_lost_at )
1242 __field(long, resend_at )
1243 __field(long, ping_at )
1244 __field(long, expect_rx_by )
1245 __field(long, expect_req_by )
1246 __field(long, expect_term_by )
1247 __field(long, timer )
1251 __entry->call = call->debug_id;
1253 __entry->ack_at = call->delay_ack_at;
1254 __entry->ack_lost_at = call->ack_lost_at;
1255 __entry->resend_at = call->resend_at;
1256 __entry->expect_rx_by = call->expect_rx_by;
1257 __entry->expect_req_by = call->expect_req_by;
1258 __entry->expect_term_by = call->expect_term_by;
1259 __entry->timer = call->timer.expires;
1262 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1264 __entry->ack_at - __entry->now,
1265 __entry->ack_lost_at - __entry->now,
1266 __entry->resend_at - __entry->now,
1267 __entry->expect_rx_by - __entry->now,
1268 __entry->expect_req_by - __entry->now,
1269 __entry->expect_term_by - __entry->now,
1270 __entry->timer - __entry->now)
1273 TRACE_EVENT(rxrpc_rx_lose,
1274 TP_PROTO(struct rxrpc_skb_priv *sp),
1279 __field_struct(struct rxrpc_host_header, hdr )
1283 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1286 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1287 __entry->hdr.epoch, __entry->hdr.cid,
1288 __entry->hdr.callNumber, __entry->hdr.serviceId,
1289 __entry->hdr.serial, __entry->hdr.seq,
1290 __entry->hdr.type, __entry->hdr.flags,
1291 __entry->hdr.type <= 15 ?
1292 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1295 TRACE_EVENT(rxrpc_propose_ack,
1296 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1297 u8 ack_reason, rxrpc_serial_t serial),
1299 TP_ARGS(call, why, ack_reason, serial),
1302 __field(unsigned int, call )
1303 __field(enum rxrpc_propose_ack_trace, why )
1304 __field(rxrpc_serial_t, serial )
1305 __field(u8, ack_reason )
1309 __entry->call = call->debug_id;
1311 __entry->serial = serial;
1312 __entry->ack_reason = ack_reason;
1315 TP_printk("c=%08x %s %s r=%08x",
1317 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1318 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1322 TRACE_EVENT(rxrpc_send_ack,
1323 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1324 u8 ack_reason, rxrpc_serial_t serial),
1326 TP_ARGS(call, why, ack_reason, serial),
1329 __field(unsigned int, call )
1330 __field(enum rxrpc_propose_ack_trace, why )
1331 __field(rxrpc_serial_t, serial )
1332 __field(u8, ack_reason )
1336 __entry->call = call->debug_id;
1338 __entry->serial = serial;
1339 __entry->ack_reason = ack_reason;
1342 TP_printk("c=%08x %s %s r=%08x",
1344 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1345 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1349 TRACE_EVENT(rxrpc_drop_ack,
1350 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1351 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1353 TP_ARGS(call, why, ack_reason, serial, nobuf),
1356 __field(unsigned int, call )
1357 __field(enum rxrpc_propose_ack_trace, why )
1358 __field(rxrpc_serial_t, serial )
1359 __field(u8, ack_reason )
1360 __field(bool, nobuf )
1364 __entry->call = call->debug_id;
1366 __entry->serial = serial;
1367 __entry->ack_reason = ack_reason;
1368 __entry->nobuf = nobuf;
1371 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1373 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1374 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1375 __entry->serial, __entry->nobuf)
1378 TRACE_EVENT(rxrpc_retransmit,
1379 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1381 TP_ARGS(call, seq, expiry),
1384 __field(unsigned int, call )
1385 __field(rxrpc_seq_t, seq )
1386 __field(s64, expiry )
1390 __entry->call = call->debug_id;
1392 __entry->expiry = expiry;
1395 TP_printk("c=%08x q=%x xp=%lld",
1401 TRACE_EVENT(rxrpc_congest,
1402 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1403 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1405 TP_ARGS(call, summary, ack_serial, change),
1408 __field(unsigned int, call )
1409 __field(enum rxrpc_congest_change, change )
1410 __field(rxrpc_seq_t, hard_ack )
1411 __field(rxrpc_seq_t, top )
1412 __field(rxrpc_seq_t, lowest_nak )
1413 __field(rxrpc_serial_t, ack_serial )
1414 __field_struct(struct rxrpc_ack_summary, sum )
1418 __entry->call = call->debug_id;
1419 __entry->change = change;
1420 __entry->hard_ack = call->acks_hard_ack;
1421 __entry->top = call->tx_top;
1422 __entry->lowest_nak = call->acks_lowest_nak;
1423 __entry->ack_serial = ack_serial;
1424 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1427 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",
1429 __entry->ack_serial,
1430 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1432 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1434 __entry->sum.ssthresh,
1435 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1436 __entry->sum.nr_new_acks,
1437 __entry->sum.nr_rot_new_acks,
1438 __entry->top - __entry->hard_ack,
1439 __entry->sum.cumulative_acks,
1440 __entry->sum.dup_acks,
1441 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1442 __print_symbolic(__entry->change, rxrpc_congest_changes),
1443 __entry->sum.retrans_timeo ? " rTxTo" : "")
1446 TRACE_EVENT(rxrpc_reset_cwnd,
1447 TP_PROTO(struct rxrpc_call *call, ktime_t now),
1452 __field(unsigned int, call )
1453 __field(enum rxrpc_congest_mode, mode )
1454 __field(unsigned short, cwnd )
1455 __field(unsigned short, extra )
1456 __field(rxrpc_seq_t, hard_ack )
1457 __field(rxrpc_seq_t, prepared )
1458 __field(ktime_t, since_last_tx )
1459 __field(bool, has_data )
1463 __entry->call = call->debug_id;
1464 __entry->mode = call->cong_mode;
1465 __entry->cwnd = call->cong_cwnd;
1466 __entry->extra = call->cong_extra;
1467 __entry->hard_ack = call->acks_hard_ack;
1468 __entry->prepared = call->tx_prepared - call->tx_bottom;
1469 __entry->since_last_tx = ktime_sub(now, call->tx_last_sent);
1470 __entry->has_data = !list_empty(&call->tx_sendmsg);
1473 TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u",
1476 __print_symbolic(__entry->mode, rxrpc_congest_modes),
1480 ktime_to_ns(__entry->since_last_tx),
1484 TRACE_EVENT(rxrpc_disconnect_call,
1485 TP_PROTO(struct rxrpc_call *call),
1490 __field(unsigned int, call )
1491 __field(u32, abort_code )
1495 __entry->call = call->debug_id;
1496 __entry->abort_code = call->abort_code;
1499 TP_printk("c=%08x ab=%08x",
1501 __entry->abort_code)
1504 TRACE_EVENT(rxrpc_improper_term,
1505 TP_PROTO(struct rxrpc_call *call),
1510 __field(unsigned int, call )
1511 __field(u32, abort_code )
1515 __entry->call = call->debug_id;
1516 __entry->abort_code = call->abort_code;
1519 TP_printk("c=%08x ab=%08x",
1521 __entry->abort_code)
1524 TRACE_EVENT(rxrpc_rx_eproto,
1525 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1528 TP_ARGS(call, serial, why),
1531 __field(unsigned int, call )
1532 __field(rxrpc_serial_t, serial )
1533 __field(const char *, why )
1537 __entry->call = call ? call->debug_id : 0;
1538 __entry->serial = serial;
1542 TP_printk("c=%08x EPROTO %08x %s",
1548 TRACE_EVENT(rxrpc_connect_call,
1549 TP_PROTO(struct rxrpc_call *call),
1554 __field(unsigned int, call )
1555 __field(unsigned long, user_call_ID )
1557 __field(u32, call_id )
1558 __field_struct(struct sockaddr_rxrpc, srx )
1562 __entry->call = call->debug_id;
1563 __entry->user_call_ID = call->user_call_ID;
1564 __entry->cid = call->cid;
1565 __entry->call_id = call->call_id;
1566 __entry->srx = call->dest_srx;
1569 TP_printk("c=%08x u=%p %08x:%08x dst=%pISp",
1571 (void *)__entry->user_call_ID,
1574 &__entry->srx.transport)
1577 TRACE_EVENT(rxrpc_resend,
1578 TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack),
1583 __field(unsigned int, call )
1584 __field(rxrpc_seq_t, seq )
1585 __field(rxrpc_seq_t, transmitted )
1586 __field(rxrpc_serial_t, ack_serial )
1590 struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL;
1591 __entry->call = call->debug_id;
1592 __entry->seq = call->acks_hard_ack;
1593 __entry->transmitted = call->tx_transmitted;
1594 __entry->ack_serial = sp ? sp->hdr.serial : 0;
1597 TP_printk("c=%08x r=%x q=%x tq=%x",
1599 __entry->ack_serial,
1601 __entry->transmitted)
1604 TRACE_EVENT(rxrpc_rx_icmp,
1605 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1606 struct sockaddr_rxrpc *srx),
1608 TP_ARGS(peer, ee, srx),
1611 __field(unsigned int, peer )
1612 __field_struct(struct sock_extended_err, ee )
1613 __field_struct(struct sockaddr_rxrpc, srx )
1617 __entry->peer = peer->debug_id;
1618 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1619 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1622 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1624 __entry->ee.ee_origin,
1625 __entry->ee.ee_type,
1626 __entry->ee.ee_code,
1627 __entry->ee.ee_info,
1628 __entry->ee.ee_data,
1629 __entry->ee.ee_errno,
1630 &__entry->srx.transport)
1633 TRACE_EVENT(rxrpc_tx_fail,
1634 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1635 enum rxrpc_tx_point where),
1637 TP_ARGS(debug_id, serial, ret, where),
1640 __field(unsigned int, debug_id )
1641 __field(rxrpc_serial_t, serial )
1643 __field(enum rxrpc_tx_point, where )
1647 __entry->debug_id = debug_id;
1648 __entry->serial = serial;
1650 __entry->where = where;
1653 TP_printk("c=%08x r=%x ret=%d %s",
1657 __print_symbolic(__entry->where, rxrpc_tx_points))
1660 TRACE_EVENT(rxrpc_call_reset,
1661 TP_PROTO(struct rxrpc_call *call),
1666 __field(unsigned int, debug_id )
1668 __field(u32, call_id )
1669 __field(rxrpc_serial_t, call_serial )
1670 __field(rxrpc_serial_t, conn_serial )
1671 __field(rxrpc_seq_t, tx_seq )
1672 __field(rxrpc_seq_t, rx_seq )
1676 __entry->debug_id = call->debug_id;
1677 __entry->cid = call->cid;
1678 __entry->call_id = call->call_id;
1679 __entry->call_serial = call->rx_serial;
1680 __entry->conn_serial = call->conn->hi_serial;
1681 __entry->tx_seq = call->acks_hard_ack;
1682 __entry->rx_seq = call->rx_highest_seq;
1685 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1687 __entry->cid, __entry->call_id,
1688 __entry->call_serial, __entry->conn_serial,
1689 __entry->tx_seq, __entry->rx_seq)
1692 TRACE_EVENT(rxrpc_notify_socket,
1693 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1695 TP_ARGS(debug_id, serial),
1698 __field(unsigned int, debug_id )
1699 __field(rxrpc_serial_t, serial )
1703 __entry->debug_id = debug_id;
1704 __entry->serial = serial;
1707 TP_printk("c=%08x r=%08x",
1712 TRACE_EVENT(rxrpc_rx_discard_ack,
1713 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1714 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1715 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1717 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1718 prev_pkt, call_ackr_prev),
1721 __field(unsigned int, debug_id )
1722 __field(rxrpc_serial_t, serial )
1723 __field(rxrpc_seq_t, first_soft_ack)
1724 __field(rxrpc_seq_t, call_ackr_first)
1725 __field(rxrpc_seq_t, prev_pkt)
1726 __field(rxrpc_seq_t, call_ackr_prev)
1730 __entry->debug_id = debug_id;
1731 __entry->serial = serial;
1732 __entry->first_soft_ack = first_soft_ack;
1733 __entry->call_ackr_first = call_ackr_first;
1734 __entry->prev_pkt = prev_pkt;
1735 __entry->call_ackr_prev = call_ackr_prev;
1738 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1741 __entry->first_soft_ack,
1742 __entry->call_ackr_first,
1744 __entry->call_ackr_prev)
1747 TRACE_EVENT(rxrpc_req_ack,
1748 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1749 enum rxrpc_req_ack_trace why),
1751 TP_ARGS(call_debug_id, seq, why),
1754 __field(unsigned int, call_debug_id )
1755 __field(rxrpc_seq_t, seq )
1756 __field(enum rxrpc_req_ack_trace, why )
1760 __entry->call_debug_id = call_debug_id;
1765 TP_printk("c=%08x q=%08x REQ-%s",
1766 __entry->call_debug_id,
1768 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1771 TRACE_EVENT(rxrpc_txbuf,
1772 TP_PROTO(unsigned int debug_id,
1773 unsigned int call_debug_id, rxrpc_seq_t seq,
1774 int ref, enum rxrpc_txbuf_trace what),
1776 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1779 __field(unsigned int, debug_id )
1780 __field(unsigned int, call_debug_id )
1781 __field(rxrpc_seq_t, seq )
1783 __field(enum rxrpc_txbuf_trace, what )
1787 __entry->debug_id = debug_id;
1788 __entry->call_debug_id = call_debug_id;
1791 __entry->what = what;
1794 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1796 __entry->call_debug_id,
1798 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1802 TRACE_EVENT(rxrpc_poke_call,
1803 TP_PROTO(struct rxrpc_call *call, bool busy,
1804 enum rxrpc_call_poke_trace what),
1806 TP_ARGS(call, busy, what),
1809 __field(unsigned int, call_debug_id )
1810 __field(bool, busy )
1811 __field(enum rxrpc_call_poke_trace, what )
1815 __entry->call_debug_id = call->debug_id;
1816 __entry->busy = busy;
1817 __entry->what = what;
1820 TP_printk("c=%08x %s%s",
1821 __entry->call_debug_id,
1822 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1823 __entry->busy ? "!" : "")
1826 TRACE_EVENT(rxrpc_call_poked,
1827 TP_PROTO(struct rxrpc_call *call),
1832 __field(unsigned int, call_debug_id )
1836 __entry->call_debug_id = call->debug_id;
1840 __entry->call_debug_id)
1845 #endif /* _TRACE_RXRPC_H */
1847 /* This part must be outside protection */
1848 #include <trace/define_trace.h>