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_local_work, "GET locl-work") \
32 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \
33 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
34 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
35 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
36 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
37 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
38 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
39 EM(rxrpc_skb_put_ack, "PUT ack ") \
40 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \
41 EM(rxrpc_skb_put_error_report, "PUT error-rep") \
42 EM(rxrpc_skb_put_input, "PUT input ") \
43 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \
44 EM(rxrpc_skb_put_purge, "PUT purge ") \
45 EM(rxrpc_skb_put_rotate, "PUT rotate ") \
46 EM(rxrpc_skb_put_unknown, "PUT unknown ") \
47 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \
48 EM(rxrpc_skb_see_local_work, "SEE locl-work") \
49 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \
50 EM(rxrpc_skb_see_reject, "SEE reject ") \
51 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
52 E_(rxrpc_skb_see_version, "SEE version ")
54 #define rxrpc_local_traces \
55 EM(rxrpc_local_free, "FREE ") \
56 EM(rxrpc_local_get_call, "GET call ") \
57 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
58 EM(rxrpc_local_get_for_use, "GET for-use ") \
59 EM(rxrpc_local_get_peer, "GET peer ") \
60 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
61 EM(rxrpc_local_get_queue, "GET queue ") \
62 EM(rxrpc_local_new, "NEW ") \
63 EM(rxrpc_local_processing, "PROCESSING ") \
64 EM(rxrpc_local_put_already_queued, "PUT alreadyq") \
65 EM(rxrpc_local_put_bind, "PUT bind ") \
66 EM(rxrpc_local_put_call, "PUT call ") \
67 EM(rxrpc_local_put_for_use, "PUT for-use ") \
68 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
69 EM(rxrpc_local_put_peer, "PUT peer ") \
70 EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \
71 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
72 EM(rxrpc_local_put_queue, "PUT queue ") \
73 EM(rxrpc_local_queued, "QUEUED ") \
74 EM(rxrpc_local_see_tx_ack, "SEE tx-ack ") \
75 EM(rxrpc_local_stop, "STOP ") \
76 EM(rxrpc_local_stopped, "STOPPED ") \
77 EM(rxrpc_local_unuse_bind, "UNU bind ") \
78 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
79 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
80 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
81 EM(rxrpc_local_unuse_work, "UNU work ") \
82 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
83 EM(rxrpc_local_use_lookup, "USE lookup ") \
84 EM(rxrpc_local_use_peer_keepalive, "USE peer-kpa") \
85 E_(rxrpc_local_use_work, "USE work ")
87 #define rxrpc_peer_traces \
88 EM(rxrpc_peer_free, "FREE ") \
89 EM(rxrpc_peer_get_accept, "GET accept ") \
90 EM(rxrpc_peer_get_activate_call, "GET act-call") \
91 EM(rxrpc_peer_get_bundle, "GET bundle ") \
92 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
93 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
94 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
95 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
96 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
97 EM(rxrpc_peer_new_client, "NEW client ") \
98 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
99 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
100 EM(rxrpc_peer_put_call, "PUT call ") \
101 EM(rxrpc_peer_put_conn, "PUT conn ") \
102 EM(rxrpc_peer_put_discard_tmp, "PUT disc-tmp") \
103 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
104 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
106 #define rxrpc_bundle_traces \
107 EM(rxrpc_bundle_free, "FREE ") \
108 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
109 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
110 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
111 EM(rxrpc_bundle_put_conn, "PUT conn ") \
112 EM(rxrpc_bundle_put_discard, "PUT discard ") \
113 E_(rxrpc_bundle_new, "NEW ")
115 #define rxrpc_conn_traces \
116 EM(rxrpc_conn_free, "FREE ") \
117 EM(rxrpc_conn_get_activate_call, "GET act-call") \
118 EM(rxrpc_conn_get_call_input, "GET inp-call") \
119 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
120 EM(rxrpc_conn_get_idle, "GET idle ") \
121 EM(rxrpc_conn_get_poke, "GET poke ") \
122 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
123 EM(rxrpc_conn_new_client, "NEW client ") \
124 EM(rxrpc_conn_new_service, "NEW service ") \
125 EM(rxrpc_conn_put_call, "PUT call ") \
126 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
127 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
128 EM(rxrpc_conn_put_discard, "PUT discard ") \
129 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
130 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
131 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
132 EM(rxrpc_conn_put_poke, "PUT poke ") \
133 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \
134 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
135 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
136 EM(rxrpc_conn_queue_challenge, "QUE chall ") \
137 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
138 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
139 EM(rxrpc_conn_queue_timer, "QUE timer ") \
140 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
141 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
142 E_(rxrpc_conn_see_work, "SEE work ")
144 #define rxrpc_client_traces \
145 EM(rxrpc_client_activate_chans, "Activa") \
146 EM(rxrpc_client_alloc, "Alloc ") \
147 EM(rxrpc_client_chan_activate, "ChActv") \
148 EM(rxrpc_client_chan_disconnect, "ChDisc") \
149 EM(rxrpc_client_chan_pass, "ChPass") \
150 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
151 EM(rxrpc_client_cleanup, "Clean ") \
152 EM(rxrpc_client_discard, "Discar") \
153 EM(rxrpc_client_duplicate, "Duplic") \
154 EM(rxrpc_client_exposed, "Expose") \
155 EM(rxrpc_client_replace, "Replac") \
156 EM(rxrpc_client_to_active, "->Actv") \
157 E_(rxrpc_client_to_idle, "->Idle")
159 #define rxrpc_call_traces \
160 EM(rxrpc_call_get_input, "GET input ") \
161 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
162 EM(rxrpc_call_get_notify_socket, "GET notify ") \
163 EM(rxrpc_call_get_poke, "GET poke ") \
164 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
165 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
166 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
167 EM(rxrpc_call_get_send_ack, "GET send-ack") \
168 EM(rxrpc_call_get_userid, "GET user-id ") \
169 EM(rxrpc_call_new_client, "NEW client ") \
170 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
171 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
172 EM(rxrpc_call_put_discard_error, "PUT disc-err") \
173 EM(rxrpc_call_put_input, "PUT input ") \
174 EM(rxrpc_call_put_kernel, "PUT kernel ") \
175 EM(rxrpc_call_put_poke, "PUT poke ") \
176 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
177 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
178 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
179 EM(rxrpc_call_put_send_ack, "PUT send-ack") \
180 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
181 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
182 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
183 EM(rxrpc_call_queue_abort, "QUE abort ") \
184 EM(rxrpc_call_queue_requeue, "QUE requeue ") \
185 EM(rxrpc_call_queue_resend, "QUE resend ") \
186 EM(rxrpc_call_queue_timer, "QUE timer ") \
187 EM(rxrpc_call_queue_tx_data, "QUE tx-data ") \
188 EM(rxrpc_call_see_accept, "SEE accept ") \
189 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
190 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
191 EM(rxrpc_call_see_connected, "SEE connect ") \
192 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
193 EM(rxrpc_call_see_input, "SEE input ") \
194 EM(rxrpc_call_see_release, "SEE release ") \
195 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
196 E_(rxrpc_call_see_zap, "SEE zap ")
198 #define rxrpc_txqueue_traces \
199 EM(rxrpc_txqueue_await_reply, "AWR") \
200 EM(rxrpc_txqueue_dequeue, "DEQ") \
201 EM(rxrpc_txqueue_end, "END") \
202 EM(rxrpc_txqueue_queue, "QUE") \
203 EM(rxrpc_txqueue_queue_last, "QLS") \
204 EM(rxrpc_txqueue_rotate, "ROT") \
205 EM(rxrpc_txqueue_rotate_last, "RLS") \
206 E_(rxrpc_txqueue_wait, "WAI")
208 #define rxrpc_receive_traces \
209 EM(rxrpc_receive_end, "END") \
210 EM(rxrpc_receive_front, "FRN") \
211 EM(rxrpc_receive_incoming, "INC") \
212 EM(rxrpc_receive_queue, "QUE") \
213 EM(rxrpc_receive_queue_last, "QLS") \
214 EM(rxrpc_receive_queue_oos, "QUO") \
215 EM(rxrpc_receive_queue_oos_last, "QOL") \
216 EM(rxrpc_receive_oos, "OOS") \
217 EM(rxrpc_receive_oos_last, "OSL") \
218 EM(rxrpc_receive_rotate, "ROT") \
219 E_(rxrpc_receive_rotate_last, "RLS")
221 #define rxrpc_recvmsg_traces \
222 EM(rxrpc_recvmsg_cont, "CONT") \
223 EM(rxrpc_recvmsg_data_return, "DATA") \
224 EM(rxrpc_recvmsg_dequeue, "DEQU") \
225 EM(rxrpc_recvmsg_enter, "ENTR") \
226 EM(rxrpc_recvmsg_full, "FULL") \
227 EM(rxrpc_recvmsg_hole, "HOLE") \
228 EM(rxrpc_recvmsg_next, "NEXT") \
229 EM(rxrpc_recvmsg_requeue, "REQU") \
230 EM(rxrpc_recvmsg_return, "RETN") \
231 EM(rxrpc_recvmsg_terminal, "TERM") \
232 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
233 E_(rxrpc_recvmsg_wait, "WAIT")
235 #define rxrpc_rtt_tx_traces \
236 EM(rxrpc_rtt_tx_cancel, "CNCE") \
237 EM(rxrpc_rtt_tx_data, "DATA") \
238 EM(rxrpc_rtt_tx_no_slot, "FULL") \
239 E_(rxrpc_rtt_tx_ping, "PING")
241 #define rxrpc_rtt_rx_traces \
242 EM(rxrpc_rtt_rx_cancel, "CNCL") \
243 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
244 EM(rxrpc_rtt_rx_lost, "LOST") \
245 EM(rxrpc_rtt_rx_ping_response, "PONG") \
246 E_(rxrpc_rtt_rx_requested_ack, "RACK")
248 #define rxrpc_timer_traces \
249 EM(rxrpc_timer_begin, "Begin ") \
250 EM(rxrpc_timer_exp_ack, "ExpAck") \
251 EM(rxrpc_timer_exp_hard, "ExpHrd") \
252 EM(rxrpc_timer_exp_idle, "ExpIdl") \
253 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
254 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
255 EM(rxrpc_timer_exp_normal, "ExpNml") \
256 EM(rxrpc_timer_exp_ping, "ExpPng") \
257 EM(rxrpc_timer_exp_resend, "ExpRsn") \
258 EM(rxrpc_timer_init_for_reply, "IniRpl") \
259 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
260 EM(rxrpc_timer_restart, "Restrt") \
261 EM(rxrpc_timer_set_for_ack, "SetAck") \
262 EM(rxrpc_timer_set_for_hard, "SetHrd") \
263 EM(rxrpc_timer_set_for_idle, "SetIdl") \
264 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
265 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
266 EM(rxrpc_timer_set_for_normal, "SetNml") \
267 EM(rxrpc_timer_set_for_ping, "SetPng") \
268 EM(rxrpc_timer_set_for_resend, "SetRTx") \
269 E_(rxrpc_timer_set_for_send, "SetSnd")
271 #define rxrpc_propose_ack_traces \
272 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
273 EM(rxrpc_propose_ack_input_data, "DataIn ") \
274 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
275 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
276 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
277 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
278 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
279 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
280 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
281 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
282 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
283 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
284 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
285 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
287 #define rxrpc_congest_modes \
288 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
289 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
290 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
291 E_(RXRPC_CALL_SLOW_START, "SlowStart")
293 #define rxrpc_congest_changes \
294 EM(rxrpc_cong_begin_retransmission, " Retrans") \
295 EM(rxrpc_cong_cleared_nacks, " Cleared") \
296 EM(rxrpc_cong_new_low_nack, " NewLowN") \
297 EM(rxrpc_cong_no_change, " -") \
298 EM(rxrpc_cong_progress, " Progres") \
299 EM(rxrpc_cong_idle_reset, " IdleRes") \
300 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
301 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
302 E_(rxrpc_cong_saw_nack, " SawNack")
306 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
307 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
308 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
309 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
310 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
311 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
312 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
313 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
318 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
322 #define rxrpc_ack_names \
324 EM(RXRPC_ACK_REQUESTED, "REQ") \
325 EM(RXRPC_ACK_DUPLICATE, "DUP") \
326 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
327 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
328 EM(RXRPC_ACK_NOSPACE, "MEM") \
329 EM(RXRPC_ACK_PING, "PNG") \
330 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
331 EM(RXRPC_ACK_DELAY, "DLY") \
332 EM(RXRPC_ACK_IDLE, "IDL") \
333 E_(RXRPC_ACK__INVALID, "-?-")
335 #define rxrpc_completions \
336 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
337 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
338 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
339 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
340 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
342 #define rxrpc_tx_points \
343 EM(rxrpc_tx_point_call_abort, "CallAbort") \
344 EM(rxrpc_tx_point_call_ack, "CallAck") \
345 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
346 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
347 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
348 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
349 EM(rxrpc_tx_point_reject, "Reject") \
350 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
351 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
352 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
353 E_(rxrpc_tx_point_version_reply, "VerReply")
355 #define rxrpc_req_ack_traces \
356 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
357 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
358 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
359 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
360 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
361 EM(rxrpc_reqack_retrans, "RETRANS ") \
362 EM(rxrpc_reqack_slow_start, "SLOW-START") \
363 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
364 /* ---- Must update size of stat_why_req_ack[] if more are added! */
366 #define rxrpc_txbuf_traces \
367 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
368 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
369 EM(rxrpc_txbuf_free, "FREE ") \
370 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
371 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
372 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
373 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
374 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
375 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
376 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
377 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
378 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
379 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
380 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
381 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
384 * Generate enums for tracing information.
386 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
387 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
394 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
395 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
396 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
397 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
398 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
399 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
400 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
401 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
402 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
403 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
404 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
405 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
406 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
407 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
408 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
409 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
410 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
411 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
412 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
413 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
415 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
418 * Export enum symbols via userspace.
422 #define EM(a, b) TRACE_DEFINE_ENUM(a);
423 #define E_(a, b) TRACE_DEFINE_ENUM(a);
426 rxrpc_call_poke_traces;
429 rxrpc_congest_changes;
433 rxrpc_propose_ack_traces;
434 rxrpc_receive_traces;
435 rxrpc_recvmsg_traces;
436 rxrpc_req_ack_traces;
443 rxrpc_txqueue_traces;
446 * Now redefine the EM() and E_() macros to map the enums to the strings that
447 * will be printed in the output.
451 #define EM(a, b) { a, b },
452 #define E_(a, b) { a, b }
454 TRACE_EVENT(rxrpc_local,
455 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
458 TP_ARGS(local_debug_id, op, ref, usage),
461 __field(unsigned int, local )
468 __entry->local = local_debug_id;
471 __entry->usage = usage;
474 TP_printk("L=%08x %s r=%d u=%d",
476 __print_symbolic(__entry->op, rxrpc_local_traces),
481 TRACE_EVENT(rxrpc_peer,
482 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
484 TP_ARGS(peer_debug_id, ref, why),
487 __field(unsigned int, peer )
493 __entry->peer = peer_debug_id;
498 TP_printk("P=%08x %s r=%d",
500 __print_symbolic(__entry->why, rxrpc_peer_traces),
504 TRACE_EVENT(rxrpc_bundle,
505 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
507 TP_ARGS(bundle_debug_id, ref, why),
510 __field(unsigned int, bundle )
516 __entry->bundle = bundle_debug_id;
521 TP_printk("CB=%08x %s r=%d",
523 __print_symbolic(__entry->why, rxrpc_bundle_traces),
527 TRACE_EVENT(rxrpc_conn,
528 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
530 TP_ARGS(conn_debug_id, ref, why),
533 __field(unsigned int, conn )
539 __entry->conn = conn_debug_id;
544 TP_printk("C=%08x %s r=%d",
546 __print_symbolic(__entry->why, rxrpc_conn_traces),
550 TRACE_EVENT(rxrpc_client,
551 TP_PROTO(struct rxrpc_connection *conn, int channel,
552 enum rxrpc_client_trace op),
554 TP_ARGS(conn, channel, op),
557 __field(unsigned int, conn )
559 __field(int, channel )
561 __field(enum rxrpc_client_trace, op )
565 __entry->conn = conn ? conn->debug_id : 0;
566 __entry->channel = channel;
567 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
569 __entry->cid = conn ? conn->proto.cid : 0;
572 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
575 __print_symbolic(__entry->op, rxrpc_client_traces),
580 TRACE_EVENT(rxrpc_call,
581 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
582 enum rxrpc_call_trace why),
584 TP_ARGS(call_debug_id, ref, aux, why),
587 __field(unsigned int, call )
590 __field(unsigned long, aux )
594 __entry->call = call_debug_id;
600 TP_printk("c=%08x %s r=%d a=%lx",
602 __print_symbolic(__entry->why, rxrpc_call_traces),
607 TRACE_EVENT(rxrpc_skb,
608 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
609 enum rxrpc_skb_trace why),
611 TP_ARGS(skb, usage, mod_count, why),
614 __field(struct sk_buff *, skb )
616 __field(int, mod_count )
617 __field(enum rxrpc_skb_trace, why )
622 __entry->usage = usage;
623 __entry->mod_count = mod_count;
627 TP_printk("s=%p Rx %s u=%d m=%d",
629 __print_symbolic(__entry->why, rxrpc_skb_traces),
634 TRACE_EVENT(rxrpc_rx_packet,
635 TP_PROTO(struct rxrpc_skb_priv *sp),
640 __field_struct(struct rxrpc_host_header, hdr )
644 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
647 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
648 __entry->hdr.epoch, __entry->hdr.cid,
649 __entry->hdr.callNumber, __entry->hdr.serviceId,
650 __entry->hdr.serial, __entry->hdr.seq,
651 __entry->hdr.type, __entry->hdr.flags,
652 __entry->hdr.type <= 15 ?
653 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
656 TRACE_EVENT(rxrpc_rx_done,
657 TP_PROTO(int result, int abort_code),
659 TP_ARGS(result, abort_code),
662 __field(int, result )
663 __field(int, abort_code )
667 __entry->result = result;
668 __entry->abort_code = abort_code;
671 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
674 TRACE_EVENT(rxrpc_abort,
675 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
676 rxrpc_seq_t seq, int abort_code, int error),
678 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
681 __field(unsigned int, call_nr )
682 __array(char, why, 4 )
684 __field(u32, call_id )
685 __field(rxrpc_seq_t, seq )
686 __field(int, abort_code )
691 memcpy(__entry->why, why, 4);
692 __entry->call_nr = call_nr;
694 __entry->call_id = call_id;
695 __entry->abort_code = abort_code;
696 __entry->error = error;
700 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
702 __entry->cid, __entry->call_id, __entry->seq,
703 __entry->abort_code, __entry->error, __entry->why)
706 TRACE_EVENT(rxrpc_call_complete,
707 TP_PROTO(struct rxrpc_call *call),
712 __field(unsigned int, call )
713 __field(enum rxrpc_call_completion, compl )
715 __field(u32, abort_code )
719 __entry->call = call->debug_id;
720 __entry->compl = call->completion;
721 __entry->error = call->error;
722 __entry->abort_code = call->abort_code;
725 TP_printk("c=%08x %s r=%d ac=%d",
727 __print_symbolic(__entry->compl, rxrpc_completions),
732 TRACE_EVENT(rxrpc_txqueue,
733 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
738 __field(unsigned int, call )
739 __field(enum rxrpc_txqueue_trace, why )
740 __field(rxrpc_seq_t, acks_hard_ack )
741 __field(rxrpc_seq_t, tx_bottom )
742 __field(rxrpc_seq_t, tx_top )
743 __field(rxrpc_seq_t, tx_prepared )
744 __field(int, tx_winsize )
748 __entry->call = call->debug_id;
750 __entry->acks_hard_ack = call->acks_hard_ack;
751 __entry->tx_bottom = call->tx_bottom;
752 __entry->tx_top = call->tx_top;
753 __entry->tx_prepared = call->tx_prepared;
754 __entry->tx_winsize = call->tx_winsize;
757 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
759 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
761 __entry->acks_hard_ack,
762 __entry->tx_top - __entry->tx_bottom,
763 __entry->tx_top - __entry->acks_hard_ack,
764 __entry->tx_prepared - __entry->tx_bottom,
768 TRACE_EVENT(rxrpc_rx_data,
769 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
770 rxrpc_serial_t serial, u8 flags),
772 TP_ARGS(call, seq, serial, flags),
775 __field(unsigned int, call )
776 __field(rxrpc_seq_t, seq )
777 __field(rxrpc_serial_t, serial )
782 __entry->call = call;
784 __entry->serial = serial;
785 __entry->flags = flags;
788 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
795 TRACE_EVENT(rxrpc_rx_ack,
796 TP_PROTO(struct rxrpc_call *call,
797 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
798 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
800 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
803 __field(unsigned int, call )
804 __field(rxrpc_serial_t, serial )
805 __field(rxrpc_serial_t, ack_serial )
806 __field(rxrpc_seq_t, first )
807 __field(rxrpc_seq_t, prev )
813 __entry->call = call->debug_id;
814 __entry->serial = serial;
815 __entry->ack_serial = ack_serial;
816 __entry->first = first;
817 __entry->prev = prev;
818 __entry->reason = reason;
819 __entry->n_acks = n_acks;
822 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
825 __print_symbolic(__entry->reason, rxrpc_ack_names),
832 TRACE_EVENT(rxrpc_rx_abort,
833 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
836 TP_ARGS(call, serial, abort_code),
839 __field(unsigned int, call )
840 __field(rxrpc_serial_t, serial )
841 __field(u32, abort_code )
845 __entry->call = call->debug_id;
846 __entry->serial = serial;
847 __entry->abort_code = abort_code;
850 TP_printk("c=%08x ABORT %08x ac=%d",
856 TRACE_EVENT(rxrpc_rx_challenge,
857 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
858 u32 version, u32 nonce, u32 min_level),
860 TP_ARGS(conn, serial, version, nonce, min_level),
863 __field(unsigned int, conn )
864 __field(rxrpc_serial_t, serial )
865 __field(u32, version )
867 __field(u32, min_level )
871 __entry->conn = conn->debug_id;
872 __entry->serial = serial;
873 __entry->version = version;
874 __entry->nonce = nonce;
875 __entry->min_level = min_level;
878 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
886 TRACE_EVENT(rxrpc_rx_response,
887 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
888 u32 version, u32 kvno, u32 ticket_len),
890 TP_ARGS(conn, serial, version, kvno, ticket_len),
893 __field(unsigned int, conn )
894 __field(rxrpc_serial_t, serial )
895 __field(u32, version )
897 __field(u32, ticket_len )
901 __entry->conn = conn->debug_id;
902 __entry->serial = serial;
903 __entry->version = version;
904 __entry->kvno = kvno;
905 __entry->ticket_len = ticket_len;
908 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
916 TRACE_EVENT(rxrpc_rx_rwind_change,
917 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
918 u32 rwind, bool wake),
920 TP_ARGS(call, serial, rwind, wake),
923 __field(unsigned int, call )
924 __field(rxrpc_serial_t, serial )
930 __entry->call = call->debug_id;
931 __entry->serial = serial;
932 __entry->rwind = rwind;
933 __entry->wake = wake;
936 TP_printk("c=%08x %08x rw=%u%s",
940 __entry->wake ? " wake" : "")
943 TRACE_EVENT(rxrpc_tx_packet,
944 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
945 enum rxrpc_tx_point where),
947 TP_ARGS(call_id, whdr, where),
950 __field(unsigned int, call )
951 __field(enum rxrpc_tx_point, where )
952 __field_struct(struct rxrpc_wire_header, whdr )
956 __entry->call = call_id;
957 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
958 __entry->where = where;
961 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
963 ntohl(__entry->whdr.epoch),
964 ntohl(__entry->whdr.cid),
965 ntohl(__entry->whdr.callNumber),
966 ntohs(__entry->whdr.serviceId),
967 ntohl(__entry->whdr.serial),
968 ntohl(__entry->whdr.seq),
969 __entry->whdr.type, __entry->whdr.flags,
970 __entry->whdr.type <= 15 ?
971 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
972 __print_symbolic(__entry->where, rxrpc_tx_points))
975 TRACE_EVENT(rxrpc_tx_data,
976 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
977 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
979 TP_ARGS(call, seq, serial, flags, retrans, lose),
982 __field(unsigned int, call )
983 __field(rxrpc_seq_t, seq )
984 __field(rxrpc_serial_t, serial )
986 __field(u32, call_id )
988 __field(bool, retrans )
993 __entry->call = call->debug_id;
994 __entry->cid = call->cid;
995 __entry->call_id = call->call_id;
997 __entry->serial = serial;
998 __entry->flags = flags;
999 __entry->retrans = retrans;
1000 __entry->lose = lose;
1003 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1010 __entry->retrans ? " *RETRANS*" : "",
1011 __entry->lose ? " *LOSE*" : "")
1014 TRACE_EVENT(rxrpc_tx_ack,
1015 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1016 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1017 u8 reason, u8 n_acks),
1019 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1022 __field(unsigned int, call )
1023 __field(rxrpc_serial_t, serial )
1024 __field(rxrpc_seq_t, ack_first )
1025 __field(rxrpc_serial_t, ack_serial )
1026 __field(u8, reason )
1027 __field(u8, n_acks )
1031 __entry->call = call;
1032 __entry->serial = serial;
1033 __entry->ack_first = ack_first;
1034 __entry->ack_serial = ack_serial;
1035 __entry->reason = reason;
1036 __entry->n_acks = n_acks;
1039 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1042 __print_symbolic(__entry->reason, rxrpc_ack_names),
1044 __entry->ack_serial,
1048 TRACE_EVENT(rxrpc_receive,
1049 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1050 rxrpc_serial_t serial, rxrpc_seq_t seq),
1052 TP_ARGS(call, why, serial, seq),
1055 __field(unsigned int, call )
1056 __field(enum rxrpc_receive_trace, why )
1057 __field(rxrpc_serial_t, serial )
1058 __field(rxrpc_seq_t, seq )
1059 __field(u64, window )
1063 __entry->call = call->debug_id;
1065 __entry->serial = serial;
1067 __entry->window = atomic64_read(&call->ackr_window);
1070 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1072 __print_symbolic(__entry->why, rxrpc_receive_traces),
1075 lower_32_bits(__entry->window),
1076 upper_32_bits(__entry->window))
1079 TRACE_EVENT(rxrpc_recvmsg,
1080 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1083 TP_ARGS(call, why, ret),
1086 __field(unsigned int, call )
1087 __field(enum rxrpc_recvmsg_trace, why )
1092 __entry->call = call ? call->debug_id : 0;
1097 TP_printk("c=%08x %s ret=%d",
1099 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1103 TRACE_EVENT(rxrpc_recvdata,
1104 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1105 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1108 TP_ARGS(call, why, seq, offset, len, ret),
1111 __field(unsigned int, call )
1112 __field(enum rxrpc_recvmsg_trace, why )
1113 __field(rxrpc_seq_t, seq )
1114 __field(unsigned int, offset )
1115 __field(unsigned int, len )
1120 __entry->call = call ? call->debug_id : 0;
1123 __entry->offset = offset;
1128 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1130 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1137 TRACE_EVENT(rxrpc_rtt_tx,
1138 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1139 int slot, rxrpc_serial_t send_serial),
1141 TP_ARGS(call, why, slot, send_serial),
1144 __field(unsigned int, call )
1145 __field(enum rxrpc_rtt_tx_trace, why )
1147 __field(rxrpc_serial_t, send_serial )
1151 __entry->call = call->debug_id;
1153 __entry->slot = slot;
1154 __entry->send_serial = send_serial;
1157 TP_printk("c=%08x [%d] %s sr=%08x",
1160 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1161 __entry->send_serial)
1164 TRACE_EVENT(rxrpc_rtt_rx,
1165 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1167 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1170 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1173 __field(unsigned int, call )
1174 __field(enum rxrpc_rtt_rx_trace, why )
1176 __field(rxrpc_serial_t, send_serial )
1177 __field(rxrpc_serial_t, resp_serial )
1183 __entry->call = call->debug_id;
1185 __entry->slot = slot;
1186 __entry->send_serial = send_serial;
1187 __entry->resp_serial = resp_serial;
1192 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1195 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1196 __entry->send_serial,
1197 __entry->resp_serial,
1202 TRACE_EVENT(rxrpc_timer,
1203 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1206 TP_ARGS(call, why, now),
1209 __field(unsigned int, call )
1210 __field(enum rxrpc_timer_trace, why )
1212 __field(long, ack_at )
1213 __field(long, ack_lost_at )
1214 __field(long, resend_at )
1215 __field(long, ping_at )
1216 __field(long, expect_rx_by )
1217 __field(long, expect_req_by )
1218 __field(long, expect_term_by )
1219 __field(long, timer )
1223 __entry->call = call->debug_id;
1226 __entry->ack_at = call->delay_ack_at;
1227 __entry->ack_lost_at = call->ack_lost_at;
1228 __entry->resend_at = call->resend_at;
1229 __entry->expect_rx_by = call->expect_rx_by;
1230 __entry->expect_req_by = call->expect_req_by;
1231 __entry->expect_term_by = call->expect_term_by;
1232 __entry->timer = call->timer.expires;
1235 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1237 __print_symbolic(__entry->why, rxrpc_timer_traces),
1238 __entry->ack_at - __entry->now,
1239 __entry->ack_lost_at - __entry->now,
1240 __entry->resend_at - __entry->now,
1241 __entry->expect_rx_by - __entry->now,
1242 __entry->expect_req_by - __entry->now,
1243 __entry->expect_term_by - __entry->now,
1244 __entry->timer - __entry->now)
1247 TRACE_EVENT(rxrpc_timer_expired,
1248 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1253 __field(unsigned int, call )
1255 __field(long, ack_at )
1256 __field(long, ack_lost_at )
1257 __field(long, resend_at )
1258 __field(long, ping_at )
1259 __field(long, expect_rx_by )
1260 __field(long, expect_req_by )
1261 __field(long, expect_term_by )
1262 __field(long, timer )
1266 __entry->call = call->debug_id;
1268 __entry->ack_at = call->delay_ack_at;
1269 __entry->ack_lost_at = call->ack_lost_at;
1270 __entry->resend_at = call->resend_at;
1271 __entry->expect_rx_by = call->expect_rx_by;
1272 __entry->expect_req_by = call->expect_req_by;
1273 __entry->expect_term_by = call->expect_term_by;
1274 __entry->timer = call->timer.expires;
1277 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1279 __entry->ack_at - __entry->now,
1280 __entry->ack_lost_at - __entry->now,
1281 __entry->resend_at - __entry->now,
1282 __entry->expect_rx_by - __entry->now,
1283 __entry->expect_req_by - __entry->now,
1284 __entry->expect_term_by - __entry->now,
1285 __entry->timer - __entry->now)
1288 TRACE_EVENT(rxrpc_rx_lose,
1289 TP_PROTO(struct rxrpc_skb_priv *sp),
1294 __field_struct(struct rxrpc_host_header, hdr )
1298 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1301 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1302 __entry->hdr.epoch, __entry->hdr.cid,
1303 __entry->hdr.callNumber, __entry->hdr.serviceId,
1304 __entry->hdr.serial, __entry->hdr.seq,
1305 __entry->hdr.type, __entry->hdr.flags,
1306 __entry->hdr.type <= 15 ?
1307 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1310 TRACE_EVENT(rxrpc_propose_ack,
1311 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1312 u8 ack_reason, rxrpc_serial_t serial),
1314 TP_ARGS(call, why, ack_reason, serial),
1317 __field(unsigned int, call )
1318 __field(enum rxrpc_propose_ack_trace, why )
1319 __field(rxrpc_serial_t, serial )
1320 __field(u8, ack_reason )
1324 __entry->call = call->debug_id;
1326 __entry->serial = serial;
1327 __entry->ack_reason = ack_reason;
1330 TP_printk("c=%08x %s %s r=%08x",
1332 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1333 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1337 TRACE_EVENT(rxrpc_send_ack,
1338 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1339 u8 ack_reason, rxrpc_serial_t serial),
1341 TP_ARGS(call, why, ack_reason, serial),
1344 __field(unsigned int, call )
1345 __field(enum rxrpc_propose_ack_trace, why )
1346 __field(rxrpc_serial_t, serial )
1347 __field(u8, ack_reason )
1351 __entry->call = call->debug_id;
1353 __entry->serial = serial;
1354 __entry->ack_reason = ack_reason;
1357 TP_printk("c=%08x %s %s r=%08x",
1359 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1360 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1364 TRACE_EVENT(rxrpc_drop_ack,
1365 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1366 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1368 TP_ARGS(call, why, ack_reason, serial, nobuf),
1371 __field(unsigned int, call )
1372 __field(enum rxrpc_propose_ack_trace, why )
1373 __field(rxrpc_serial_t, serial )
1374 __field(u8, ack_reason )
1375 __field(bool, nobuf )
1379 __entry->call = call->debug_id;
1381 __entry->serial = serial;
1382 __entry->ack_reason = ack_reason;
1383 __entry->nobuf = nobuf;
1386 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1388 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1389 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1390 __entry->serial, __entry->nobuf)
1393 TRACE_EVENT(rxrpc_retransmit,
1394 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1396 TP_ARGS(call, seq, expiry),
1399 __field(unsigned int, call )
1400 __field(rxrpc_seq_t, seq )
1401 __field(s64, expiry )
1405 __entry->call = call->debug_id;
1407 __entry->expiry = expiry;
1410 TP_printk("c=%08x q=%x xp=%lld",
1416 TRACE_EVENT(rxrpc_congest,
1417 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1418 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1420 TP_ARGS(call, summary, ack_serial, change),
1423 __field(unsigned int, call )
1424 __field(enum rxrpc_congest_change, change )
1425 __field(rxrpc_seq_t, hard_ack )
1426 __field(rxrpc_seq_t, top )
1427 __field(rxrpc_seq_t, lowest_nak )
1428 __field(rxrpc_serial_t, ack_serial )
1429 __field_struct(struct rxrpc_ack_summary, sum )
1433 __entry->call = call->debug_id;
1434 __entry->change = change;
1435 __entry->hard_ack = call->acks_hard_ack;
1436 __entry->top = call->tx_top;
1437 __entry->lowest_nak = call->acks_lowest_nak;
1438 __entry->ack_serial = ack_serial;
1439 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1442 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",
1444 __entry->ack_serial,
1445 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1447 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1449 __entry->sum.ssthresh,
1450 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1451 __entry->sum.nr_new_acks,
1452 __entry->sum.nr_rot_new_acks,
1453 __entry->top - __entry->hard_ack,
1454 __entry->sum.cumulative_acks,
1455 __entry->sum.dup_acks,
1456 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1457 __print_symbolic(__entry->change, rxrpc_congest_changes),
1458 __entry->sum.retrans_timeo ? " rTxTo" : "")
1461 TRACE_EVENT(rxrpc_disconnect_call,
1462 TP_PROTO(struct rxrpc_call *call),
1467 __field(unsigned int, call )
1468 __field(u32, abort_code )
1472 __entry->call = call->debug_id;
1473 __entry->abort_code = call->abort_code;
1476 TP_printk("c=%08x ab=%08x",
1478 __entry->abort_code)
1481 TRACE_EVENT(rxrpc_improper_term,
1482 TP_PROTO(struct rxrpc_call *call),
1487 __field(unsigned int, call )
1488 __field(u32, abort_code )
1492 __entry->call = call->debug_id;
1493 __entry->abort_code = call->abort_code;
1496 TP_printk("c=%08x ab=%08x",
1498 __entry->abort_code)
1501 TRACE_EVENT(rxrpc_rx_eproto,
1502 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1505 TP_ARGS(call, serial, why),
1508 __field(unsigned int, call )
1509 __field(rxrpc_serial_t, serial )
1510 __field(const char *, why )
1514 __entry->call = call ? call->debug_id : 0;
1515 __entry->serial = serial;
1519 TP_printk("c=%08x EPROTO %08x %s",
1525 TRACE_EVENT(rxrpc_connect_call,
1526 TP_PROTO(struct rxrpc_call *call),
1531 __field(unsigned int, call )
1532 __field(unsigned long, user_call_ID )
1534 __field(u32, call_id )
1538 __entry->call = call->debug_id;
1539 __entry->user_call_ID = call->user_call_ID;
1540 __entry->cid = call->cid;
1541 __entry->call_id = call->call_id;
1544 TP_printk("c=%08x u=%p %08x:%08x",
1546 (void *)__entry->user_call_ID,
1551 TRACE_EVENT(rxrpc_resend,
1552 TP_PROTO(struct rxrpc_call *call),
1557 __field(unsigned int, call )
1558 __field(rxrpc_seq_t, seq )
1562 __entry->call = call->debug_id;
1563 __entry->seq = call->acks_hard_ack;
1566 TP_printk("c=%08x q=%x",
1571 TRACE_EVENT(rxrpc_rx_icmp,
1572 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1573 struct sockaddr_rxrpc *srx),
1575 TP_ARGS(peer, ee, srx),
1578 __field(unsigned int, peer )
1579 __field_struct(struct sock_extended_err, ee )
1580 __field_struct(struct sockaddr_rxrpc, srx )
1584 __entry->peer = peer->debug_id;
1585 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1586 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1589 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1591 __entry->ee.ee_origin,
1592 __entry->ee.ee_type,
1593 __entry->ee.ee_code,
1594 __entry->ee.ee_info,
1595 __entry->ee.ee_data,
1596 __entry->ee.ee_errno,
1597 &__entry->srx.transport)
1600 TRACE_EVENT(rxrpc_tx_fail,
1601 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1602 enum rxrpc_tx_point where),
1604 TP_ARGS(debug_id, serial, ret, where),
1607 __field(unsigned int, debug_id )
1608 __field(rxrpc_serial_t, serial )
1610 __field(enum rxrpc_tx_point, where )
1614 __entry->debug_id = debug_id;
1615 __entry->serial = serial;
1617 __entry->where = where;
1620 TP_printk("c=%08x r=%x ret=%d %s",
1624 __print_symbolic(__entry->where, rxrpc_tx_points))
1627 TRACE_EVENT(rxrpc_call_reset,
1628 TP_PROTO(struct rxrpc_call *call),
1633 __field(unsigned int, debug_id )
1635 __field(u32, call_id )
1636 __field(rxrpc_serial_t, call_serial )
1637 __field(rxrpc_serial_t, conn_serial )
1638 __field(rxrpc_seq_t, tx_seq )
1639 __field(rxrpc_seq_t, rx_seq )
1643 __entry->debug_id = call->debug_id;
1644 __entry->cid = call->cid;
1645 __entry->call_id = call->call_id;
1646 __entry->call_serial = call->rx_serial;
1647 __entry->conn_serial = call->conn->hi_serial;
1648 __entry->tx_seq = call->acks_hard_ack;
1649 __entry->rx_seq = call->rx_highest_seq;
1652 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1654 __entry->cid, __entry->call_id,
1655 __entry->call_serial, __entry->conn_serial,
1656 __entry->tx_seq, __entry->rx_seq)
1659 TRACE_EVENT(rxrpc_notify_socket,
1660 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1662 TP_ARGS(debug_id, serial),
1665 __field(unsigned int, debug_id )
1666 __field(rxrpc_serial_t, serial )
1670 __entry->debug_id = debug_id;
1671 __entry->serial = serial;
1674 TP_printk("c=%08x r=%08x",
1679 TRACE_EVENT(rxrpc_rx_discard_ack,
1680 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1681 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1682 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1684 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1685 prev_pkt, call_ackr_prev),
1688 __field(unsigned int, debug_id )
1689 __field(rxrpc_serial_t, serial )
1690 __field(rxrpc_seq_t, first_soft_ack)
1691 __field(rxrpc_seq_t, call_ackr_first)
1692 __field(rxrpc_seq_t, prev_pkt)
1693 __field(rxrpc_seq_t, call_ackr_prev)
1697 __entry->debug_id = debug_id;
1698 __entry->serial = serial;
1699 __entry->first_soft_ack = first_soft_ack;
1700 __entry->call_ackr_first = call_ackr_first;
1701 __entry->prev_pkt = prev_pkt;
1702 __entry->call_ackr_prev = call_ackr_prev;
1705 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1708 __entry->first_soft_ack,
1709 __entry->call_ackr_first,
1711 __entry->call_ackr_prev)
1714 TRACE_EVENT(rxrpc_req_ack,
1715 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1716 enum rxrpc_req_ack_trace why),
1718 TP_ARGS(call_debug_id, seq, why),
1721 __field(unsigned int, call_debug_id )
1722 __field(rxrpc_seq_t, seq )
1723 __field(enum rxrpc_req_ack_trace, why )
1727 __entry->call_debug_id = call_debug_id;
1732 TP_printk("c=%08x q=%08x REQ-%s",
1733 __entry->call_debug_id,
1735 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1738 TRACE_EVENT(rxrpc_txbuf,
1739 TP_PROTO(unsigned int debug_id,
1740 unsigned int call_debug_id, rxrpc_seq_t seq,
1741 int ref, enum rxrpc_txbuf_trace what),
1743 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1746 __field(unsigned int, debug_id )
1747 __field(unsigned int, call_debug_id )
1748 __field(rxrpc_seq_t, seq )
1750 __field(enum rxrpc_txbuf_trace, what )
1754 __entry->debug_id = debug_id;
1755 __entry->call_debug_id = call_debug_id;
1758 __entry->what = what;
1761 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1763 __entry->call_debug_id,
1765 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1769 TRACE_EVENT(rxrpc_poke_call,
1770 TP_PROTO(struct rxrpc_call *call, bool busy,
1771 enum rxrpc_call_poke_trace what),
1773 TP_ARGS(call, busy, what),
1776 __field(unsigned int, call_debug_id )
1777 __field(bool, busy )
1778 __field(enum rxrpc_call_poke_trace, what )
1782 __entry->call_debug_id = call->debug_id;
1783 __entry->busy = busy;
1784 __entry->what = what;
1787 TP_printk("c=%08x %s%s",
1788 __entry->call_debug_id,
1789 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1790 __entry->busy ? "!" : "")
1793 TRACE_EVENT(rxrpc_call_poked,
1794 TP_PROTO(struct rxrpc_call *call),
1799 __field(unsigned int, call_debug_id )
1803 __entry->call_debug_id = call->debug_id;
1807 __entry->call_debug_id)
1812 #endif /* _TRACE_RXRPC_H */
1814 /* This part must be outside protection */
1815 #include <trace/define_trace.h>