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_timer, "GET timer ") \
159 EM(rxrpc_call_get_userid, "GET user-id ") \
160 EM(rxrpc_call_new_client, "NEW client ") \
161 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
162 EM(rxrpc_call_put_already_queued, "PUT alreadyq") \
163 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
164 EM(rxrpc_call_put_input, "PUT input ") \
165 EM(rxrpc_call_put_kernel, "PUT kernel ") \
166 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
167 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
168 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
169 EM(rxrpc_call_put_send_ack, "PUT send-ack") \
170 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
171 EM(rxrpc_call_put_timer, "PUT timer ") \
172 EM(rxrpc_call_put_timer_already, "PUT timer-al") \
173 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
174 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
175 EM(rxrpc_call_put_work, "PUT work ") \
176 EM(rxrpc_call_queue_abort, "QUE abort ") \
177 EM(rxrpc_call_queue_requeue, "QUE requeue ") \
178 EM(rxrpc_call_queue_resend, "QUE resend ") \
179 EM(rxrpc_call_queue_timer, "QUE timer ") \
180 EM(rxrpc_call_see_accept, "SEE accept ") \
181 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
182 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
183 EM(rxrpc_call_see_connected, "SEE connect ") \
184 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
185 EM(rxrpc_call_see_input, "SEE input ") \
186 EM(rxrpc_call_see_release, "SEE release ") \
187 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
188 E_(rxrpc_call_see_zap, "SEE zap ")
190 #define rxrpc_txqueue_traces \
191 EM(rxrpc_txqueue_await_reply, "AWR") \
192 EM(rxrpc_txqueue_dequeue, "DEQ") \
193 EM(rxrpc_txqueue_end, "END") \
194 EM(rxrpc_txqueue_queue, "QUE") \
195 EM(rxrpc_txqueue_queue_last, "QLS") \
196 EM(rxrpc_txqueue_rotate, "ROT") \
197 EM(rxrpc_txqueue_rotate_last, "RLS") \
198 E_(rxrpc_txqueue_wait, "WAI")
200 #define rxrpc_receive_traces \
201 EM(rxrpc_receive_end, "END") \
202 EM(rxrpc_receive_front, "FRN") \
203 EM(rxrpc_receive_incoming, "INC") \
204 EM(rxrpc_receive_queue, "QUE") \
205 EM(rxrpc_receive_queue_last, "QLS") \
206 EM(rxrpc_receive_queue_oos, "QUO") \
207 EM(rxrpc_receive_queue_oos_last, "QOL") \
208 EM(rxrpc_receive_oos, "OOS") \
209 EM(rxrpc_receive_oos_last, "OSL") \
210 EM(rxrpc_receive_rotate, "ROT") \
211 E_(rxrpc_receive_rotate_last, "RLS")
213 #define rxrpc_recvmsg_traces \
214 EM(rxrpc_recvmsg_cont, "CONT") \
215 EM(rxrpc_recvmsg_data_return, "DATA") \
216 EM(rxrpc_recvmsg_dequeue, "DEQU") \
217 EM(rxrpc_recvmsg_enter, "ENTR") \
218 EM(rxrpc_recvmsg_full, "FULL") \
219 EM(rxrpc_recvmsg_hole, "HOLE") \
220 EM(rxrpc_recvmsg_next, "NEXT") \
221 EM(rxrpc_recvmsg_requeue, "REQU") \
222 EM(rxrpc_recvmsg_return, "RETN") \
223 EM(rxrpc_recvmsg_terminal, "TERM") \
224 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
225 E_(rxrpc_recvmsg_wait, "WAIT")
227 #define rxrpc_rtt_tx_traces \
228 EM(rxrpc_rtt_tx_cancel, "CNCE") \
229 EM(rxrpc_rtt_tx_data, "DATA") \
230 EM(rxrpc_rtt_tx_no_slot, "FULL") \
231 E_(rxrpc_rtt_tx_ping, "PING")
233 #define rxrpc_rtt_rx_traces \
234 EM(rxrpc_rtt_rx_cancel, "CNCL") \
235 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
236 EM(rxrpc_rtt_rx_lost, "LOST") \
237 EM(rxrpc_rtt_rx_ping_response, "PONG") \
238 E_(rxrpc_rtt_rx_requested_ack, "RACK")
240 #define rxrpc_timer_traces \
241 EM(rxrpc_timer_begin, "Begin ") \
242 EM(rxrpc_timer_exp_ack, "ExpAck") \
243 EM(rxrpc_timer_exp_hard, "ExpHrd") \
244 EM(rxrpc_timer_exp_idle, "ExpIdl") \
245 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
246 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
247 EM(rxrpc_timer_exp_normal, "ExpNml") \
248 EM(rxrpc_timer_exp_ping, "ExpPng") \
249 EM(rxrpc_timer_exp_resend, "ExpRsn") \
250 EM(rxrpc_timer_init_for_reply, "IniRpl") \
251 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
252 EM(rxrpc_timer_restart, "Restrt") \
253 EM(rxrpc_timer_set_for_ack, "SetAck") \
254 EM(rxrpc_timer_set_for_hard, "SetHrd") \
255 EM(rxrpc_timer_set_for_idle, "SetIdl") \
256 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
257 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
258 EM(rxrpc_timer_set_for_normal, "SetNml") \
259 EM(rxrpc_timer_set_for_ping, "SetPng") \
260 EM(rxrpc_timer_set_for_resend, "SetRTx") \
261 E_(rxrpc_timer_set_for_send, "SetSnd")
263 #define rxrpc_propose_ack_traces \
264 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
265 EM(rxrpc_propose_ack_input_data, "DataIn ") \
266 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
267 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
268 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
269 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
270 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
271 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
272 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
273 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
274 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
275 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
276 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
277 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
279 #define rxrpc_congest_modes \
280 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
281 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
282 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
283 E_(RXRPC_CALL_SLOW_START, "SlowStart")
285 #define rxrpc_congest_changes \
286 EM(rxrpc_cong_begin_retransmission, " Retrans") \
287 EM(rxrpc_cong_cleared_nacks, " Cleared") \
288 EM(rxrpc_cong_new_low_nack, " NewLowN") \
289 EM(rxrpc_cong_no_change, " -") \
290 EM(rxrpc_cong_progress, " Progres") \
291 EM(rxrpc_cong_idle_reset, " IdleRes") \
292 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
293 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
294 E_(rxrpc_cong_saw_nack, " SawNack")
298 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
299 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
300 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
301 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
302 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
303 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
304 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
305 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
310 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
314 #define rxrpc_ack_names \
316 EM(RXRPC_ACK_REQUESTED, "REQ") \
317 EM(RXRPC_ACK_DUPLICATE, "DUP") \
318 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
319 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
320 EM(RXRPC_ACK_NOSPACE, "MEM") \
321 EM(RXRPC_ACK_PING, "PNG") \
322 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
323 EM(RXRPC_ACK_DELAY, "DLY") \
324 EM(RXRPC_ACK_IDLE, "IDL") \
325 E_(RXRPC_ACK__INVALID, "-?-")
327 #define rxrpc_completions \
328 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
329 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
330 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
331 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
332 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
334 #define rxrpc_tx_points \
335 EM(rxrpc_tx_point_call_abort, "CallAbort") \
336 EM(rxrpc_tx_point_call_ack, "CallAck") \
337 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
338 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
339 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
340 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
341 EM(rxrpc_tx_point_reject, "Reject") \
342 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
343 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
344 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
345 E_(rxrpc_tx_point_version_reply, "VerReply")
347 #define rxrpc_req_ack_traces \
348 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
349 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
350 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
351 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
352 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
353 EM(rxrpc_reqack_retrans, "RETRANS ") \
354 EM(rxrpc_reqack_slow_start, "SLOW-START") \
355 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
356 /* ---- Must update size of stat_why_req_ack[] if more are added! */
358 #define rxrpc_txbuf_traces \
359 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
360 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
361 EM(rxrpc_txbuf_free, "FREE ") \
362 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
363 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
364 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
365 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
366 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
367 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
368 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
369 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
370 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
371 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
372 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
375 * Generate enums for tracing information.
377 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
378 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
385 enum rxrpc_bundle_trace { rxrpc_bundle_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);
418 rxrpc_congest_changes;
422 rxrpc_propose_ack_traces;
423 rxrpc_receive_traces;
424 rxrpc_recvmsg_traces;
425 rxrpc_req_ack_traces;
432 rxrpc_txqueue_traces;
435 * Now redefine the EM() and E_() macros to map the enums to the strings that
436 * will be printed in the output.
440 #define EM(a, b) { a, b },
441 #define E_(a, b) { a, b }
443 TRACE_EVENT(rxrpc_local,
444 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
447 TP_ARGS(local_debug_id, op, ref, usage),
450 __field(unsigned int, local )
457 __entry->local = local_debug_id;
460 __entry->usage = usage;
463 TP_printk("L=%08x %s r=%d u=%d",
465 __print_symbolic(__entry->op, rxrpc_local_traces),
470 TRACE_EVENT(rxrpc_peer,
471 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
473 TP_ARGS(peer_debug_id, ref, why),
476 __field(unsigned int, peer )
482 __entry->peer = peer_debug_id;
487 TP_printk("P=%08x %s r=%d",
489 __print_symbolic(__entry->why, rxrpc_peer_traces),
493 TRACE_EVENT(rxrpc_bundle,
494 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
496 TP_ARGS(bundle_debug_id, ref, why),
499 __field(unsigned int, bundle )
505 __entry->bundle = bundle_debug_id;
510 TP_printk("CB=%08x %s r=%d",
512 __print_symbolic(__entry->why, rxrpc_bundle_traces),
516 TRACE_EVENT(rxrpc_conn,
517 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
519 TP_ARGS(conn_debug_id, ref, why),
522 __field(unsigned int, conn )
528 __entry->conn = conn_debug_id;
533 TP_printk("C=%08x %s r=%d",
535 __print_symbolic(__entry->why, rxrpc_conn_traces),
539 TRACE_EVENT(rxrpc_client,
540 TP_PROTO(struct rxrpc_connection *conn, int channel,
541 enum rxrpc_client_trace op),
543 TP_ARGS(conn, channel, op),
546 __field(unsigned int, conn )
548 __field(int, channel )
550 __field(enum rxrpc_client_trace, op )
554 __entry->conn = conn ? conn->debug_id : 0;
555 __entry->channel = channel;
556 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
558 __entry->cid = conn ? conn->proto.cid : 0;
561 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
564 __print_symbolic(__entry->op, rxrpc_client_traces),
569 TRACE_EVENT(rxrpc_call,
570 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
571 enum rxrpc_call_trace why),
573 TP_ARGS(call_debug_id, ref, aux, why),
576 __field(unsigned int, call )
579 __field(unsigned long, aux )
583 __entry->call = call_debug_id;
589 TP_printk("c=%08x %s r=%d a=%lx",
591 __print_symbolic(__entry->why, rxrpc_call_traces),
596 TRACE_EVENT(rxrpc_skb,
597 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
598 enum rxrpc_skb_trace why),
600 TP_ARGS(skb, usage, mod_count, why),
603 __field(struct sk_buff *, skb )
605 __field(int, mod_count )
606 __field(enum rxrpc_skb_trace, why )
611 __entry->usage = usage;
612 __entry->mod_count = mod_count;
616 TP_printk("s=%p Rx %s u=%d m=%d",
618 __print_symbolic(__entry->why, rxrpc_skb_traces),
623 TRACE_EVENT(rxrpc_rx_packet,
624 TP_PROTO(struct rxrpc_skb_priv *sp),
629 __field_struct(struct rxrpc_host_header, hdr )
633 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
636 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
637 __entry->hdr.epoch, __entry->hdr.cid,
638 __entry->hdr.callNumber, __entry->hdr.serviceId,
639 __entry->hdr.serial, __entry->hdr.seq,
640 __entry->hdr.type, __entry->hdr.flags,
641 __entry->hdr.type <= 15 ?
642 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
645 TRACE_EVENT(rxrpc_rx_done,
646 TP_PROTO(int result, int abort_code),
648 TP_ARGS(result, abort_code),
651 __field(int, result )
652 __field(int, abort_code )
656 __entry->result = result;
657 __entry->abort_code = abort_code;
660 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
663 TRACE_EVENT(rxrpc_abort,
664 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
665 rxrpc_seq_t seq, int abort_code, int error),
667 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
670 __field(unsigned int, call_nr )
671 __array(char, why, 4 )
673 __field(u32, call_id )
674 __field(rxrpc_seq_t, seq )
675 __field(int, abort_code )
680 memcpy(__entry->why, why, 4);
681 __entry->call_nr = call_nr;
683 __entry->call_id = call_id;
684 __entry->abort_code = abort_code;
685 __entry->error = error;
689 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
691 __entry->cid, __entry->call_id, __entry->seq,
692 __entry->abort_code, __entry->error, __entry->why)
695 TRACE_EVENT(rxrpc_call_complete,
696 TP_PROTO(struct rxrpc_call *call),
701 __field(unsigned int, call )
702 __field(enum rxrpc_call_completion, compl )
704 __field(u32, abort_code )
708 __entry->call = call->debug_id;
709 __entry->compl = call->completion;
710 __entry->error = call->error;
711 __entry->abort_code = call->abort_code;
714 TP_printk("c=%08x %s r=%d ac=%d",
716 __print_symbolic(__entry->compl, rxrpc_completions),
721 TRACE_EVENT(rxrpc_txqueue,
722 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
727 __field(unsigned int, call )
728 __field(enum rxrpc_txqueue_trace, why )
729 __field(rxrpc_seq_t, acks_hard_ack )
730 __field(rxrpc_seq_t, tx_bottom )
731 __field(rxrpc_seq_t, tx_top )
732 __field(int, tx_winsize )
736 __entry->call = call->debug_id;
738 __entry->acks_hard_ack = call->acks_hard_ack;
739 __entry->tx_bottom = call->tx_bottom;
740 __entry->tx_top = call->tx_top;
741 __entry->tx_winsize = call->tx_winsize;
744 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
746 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
748 __entry->acks_hard_ack,
749 __entry->tx_top - __entry->tx_bottom,
750 __entry->tx_top - __entry->acks_hard_ack,
754 TRACE_EVENT(rxrpc_rx_data,
755 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
756 rxrpc_serial_t serial, u8 flags),
758 TP_ARGS(call, seq, serial, flags),
761 __field(unsigned int, call )
762 __field(rxrpc_seq_t, seq )
763 __field(rxrpc_serial_t, serial )
768 __entry->call = call;
770 __entry->serial = serial;
771 __entry->flags = flags;
774 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
781 TRACE_EVENT(rxrpc_rx_ack,
782 TP_PROTO(struct rxrpc_call *call,
783 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
784 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
786 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
789 __field(unsigned int, call )
790 __field(rxrpc_serial_t, serial )
791 __field(rxrpc_serial_t, ack_serial )
792 __field(rxrpc_seq_t, first )
793 __field(rxrpc_seq_t, prev )
799 __entry->call = call->debug_id;
800 __entry->serial = serial;
801 __entry->ack_serial = ack_serial;
802 __entry->first = first;
803 __entry->prev = prev;
804 __entry->reason = reason;
805 __entry->n_acks = n_acks;
808 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
811 __print_symbolic(__entry->reason, rxrpc_ack_names),
818 TRACE_EVENT(rxrpc_rx_abort,
819 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
822 TP_ARGS(call, serial, abort_code),
825 __field(unsigned int, call )
826 __field(rxrpc_serial_t, serial )
827 __field(u32, abort_code )
831 __entry->call = call->debug_id;
832 __entry->serial = serial;
833 __entry->abort_code = abort_code;
836 TP_printk("c=%08x ABORT %08x ac=%d",
842 TRACE_EVENT(rxrpc_rx_challenge,
843 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
844 u32 version, u32 nonce, u32 min_level),
846 TP_ARGS(conn, serial, version, nonce, min_level),
849 __field(unsigned int, conn )
850 __field(rxrpc_serial_t, serial )
851 __field(u32, version )
853 __field(u32, min_level )
857 __entry->conn = conn->debug_id;
858 __entry->serial = serial;
859 __entry->version = version;
860 __entry->nonce = nonce;
861 __entry->min_level = min_level;
864 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
872 TRACE_EVENT(rxrpc_rx_response,
873 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
874 u32 version, u32 kvno, u32 ticket_len),
876 TP_ARGS(conn, serial, version, kvno, ticket_len),
879 __field(unsigned int, conn )
880 __field(rxrpc_serial_t, serial )
881 __field(u32, version )
883 __field(u32, ticket_len )
887 __entry->conn = conn->debug_id;
888 __entry->serial = serial;
889 __entry->version = version;
890 __entry->kvno = kvno;
891 __entry->ticket_len = ticket_len;
894 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
902 TRACE_EVENT(rxrpc_rx_rwind_change,
903 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
904 u32 rwind, bool wake),
906 TP_ARGS(call, serial, rwind, wake),
909 __field(unsigned int, call )
910 __field(rxrpc_serial_t, serial )
916 __entry->call = call->debug_id;
917 __entry->serial = serial;
918 __entry->rwind = rwind;
919 __entry->wake = wake;
922 TP_printk("c=%08x %08x rw=%u%s",
926 __entry->wake ? " wake" : "")
929 TRACE_EVENT(rxrpc_tx_packet,
930 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
931 enum rxrpc_tx_point where),
933 TP_ARGS(call_id, whdr, where),
936 __field(unsigned int, call )
937 __field(enum rxrpc_tx_point, where )
938 __field_struct(struct rxrpc_wire_header, whdr )
942 __entry->call = call_id;
943 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
944 __entry->where = where;
947 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
949 ntohl(__entry->whdr.epoch),
950 ntohl(__entry->whdr.cid),
951 ntohl(__entry->whdr.callNumber),
952 ntohs(__entry->whdr.serviceId),
953 ntohl(__entry->whdr.serial),
954 ntohl(__entry->whdr.seq),
955 __entry->whdr.type, __entry->whdr.flags,
956 __entry->whdr.type <= 15 ?
957 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
958 __print_symbolic(__entry->where, rxrpc_tx_points))
961 TRACE_EVENT(rxrpc_tx_data,
962 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
963 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
965 TP_ARGS(call, seq, serial, flags, retrans, lose),
968 __field(unsigned int, call )
969 __field(rxrpc_seq_t, seq )
970 __field(rxrpc_serial_t, serial )
972 __field(u32, call_id )
974 __field(bool, retrans )
979 __entry->call = call->debug_id;
980 __entry->cid = call->cid;
981 __entry->call_id = call->call_id;
983 __entry->serial = serial;
984 __entry->flags = flags;
985 __entry->retrans = retrans;
986 __entry->lose = lose;
989 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
996 __entry->retrans ? " *RETRANS*" : "",
997 __entry->lose ? " *LOSE*" : "")
1000 TRACE_EVENT(rxrpc_tx_ack,
1001 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1002 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1003 u8 reason, u8 n_acks),
1005 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1008 __field(unsigned int, call )
1009 __field(rxrpc_serial_t, serial )
1010 __field(rxrpc_seq_t, ack_first )
1011 __field(rxrpc_serial_t, ack_serial )
1012 __field(u8, reason )
1013 __field(u8, n_acks )
1017 __entry->call = call;
1018 __entry->serial = serial;
1019 __entry->ack_first = ack_first;
1020 __entry->ack_serial = ack_serial;
1021 __entry->reason = reason;
1022 __entry->n_acks = n_acks;
1025 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1028 __print_symbolic(__entry->reason, rxrpc_ack_names),
1030 __entry->ack_serial,
1034 TRACE_EVENT(rxrpc_receive,
1035 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1036 rxrpc_serial_t serial, rxrpc_seq_t seq),
1038 TP_ARGS(call, why, serial, seq),
1041 __field(unsigned int, call )
1042 __field(enum rxrpc_receive_trace, why )
1043 __field(rxrpc_serial_t, serial )
1044 __field(rxrpc_seq_t, seq )
1045 __field(u64, window )
1049 __entry->call = call->debug_id;
1051 __entry->serial = serial;
1053 __entry->window = atomic64_read(&call->ackr_window);
1056 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1058 __print_symbolic(__entry->why, rxrpc_receive_traces),
1061 lower_32_bits(__entry->window),
1062 upper_32_bits(__entry->window))
1065 TRACE_EVENT(rxrpc_recvmsg,
1066 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1069 TP_ARGS(call, why, ret),
1072 __field(unsigned int, call )
1073 __field(enum rxrpc_recvmsg_trace, why )
1078 __entry->call = call ? call->debug_id : 0;
1083 TP_printk("c=%08x %s ret=%d",
1085 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1089 TRACE_EVENT(rxrpc_recvdata,
1090 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1091 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1094 TP_ARGS(call, why, seq, offset, len, ret),
1097 __field(unsigned int, call )
1098 __field(enum rxrpc_recvmsg_trace, why )
1099 __field(rxrpc_seq_t, seq )
1100 __field(unsigned int, offset )
1101 __field(unsigned int, len )
1106 __entry->call = call ? call->debug_id : 0;
1109 __entry->offset = offset;
1114 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1116 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1123 TRACE_EVENT(rxrpc_rtt_tx,
1124 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1125 int slot, rxrpc_serial_t send_serial),
1127 TP_ARGS(call, why, slot, send_serial),
1130 __field(unsigned int, call )
1131 __field(enum rxrpc_rtt_tx_trace, why )
1133 __field(rxrpc_serial_t, send_serial )
1137 __entry->call = call->debug_id;
1139 __entry->slot = slot;
1140 __entry->send_serial = send_serial;
1143 TP_printk("c=%08x [%d] %s sr=%08x",
1146 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1147 __entry->send_serial)
1150 TRACE_EVENT(rxrpc_rtt_rx,
1151 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1153 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1156 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1159 __field(unsigned int, call )
1160 __field(enum rxrpc_rtt_rx_trace, why )
1162 __field(rxrpc_serial_t, send_serial )
1163 __field(rxrpc_serial_t, resp_serial )
1169 __entry->call = call->debug_id;
1171 __entry->slot = slot;
1172 __entry->send_serial = send_serial;
1173 __entry->resp_serial = resp_serial;
1178 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1181 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1182 __entry->send_serial,
1183 __entry->resp_serial,
1188 TRACE_EVENT(rxrpc_timer,
1189 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1192 TP_ARGS(call, why, now),
1195 __field(unsigned int, call )
1196 __field(enum rxrpc_timer_trace, why )
1198 __field(long, ack_at )
1199 __field(long, ack_lost_at )
1200 __field(long, resend_at )
1201 __field(long, ping_at )
1202 __field(long, expect_rx_by )
1203 __field(long, expect_req_by )
1204 __field(long, expect_term_by )
1205 __field(long, timer )
1209 __entry->call = call->debug_id;
1212 __entry->ack_at = call->delay_ack_at;
1213 __entry->ack_lost_at = call->ack_lost_at;
1214 __entry->resend_at = call->resend_at;
1215 __entry->expect_rx_by = call->expect_rx_by;
1216 __entry->expect_req_by = call->expect_req_by;
1217 __entry->expect_term_by = call->expect_term_by;
1218 __entry->timer = call->timer.expires;
1221 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1223 __print_symbolic(__entry->why, rxrpc_timer_traces),
1224 __entry->ack_at - __entry->now,
1225 __entry->ack_lost_at - __entry->now,
1226 __entry->resend_at - __entry->now,
1227 __entry->expect_rx_by - __entry->now,
1228 __entry->expect_req_by - __entry->now,
1229 __entry->expect_term_by - __entry->now,
1230 __entry->timer - __entry->now)
1233 TRACE_EVENT(rxrpc_timer_expired,
1234 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1239 __field(unsigned int, call )
1241 __field(long, ack_at )
1242 __field(long, ack_lost_at )
1243 __field(long, resend_at )
1244 __field(long, ping_at )
1245 __field(long, expect_rx_by )
1246 __field(long, expect_req_by )
1247 __field(long, expect_term_by )
1248 __field(long, timer )
1252 __entry->call = call->debug_id;
1254 __entry->ack_at = call->delay_ack_at;
1255 __entry->ack_lost_at = call->ack_lost_at;
1256 __entry->resend_at = call->resend_at;
1257 __entry->expect_rx_by = call->expect_rx_by;
1258 __entry->expect_req_by = call->expect_req_by;
1259 __entry->expect_term_by = call->expect_term_by;
1260 __entry->timer = call->timer.expires;
1263 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1265 __entry->ack_at - __entry->now,
1266 __entry->ack_lost_at - __entry->now,
1267 __entry->resend_at - __entry->now,
1268 __entry->expect_rx_by - __entry->now,
1269 __entry->expect_req_by - __entry->now,
1270 __entry->expect_term_by - __entry->now,
1271 __entry->timer - __entry->now)
1274 TRACE_EVENT(rxrpc_rx_lose,
1275 TP_PROTO(struct rxrpc_skb_priv *sp),
1280 __field_struct(struct rxrpc_host_header, hdr )
1284 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1287 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1288 __entry->hdr.epoch, __entry->hdr.cid,
1289 __entry->hdr.callNumber, __entry->hdr.serviceId,
1290 __entry->hdr.serial, __entry->hdr.seq,
1291 __entry->hdr.type, __entry->hdr.flags,
1292 __entry->hdr.type <= 15 ?
1293 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1296 TRACE_EVENT(rxrpc_propose_ack,
1297 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1298 u8 ack_reason, rxrpc_serial_t serial),
1300 TP_ARGS(call, why, ack_reason, serial),
1303 __field(unsigned int, call )
1304 __field(enum rxrpc_propose_ack_trace, why )
1305 __field(rxrpc_serial_t, serial )
1306 __field(u8, ack_reason )
1310 __entry->call = call->debug_id;
1312 __entry->serial = serial;
1313 __entry->ack_reason = ack_reason;
1316 TP_printk("c=%08x %s %s r=%08x",
1318 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1319 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1323 TRACE_EVENT(rxrpc_send_ack,
1324 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1325 u8 ack_reason, rxrpc_serial_t serial),
1327 TP_ARGS(call, why, ack_reason, serial),
1330 __field(unsigned int, call )
1331 __field(enum rxrpc_propose_ack_trace, why )
1332 __field(rxrpc_serial_t, serial )
1333 __field(u8, ack_reason )
1337 __entry->call = call->debug_id;
1339 __entry->serial = serial;
1340 __entry->ack_reason = ack_reason;
1343 TP_printk("c=%08x %s %s r=%08x",
1345 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1346 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1350 TRACE_EVENT(rxrpc_drop_ack,
1351 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1352 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1354 TP_ARGS(call, why, ack_reason, serial, nobuf),
1357 __field(unsigned int, call )
1358 __field(enum rxrpc_propose_ack_trace, why )
1359 __field(rxrpc_serial_t, serial )
1360 __field(u8, ack_reason )
1361 __field(bool, nobuf )
1365 __entry->call = call->debug_id;
1367 __entry->serial = serial;
1368 __entry->ack_reason = ack_reason;
1369 __entry->nobuf = nobuf;
1372 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1374 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1375 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1376 __entry->serial, __entry->nobuf)
1379 TRACE_EVENT(rxrpc_retransmit,
1380 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1382 TP_ARGS(call, seq, expiry),
1385 __field(unsigned int, call )
1386 __field(rxrpc_seq_t, seq )
1387 __field(s64, expiry )
1391 __entry->call = call->debug_id;
1393 __entry->expiry = expiry;
1396 TP_printk("c=%08x q=%x xp=%lld",
1402 TRACE_EVENT(rxrpc_congest,
1403 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1404 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1406 TP_ARGS(call, summary, ack_serial, change),
1409 __field(unsigned int, call )
1410 __field(enum rxrpc_congest_change, change )
1411 __field(rxrpc_seq_t, hard_ack )
1412 __field(rxrpc_seq_t, top )
1413 __field(rxrpc_seq_t, lowest_nak )
1414 __field(rxrpc_serial_t, ack_serial )
1415 __field_struct(struct rxrpc_ack_summary, sum )
1419 __entry->call = call->debug_id;
1420 __entry->change = change;
1421 __entry->hard_ack = call->acks_hard_ack;
1422 __entry->top = call->tx_top;
1423 __entry->lowest_nak = call->acks_lowest_nak;
1424 __entry->ack_serial = ack_serial;
1425 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1428 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",
1430 __entry->ack_serial,
1431 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1433 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1435 __entry->sum.ssthresh,
1436 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1437 __entry->sum.nr_new_acks,
1438 __entry->sum.nr_rot_new_acks,
1439 __entry->top - __entry->hard_ack,
1440 __entry->sum.cumulative_acks,
1441 __entry->sum.dup_acks,
1442 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1443 __print_symbolic(__entry->change, rxrpc_congest_changes),
1444 __entry->sum.retrans_timeo ? " rTxTo" : "")
1447 TRACE_EVENT(rxrpc_disconnect_call,
1448 TP_PROTO(struct rxrpc_call *call),
1453 __field(unsigned int, call )
1454 __field(u32, abort_code )
1458 __entry->call = call->debug_id;
1459 __entry->abort_code = call->abort_code;
1462 TP_printk("c=%08x ab=%08x",
1464 __entry->abort_code)
1467 TRACE_EVENT(rxrpc_improper_term,
1468 TP_PROTO(struct rxrpc_call *call),
1473 __field(unsigned int, call )
1474 __field(u32, abort_code )
1478 __entry->call = call->debug_id;
1479 __entry->abort_code = call->abort_code;
1482 TP_printk("c=%08x ab=%08x",
1484 __entry->abort_code)
1487 TRACE_EVENT(rxrpc_rx_eproto,
1488 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1491 TP_ARGS(call, serial, why),
1494 __field(unsigned int, call )
1495 __field(rxrpc_serial_t, serial )
1496 __field(const char *, why )
1500 __entry->call = call ? call->debug_id : 0;
1501 __entry->serial = serial;
1505 TP_printk("c=%08x EPROTO %08x %s",
1511 TRACE_EVENT(rxrpc_connect_call,
1512 TP_PROTO(struct rxrpc_call *call),
1517 __field(unsigned int, call )
1518 __field(unsigned long, user_call_ID )
1520 __field(u32, call_id )
1524 __entry->call = call->debug_id;
1525 __entry->user_call_ID = call->user_call_ID;
1526 __entry->cid = call->cid;
1527 __entry->call_id = call->call_id;
1530 TP_printk("c=%08x u=%p %08x:%08x",
1532 (void *)__entry->user_call_ID,
1537 TRACE_EVENT(rxrpc_resend,
1538 TP_PROTO(struct rxrpc_call *call),
1543 __field(unsigned int, call )
1544 __field(rxrpc_seq_t, seq )
1548 __entry->call = call->debug_id;
1549 __entry->seq = call->acks_hard_ack;
1552 TP_printk("c=%08x q=%x",
1557 TRACE_EVENT(rxrpc_rx_icmp,
1558 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1559 struct sockaddr_rxrpc *srx),
1561 TP_ARGS(peer, ee, srx),
1564 __field(unsigned int, peer )
1565 __field_struct(struct sock_extended_err, ee )
1566 __field_struct(struct sockaddr_rxrpc, srx )
1570 __entry->peer = peer->debug_id;
1571 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1572 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1575 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1577 __entry->ee.ee_origin,
1578 __entry->ee.ee_type,
1579 __entry->ee.ee_code,
1580 __entry->ee.ee_info,
1581 __entry->ee.ee_data,
1582 __entry->ee.ee_errno,
1583 &__entry->srx.transport)
1586 TRACE_EVENT(rxrpc_tx_fail,
1587 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1588 enum rxrpc_tx_point where),
1590 TP_ARGS(debug_id, serial, ret, where),
1593 __field(unsigned int, debug_id )
1594 __field(rxrpc_serial_t, serial )
1596 __field(enum rxrpc_tx_point, where )
1600 __entry->debug_id = debug_id;
1601 __entry->serial = serial;
1603 __entry->where = where;
1606 TP_printk("c=%08x r=%x ret=%d %s",
1610 __print_symbolic(__entry->where, rxrpc_tx_points))
1613 TRACE_EVENT(rxrpc_call_reset,
1614 TP_PROTO(struct rxrpc_call *call),
1619 __field(unsigned int, debug_id )
1621 __field(u32, call_id )
1622 __field(rxrpc_serial_t, call_serial )
1623 __field(rxrpc_serial_t, conn_serial )
1624 __field(rxrpc_seq_t, tx_seq )
1625 __field(rxrpc_seq_t, rx_seq )
1629 __entry->debug_id = call->debug_id;
1630 __entry->cid = call->cid;
1631 __entry->call_id = call->call_id;
1632 __entry->call_serial = call->rx_serial;
1633 __entry->conn_serial = call->conn->hi_serial;
1634 __entry->tx_seq = call->acks_hard_ack;
1635 __entry->rx_seq = call->rx_highest_seq;
1638 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1640 __entry->cid, __entry->call_id,
1641 __entry->call_serial, __entry->conn_serial,
1642 __entry->tx_seq, __entry->rx_seq)
1645 TRACE_EVENT(rxrpc_notify_socket,
1646 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1648 TP_ARGS(debug_id, serial),
1651 __field(unsigned int, debug_id )
1652 __field(rxrpc_serial_t, serial )
1656 __entry->debug_id = debug_id;
1657 __entry->serial = serial;
1660 TP_printk("c=%08x r=%08x",
1665 TRACE_EVENT(rxrpc_rx_discard_ack,
1666 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1667 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1668 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1670 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1671 prev_pkt, call_ackr_prev),
1674 __field(unsigned int, debug_id )
1675 __field(rxrpc_serial_t, serial )
1676 __field(rxrpc_seq_t, first_soft_ack)
1677 __field(rxrpc_seq_t, call_ackr_first)
1678 __field(rxrpc_seq_t, prev_pkt)
1679 __field(rxrpc_seq_t, call_ackr_prev)
1683 __entry->debug_id = debug_id;
1684 __entry->serial = serial;
1685 __entry->first_soft_ack = first_soft_ack;
1686 __entry->call_ackr_first = call_ackr_first;
1687 __entry->prev_pkt = prev_pkt;
1688 __entry->call_ackr_prev = call_ackr_prev;
1691 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1694 __entry->first_soft_ack,
1695 __entry->call_ackr_first,
1697 __entry->call_ackr_prev)
1700 TRACE_EVENT(rxrpc_req_ack,
1701 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1702 enum rxrpc_req_ack_trace why),
1704 TP_ARGS(call_debug_id, seq, why),
1707 __field(unsigned int, call_debug_id )
1708 __field(rxrpc_seq_t, seq )
1709 __field(enum rxrpc_req_ack_trace, why )
1713 __entry->call_debug_id = call_debug_id;
1718 TP_printk("c=%08x q=%08x REQ-%s",
1719 __entry->call_debug_id,
1721 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1724 TRACE_EVENT(rxrpc_txbuf,
1725 TP_PROTO(unsigned int debug_id,
1726 unsigned int call_debug_id, rxrpc_seq_t seq,
1727 int ref, enum rxrpc_txbuf_trace what),
1729 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1732 __field(unsigned int, debug_id )
1733 __field(unsigned int, call_debug_id )
1734 __field(rxrpc_seq_t, seq )
1736 __field(enum rxrpc_txbuf_trace, what )
1740 __entry->debug_id = debug_id;
1741 __entry->call_debug_id = call_debug_id;
1744 __entry->what = what;
1747 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1749 __entry->call_debug_id,
1751 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1757 #endif /* _TRACE_RXRPC_H */
1759 /* This part must be outside protection */
1760 #include <trace/define_trace.h>