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_abort, "Abort") \
21 EM(rxrpc_call_poke_complete, "Compl") \
22 EM(rxrpc_call_poke_error, "Error") \
23 EM(rxrpc_call_poke_idle, "Idle") \
24 EM(rxrpc_call_poke_start, "Start") \
25 EM(rxrpc_call_poke_timer, "Timer") \
26 E_(rxrpc_call_poke_timer_now, "Timer-now")
28 #define rxrpc_skb_traces \
29 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \
30 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \
31 EM(rxrpc_skb_get_conn_work, "GET conn-work") \
32 EM(rxrpc_skb_get_local_work, "GET locl-work") \
33 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \
34 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
35 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
36 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
37 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
38 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
39 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
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_recvmsg, "SEE recvmsg ") \
49 EM(rxrpc_skb_see_reject, "SEE reject ") \
50 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
51 E_(rxrpc_skb_see_version, "SEE version ")
53 #define rxrpc_local_traces \
54 EM(rxrpc_local_free, "FREE ") \
55 EM(rxrpc_local_get_call, "GET call ") \
56 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
57 EM(rxrpc_local_get_for_use, "GET for-use ") \
58 EM(rxrpc_local_get_peer, "GET peer ") \
59 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
60 EM(rxrpc_local_new, "NEW ") \
61 EM(rxrpc_local_put_bind, "PUT bind ") \
62 EM(rxrpc_local_put_call, "PUT call ") \
63 EM(rxrpc_local_put_for_use, "PUT for-use ") \
64 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
65 EM(rxrpc_local_put_peer, "PUT peer ") \
66 EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \
67 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
68 EM(rxrpc_local_stop, "STOP ") \
69 EM(rxrpc_local_stopped, "STOPPED ") \
70 EM(rxrpc_local_unuse_bind, "UNU bind ") \
71 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
72 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
73 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
74 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
75 EM(rxrpc_local_use_lookup, "USE lookup ") \
76 E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa")
78 #define rxrpc_peer_traces \
79 EM(rxrpc_peer_free, "FREE ") \
80 EM(rxrpc_peer_get_accept, "GET accept ") \
81 EM(rxrpc_peer_get_activate_call, "GET act-call") \
82 EM(rxrpc_peer_get_bundle, "GET bundle ") \
83 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
84 EM(rxrpc_peer_get_input, "GET input ") \
85 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
86 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
87 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
88 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
89 EM(rxrpc_peer_new_client, "NEW client ") \
90 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
91 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
92 EM(rxrpc_peer_put_call, "PUT call ") \
93 EM(rxrpc_peer_put_conn, "PUT conn ") \
94 EM(rxrpc_peer_put_discard_tmp, "PUT disc-tmp") \
95 EM(rxrpc_peer_put_input, "PUT input ") \
96 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
97 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
99 #define rxrpc_bundle_traces \
100 EM(rxrpc_bundle_free, "FREE ") \
101 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
102 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
103 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
104 EM(rxrpc_bundle_put_conn, "PUT conn ") \
105 EM(rxrpc_bundle_put_discard, "PUT discard ") \
106 E_(rxrpc_bundle_new, "NEW ")
108 #define rxrpc_conn_traces \
109 EM(rxrpc_conn_free, "FREE ") \
110 EM(rxrpc_conn_get_activate_call, "GET act-call") \
111 EM(rxrpc_conn_get_call_input, "GET inp-call") \
112 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
113 EM(rxrpc_conn_get_idle, "GET idle ") \
114 EM(rxrpc_conn_get_poke, "GET poke ") \
115 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
116 EM(rxrpc_conn_new_client, "NEW client ") \
117 EM(rxrpc_conn_new_service, "NEW service ") \
118 EM(rxrpc_conn_put_call, "PUT call ") \
119 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
120 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
121 EM(rxrpc_conn_put_discard, "PUT discard ") \
122 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
123 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
124 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
125 EM(rxrpc_conn_put_poke, "PUT poke ") \
126 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \
127 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
128 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
129 EM(rxrpc_conn_queue_challenge, "QUE chall ") \
130 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
131 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
132 EM(rxrpc_conn_queue_timer, "QUE timer ") \
133 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
134 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
135 E_(rxrpc_conn_see_work, "SEE work ")
137 #define rxrpc_client_traces \
138 EM(rxrpc_client_activate_chans, "Activa") \
139 EM(rxrpc_client_alloc, "Alloc ") \
140 EM(rxrpc_client_chan_activate, "ChActv") \
141 EM(rxrpc_client_chan_disconnect, "ChDisc") \
142 EM(rxrpc_client_chan_pass, "ChPass") \
143 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
144 EM(rxrpc_client_cleanup, "Clean ") \
145 EM(rxrpc_client_discard, "Discar") \
146 EM(rxrpc_client_duplicate, "Duplic") \
147 EM(rxrpc_client_exposed, "Expose") \
148 EM(rxrpc_client_replace, "Replac") \
149 EM(rxrpc_client_to_active, "->Actv") \
150 E_(rxrpc_client_to_idle, "->Idle")
152 #define rxrpc_call_traces \
153 EM(rxrpc_call_get_io_thread, "GET iothread") \
154 EM(rxrpc_call_get_input, "GET input ") \
155 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
156 EM(rxrpc_call_get_notify_socket, "GET notify ") \
157 EM(rxrpc_call_get_poke, "GET poke ") \
158 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
159 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
160 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
161 EM(rxrpc_call_get_userid, "GET user-id ") \
162 EM(rxrpc_call_new_client, "NEW client ") \
163 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
164 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
165 EM(rxrpc_call_put_discard_error, "PUT disc-err") \
166 EM(rxrpc_call_put_io_thread, "PUT iothread") \
167 EM(rxrpc_call_put_input, "PUT input ") \
168 EM(rxrpc_call_put_kernel, "PUT kernel ") \
169 EM(rxrpc_call_put_poke, "PUT poke ") \
170 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
171 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
172 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
173 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
174 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
175 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
176 EM(rxrpc_call_see_accept, "SEE accept ") \
177 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
178 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
179 EM(rxrpc_call_see_connected, "SEE connect ") \
180 EM(rxrpc_call_see_disconnected, "SEE disconn ") \
181 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
182 EM(rxrpc_call_see_input, "SEE input ") \
183 EM(rxrpc_call_see_release, "SEE release ") \
184 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
185 E_(rxrpc_call_see_zap, "SEE zap ")
187 #define rxrpc_txqueue_traces \
188 EM(rxrpc_txqueue_await_reply, "AWR") \
189 EM(rxrpc_txqueue_dequeue, "DEQ") \
190 EM(rxrpc_txqueue_end, "END") \
191 EM(rxrpc_txqueue_queue, "QUE") \
192 EM(rxrpc_txqueue_queue_last, "QLS") \
193 EM(rxrpc_txqueue_rotate, "ROT") \
194 EM(rxrpc_txqueue_rotate_last, "RLS") \
195 E_(rxrpc_txqueue_wait, "WAI")
197 #define rxrpc_receive_traces \
198 EM(rxrpc_receive_end, "END") \
199 EM(rxrpc_receive_front, "FRN") \
200 EM(rxrpc_receive_incoming, "INC") \
201 EM(rxrpc_receive_queue, "QUE") \
202 EM(rxrpc_receive_queue_last, "QLS") \
203 EM(rxrpc_receive_queue_oos, "QUO") \
204 EM(rxrpc_receive_queue_oos_last, "QOL") \
205 EM(rxrpc_receive_oos, "OOS") \
206 EM(rxrpc_receive_oos_last, "OSL") \
207 EM(rxrpc_receive_rotate, "ROT") \
208 E_(rxrpc_receive_rotate_last, "RLS")
210 #define rxrpc_recvmsg_traces \
211 EM(rxrpc_recvmsg_cont, "CONT") \
212 EM(rxrpc_recvmsg_data_return, "DATA") \
213 EM(rxrpc_recvmsg_dequeue, "DEQU") \
214 EM(rxrpc_recvmsg_enter, "ENTR") \
215 EM(rxrpc_recvmsg_full, "FULL") \
216 EM(rxrpc_recvmsg_hole, "HOLE") \
217 EM(rxrpc_recvmsg_next, "NEXT") \
218 EM(rxrpc_recvmsg_requeue, "REQU") \
219 EM(rxrpc_recvmsg_return, "RETN") \
220 EM(rxrpc_recvmsg_terminal, "TERM") \
221 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
222 E_(rxrpc_recvmsg_wait, "WAIT")
224 #define rxrpc_rtt_tx_traces \
225 EM(rxrpc_rtt_tx_cancel, "CNCE") \
226 EM(rxrpc_rtt_tx_data, "DATA") \
227 EM(rxrpc_rtt_tx_no_slot, "FULL") \
228 E_(rxrpc_rtt_tx_ping, "PING")
230 #define rxrpc_rtt_rx_traces \
231 EM(rxrpc_rtt_rx_cancel, "CNCL") \
232 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
233 EM(rxrpc_rtt_rx_lost, "LOST") \
234 EM(rxrpc_rtt_rx_ping_response, "PONG") \
235 E_(rxrpc_rtt_rx_requested_ack, "RACK")
237 #define rxrpc_timer_traces \
238 EM(rxrpc_timer_begin, "Begin ") \
239 EM(rxrpc_timer_exp_ack, "ExpAck") \
240 EM(rxrpc_timer_exp_hard, "ExpHrd") \
241 EM(rxrpc_timer_exp_idle, "ExpIdl") \
242 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
243 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
244 EM(rxrpc_timer_exp_normal, "ExpNml") \
245 EM(rxrpc_timer_exp_ping, "ExpPng") \
246 EM(rxrpc_timer_exp_resend, "ExpRsn") \
247 EM(rxrpc_timer_init_for_reply, "IniRpl") \
248 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
249 EM(rxrpc_timer_restart, "Restrt") \
250 EM(rxrpc_timer_set_for_ack, "SetAck") \
251 EM(rxrpc_timer_set_for_hard, "SetHrd") \
252 EM(rxrpc_timer_set_for_idle, "SetIdl") \
253 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
254 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
255 EM(rxrpc_timer_set_for_normal, "SetNml") \
256 EM(rxrpc_timer_set_for_ping, "SetPng") \
257 EM(rxrpc_timer_set_for_resend, "SetRTx") \
258 E_(rxrpc_timer_set_for_send, "SetSnd")
260 #define rxrpc_propose_ack_traces \
261 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
262 EM(rxrpc_propose_ack_input_data, "DataIn ") \
263 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
264 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
265 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
266 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
267 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
268 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
269 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
270 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
271 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
272 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
273 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
274 EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \
275 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
277 #define rxrpc_congest_modes \
278 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
279 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
280 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
281 E_(RXRPC_CALL_SLOW_START, "SlowStart")
283 #define rxrpc_congest_changes \
284 EM(rxrpc_cong_begin_retransmission, " Retrans") \
285 EM(rxrpc_cong_cleared_nacks, " Cleared") \
286 EM(rxrpc_cong_new_low_nack, " NewLowN") \
287 EM(rxrpc_cong_no_change, " -") \
288 EM(rxrpc_cong_progress, " Progres") \
289 EM(rxrpc_cong_idle_reset, " IdleRes") \
290 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
291 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
292 E_(rxrpc_cong_saw_nack, " SawNack")
296 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
297 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
298 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
299 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
300 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
301 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
302 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
303 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
308 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
312 #define rxrpc_ack_names \
314 EM(RXRPC_ACK_REQUESTED, "REQ") \
315 EM(RXRPC_ACK_DUPLICATE, "DUP") \
316 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
317 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
318 EM(RXRPC_ACK_NOSPACE, "MEM") \
319 EM(RXRPC_ACK_PING, "PNG") \
320 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
321 EM(RXRPC_ACK_DELAY, "DLY") \
322 EM(RXRPC_ACK_IDLE, "IDL") \
323 E_(RXRPC_ACK__INVALID, "-?-")
325 #define rxrpc_completions \
326 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
327 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
328 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
329 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
330 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
332 #define rxrpc_tx_points \
333 EM(rxrpc_tx_point_call_abort, "CallAbort") \
334 EM(rxrpc_tx_point_call_ack, "CallAck") \
335 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
336 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
337 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
338 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
339 EM(rxrpc_tx_point_reject, "Reject") \
340 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
341 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
342 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
343 E_(rxrpc_tx_point_version_reply, "VerReply")
345 #define rxrpc_req_ack_traces \
346 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
347 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
348 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
349 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
350 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
351 EM(rxrpc_reqack_retrans, "RETRANS ") \
352 EM(rxrpc_reqack_slow_start, "SLOW-START") \
353 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
354 /* ---- Must update size of stat_why_req_ack[] if more are added! */
356 #define rxrpc_txbuf_traces \
357 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
358 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
359 EM(rxrpc_txbuf_free, "FREE ") \
360 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
361 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
362 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
363 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
364 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
365 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
366 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
367 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
368 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
369 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
370 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
371 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
374 * Generate enums for tracing information.
376 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
377 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
384 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
385 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
386 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
387 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
388 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
389 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
390 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
391 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
392 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
393 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
394 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
395 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
396 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
397 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
398 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
399 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
400 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
401 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
402 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
403 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
405 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
408 * Export enum symbols via userspace.
412 #define EM(a, b) TRACE_DEFINE_ENUM(a);
413 #define E_(a, b) TRACE_DEFINE_ENUM(a);
416 rxrpc_call_poke_traces;
419 rxrpc_congest_changes;
423 rxrpc_propose_ack_traces;
424 rxrpc_receive_traces;
425 rxrpc_recvmsg_traces;
426 rxrpc_req_ack_traces;
433 rxrpc_txqueue_traces;
436 * Now redefine the EM() and E_() macros to map the enums to the strings that
437 * will be printed in the output.
441 #define EM(a, b) { a, b },
442 #define E_(a, b) { a, b }
444 TRACE_EVENT(rxrpc_local,
445 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
448 TP_ARGS(local_debug_id, op, ref, usage),
451 __field(unsigned int, local )
458 __entry->local = local_debug_id;
461 __entry->usage = usage;
464 TP_printk("L=%08x %s r=%d u=%d",
466 __print_symbolic(__entry->op, rxrpc_local_traces),
471 TRACE_EVENT(rxrpc_peer,
472 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
474 TP_ARGS(peer_debug_id, ref, why),
477 __field(unsigned int, peer )
479 __field(enum rxrpc_peer_trace, why )
483 __entry->peer = peer_debug_id;
488 TP_printk("P=%08x %s r=%d",
490 __print_symbolic(__entry->why, rxrpc_peer_traces),
494 TRACE_EVENT(rxrpc_bundle,
495 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
497 TP_ARGS(bundle_debug_id, ref, why),
500 __field(unsigned int, bundle )
506 __entry->bundle = bundle_debug_id;
511 TP_printk("CB=%08x %s r=%d",
513 __print_symbolic(__entry->why, rxrpc_bundle_traces),
517 TRACE_EVENT(rxrpc_conn,
518 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
520 TP_ARGS(conn_debug_id, ref, why),
523 __field(unsigned int, conn )
529 __entry->conn = conn_debug_id;
534 TP_printk("C=%08x %s r=%d",
536 __print_symbolic(__entry->why, rxrpc_conn_traces),
540 TRACE_EVENT(rxrpc_client,
541 TP_PROTO(struct rxrpc_connection *conn, int channel,
542 enum rxrpc_client_trace op),
544 TP_ARGS(conn, channel, op),
547 __field(unsigned int, conn )
549 __field(int, channel )
551 __field(enum rxrpc_client_trace, op )
555 __entry->conn = conn ? conn->debug_id : 0;
556 __entry->channel = channel;
557 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
559 __entry->cid = conn ? conn->proto.cid : 0;
562 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
565 __print_symbolic(__entry->op, rxrpc_client_traces),
570 TRACE_EVENT(rxrpc_call,
571 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
572 enum rxrpc_call_trace why),
574 TP_ARGS(call_debug_id, ref, aux, why),
577 __field(unsigned int, call )
580 __field(unsigned long, aux )
584 __entry->call = call_debug_id;
590 TP_printk("c=%08x %s r=%d a=%lx",
592 __print_symbolic(__entry->why, rxrpc_call_traces),
597 TRACE_EVENT(rxrpc_skb,
598 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
599 enum rxrpc_skb_trace why),
601 TP_ARGS(skb, usage, mod_count, why),
604 __field(struct sk_buff *, skb )
606 __field(int, mod_count )
607 __field(enum rxrpc_skb_trace, why )
612 __entry->usage = usage;
613 __entry->mod_count = mod_count;
617 TP_printk("s=%p Rx %s u=%d m=%d",
619 __print_symbolic(__entry->why, rxrpc_skb_traces),
624 TRACE_EVENT(rxrpc_rx_packet,
625 TP_PROTO(struct rxrpc_skb_priv *sp),
630 __field_struct(struct rxrpc_host_header, hdr )
634 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
637 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
638 __entry->hdr.epoch, __entry->hdr.cid,
639 __entry->hdr.callNumber, __entry->hdr.serviceId,
640 __entry->hdr.serial, __entry->hdr.seq,
641 __entry->hdr.type, __entry->hdr.flags,
642 __entry->hdr.type <= 15 ?
643 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
646 TRACE_EVENT(rxrpc_rx_done,
647 TP_PROTO(int result, int abort_code),
649 TP_ARGS(result, abort_code),
652 __field(int, result )
653 __field(int, abort_code )
657 __entry->result = result;
658 __entry->abort_code = abort_code;
661 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
664 TRACE_EVENT(rxrpc_abort,
665 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
666 rxrpc_seq_t seq, int abort_code, int error),
668 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
671 __field(unsigned int, call_nr )
672 __array(char, why, 4 )
674 __field(u32, call_id )
675 __field(rxrpc_seq_t, seq )
676 __field(int, abort_code )
681 memcpy(__entry->why, why, 4);
682 __entry->call_nr = call_nr;
684 __entry->call_id = call_id;
685 __entry->abort_code = abort_code;
686 __entry->error = error;
690 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
692 __entry->cid, __entry->call_id, __entry->seq,
693 __entry->abort_code, __entry->error, __entry->why)
696 TRACE_EVENT(rxrpc_call_complete,
697 TP_PROTO(struct rxrpc_call *call),
702 __field(unsigned int, call )
703 __field(enum rxrpc_call_completion, compl )
705 __field(u32, abort_code )
709 __entry->call = call->debug_id;
710 __entry->compl = call->completion;
711 __entry->error = call->error;
712 __entry->abort_code = call->abort_code;
715 TP_printk("c=%08x %s r=%d ac=%d",
717 __print_symbolic(__entry->compl, rxrpc_completions),
722 TRACE_EVENT(rxrpc_txqueue,
723 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
728 __field(unsigned int, call )
729 __field(enum rxrpc_txqueue_trace, why )
730 __field(rxrpc_seq_t, acks_hard_ack )
731 __field(rxrpc_seq_t, tx_bottom )
732 __field(rxrpc_seq_t, tx_top )
733 __field(rxrpc_seq_t, tx_prepared )
734 __field(int, tx_winsize )
738 __entry->call = call->debug_id;
740 __entry->acks_hard_ack = call->acks_hard_ack;
741 __entry->tx_bottom = call->tx_bottom;
742 __entry->tx_top = call->tx_top;
743 __entry->tx_prepared = call->tx_prepared;
744 __entry->tx_winsize = call->tx_winsize;
747 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
749 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
751 __entry->acks_hard_ack,
752 __entry->tx_top - __entry->tx_bottom,
753 __entry->tx_top - __entry->acks_hard_ack,
754 __entry->tx_prepared - __entry->tx_bottom,
758 TRACE_EVENT(rxrpc_rx_data,
759 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
760 rxrpc_serial_t serial, u8 flags),
762 TP_ARGS(call, seq, serial, flags),
765 __field(unsigned int, call )
766 __field(rxrpc_seq_t, seq )
767 __field(rxrpc_serial_t, serial )
772 __entry->call = call;
774 __entry->serial = serial;
775 __entry->flags = flags;
778 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
785 TRACE_EVENT(rxrpc_rx_ack,
786 TP_PROTO(struct rxrpc_call *call,
787 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
788 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
790 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
793 __field(unsigned int, call )
794 __field(rxrpc_serial_t, serial )
795 __field(rxrpc_serial_t, ack_serial )
796 __field(rxrpc_seq_t, first )
797 __field(rxrpc_seq_t, prev )
803 __entry->call = call->debug_id;
804 __entry->serial = serial;
805 __entry->ack_serial = ack_serial;
806 __entry->first = first;
807 __entry->prev = prev;
808 __entry->reason = reason;
809 __entry->n_acks = n_acks;
812 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
815 __print_symbolic(__entry->reason, rxrpc_ack_names),
822 TRACE_EVENT(rxrpc_rx_abort,
823 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
826 TP_ARGS(call, serial, abort_code),
829 __field(unsigned int, call )
830 __field(rxrpc_serial_t, serial )
831 __field(u32, abort_code )
835 __entry->call = call->debug_id;
836 __entry->serial = serial;
837 __entry->abort_code = abort_code;
840 TP_printk("c=%08x ABORT %08x ac=%d",
846 TRACE_EVENT(rxrpc_rx_challenge,
847 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
848 u32 version, u32 nonce, u32 min_level),
850 TP_ARGS(conn, serial, version, nonce, min_level),
853 __field(unsigned int, conn )
854 __field(rxrpc_serial_t, serial )
855 __field(u32, version )
857 __field(u32, min_level )
861 __entry->conn = conn->debug_id;
862 __entry->serial = serial;
863 __entry->version = version;
864 __entry->nonce = nonce;
865 __entry->min_level = min_level;
868 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
876 TRACE_EVENT(rxrpc_rx_response,
877 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
878 u32 version, u32 kvno, u32 ticket_len),
880 TP_ARGS(conn, serial, version, kvno, ticket_len),
883 __field(unsigned int, conn )
884 __field(rxrpc_serial_t, serial )
885 __field(u32, version )
887 __field(u32, ticket_len )
891 __entry->conn = conn->debug_id;
892 __entry->serial = serial;
893 __entry->version = version;
894 __entry->kvno = kvno;
895 __entry->ticket_len = ticket_len;
898 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
906 TRACE_EVENT(rxrpc_rx_rwind_change,
907 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
908 u32 rwind, bool wake),
910 TP_ARGS(call, serial, rwind, wake),
913 __field(unsigned int, call )
914 __field(rxrpc_serial_t, serial )
920 __entry->call = call->debug_id;
921 __entry->serial = serial;
922 __entry->rwind = rwind;
923 __entry->wake = wake;
926 TP_printk("c=%08x %08x rw=%u%s",
930 __entry->wake ? " wake" : "")
933 TRACE_EVENT(rxrpc_tx_packet,
934 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
935 enum rxrpc_tx_point where),
937 TP_ARGS(call_id, whdr, where),
940 __field(unsigned int, call )
941 __field(enum rxrpc_tx_point, where )
942 __field_struct(struct rxrpc_wire_header, whdr )
946 __entry->call = call_id;
947 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
948 __entry->where = where;
951 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
953 ntohl(__entry->whdr.epoch),
954 ntohl(__entry->whdr.cid),
955 ntohl(__entry->whdr.callNumber),
956 ntohs(__entry->whdr.serviceId),
957 ntohl(__entry->whdr.serial),
958 ntohl(__entry->whdr.seq),
959 __entry->whdr.type, __entry->whdr.flags,
960 __entry->whdr.type <= 15 ?
961 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
962 __print_symbolic(__entry->where, rxrpc_tx_points))
965 TRACE_EVENT(rxrpc_tx_data,
966 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
967 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
969 TP_ARGS(call, seq, serial, flags, retrans, lose),
972 __field(unsigned int, call )
973 __field(rxrpc_seq_t, seq )
974 __field(rxrpc_serial_t, serial )
976 __field(u32, call_id )
978 __field(bool, retrans )
983 __entry->call = call->debug_id;
984 __entry->cid = call->cid;
985 __entry->call_id = call->call_id;
987 __entry->serial = serial;
988 __entry->flags = flags;
989 __entry->retrans = retrans;
990 __entry->lose = lose;
993 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1000 __entry->retrans ? " *RETRANS*" : "",
1001 __entry->lose ? " *LOSE*" : "")
1004 TRACE_EVENT(rxrpc_tx_ack,
1005 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1006 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1007 u8 reason, u8 n_acks),
1009 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1012 __field(unsigned int, call )
1013 __field(rxrpc_serial_t, serial )
1014 __field(rxrpc_seq_t, ack_first )
1015 __field(rxrpc_serial_t, ack_serial )
1016 __field(u8, reason )
1017 __field(u8, n_acks )
1021 __entry->call = call;
1022 __entry->serial = serial;
1023 __entry->ack_first = ack_first;
1024 __entry->ack_serial = ack_serial;
1025 __entry->reason = reason;
1026 __entry->n_acks = n_acks;
1029 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1032 __print_symbolic(__entry->reason, rxrpc_ack_names),
1034 __entry->ack_serial,
1038 TRACE_EVENT(rxrpc_receive,
1039 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1040 rxrpc_serial_t serial, rxrpc_seq_t seq),
1042 TP_ARGS(call, why, serial, seq),
1045 __field(unsigned int, call )
1046 __field(enum rxrpc_receive_trace, why )
1047 __field(rxrpc_serial_t, serial )
1048 __field(rxrpc_seq_t, seq )
1049 __field(u64, window )
1053 __entry->call = call->debug_id;
1055 __entry->serial = serial;
1057 __entry->window = atomic64_read(&call->ackr_window);
1060 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1062 __print_symbolic(__entry->why, rxrpc_receive_traces),
1065 lower_32_bits(__entry->window),
1066 upper_32_bits(__entry->window))
1069 TRACE_EVENT(rxrpc_recvmsg,
1070 TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why,
1073 TP_ARGS(call_debug_id, why, ret),
1076 __field(unsigned int, call )
1077 __field(enum rxrpc_recvmsg_trace, why )
1082 __entry->call = call_debug_id;
1087 TP_printk("c=%08x %s ret=%d",
1089 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1093 TRACE_EVENT(rxrpc_recvdata,
1094 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1095 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1098 TP_ARGS(call, why, seq, offset, len, ret),
1101 __field(unsigned int, call )
1102 __field(enum rxrpc_recvmsg_trace, why )
1103 __field(rxrpc_seq_t, seq )
1104 __field(unsigned int, offset )
1105 __field(unsigned int, len )
1110 __entry->call = call ? call->debug_id : 0;
1113 __entry->offset = offset;
1118 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1120 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1127 TRACE_EVENT(rxrpc_rtt_tx,
1128 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1129 int slot, rxrpc_serial_t send_serial),
1131 TP_ARGS(call, why, slot, send_serial),
1134 __field(unsigned int, call )
1135 __field(enum rxrpc_rtt_tx_trace, why )
1137 __field(rxrpc_serial_t, send_serial )
1141 __entry->call = call->debug_id;
1143 __entry->slot = slot;
1144 __entry->send_serial = send_serial;
1147 TP_printk("c=%08x [%d] %s sr=%08x",
1150 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1151 __entry->send_serial)
1154 TRACE_EVENT(rxrpc_rtt_rx,
1155 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1157 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1160 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1163 __field(unsigned int, call )
1164 __field(enum rxrpc_rtt_rx_trace, why )
1166 __field(rxrpc_serial_t, send_serial )
1167 __field(rxrpc_serial_t, resp_serial )
1173 __entry->call = call->debug_id;
1175 __entry->slot = slot;
1176 __entry->send_serial = send_serial;
1177 __entry->resp_serial = resp_serial;
1182 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1185 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1186 __entry->send_serial,
1187 __entry->resp_serial,
1192 TRACE_EVENT(rxrpc_timer,
1193 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1196 TP_ARGS(call, why, now),
1199 __field(unsigned int, call )
1200 __field(enum rxrpc_timer_trace, why )
1202 __field(long, ack_at )
1203 __field(long, ack_lost_at )
1204 __field(long, resend_at )
1205 __field(long, ping_at )
1206 __field(long, expect_rx_by )
1207 __field(long, expect_req_by )
1208 __field(long, expect_term_by )
1209 __field(long, timer )
1213 __entry->call = call->debug_id;
1216 __entry->ack_at = call->delay_ack_at;
1217 __entry->ack_lost_at = call->ack_lost_at;
1218 __entry->resend_at = call->resend_at;
1219 __entry->expect_rx_by = call->expect_rx_by;
1220 __entry->expect_req_by = call->expect_req_by;
1221 __entry->expect_term_by = call->expect_term_by;
1222 __entry->timer = call->timer.expires;
1225 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1227 __print_symbolic(__entry->why, rxrpc_timer_traces),
1228 __entry->ack_at - __entry->now,
1229 __entry->ack_lost_at - __entry->now,
1230 __entry->resend_at - __entry->now,
1231 __entry->expect_rx_by - __entry->now,
1232 __entry->expect_req_by - __entry->now,
1233 __entry->expect_term_by - __entry->now,
1234 __entry->timer - __entry->now)
1237 TRACE_EVENT(rxrpc_timer_expired,
1238 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1243 __field(unsigned int, call )
1245 __field(long, ack_at )
1246 __field(long, ack_lost_at )
1247 __field(long, resend_at )
1248 __field(long, ping_at )
1249 __field(long, expect_rx_by )
1250 __field(long, expect_req_by )
1251 __field(long, expect_term_by )
1252 __field(long, timer )
1256 __entry->call = call->debug_id;
1258 __entry->ack_at = call->delay_ack_at;
1259 __entry->ack_lost_at = call->ack_lost_at;
1260 __entry->resend_at = call->resend_at;
1261 __entry->expect_rx_by = call->expect_rx_by;
1262 __entry->expect_req_by = call->expect_req_by;
1263 __entry->expect_term_by = call->expect_term_by;
1264 __entry->timer = call->timer.expires;
1267 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1269 __entry->ack_at - __entry->now,
1270 __entry->ack_lost_at - __entry->now,
1271 __entry->resend_at - __entry->now,
1272 __entry->expect_rx_by - __entry->now,
1273 __entry->expect_req_by - __entry->now,
1274 __entry->expect_term_by - __entry->now,
1275 __entry->timer - __entry->now)
1278 TRACE_EVENT(rxrpc_rx_lose,
1279 TP_PROTO(struct rxrpc_skb_priv *sp),
1284 __field_struct(struct rxrpc_host_header, hdr )
1288 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1291 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1292 __entry->hdr.epoch, __entry->hdr.cid,
1293 __entry->hdr.callNumber, __entry->hdr.serviceId,
1294 __entry->hdr.serial, __entry->hdr.seq,
1295 __entry->hdr.type, __entry->hdr.flags,
1296 __entry->hdr.type <= 15 ?
1297 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1300 TRACE_EVENT(rxrpc_propose_ack,
1301 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1302 u8 ack_reason, rxrpc_serial_t serial),
1304 TP_ARGS(call, why, ack_reason, serial),
1307 __field(unsigned int, call )
1308 __field(enum rxrpc_propose_ack_trace, why )
1309 __field(rxrpc_serial_t, serial )
1310 __field(u8, ack_reason )
1314 __entry->call = call->debug_id;
1316 __entry->serial = serial;
1317 __entry->ack_reason = ack_reason;
1320 TP_printk("c=%08x %s %s r=%08x",
1322 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1323 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1327 TRACE_EVENT(rxrpc_send_ack,
1328 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1329 u8 ack_reason, rxrpc_serial_t serial),
1331 TP_ARGS(call, why, ack_reason, serial),
1334 __field(unsigned int, call )
1335 __field(enum rxrpc_propose_ack_trace, why )
1336 __field(rxrpc_serial_t, serial )
1337 __field(u8, ack_reason )
1341 __entry->call = call->debug_id;
1343 __entry->serial = serial;
1344 __entry->ack_reason = ack_reason;
1347 TP_printk("c=%08x %s %s r=%08x",
1349 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1350 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1354 TRACE_EVENT(rxrpc_drop_ack,
1355 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1356 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1358 TP_ARGS(call, why, ack_reason, serial, nobuf),
1361 __field(unsigned int, call )
1362 __field(enum rxrpc_propose_ack_trace, why )
1363 __field(rxrpc_serial_t, serial )
1364 __field(u8, ack_reason )
1365 __field(bool, nobuf )
1369 __entry->call = call->debug_id;
1371 __entry->serial = serial;
1372 __entry->ack_reason = ack_reason;
1373 __entry->nobuf = nobuf;
1376 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1378 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1379 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1380 __entry->serial, __entry->nobuf)
1383 TRACE_EVENT(rxrpc_retransmit,
1384 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1386 TP_ARGS(call, seq, expiry),
1389 __field(unsigned int, call )
1390 __field(rxrpc_seq_t, seq )
1391 __field(s64, expiry )
1395 __entry->call = call->debug_id;
1397 __entry->expiry = expiry;
1400 TP_printk("c=%08x q=%x xp=%lld",
1406 TRACE_EVENT(rxrpc_congest,
1407 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1408 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1410 TP_ARGS(call, summary, ack_serial, change),
1413 __field(unsigned int, call )
1414 __field(enum rxrpc_congest_change, change )
1415 __field(rxrpc_seq_t, hard_ack )
1416 __field(rxrpc_seq_t, top )
1417 __field(rxrpc_seq_t, lowest_nak )
1418 __field(rxrpc_serial_t, ack_serial )
1419 __field_struct(struct rxrpc_ack_summary, sum )
1423 __entry->call = call->debug_id;
1424 __entry->change = change;
1425 __entry->hard_ack = call->acks_hard_ack;
1426 __entry->top = call->tx_top;
1427 __entry->lowest_nak = call->acks_lowest_nak;
1428 __entry->ack_serial = ack_serial;
1429 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1432 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",
1434 __entry->ack_serial,
1435 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1437 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1439 __entry->sum.ssthresh,
1440 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1441 __entry->sum.nr_new_acks,
1442 __entry->sum.nr_rot_new_acks,
1443 __entry->top - __entry->hard_ack,
1444 __entry->sum.cumulative_acks,
1445 __entry->sum.dup_acks,
1446 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1447 __print_symbolic(__entry->change, rxrpc_congest_changes),
1448 __entry->sum.retrans_timeo ? " rTxTo" : "")
1451 TRACE_EVENT(rxrpc_reset_cwnd,
1452 TP_PROTO(struct rxrpc_call *call, ktime_t now),
1457 __field(unsigned int, call )
1458 __field(enum rxrpc_congest_mode, mode )
1459 __field(unsigned short, cwnd )
1460 __field(unsigned short, extra )
1461 __field(rxrpc_seq_t, hard_ack )
1462 __field(rxrpc_seq_t, prepared )
1463 __field(ktime_t, since_last_tx )
1464 __field(bool, has_data )
1468 __entry->call = call->debug_id;
1469 __entry->mode = call->cong_mode;
1470 __entry->cwnd = call->cong_cwnd;
1471 __entry->extra = call->cong_extra;
1472 __entry->hard_ack = call->acks_hard_ack;
1473 __entry->prepared = call->tx_prepared - call->tx_bottom;
1474 __entry->since_last_tx = ktime_sub(now, call->tx_last_sent);
1475 __entry->has_data = !list_empty(&call->tx_sendmsg);
1478 TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u",
1481 __print_symbolic(__entry->mode, rxrpc_congest_modes),
1485 ktime_to_ns(__entry->since_last_tx),
1489 TRACE_EVENT(rxrpc_disconnect_call,
1490 TP_PROTO(struct rxrpc_call *call),
1495 __field(unsigned int, call )
1496 __field(u32, abort_code )
1500 __entry->call = call->debug_id;
1501 __entry->abort_code = call->abort_code;
1504 TP_printk("c=%08x ab=%08x",
1506 __entry->abort_code)
1509 TRACE_EVENT(rxrpc_improper_term,
1510 TP_PROTO(struct rxrpc_call *call),
1515 __field(unsigned int, call )
1516 __field(u32, abort_code )
1520 __entry->call = call->debug_id;
1521 __entry->abort_code = call->abort_code;
1524 TP_printk("c=%08x ab=%08x",
1526 __entry->abort_code)
1529 TRACE_EVENT(rxrpc_rx_eproto,
1530 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1533 TP_ARGS(call, serial, why),
1536 __field(unsigned int, call )
1537 __field(rxrpc_serial_t, serial )
1538 __field(const char *, why )
1542 __entry->call = call ? call->debug_id : 0;
1543 __entry->serial = serial;
1547 TP_printk("c=%08x EPROTO %08x %s",
1553 TRACE_EVENT(rxrpc_connect_call,
1554 TP_PROTO(struct rxrpc_call *call),
1559 __field(unsigned int, call )
1560 __field(unsigned long, user_call_ID )
1562 __field(u32, call_id )
1563 __field_struct(struct sockaddr_rxrpc, srx )
1567 __entry->call = call->debug_id;
1568 __entry->user_call_ID = call->user_call_ID;
1569 __entry->cid = call->cid;
1570 __entry->call_id = call->call_id;
1571 __entry->srx = call->dest_srx;
1574 TP_printk("c=%08x u=%p %08x:%08x dst=%pISp",
1576 (void *)__entry->user_call_ID,
1579 &__entry->srx.transport)
1582 TRACE_EVENT(rxrpc_resend,
1583 TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack),
1588 __field(unsigned int, call )
1589 __field(rxrpc_seq_t, seq )
1590 __field(rxrpc_seq_t, transmitted )
1591 __field(rxrpc_serial_t, ack_serial )
1595 struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL;
1596 __entry->call = call->debug_id;
1597 __entry->seq = call->acks_hard_ack;
1598 __entry->transmitted = call->tx_transmitted;
1599 __entry->ack_serial = sp ? sp->hdr.serial : 0;
1602 TP_printk("c=%08x r=%x q=%x tq=%x",
1604 __entry->ack_serial,
1606 __entry->transmitted)
1609 TRACE_EVENT(rxrpc_rx_icmp,
1610 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1611 struct sockaddr_rxrpc *srx),
1613 TP_ARGS(peer, ee, srx),
1616 __field(unsigned int, peer )
1617 __field_struct(struct sock_extended_err, ee )
1618 __field_struct(struct sockaddr_rxrpc, srx )
1622 __entry->peer = peer->debug_id;
1623 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1624 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1627 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1629 __entry->ee.ee_origin,
1630 __entry->ee.ee_type,
1631 __entry->ee.ee_code,
1632 __entry->ee.ee_info,
1633 __entry->ee.ee_data,
1634 __entry->ee.ee_errno,
1635 &__entry->srx.transport)
1638 TRACE_EVENT(rxrpc_tx_fail,
1639 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1640 enum rxrpc_tx_point where),
1642 TP_ARGS(debug_id, serial, ret, where),
1645 __field(unsigned int, debug_id )
1646 __field(rxrpc_serial_t, serial )
1648 __field(enum rxrpc_tx_point, where )
1652 __entry->debug_id = debug_id;
1653 __entry->serial = serial;
1655 __entry->where = where;
1658 TP_printk("c=%08x r=%x ret=%d %s",
1662 __print_symbolic(__entry->where, rxrpc_tx_points))
1665 TRACE_EVENT(rxrpc_call_reset,
1666 TP_PROTO(struct rxrpc_call *call),
1671 __field(unsigned int, debug_id )
1673 __field(u32, call_id )
1674 __field(rxrpc_serial_t, call_serial )
1675 __field(rxrpc_serial_t, conn_serial )
1676 __field(rxrpc_seq_t, tx_seq )
1677 __field(rxrpc_seq_t, rx_seq )
1681 __entry->debug_id = call->debug_id;
1682 __entry->cid = call->cid;
1683 __entry->call_id = call->call_id;
1684 __entry->call_serial = call->rx_serial;
1685 __entry->conn_serial = call->conn->hi_serial;
1686 __entry->tx_seq = call->acks_hard_ack;
1687 __entry->rx_seq = call->rx_highest_seq;
1690 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1692 __entry->cid, __entry->call_id,
1693 __entry->call_serial, __entry->conn_serial,
1694 __entry->tx_seq, __entry->rx_seq)
1697 TRACE_EVENT(rxrpc_notify_socket,
1698 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1700 TP_ARGS(debug_id, serial),
1703 __field(unsigned int, debug_id )
1704 __field(rxrpc_serial_t, serial )
1708 __entry->debug_id = debug_id;
1709 __entry->serial = serial;
1712 TP_printk("c=%08x r=%08x",
1717 TRACE_EVENT(rxrpc_rx_discard_ack,
1718 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1719 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1720 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1722 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1723 prev_pkt, call_ackr_prev),
1726 __field(unsigned int, debug_id )
1727 __field(rxrpc_serial_t, serial )
1728 __field(rxrpc_seq_t, first_soft_ack)
1729 __field(rxrpc_seq_t, call_ackr_first)
1730 __field(rxrpc_seq_t, prev_pkt)
1731 __field(rxrpc_seq_t, call_ackr_prev)
1735 __entry->debug_id = debug_id;
1736 __entry->serial = serial;
1737 __entry->first_soft_ack = first_soft_ack;
1738 __entry->call_ackr_first = call_ackr_first;
1739 __entry->prev_pkt = prev_pkt;
1740 __entry->call_ackr_prev = call_ackr_prev;
1743 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1746 __entry->first_soft_ack,
1747 __entry->call_ackr_first,
1749 __entry->call_ackr_prev)
1752 TRACE_EVENT(rxrpc_req_ack,
1753 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1754 enum rxrpc_req_ack_trace why),
1756 TP_ARGS(call_debug_id, seq, why),
1759 __field(unsigned int, call_debug_id )
1760 __field(rxrpc_seq_t, seq )
1761 __field(enum rxrpc_req_ack_trace, why )
1765 __entry->call_debug_id = call_debug_id;
1770 TP_printk("c=%08x q=%08x REQ-%s",
1771 __entry->call_debug_id,
1773 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1776 TRACE_EVENT(rxrpc_txbuf,
1777 TP_PROTO(unsigned int debug_id,
1778 unsigned int call_debug_id, rxrpc_seq_t seq,
1779 int ref, enum rxrpc_txbuf_trace what),
1781 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1784 __field(unsigned int, debug_id )
1785 __field(unsigned int, call_debug_id )
1786 __field(rxrpc_seq_t, seq )
1788 __field(enum rxrpc_txbuf_trace, what )
1792 __entry->debug_id = debug_id;
1793 __entry->call_debug_id = call_debug_id;
1796 __entry->what = what;
1799 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1801 __entry->call_debug_id,
1803 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1807 TRACE_EVENT(rxrpc_poke_call,
1808 TP_PROTO(struct rxrpc_call *call, bool busy,
1809 enum rxrpc_call_poke_trace what),
1811 TP_ARGS(call, busy, what),
1814 __field(unsigned int, call_debug_id )
1815 __field(bool, busy )
1816 __field(enum rxrpc_call_poke_trace, what )
1820 __entry->call_debug_id = call->debug_id;
1821 __entry->busy = busy;
1822 __entry->what = what;
1825 TP_printk("c=%08x %s%s",
1826 __entry->call_debug_id,
1827 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1828 __entry->busy ? "!" : "")
1831 TRACE_EVENT(rxrpc_call_poked,
1832 TP_PROTO(struct rxrpc_call *call),
1837 __field(unsigned int, call_debug_id )
1841 __entry->call_debug_id = call->debug_id;
1845 __entry->call_debug_id)
1850 #endif /* _TRACE_RXRPC_H */
1852 /* This part must be outside protection */
1853 #include <trace/define_trace.h>