1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* AF_RXRPC tracepoints
4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
8 #define TRACE_SYSTEM rxrpc
10 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
11 #define _TRACE_RXRPC_H
13 #include <linux/tracepoint.h>
14 #include <linux/errqueue.h>
17 * Declare tracing information enums and their string mappings for display.
19 #define rxrpc_skb_traces \
20 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \
21 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \
22 EM(rxrpc_skb_get_ack, "GET ack ") \
23 EM(rxrpc_skb_get_conn_work, "GET conn-work") \
24 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
25 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
26 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
27 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
28 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
29 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
30 EM(rxrpc_skb_put_ack, "PUT ack ") \
31 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \
32 EM(rxrpc_skb_put_error_report, "PUT error-rep") \
33 EM(rxrpc_skb_put_input, "PUT input ") \
34 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \
35 EM(rxrpc_skb_put_lose, "PUT lose ") \
36 EM(rxrpc_skb_put_purge, "PUT purge ") \
37 EM(rxrpc_skb_put_rotate, "PUT rotate ") \
38 EM(rxrpc_skb_put_unknown, "PUT unknown ") \
39 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \
40 EM(rxrpc_skb_see_local_work, "SEE locl-work") \
41 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \
42 EM(rxrpc_skb_see_reject, "SEE reject ") \
43 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
44 E_(rxrpc_skb_see_version, "SEE version ")
46 #define rxrpc_local_traces \
47 EM(rxrpc_local_free, "FREE ") \
48 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
49 EM(rxrpc_local_get_for_use, "GET for-use ") \
50 EM(rxrpc_local_get_peer, "GET peer ") \
51 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
52 EM(rxrpc_local_get_queue, "GET queue ") \
53 EM(rxrpc_local_new, "NEW ") \
54 EM(rxrpc_local_processing, "PROCESSING ") \
55 EM(rxrpc_local_put_already_queued, "PUT alreadyq") \
56 EM(rxrpc_local_put_bind, "PUT bind ") \
57 EM(rxrpc_local_put_for_use, "PUT for-use ") \
58 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
59 EM(rxrpc_local_put_peer, "PUT peer ") \
60 EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \
61 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
62 EM(rxrpc_local_put_queue, "PUT queue ") \
63 EM(rxrpc_local_queued, "QUEUED ") \
64 EM(rxrpc_local_see_tx_ack, "SEE tx-ack ") \
65 EM(rxrpc_local_stop, "STOP ") \
66 EM(rxrpc_local_stopped, "STOPPED ") \
67 EM(rxrpc_local_unuse_bind, "UNU bind ") \
68 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
69 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
70 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
71 EM(rxrpc_local_unuse_work, "UNU work ") \
72 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
73 EM(rxrpc_local_use_lookup, "USE lookup ") \
74 EM(rxrpc_local_use_peer_keepalive, "USE peer-kpa") \
75 E_(rxrpc_local_use_work, "USE work ")
77 #define rxrpc_peer_traces \
78 EM(rxrpc_peer_free, "FREE ") \
79 EM(rxrpc_peer_get_accept, "GET accept ") \
80 EM(rxrpc_peer_get_activate_call, "GET act-call") \
81 EM(rxrpc_peer_get_bundle, "GET bundle ") \
82 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
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_error, "PUT inpt-err") \
94 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
96 #define rxrpc_bundle_traces \
97 EM(rxrpc_bundle_free, "FREE ") \
98 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
99 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
100 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
101 EM(rxrpc_bundle_put_conn, "PUT conn ") \
102 EM(rxrpc_bundle_put_discard, "PUT discard ") \
103 E_(rxrpc_bundle_new, "NEW ")
105 #define rxrpc_conn_traces \
106 EM(rxrpc_conn_free, "FREE ") \
107 EM(rxrpc_conn_get_activate_call, "GET act-call") \
108 EM(rxrpc_conn_get_call_input, "GET inp-call") \
109 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
110 EM(rxrpc_conn_get_idle, "GET idle ") \
111 EM(rxrpc_conn_get_poke, "GET poke ") \
112 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
113 EM(rxrpc_conn_new_client, "NEW client ") \
114 EM(rxrpc_conn_new_service, "NEW service ") \
115 EM(rxrpc_conn_put_already_queued, "PUT alreadyq") \
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_unbundle, "PUT unbundle") \
125 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
126 EM(rxrpc_conn_put_work, "PUT work ") \
127 EM(rxrpc_conn_queue_challenge, "GQ chall ") \
128 EM(rxrpc_conn_queue_retry_work, "GQ retry-wk") \
129 EM(rxrpc_conn_queue_rx_work, "GQ rx-work ") \
130 EM(rxrpc_conn_queue_timer, "GQ 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_recvmsg, "GET recvmsg ") \
155 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
156 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
157 EM(rxrpc_call_get_send_ack, "GET send-ack") \
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_input, "PUT input ") \
163 EM(rxrpc_call_put_kernel, "PUT kernel ") \
164 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
165 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
166 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
167 EM(rxrpc_call_put_send_ack, "PUT send-ack") \
168 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
169 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
170 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
171 EM(rxrpc_call_queue_abort, "QUE abort ") \
172 EM(rxrpc_call_queue_requeue, "QUE requeue ") \
173 EM(rxrpc_call_queue_resend, "QUE resend ") \
174 EM(rxrpc_call_queue_timer, "QUE timer ") \
175 EM(rxrpc_call_see_accept, "SEE accept ") \
176 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
177 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
178 EM(rxrpc_call_see_connected, "SEE connect ") \
179 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
180 EM(rxrpc_call_see_input, "SEE input ") \
181 EM(rxrpc_call_see_release, "SEE release ") \
182 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
183 E_(rxrpc_call_see_zap, "SEE zap ")
185 #define rxrpc_txqueue_traces \
186 EM(rxrpc_txqueue_await_reply, "AWR") \
187 EM(rxrpc_txqueue_dequeue, "DEQ") \
188 EM(rxrpc_txqueue_end, "END") \
189 EM(rxrpc_txqueue_queue, "QUE") \
190 EM(rxrpc_txqueue_queue_last, "QLS") \
191 EM(rxrpc_txqueue_rotate, "ROT") \
192 EM(rxrpc_txqueue_rotate_last, "RLS") \
193 E_(rxrpc_txqueue_wait, "WAI")
195 #define rxrpc_receive_traces \
196 EM(rxrpc_receive_end, "END") \
197 EM(rxrpc_receive_front, "FRN") \
198 EM(rxrpc_receive_incoming, "INC") \
199 EM(rxrpc_receive_queue, "QUE") \
200 EM(rxrpc_receive_queue_last, "QLS") \
201 EM(rxrpc_receive_queue_oos, "QUO") \
202 EM(rxrpc_receive_queue_oos_last, "QOL") \
203 EM(rxrpc_receive_oos, "OOS") \
204 EM(rxrpc_receive_oos_last, "OSL") \
205 EM(rxrpc_receive_rotate, "ROT") \
206 E_(rxrpc_receive_rotate_last, "RLS")
208 #define rxrpc_recvmsg_traces \
209 EM(rxrpc_recvmsg_cont, "CONT") \
210 EM(rxrpc_recvmsg_data_return, "DATA") \
211 EM(rxrpc_recvmsg_dequeue, "DEQU") \
212 EM(rxrpc_recvmsg_enter, "ENTR") \
213 EM(rxrpc_recvmsg_full, "FULL") \
214 EM(rxrpc_recvmsg_hole, "HOLE") \
215 EM(rxrpc_recvmsg_next, "NEXT") \
216 EM(rxrpc_recvmsg_requeue, "REQU") \
217 EM(rxrpc_recvmsg_return, "RETN") \
218 EM(rxrpc_recvmsg_terminal, "TERM") \
219 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
220 E_(rxrpc_recvmsg_wait, "WAIT")
222 #define rxrpc_rtt_tx_traces \
223 EM(rxrpc_rtt_tx_cancel, "CNCE") \
224 EM(rxrpc_rtt_tx_data, "DATA") \
225 EM(rxrpc_rtt_tx_no_slot, "FULL") \
226 E_(rxrpc_rtt_tx_ping, "PING")
228 #define rxrpc_rtt_rx_traces \
229 EM(rxrpc_rtt_rx_cancel, "CNCL") \
230 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
231 EM(rxrpc_rtt_rx_lost, "LOST") \
232 EM(rxrpc_rtt_rx_ping_response, "PONG") \
233 E_(rxrpc_rtt_rx_requested_ack, "RACK")
235 #define rxrpc_timer_traces \
236 EM(rxrpc_timer_begin, "Begin ") \
237 EM(rxrpc_timer_exp_ack, "ExpAck") \
238 EM(rxrpc_timer_exp_hard, "ExpHrd") \
239 EM(rxrpc_timer_exp_idle, "ExpIdl") \
240 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
241 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
242 EM(rxrpc_timer_exp_normal, "ExpNml") \
243 EM(rxrpc_timer_exp_ping, "ExpPng") \
244 EM(rxrpc_timer_exp_resend, "ExpRsn") \
245 EM(rxrpc_timer_init_for_reply, "IniRpl") \
246 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
247 EM(rxrpc_timer_restart, "Restrt") \
248 EM(rxrpc_timer_set_for_ack, "SetAck") \
249 EM(rxrpc_timer_set_for_hard, "SetHrd") \
250 EM(rxrpc_timer_set_for_idle, "SetIdl") \
251 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
252 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
253 EM(rxrpc_timer_set_for_normal, "SetNml") \
254 EM(rxrpc_timer_set_for_ping, "SetPng") \
255 EM(rxrpc_timer_set_for_resend, "SetRTx") \
256 E_(rxrpc_timer_set_for_send, "SetSnd")
258 #define rxrpc_propose_ack_traces \
259 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
260 EM(rxrpc_propose_ack_input_data, "DataIn ") \
261 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
262 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
263 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
264 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
265 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
266 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
267 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
268 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
269 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
270 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
271 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
272 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
274 #define rxrpc_congest_modes \
275 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
276 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
277 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
278 E_(RXRPC_CALL_SLOW_START, "SlowStart")
280 #define rxrpc_congest_changes \
281 EM(rxrpc_cong_begin_retransmission, " Retrans") \
282 EM(rxrpc_cong_cleared_nacks, " Cleared") \
283 EM(rxrpc_cong_new_low_nack, " NewLowN") \
284 EM(rxrpc_cong_no_change, " -") \
285 EM(rxrpc_cong_progress, " Progres") \
286 EM(rxrpc_cong_idle_reset, " IdleRes") \
287 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
288 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
289 E_(rxrpc_cong_saw_nack, " SawNack")
293 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
294 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
295 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
296 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
297 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
298 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
299 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
300 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
305 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
309 #define rxrpc_ack_names \
311 EM(RXRPC_ACK_REQUESTED, "REQ") \
312 EM(RXRPC_ACK_DUPLICATE, "DUP") \
313 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
314 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
315 EM(RXRPC_ACK_NOSPACE, "MEM") \
316 EM(RXRPC_ACK_PING, "PNG") \
317 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
318 EM(RXRPC_ACK_DELAY, "DLY") \
319 EM(RXRPC_ACK_IDLE, "IDL") \
320 E_(RXRPC_ACK__INVALID, "-?-")
322 #define rxrpc_completions \
323 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
324 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
325 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
326 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
327 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
329 #define rxrpc_tx_points \
330 EM(rxrpc_tx_point_call_abort, "CallAbort") \
331 EM(rxrpc_tx_point_call_ack, "CallAck") \
332 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
333 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
334 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
335 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
336 EM(rxrpc_tx_point_reject, "Reject") \
337 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
338 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
339 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
340 E_(rxrpc_tx_point_version_reply, "VerReply")
342 #define rxrpc_req_ack_traces \
343 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
344 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
345 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
346 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
347 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
348 EM(rxrpc_reqack_retrans, "RETRANS ") \
349 EM(rxrpc_reqack_slow_start, "SLOW-START") \
350 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
351 /* ---- Must update size of stat_why_req_ack[] if more are added! */
353 #define rxrpc_txbuf_traces \
354 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
355 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
356 EM(rxrpc_txbuf_free, "FREE ") \
357 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
358 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
359 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
360 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
361 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
362 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
363 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
364 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
365 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
366 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
367 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
368 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
371 * Generate enums for tracing information.
373 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
374 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
381 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
382 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
383 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
384 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
385 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
386 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
387 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
388 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
389 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
390 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
391 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
392 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
393 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
394 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
395 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
396 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
397 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
398 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
399 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
401 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
404 * Export enum symbols via userspace.
408 #define EM(a, b) TRACE_DEFINE_ENUM(a);
409 #define E_(a, b) TRACE_DEFINE_ENUM(a);
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 )
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(int, tx_winsize )
732 __entry->call = call->debug_id;
734 __entry->acks_hard_ack = call->acks_hard_ack;
735 __entry->tx_bottom = call->tx_bottom;
736 __entry->tx_top = call->tx_top;
737 __entry->tx_winsize = call->tx_winsize;
740 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
742 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
744 __entry->acks_hard_ack,
745 __entry->tx_top - __entry->tx_bottom,
746 __entry->tx_top - __entry->acks_hard_ack,
750 TRACE_EVENT(rxrpc_rx_data,
751 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
752 rxrpc_serial_t serial, u8 flags),
754 TP_ARGS(call, seq, serial, flags),
757 __field(unsigned int, call )
758 __field(rxrpc_seq_t, seq )
759 __field(rxrpc_serial_t, serial )
764 __entry->call = call;
766 __entry->serial = serial;
767 __entry->flags = flags;
770 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
777 TRACE_EVENT(rxrpc_rx_ack,
778 TP_PROTO(struct rxrpc_call *call,
779 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
780 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
782 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
785 __field(unsigned int, call )
786 __field(rxrpc_serial_t, serial )
787 __field(rxrpc_serial_t, ack_serial )
788 __field(rxrpc_seq_t, first )
789 __field(rxrpc_seq_t, prev )
795 __entry->call = call->debug_id;
796 __entry->serial = serial;
797 __entry->ack_serial = ack_serial;
798 __entry->first = first;
799 __entry->prev = prev;
800 __entry->reason = reason;
801 __entry->n_acks = n_acks;
804 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
807 __print_symbolic(__entry->reason, rxrpc_ack_names),
814 TRACE_EVENT(rxrpc_rx_abort,
815 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
818 TP_ARGS(call, serial, abort_code),
821 __field(unsigned int, call )
822 __field(rxrpc_serial_t, serial )
823 __field(u32, abort_code )
827 __entry->call = call->debug_id;
828 __entry->serial = serial;
829 __entry->abort_code = abort_code;
832 TP_printk("c=%08x ABORT %08x ac=%d",
838 TRACE_EVENT(rxrpc_rx_challenge,
839 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
840 u32 version, u32 nonce, u32 min_level),
842 TP_ARGS(conn, serial, version, nonce, min_level),
845 __field(unsigned int, conn )
846 __field(rxrpc_serial_t, serial )
847 __field(u32, version )
849 __field(u32, min_level )
853 __entry->conn = conn->debug_id;
854 __entry->serial = serial;
855 __entry->version = version;
856 __entry->nonce = nonce;
857 __entry->min_level = min_level;
860 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
868 TRACE_EVENT(rxrpc_rx_response,
869 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
870 u32 version, u32 kvno, u32 ticket_len),
872 TP_ARGS(conn, serial, version, kvno, ticket_len),
875 __field(unsigned int, conn )
876 __field(rxrpc_serial_t, serial )
877 __field(u32, version )
879 __field(u32, ticket_len )
883 __entry->conn = conn->debug_id;
884 __entry->serial = serial;
885 __entry->version = version;
886 __entry->kvno = kvno;
887 __entry->ticket_len = ticket_len;
890 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
898 TRACE_EVENT(rxrpc_rx_rwind_change,
899 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
900 u32 rwind, bool wake),
902 TP_ARGS(call, serial, rwind, wake),
905 __field(unsigned int, call )
906 __field(rxrpc_serial_t, serial )
912 __entry->call = call->debug_id;
913 __entry->serial = serial;
914 __entry->rwind = rwind;
915 __entry->wake = wake;
918 TP_printk("c=%08x %08x rw=%u%s",
922 __entry->wake ? " wake" : "")
925 TRACE_EVENT(rxrpc_tx_packet,
926 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
927 enum rxrpc_tx_point where),
929 TP_ARGS(call_id, whdr, where),
932 __field(unsigned int, call )
933 __field(enum rxrpc_tx_point, where )
934 __field_struct(struct rxrpc_wire_header, whdr )
938 __entry->call = call_id;
939 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
940 __entry->where = where;
943 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
945 ntohl(__entry->whdr.epoch),
946 ntohl(__entry->whdr.cid),
947 ntohl(__entry->whdr.callNumber),
948 ntohs(__entry->whdr.serviceId),
949 ntohl(__entry->whdr.serial),
950 ntohl(__entry->whdr.seq),
951 __entry->whdr.type, __entry->whdr.flags,
952 __entry->whdr.type <= 15 ?
953 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
954 __print_symbolic(__entry->where, rxrpc_tx_points))
957 TRACE_EVENT(rxrpc_tx_data,
958 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
959 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
961 TP_ARGS(call, seq, serial, flags, retrans, lose),
964 __field(unsigned int, call )
965 __field(rxrpc_seq_t, seq )
966 __field(rxrpc_serial_t, serial )
968 __field(u32, call_id )
970 __field(bool, retrans )
975 __entry->call = call->debug_id;
976 __entry->cid = call->cid;
977 __entry->call_id = call->call_id;
979 __entry->serial = serial;
980 __entry->flags = flags;
981 __entry->retrans = retrans;
982 __entry->lose = lose;
985 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
992 __entry->retrans ? " *RETRANS*" : "",
993 __entry->lose ? " *LOSE*" : "")
996 TRACE_EVENT(rxrpc_tx_ack,
997 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
998 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
999 u8 reason, u8 n_acks),
1001 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1004 __field(unsigned int, call )
1005 __field(rxrpc_serial_t, serial )
1006 __field(rxrpc_seq_t, ack_first )
1007 __field(rxrpc_serial_t, ack_serial )
1008 __field(u8, reason )
1009 __field(u8, n_acks )
1013 __entry->call = call;
1014 __entry->serial = serial;
1015 __entry->ack_first = ack_first;
1016 __entry->ack_serial = ack_serial;
1017 __entry->reason = reason;
1018 __entry->n_acks = n_acks;
1021 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1024 __print_symbolic(__entry->reason, rxrpc_ack_names),
1026 __entry->ack_serial,
1030 TRACE_EVENT(rxrpc_receive,
1031 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1032 rxrpc_serial_t serial, rxrpc_seq_t seq),
1034 TP_ARGS(call, why, serial, seq),
1037 __field(unsigned int, call )
1038 __field(enum rxrpc_receive_trace, why )
1039 __field(rxrpc_serial_t, serial )
1040 __field(rxrpc_seq_t, seq )
1041 __field(u64, window )
1045 __entry->call = call->debug_id;
1047 __entry->serial = serial;
1049 __entry->window = atomic64_read(&call->ackr_window);
1052 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1054 __print_symbolic(__entry->why, rxrpc_receive_traces),
1057 lower_32_bits(__entry->window),
1058 upper_32_bits(__entry->window))
1061 TRACE_EVENT(rxrpc_recvmsg,
1062 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1065 TP_ARGS(call, why, ret),
1068 __field(unsigned int, call )
1069 __field(enum rxrpc_recvmsg_trace, why )
1074 __entry->call = call ? call->debug_id : 0;
1079 TP_printk("c=%08x %s ret=%d",
1081 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1085 TRACE_EVENT(rxrpc_recvdata,
1086 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1087 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1090 TP_ARGS(call, why, seq, offset, len, ret),
1093 __field(unsigned int, call )
1094 __field(enum rxrpc_recvmsg_trace, why )
1095 __field(rxrpc_seq_t, seq )
1096 __field(unsigned int, offset )
1097 __field(unsigned int, len )
1102 __entry->call = call ? call->debug_id : 0;
1105 __entry->offset = offset;
1110 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1112 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1119 TRACE_EVENT(rxrpc_rtt_tx,
1120 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1121 int slot, rxrpc_serial_t send_serial),
1123 TP_ARGS(call, why, slot, send_serial),
1126 __field(unsigned int, call )
1127 __field(enum rxrpc_rtt_tx_trace, why )
1129 __field(rxrpc_serial_t, send_serial )
1133 __entry->call = call->debug_id;
1135 __entry->slot = slot;
1136 __entry->send_serial = send_serial;
1139 TP_printk("c=%08x [%d] %s sr=%08x",
1142 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1143 __entry->send_serial)
1146 TRACE_EVENT(rxrpc_rtt_rx,
1147 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1149 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1152 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1155 __field(unsigned int, call )
1156 __field(enum rxrpc_rtt_rx_trace, why )
1158 __field(rxrpc_serial_t, send_serial )
1159 __field(rxrpc_serial_t, resp_serial )
1165 __entry->call = call->debug_id;
1167 __entry->slot = slot;
1168 __entry->send_serial = send_serial;
1169 __entry->resp_serial = resp_serial;
1174 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1177 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1178 __entry->send_serial,
1179 __entry->resp_serial,
1184 TRACE_EVENT(rxrpc_timer,
1185 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1188 TP_ARGS(call, why, now),
1191 __field(unsigned int, call )
1192 __field(enum rxrpc_timer_trace, why )
1194 __field(long, ack_at )
1195 __field(long, ack_lost_at )
1196 __field(long, resend_at )
1197 __field(long, ping_at )
1198 __field(long, expect_rx_by )
1199 __field(long, expect_req_by )
1200 __field(long, expect_term_by )
1201 __field(long, timer )
1205 __entry->call = call->debug_id;
1208 __entry->ack_at = call->delay_ack_at;
1209 __entry->ack_lost_at = call->ack_lost_at;
1210 __entry->resend_at = call->resend_at;
1211 __entry->expect_rx_by = call->expect_rx_by;
1212 __entry->expect_req_by = call->expect_req_by;
1213 __entry->expect_term_by = call->expect_term_by;
1214 __entry->timer = call->timer.expires;
1217 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1219 __print_symbolic(__entry->why, rxrpc_timer_traces),
1220 __entry->ack_at - __entry->now,
1221 __entry->ack_lost_at - __entry->now,
1222 __entry->resend_at - __entry->now,
1223 __entry->expect_rx_by - __entry->now,
1224 __entry->expect_req_by - __entry->now,
1225 __entry->expect_term_by - __entry->now,
1226 __entry->timer - __entry->now)
1229 TRACE_EVENT(rxrpc_timer_expired,
1230 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1235 __field(unsigned int, call )
1237 __field(long, ack_at )
1238 __field(long, ack_lost_at )
1239 __field(long, resend_at )
1240 __field(long, ping_at )
1241 __field(long, expect_rx_by )
1242 __field(long, expect_req_by )
1243 __field(long, expect_term_by )
1244 __field(long, timer )
1248 __entry->call = call->debug_id;
1250 __entry->ack_at = call->delay_ack_at;
1251 __entry->ack_lost_at = call->ack_lost_at;
1252 __entry->resend_at = call->resend_at;
1253 __entry->expect_rx_by = call->expect_rx_by;
1254 __entry->expect_req_by = call->expect_req_by;
1255 __entry->expect_term_by = call->expect_term_by;
1256 __entry->timer = call->timer.expires;
1259 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1261 __entry->ack_at - __entry->now,
1262 __entry->ack_lost_at - __entry->now,
1263 __entry->resend_at - __entry->now,
1264 __entry->expect_rx_by - __entry->now,
1265 __entry->expect_req_by - __entry->now,
1266 __entry->expect_term_by - __entry->now,
1267 __entry->timer - __entry->now)
1270 TRACE_EVENT(rxrpc_rx_lose,
1271 TP_PROTO(struct rxrpc_skb_priv *sp),
1276 __field_struct(struct rxrpc_host_header, hdr )
1280 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1283 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1284 __entry->hdr.epoch, __entry->hdr.cid,
1285 __entry->hdr.callNumber, __entry->hdr.serviceId,
1286 __entry->hdr.serial, __entry->hdr.seq,
1287 __entry->hdr.type, __entry->hdr.flags,
1288 __entry->hdr.type <= 15 ?
1289 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1292 TRACE_EVENT(rxrpc_propose_ack,
1293 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1294 u8 ack_reason, rxrpc_serial_t serial),
1296 TP_ARGS(call, why, ack_reason, serial),
1299 __field(unsigned int, call )
1300 __field(enum rxrpc_propose_ack_trace, why )
1301 __field(rxrpc_serial_t, serial )
1302 __field(u8, ack_reason )
1306 __entry->call = call->debug_id;
1308 __entry->serial = serial;
1309 __entry->ack_reason = ack_reason;
1312 TP_printk("c=%08x %s %s r=%08x",
1314 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1315 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1319 TRACE_EVENT(rxrpc_send_ack,
1320 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1321 u8 ack_reason, rxrpc_serial_t serial),
1323 TP_ARGS(call, why, ack_reason, serial),
1326 __field(unsigned int, call )
1327 __field(enum rxrpc_propose_ack_trace, why )
1328 __field(rxrpc_serial_t, serial )
1329 __field(u8, ack_reason )
1333 __entry->call = call->debug_id;
1335 __entry->serial = serial;
1336 __entry->ack_reason = ack_reason;
1339 TP_printk("c=%08x %s %s r=%08x",
1341 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1342 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1346 TRACE_EVENT(rxrpc_drop_ack,
1347 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1348 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1350 TP_ARGS(call, why, ack_reason, serial, nobuf),
1353 __field(unsigned int, call )
1354 __field(enum rxrpc_propose_ack_trace, why )
1355 __field(rxrpc_serial_t, serial )
1356 __field(u8, ack_reason )
1357 __field(bool, nobuf )
1361 __entry->call = call->debug_id;
1363 __entry->serial = serial;
1364 __entry->ack_reason = ack_reason;
1365 __entry->nobuf = nobuf;
1368 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1370 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1371 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1372 __entry->serial, __entry->nobuf)
1375 TRACE_EVENT(rxrpc_retransmit,
1376 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1378 TP_ARGS(call, seq, expiry),
1381 __field(unsigned int, call )
1382 __field(rxrpc_seq_t, seq )
1383 __field(s64, expiry )
1387 __entry->call = call->debug_id;
1389 __entry->expiry = expiry;
1392 TP_printk("c=%08x q=%x xp=%lld",
1398 TRACE_EVENT(rxrpc_congest,
1399 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1400 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1402 TP_ARGS(call, summary, ack_serial, change),
1405 __field(unsigned int, call )
1406 __field(enum rxrpc_congest_change, change )
1407 __field(rxrpc_seq_t, hard_ack )
1408 __field(rxrpc_seq_t, top )
1409 __field(rxrpc_seq_t, lowest_nak )
1410 __field(rxrpc_serial_t, ack_serial )
1411 __field_struct(struct rxrpc_ack_summary, sum )
1415 __entry->call = call->debug_id;
1416 __entry->change = change;
1417 __entry->hard_ack = call->acks_hard_ack;
1418 __entry->top = call->tx_top;
1419 __entry->lowest_nak = call->acks_lowest_nak;
1420 __entry->ack_serial = ack_serial;
1421 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1424 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",
1426 __entry->ack_serial,
1427 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1429 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1431 __entry->sum.ssthresh,
1432 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1433 __entry->sum.nr_new_acks,
1434 __entry->sum.nr_rot_new_acks,
1435 __entry->top - __entry->hard_ack,
1436 __entry->sum.cumulative_acks,
1437 __entry->sum.dup_acks,
1438 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1439 __print_symbolic(__entry->change, rxrpc_congest_changes),
1440 __entry->sum.retrans_timeo ? " rTxTo" : "")
1443 TRACE_EVENT(rxrpc_disconnect_call,
1444 TP_PROTO(struct rxrpc_call *call),
1449 __field(unsigned int, call )
1450 __field(u32, abort_code )
1454 __entry->call = call->debug_id;
1455 __entry->abort_code = call->abort_code;
1458 TP_printk("c=%08x ab=%08x",
1460 __entry->abort_code)
1463 TRACE_EVENT(rxrpc_improper_term,
1464 TP_PROTO(struct rxrpc_call *call),
1469 __field(unsigned int, call )
1470 __field(u32, abort_code )
1474 __entry->call = call->debug_id;
1475 __entry->abort_code = call->abort_code;
1478 TP_printk("c=%08x ab=%08x",
1480 __entry->abort_code)
1483 TRACE_EVENT(rxrpc_rx_eproto,
1484 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1487 TP_ARGS(call, serial, why),
1490 __field(unsigned int, call )
1491 __field(rxrpc_serial_t, serial )
1492 __field(const char *, why )
1496 __entry->call = call ? call->debug_id : 0;
1497 __entry->serial = serial;
1501 TP_printk("c=%08x EPROTO %08x %s",
1507 TRACE_EVENT(rxrpc_connect_call,
1508 TP_PROTO(struct rxrpc_call *call),
1513 __field(unsigned int, call )
1514 __field(unsigned long, user_call_ID )
1516 __field(u32, call_id )
1520 __entry->call = call->debug_id;
1521 __entry->user_call_ID = call->user_call_ID;
1522 __entry->cid = call->cid;
1523 __entry->call_id = call->call_id;
1526 TP_printk("c=%08x u=%p %08x:%08x",
1528 (void *)__entry->user_call_ID,
1533 TRACE_EVENT(rxrpc_resend,
1534 TP_PROTO(struct rxrpc_call *call),
1539 __field(unsigned int, call )
1540 __field(rxrpc_seq_t, seq )
1544 __entry->call = call->debug_id;
1545 __entry->seq = call->acks_hard_ack;
1548 TP_printk("c=%08x q=%x",
1553 TRACE_EVENT(rxrpc_rx_icmp,
1554 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1555 struct sockaddr_rxrpc *srx),
1557 TP_ARGS(peer, ee, srx),
1560 __field(unsigned int, peer )
1561 __field_struct(struct sock_extended_err, ee )
1562 __field_struct(struct sockaddr_rxrpc, srx )
1566 __entry->peer = peer->debug_id;
1567 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1568 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1571 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1573 __entry->ee.ee_origin,
1574 __entry->ee.ee_type,
1575 __entry->ee.ee_code,
1576 __entry->ee.ee_info,
1577 __entry->ee.ee_data,
1578 __entry->ee.ee_errno,
1579 &__entry->srx.transport)
1582 TRACE_EVENT(rxrpc_tx_fail,
1583 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1584 enum rxrpc_tx_point where),
1586 TP_ARGS(debug_id, serial, ret, where),
1589 __field(unsigned int, debug_id )
1590 __field(rxrpc_serial_t, serial )
1592 __field(enum rxrpc_tx_point, where )
1596 __entry->debug_id = debug_id;
1597 __entry->serial = serial;
1599 __entry->where = where;
1602 TP_printk("c=%08x r=%x ret=%d %s",
1606 __print_symbolic(__entry->where, rxrpc_tx_points))
1609 TRACE_EVENT(rxrpc_call_reset,
1610 TP_PROTO(struct rxrpc_call *call),
1615 __field(unsigned int, debug_id )
1617 __field(u32, call_id )
1618 __field(rxrpc_serial_t, call_serial )
1619 __field(rxrpc_serial_t, conn_serial )
1620 __field(rxrpc_seq_t, tx_seq )
1621 __field(rxrpc_seq_t, rx_seq )
1625 __entry->debug_id = call->debug_id;
1626 __entry->cid = call->cid;
1627 __entry->call_id = call->call_id;
1628 __entry->call_serial = call->rx_serial;
1629 __entry->conn_serial = call->conn->hi_serial;
1630 __entry->tx_seq = call->acks_hard_ack;
1631 __entry->rx_seq = call->rx_highest_seq;
1634 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1636 __entry->cid, __entry->call_id,
1637 __entry->call_serial, __entry->conn_serial,
1638 __entry->tx_seq, __entry->rx_seq)
1641 TRACE_EVENT(rxrpc_notify_socket,
1642 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1644 TP_ARGS(debug_id, serial),
1647 __field(unsigned int, debug_id )
1648 __field(rxrpc_serial_t, serial )
1652 __entry->debug_id = debug_id;
1653 __entry->serial = serial;
1656 TP_printk("c=%08x r=%08x",
1661 TRACE_EVENT(rxrpc_rx_discard_ack,
1662 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1663 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1664 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1666 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1667 prev_pkt, call_ackr_prev),
1670 __field(unsigned int, debug_id )
1671 __field(rxrpc_serial_t, serial )
1672 __field(rxrpc_seq_t, first_soft_ack)
1673 __field(rxrpc_seq_t, call_ackr_first)
1674 __field(rxrpc_seq_t, prev_pkt)
1675 __field(rxrpc_seq_t, call_ackr_prev)
1679 __entry->debug_id = debug_id;
1680 __entry->serial = serial;
1681 __entry->first_soft_ack = first_soft_ack;
1682 __entry->call_ackr_first = call_ackr_first;
1683 __entry->prev_pkt = prev_pkt;
1684 __entry->call_ackr_prev = call_ackr_prev;
1687 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1690 __entry->first_soft_ack,
1691 __entry->call_ackr_first,
1693 __entry->call_ackr_prev)
1696 TRACE_EVENT(rxrpc_req_ack,
1697 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1698 enum rxrpc_req_ack_trace why),
1700 TP_ARGS(call_debug_id, seq, why),
1703 __field(unsigned int, call_debug_id )
1704 __field(rxrpc_seq_t, seq )
1705 __field(enum rxrpc_req_ack_trace, why )
1709 __entry->call_debug_id = call_debug_id;
1714 TP_printk("c=%08x q=%08x REQ-%s",
1715 __entry->call_debug_id,
1717 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1720 TRACE_EVENT(rxrpc_txbuf,
1721 TP_PROTO(unsigned int debug_id,
1722 unsigned int call_debug_id, rxrpc_seq_t seq,
1723 int ref, enum rxrpc_txbuf_trace what),
1725 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1728 __field(unsigned int, debug_id )
1729 __field(unsigned int, call_debug_id )
1730 __field(rxrpc_seq_t, seq )
1732 __field(enum rxrpc_txbuf_trace, what )
1736 __entry->debug_id = debug_id;
1737 __entry->call_debug_id = call_debug_id;
1740 __entry->what = what;
1743 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1745 __entry->call_debug_id,
1747 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1753 #endif /* _TRACE_RXRPC_H */
1755 /* This part must be outside protection */
1756 #include <trace/define_trace.h>