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_ack, "ACK") \
21 EM(rxrpc_skb_cleaned, "CLN") \
22 EM(rxrpc_skb_cloned_jumbo, "CLJ") \
23 EM(rxrpc_skb_freed, "FRE") \
24 EM(rxrpc_skb_got, "GOT") \
25 EM(rxrpc_skb_lost, "*L*") \
26 EM(rxrpc_skb_new, "NEW") \
27 EM(rxrpc_skb_purged, "PUR") \
28 EM(rxrpc_skb_received, "RCV") \
29 EM(rxrpc_skb_rotated, "ROT") \
30 EM(rxrpc_skb_seen, "SEE") \
31 EM(rxrpc_skb_unshared, "UNS") \
32 E_(rxrpc_skb_unshared_nomem, "US0")
34 #define rxrpc_local_traces \
35 EM(rxrpc_local_free, "FREE ") \
36 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
37 EM(rxrpc_local_get_for_use, "GET for-use ") \
38 EM(rxrpc_local_get_peer, "GET peer ") \
39 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
40 EM(rxrpc_local_get_queue, "GET queue ") \
41 EM(rxrpc_local_new, "NEW ") \
42 EM(rxrpc_local_processing, "PROCESSING ") \
43 EM(rxrpc_local_put_already_queued, "PUT alreadyq") \
44 EM(rxrpc_local_put_bind, "PUT bind ") \
45 EM(rxrpc_local_put_for_use, "PUT for-use ") \
46 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
47 EM(rxrpc_local_put_peer, "PUT peer ") \
48 EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \
49 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
50 EM(rxrpc_local_put_queue, "PUT queue ") \
51 EM(rxrpc_local_queued, "QUEUED ") \
52 EM(rxrpc_local_see_tx_ack, "SEE tx-ack ") \
53 EM(rxrpc_local_stop, "STOP ") \
54 EM(rxrpc_local_stopped, "STOPPED ") \
55 EM(rxrpc_local_unuse_bind, "UNU bind ") \
56 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
57 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
58 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
59 EM(rxrpc_local_unuse_work, "UNU work ") \
60 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
61 EM(rxrpc_local_use_lookup, "USE lookup ") \
62 EM(rxrpc_local_use_peer_keepalive, "USE peer-kpa") \
63 E_(rxrpc_local_use_work, "USE work ")
65 #define rxrpc_peer_traces \
66 EM(rxrpc_peer_free, "FREE ") \
67 EM(rxrpc_peer_get_accept, "GET accept ") \
68 EM(rxrpc_peer_get_activate_call, "GET act-call") \
69 EM(rxrpc_peer_get_bundle, "GET bundle ") \
70 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
71 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
72 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
73 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
74 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
75 EM(rxrpc_peer_new_client, "NEW client ") \
76 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
77 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
78 EM(rxrpc_peer_put_call, "PUT call ") \
79 EM(rxrpc_peer_put_conn, "PUT conn ") \
80 EM(rxrpc_peer_put_discard_tmp, "PUT disc-tmp") \
81 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
82 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
84 #define rxrpc_bundle_traces \
85 EM(rxrpc_bundle_free, "FREE ") \
86 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
87 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
88 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
89 EM(rxrpc_bundle_put_conn, "PUT conn ") \
90 EM(rxrpc_bundle_put_discard, "PUT discard ") \
91 E_(rxrpc_bundle_new, "NEW ")
93 #define rxrpc_conn_traces \
94 EM(rxrpc_conn_free, "FREE ") \
95 EM(rxrpc_conn_get_activate_call, "GET act-call") \
96 EM(rxrpc_conn_get_call_input, "GET inp-call") \
97 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
98 EM(rxrpc_conn_get_idle, "GET idle ") \
99 EM(rxrpc_conn_get_poke, "GET poke ") \
100 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
101 EM(rxrpc_conn_new_client, "NEW client ") \
102 EM(rxrpc_conn_new_service, "NEW service ") \
103 EM(rxrpc_conn_put_already_queued, "PUT alreadyq") \
104 EM(rxrpc_conn_put_call, "PUT call ") \
105 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
106 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
107 EM(rxrpc_conn_put_discard, "PUT discard ") \
108 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
109 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
110 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
111 EM(rxrpc_conn_put_poke, "PUT poke ") \
112 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
113 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
114 EM(rxrpc_conn_put_work, "PUT work ") \
115 EM(rxrpc_conn_queue_challenge, "GQ chall ") \
116 EM(rxrpc_conn_queue_retry_work, "GQ retry-wk") \
117 EM(rxrpc_conn_queue_rx_work, "GQ rx-work ") \
118 EM(rxrpc_conn_queue_timer, "GQ timer ") \
119 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
120 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
121 E_(rxrpc_conn_see_work, "SEE work ")
123 #define rxrpc_client_traces \
124 EM(rxrpc_client_activate_chans, "Activa") \
125 EM(rxrpc_client_alloc, "Alloc ") \
126 EM(rxrpc_client_chan_activate, "ChActv") \
127 EM(rxrpc_client_chan_disconnect, "ChDisc") \
128 EM(rxrpc_client_chan_pass, "ChPass") \
129 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
130 EM(rxrpc_client_cleanup, "Clean ") \
131 EM(rxrpc_client_discard, "Discar") \
132 EM(rxrpc_client_duplicate, "Duplic") \
133 EM(rxrpc_client_exposed, "Expose") \
134 EM(rxrpc_client_replace, "Replac") \
135 EM(rxrpc_client_to_active, "->Actv") \
136 E_(rxrpc_client_to_idle, "->Idle")
138 #define rxrpc_call_traces \
139 EM(rxrpc_call_get_input, "GET input ") \
140 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
141 EM(rxrpc_call_get_notify_socket, "GET notify ") \
142 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
143 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
144 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
145 EM(rxrpc_call_get_send_ack, "GET send-ack") \
146 EM(rxrpc_call_get_timer, "GET timer ") \
147 EM(rxrpc_call_get_userid, "GET user-id ") \
148 EM(rxrpc_call_new_client, "NEW client ") \
149 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
150 EM(rxrpc_call_put_already_queued, "PUT alreadyq") \
151 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
152 EM(rxrpc_call_put_input, "PUT input ") \
153 EM(rxrpc_call_put_kernel, "PUT kernel ") \
154 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
155 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
156 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
157 EM(rxrpc_call_put_send_ack, "PUT send-ack") \
158 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
159 EM(rxrpc_call_put_timer, "PUT timer ") \
160 EM(rxrpc_call_put_timer_already, "PUT timer-al") \
161 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
162 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
163 EM(rxrpc_call_put_work, "PUT work ") \
164 EM(rxrpc_call_queue_abort, "QUE abort ") \
165 EM(rxrpc_call_queue_requeue, "QUE requeue ") \
166 EM(rxrpc_call_queue_resend, "QUE resend ") \
167 EM(rxrpc_call_queue_timer, "QUE timer ") \
168 EM(rxrpc_call_see_accept, "SEE accept ") \
169 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
170 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
171 EM(rxrpc_call_see_connected, "SEE connect ") \
172 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
173 EM(rxrpc_call_see_input, "SEE input ") \
174 EM(rxrpc_call_see_release, "SEE release ") \
175 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
176 E_(rxrpc_call_see_zap, "SEE zap ")
178 #define rxrpc_txqueue_traces \
179 EM(rxrpc_txqueue_await_reply, "AWR") \
180 EM(rxrpc_txqueue_dequeue, "DEQ") \
181 EM(rxrpc_txqueue_end, "END") \
182 EM(rxrpc_txqueue_queue, "QUE") \
183 EM(rxrpc_txqueue_queue_last, "QLS") \
184 EM(rxrpc_txqueue_rotate, "ROT") \
185 EM(rxrpc_txqueue_rotate_last, "RLS") \
186 E_(rxrpc_txqueue_wait, "WAI")
188 #define rxrpc_receive_traces \
189 EM(rxrpc_receive_end, "END") \
190 EM(rxrpc_receive_front, "FRN") \
191 EM(rxrpc_receive_incoming, "INC") \
192 EM(rxrpc_receive_queue, "QUE") \
193 EM(rxrpc_receive_queue_last, "QLS") \
194 EM(rxrpc_receive_queue_oos, "QUO") \
195 EM(rxrpc_receive_queue_oos_last, "QOL") \
196 EM(rxrpc_receive_oos, "OOS") \
197 EM(rxrpc_receive_oos_last, "OSL") \
198 EM(rxrpc_receive_rotate, "ROT") \
199 E_(rxrpc_receive_rotate_last, "RLS")
201 #define rxrpc_recvmsg_traces \
202 EM(rxrpc_recvmsg_cont, "CONT") \
203 EM(rxrpc_recvmsg_data_return, "DATA") \
204 EM(rxrpc_recvmsg_dequeue, "DEQU") \
205 EM(rxrpc_recvmsg_enter, "ENTR") \
206 EM(rxrpc_recvmsg_full, "FULL") \
207 EM(rxrpc_recvmsg_hole, "HOLE") \
208 EM(rxrpc_recvmsg_next, "NEXT") \
209 EM(rxrpc_recvmsg_requeue, "REQU") \
210 EM(rxrpc_recvmsg_return, "RETN") \
211 EM(rxrpc_recvmsg_terminal, "TERM") \
212 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
213 E_(rxrpc_recvmsg_wait, "WAIT")
215 #define rxrpc_rtt_tx_traces \
216 EM(rxrpc_rtt_tx_cancel, "CNCE") \
217 EM(rxrpc_rtt_tx_data, "DATA") \
218 EM(rxrpc_rtt_tx_no_slot, "FULL") \
219 E_(rxrpc_rtt_tx_ping, "PING")
221 #define rxrpc_rtt_rx_traces \
222 EM(rxrpc_rtt_rx_cancel, "CNCL") \
223 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
224 EM(rxrpc_rtt_rx_lost, "LOST") \
225 EM(rxrpc_rtt_rx_ping_response, "PONG") \
226 E_(rxrpc_rtt_rx_requested_ack, "RACK")
228 #define rxrpc_timer_traces \
229 EM(rxrpc_timer_begin, "Begin ") \
230 EM(rxrpc_timer_exp_ack, "ExpAck") \
231 EM(rxrpc_timer_exp_hard, "ExpHrd") \
232 EM(rxrpc_timer_exp_idle, "ExpIdl") \
233 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
234 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
235 EM(rxrpc_timer_exp_normal, "ExpNml") \
236 EM(rxrpc_timer_exp_ping, "ExpPng") \
237 EM(rxrpc_timer_exp_resend, "ExpRsn") \
238 EM(rxrpc_timer_init_for_reply, "IniRpl") \
239 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
240 EM(rxrpc_timer_restart, "Restrt") \
241 EM(rxrpc_timer_set_for_ack, "SetAck") \
242 EM(rxrpc_timer_set_for_hard, "SetHrd") \
243 EM(rxrpc_timer_set_for_idle, "SetIdl") \
244 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
245 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
246 EM(rxrpc_timer_set_for_normal, "SetNml") \
247 EM(rxrpc_timer_set_for_ping, "SetPng") \
248 EM(rxrpc_timer_set_for_resend, "SetRTx") \
249 E_(rxrpc_timer_set_for_send, "SetSnd")
251 #define rxrpc_propose_ack_traces \
252 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
253 EM(rxrpc_propose_ack_input_data, "DataIn ") \
254 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
255 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
256 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
257 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
258 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
259 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
260 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
261 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
262 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
263 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
264 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
265 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
267 #define rxrpc_congest_modes \
268 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
269 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
270 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
271 E_(RXRPC_CALL_SLOW_START, "SlowStart")
273 #define rxrpc_congest_changes \
274 EM(rxrpc_cong_begin_retransmission, " Retrans") \
275 EM(rxrpc_cong_cleared_nacks, " Cleared") \
276 EM(rxrpc_cong_new_low_nack, " NewLowN") \
277 EM(rxrpc_cong_no_change, " -") \
278 EM(rxrpc_cong_progress, " Progres") \
279 EM(rxrpc_cong_idle_reset, " IdleRes") \
280 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
281 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
282 E_(rxrpc_cong_saw_nack, " SawNack")
286 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
287 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
288 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
289 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
290 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
291 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
292 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
293 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
298 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
302 #define rxrpc_ack_names \
304 EM(RXRPC_ACK_REQUESTED, "REQ") \
305 EM(RXRPC_ACK_DUPLICATE, "DUP") \
306 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
307 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
308 EM(RXRPC_ACK_NOSPACE, "MEM") \
309 EM(RXRPC_ACK_PING, "PNG") \
310 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
311 EM(RXRPC_ACK_DELAY, "DLY") \
312 EM(RXRPC_ACK_IDLE, "IDL") \
313 E_(RXRPC_ACK__INVALID, "-?-")
315 #define rxrpc_completions \
316 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
317 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
318 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
319 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
320 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
322 #define rxrpc_tx_points \
323 EM(rxrpc_tx_point_call_abort, "CallAbort") \
324 EM(rxrpc_tx_point_call_ack, "CallAck") \
325 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
326 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
327 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
328 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
329 EM(rxrpc_tx_point_reject, "Reject") \
330 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
331 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
332 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
333 E_(rxrpc_tx_point_version_reply, "VerReply")
335 #define rxrpc_req_ack_traces \
336 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
337 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
338 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
339 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
340 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
341 EM(rxrpc_reqack_retrans, "RETRANS ") \
342 EM(rxrpc_reqack_slow_start, "SLOW-START") \
343 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
344 /* ---- Must update size of stat_why_req_ack[] if more are added! */
346 #define rxrpc_txbuf_traces \
347 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
348 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
349 EM(rxrpc_txbuf_free, "FREE ") \
350 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
351 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
352 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
353 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
354 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
355 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
356 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
357 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
358 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
359 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
360 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
363 * Generate enums for tracing information.
365 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
366 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
373 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
374 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
375 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
376 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
377 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
378 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
379 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
380 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
381 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
382 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
383 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
384 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
385 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
386 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
387 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
388 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
389 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
390 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
391 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
393 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
396 * Export enum symbols via userspace.
400 #define EM(a, b) TRACE_DEFINE_ENUM(a);
401 #define E_(a, b) TRACE_DEFINE_ENUM(a);
406 rxrpc_congest_changes;
410 rxrpc_propose_ack_traces;
411 rxrpc_receive_traces;
412 rxrpc_recvmsg_traces;
413 rxrpc_req_ack_traces;
420 rxrpc_txqueue_traces;
423 * Now redefine the EM() and E_() macros to map the enums to the strings that
424 * will be printed in the output.
428 #define EM(a, b) { a, b },
429 #define E_(a, b) { a, b }
431 TRACE_EVENT(rxrpc_local,
432 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
435 TP_ARGS(local_debug_id, op, ref, usage),
438 __field(unsigned int, local )
445 __entry->local = local_debug_id;
448 __entry->usage = usage;
451 TP_printk("L=%08x %s r=%d u=%d",
453 __print_symbolic(__entry->op, rxrpc_local_traces),
458 TRACE_EVENT(rxrpc_peer,
459 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
461 TP_ARGS(peer_debug_id, ref, why),
464 __field(unsigned int, peer )
470 __entry->peer = peer_debug_id;
475 TP_printk("P=%08x %s r=%d",
477 __print_symbolic(__entry->why, rxrpc_peer_traces),
481 TRACE_EVENT(rxrpc_bundle,
482 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
484 TP_ARGS(bundle_debug_id, ref, why),
487 __field(unsigned int, bundle )
493 __entry->bundle = bundle_debug_id;
498 TP_printk("CB=%08x %s r=%d",
500 __print_symbolic(__entry->why, rxrpc_bundle_traces),
504 TRACE_EVENT(rxrpc_conn,
505 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
507 TP_ARGS(conn_debug_id, ref, why),
510 __field(unsigned int, conn )
516 __entry->conn = conn_debug_id;
521 TP_printk("C=%08x %s r=%d",
523 __print_symbolic(__entry->why, rxrpc_conn_traces),
527 TRACE_EVENT(rxrpc_client,
528 TP_PROTO(struct rxrpc_connection *conn, int channel,
529 enum rxrpc_client_trace op),
531 TP_ARGS(conn, channel, op),
534 __field(unsigned int, conn )
536 __field(int, channel )
538 __field(enum rxrpc_client_trace, op )
542 __entry->conn = conn ? conn->debug_id : 0;
543 __entry->channel = channel;
544 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
546 __entry->cid = conn ? conn->proto.cid : 0;
549 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
552 __print_symbolic(__entry->op, rxrpc_client_traces),
557 TRACE_EVENT(rxrpc_call,
558 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
559 enum rxrpc_call_trace why),
561 TP_ARGS(call_debug_id, ref, aux, why),
564 __field(unsigned int, call )
567 __field(unsigned long, aux )
571 __entry->call = call_debug_id;
577 TP_printk("c=%08x %s r=%d a=%lx",
579 __print_symbolic(__entry->why, rxrpc_call_traces),
584 TRACE_EVENT(rxrpc_skb,
585 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
586 int usage, int mod_count, const void *where),
588 TP_ARGS(skb, op, usage, mod_count, where),
591 __field(struct sk_buff *, skb )
592 __field(enum rxrpc_skb_trace, op )
594 __field(int, mod_count )
595 __field(const void *, where )
601 __entry->usage = usage;
602 __entry->mod_count = mod_count;
603 __entry->where = where;
606 TP_printk("s=%p Rx %s u=%d m=%d p=%pSR",
608 __print_symbolic(__entry->op, rxrpc_skb_traces),
614 TRACE_EVENT(rxrpc_rx_packet,
615 TP_PROTO(struct rxrpc_skb_priv *sp),
620 __field_struct(struct rxrpc_host_header, hdr )
624 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
627 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
628 __entry->hdr.epoch, __entry->hdr.cid,
629 __entry->hdr.callNumber, __entry->hdr.serviceId,
630 __entry->hdr.serial, __entry->hdr.seq,
631 __entry->hdr.type, __entry->hdr.flags,
632 __entry->hdr.type <= 15 ?
633 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
636 TRACE_EVENT(rxrpc_rx_done,
637 TP_PROTO(int result, int abort_code),
639 TP_ARGS(result, abort_code),
642 __field(int, result )
643 __field(int, abort_code )
647 __entry->result = result;
648 __entry->abort_code = abort_code;
651 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
654 TRACE_EVENT(rxrpc_abort,
655 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
656 rxrpc_seq_t seq, int abort_code, int error),
658 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
661 __field(unsigned int, call_nr )
662 __array(char, why, 4 )
664 __field(u32, call_id )
665 __field(rxrpc_seq_t, seq )
666 __field(int, abort_code )
671 memcpy(__entry->why, why, 4);
672 __entry->call_nr = call_nr;
674 __entry->call_id = call_id;
675 __entry->abort_code = abort_code;
676 __entry->error = error;
680 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
682 __entry->cid, __entry->call_id, __entry->seq,
683 __entry->abort_code, __entry->error, __entry->why)
686 TRACE_EVENT(rxrpc_call_complete,
687 TP_PROTO(struct rxrpc_call *call),
692 __field(unsigned int, call )
693 __field(enum rxrpc_call_completion, compl )
695 __field(u32, abort_code )
699 __entry->call = call->debug_id;
700 __entry->compl = call->completion;
701 __entry->error = call->error;
702 __entry->abort_code = call->abort_code;
705 TP_printk("c=%08x %s r=%d ac=%d",
707 __print_symbolic(__entry->compl, rxrpc_completions),
712 TRACE_EVENT(rxrpc_txqueue,
713 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
718 __field(unsigned int, call )
719 __field(enum rxrpc_txqueue_trace, why )
720 __field(rxrpc_seq_t, acks_hard_ack )
721 __field(rxrpc_seq_t, tx_bottom )
722 __field(rxrpc_seq_t, tx_top )
723 __field(int, tx_winsize )
727 __entry->call = call->debug_id;
729 __entry->acks_hard_ack = call->acks_hard_ack;
730 __entry->tx_bottom = call->tx_bottom;
731 __entry->tx_top = call->tx_top;
732 __entry->tx_winsize = call->tx_winsize;
735 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
737 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
739 __entry->acks_hard_ack,
740 __entry->tx_top - __entry->tx_bottom,
741 __entry->tx_top - __entry->acks_hard_ack,
745 TRACE_EVENT(rxrpc_rx_data,
746 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
747 rxrpc_serial_t serial, u8 flags),
749 TP_ARGS(call, seq, serial, flags),
752 __field(unsigned int, call )
753 __field(rxrpc_seq_t, seq )
754 __field(rxrpc_serial_t, serial )
759 __entry->call = call;
761 __entry->serial = serial;
762 __entry->flags = flags;
765 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
772 TRACE_EVENT(rxrpc_rx_ack,
773 TP_PROTO(struct rxrpc_call *call,
774 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
775 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
777 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
780 __field(unsigned int, call )
781 __field(rxrpc_serial_t, serial )
782 __field(rxrpc_serial_t, ack_serial )
783 __field(rxrpc_seq_t, first )
784 __field(rxrpc_seq_t, prev )
790 __entry->call = call->debug_id;
791 __entry->serial = serial;
792 __entry->ack_serial = ack_serial;
793 __entry->first = first;
794 __entry->prev = prev;
795 __entry->reason = reason;
796 __entry->n_acks = n_acks;
799 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
802 __print_symbolic(__entry->reason, rxrpc_ack_names),
809 TRACE_EVENT(rxrpc_rx_abort,
810 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
813 TP_ARGS(call, serial, abort_code),
816 __field(unsigned int, call )
817 __field(rxrpc_serial_t, serial )
818 __field(u32, abort_code )
822 __entry->call = call->debug_id;
823 __entry->serial = serial;
824 __entry->abort_code = abort_code;
827 TP_printk("c=%08x ABORT %08x ac=%d",
833 TRACE_EVENT(rxrpc_rx_challenge,
834 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
835 u32 version, u32 nonce, u32 min_level),
837 TP_ARGS(conn, serial, version, nonce, min_level),
840 __field(unsigned int, conn )
841 __field(rxrpc_serial_t, serial )
842 __field(u32, version )
844 __field(u32, min_level )
848 __entry->conn = conn->debug_id;
849 __entry->serial = serial;
850 __entry->version = version;
851 __entry->nonce = nonce;
852 __entry->min_level = min_level;
855 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
863 TRACE_EVENT(rxrpc_rx_response,
864 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
865 u32 version, u32 kvno, u32 ticket_len),
867 TP_ARGS(conn, serial, version, kvno, ticket_len),
870 __field(unsigned int, conn )
871 __field(rxrpc_serial_t, serial )
872 __field(u32, version )
874 __field(u32, ticket_len )
878 __entry->conn = conn->debug_id;
879 __entry->serial = serial;
880 __entry->version = version;
881 __entry->kvno = kvno;
882 __entry->ticket_len = ticket_len;
885 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
893 TRACE_EVENT(rxrpc_rx_rwind_change,
894 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
895 u32 rwind, bool wake),
897 TP_ARGS(call, serial, rwind, wake),
900 __field(unsigned int, call )
901 __field(rxrpc_serial_t, serial )
907 __entry->call = call->debug_id;
908 __entry->serial = serial;
909 __entry->rwind = rwind;
910 __entry->wake = wake;
913 TP_printk("c=%08x %08x rw=%u%s",
917 __entry->wake ? " wake" : "")
920 TRACE_EVENT(rxrpc_tx_packet,
921 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
922 enum rxrpc_tx_point where),
924 TP_ARGS(call_id, whdr, where),
927 __field(unsigned int, call )
928 __field(enum rxrpc_tx_point, where )
929 __field_struct(struct rxrpc_wire_header, whdr )
933 __entry->call = call_id;
934 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
935 __entry->where = where;
938 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
940 ntohl(__entry->whdr.epoch),
941 ntohl(__entry->whdr.cid),
942 ntohl(__entry->whdr.callNumber),
943 ntohs(__entry->whdr.serviceId),
944 ntohl(__entry->whdr.serial),
945 ntohl(__entry->whdr.seq),
946 __entry->whdr.type, __entry->whdr.flags,
947 __entry->whdr.type <= 15 ?
948 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
949 __print_symbolic(__entry->where, rxrpc_tx_points))
952 TRACE_EVENT(rxrpc_tx_data,
953 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
954 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
956 TP_ARGS(call, seq, serial, flags, retrans, lose),
959 __field(unsigned int, call )
960 __field(rxrpc_seq_t, seq )
961 __field(rxrpc_serial_t, serial )
963 __field(u32, call_id )
965 __field(bool, retrans )
970 __entry->call = call->debug_id;
971 __entry->cid = call->cid;
972 __entry->call_id = call->call_id;
974 __entry->serial = serial;
975 __entry->flags = flags;
976 __entry->retrans = retrans;
977 __entry->lose = lose;
980 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
987 __entry->retrans ? " *RETRANS*" : "",
988 __entry->lose ? " *LOSE*" : "")
991 TRACE_EVENT(rxrpc_tx_ack,
992 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
993 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
994 u8 reason, u8 n_acks),
996 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
999 __field(unsigned int, call )
1000 __field(rxrpc_serial_t, serial )
1001 __field(rxrpc_seq_t, ack_first )
1002 __field(rxrpc_serial_t, ack_serial )
1003 __field(u8, reason )
1004 __field(u8, n_acks )
1008 __entry->call = call;
1009 __entry->serial = serial;
1010 __entry->ack_first = ack_first;
1011 __entry->ack_serial = ack_serial;
1012 __entry->reason = reason;
1013 __entry->n_acks = n_acks;
1016 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
1019 __print_symbolic(__entry->reason, rxrpc_ack_names),
1021 __entry->ack_serial,
1025 TRACE_EVENT(rxrpc_receive,
1026 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1027 rxrpc_serial_t serial, rxrpc_seq_t seq),
1029 TP_ARGS(call, why, serial, seq),
1032 __field(unsigned int, call )
1033 __field(enum rxrpc_receive_trace, why )
1034 __field(rxrpc_serial_t, serial )
1035 __field(rxrpc_seq_t, seq )
1036 __field(u64, window )
1040 __entry->call = call->debug_id;
1042 __entry->serial = serial;
1044 __entry->window = atomic64_read(&call->ackr_window);
1047 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1049 __print_symbolic(__entry->why, rxrpc_receive_traces),
1052 lower_32_bits(__entry->window),
1053 upper_32_bits(__entry->window))
1056 TRACE_EVENT(rxrpc_recvmsg,
1057 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1060 TP_ARGS(call, why, ret),
1063 __field(unsigned int, call )
1064 __field(enum rxrpc_recvmsg_trace, why )
1069 __entry->call = call ? call->debug_id : 0;
1074 TP_printk("c=%08x %s ret=%d",
1076 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1080 TRACE_EVENT(rxrpc_recvdata,
1081 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1082 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1085 TP_ARGS(call, why, seq, offset, len, ret),
1088 __field(unsigned int, call )
1089 __field(enum rxrpc_recvmsg_trace, why )
1090 __field(rxrpc_seq_t, seq )
1091 __field(unsigned int, offset )
1092 __field(unsigned int, len )
1097 __entry->call = call ? call->debug_id : 0;
1100 __entry->offset = offset;
1105 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1107 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1114 TRACE_EVENT(rxrpc_rtt_tx,
1115 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1116 int slot, rxrpc_serial_t send_serial),
1118 TP_ARGS(call, why, slot, send_serial),
1121 __field(unsigned int, call )
1122 __field(enum rxrpc_rtt_tx_trace, why )
1124 __field(rxrpc_serial_t, send_serial )
1128 __entry->call = call->debug_id;
1130 __entry->slot = slot;
1131 __entry->send_serial = send_serial;
1134 TP_printk("c=%08x [%d] %s sr=%08x",
1137 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1138 __entry->send_serial)
1141 TRACE_EVENT(rxrpc_rtt_rx,
1142 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1144 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1147 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1150 __field(unsigned int, call )
1151 __field(enum rxrpc_rtt_rx_trace, why )
1153 __field(rxrpc_serial_t, send_serial )
1154 __field(rxrpc_serial_t, resp_serial )
1160 __entry->call = call->debug_id;
1162 __entry->slot = slot;
1163 __entry->send_serial = send_serial;
1164 __entry->resp_serial = resp_serial;
1169 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1172 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1173 __entry->send_serial,
1174 __entry->resp_serial,
1179 TRACE_EVENT(rxrpc_timer,
1180 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1183 TP_ARGS(call, why, now),
1186 __field(unsigned int, call )
1187 __field(enum rxrpc_timer_trace, why )
1189 __field(long, ack_at )
1190 __field(long, ack_lost_at )
1191 __field(long, resend_at )
1192 __field(long, ping_at )
1193 __field(long, expect_rx_by )
1194 __field(long, expect_req_by )
1195 __field(long, expect_term_by )
1196 __field(long, timer )
1200 __entry->call = call->debug_id;
1203 __entry->ack_at = call->delay_ack_at;
1204 __entry->ack_lost_at = call->ack_lost_at;
1205 __entry->resend_at = call->resend_at;
1206 __entry->expect_rx_by = call->expect_rx_by;
1207 __entry->expect_req_by = call->expect_req_by;
1208 __entry->expect_term_by = call->expect_term_by;
1209 __entry->timer = call->timer.expires;
1212 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1214 __print_symbolic(__entry->why, rxrpc_timer_traces),
1215 __entry->ack_at - __entry->now,
1216 __entry->ack_lost_at - __entry->now,
1217 __entry->resend_at - __entry->now,
1218 __entry->expect_rx_by - __entry->now,
1219 __entry->expect_req_by - __entry->now,
1220 __entry->expect_term_by - __entry->now,
1221 __entry->timer - __entry->now)
1224 TRACE_EVENT(rxrpc_timer_expired,
1225 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1230 __field(unsigned int, call )
1232 __field(long, ack_at )
1233 __field(long, ack_lost_at )
1234 __field(long, resend_at )
1235 __field(long, ping_at )
1236 __field(long, expect_rx_by )
1237 __field(long, expect_req_by )
1238 __field(long, expect_term_by )
1239 __field(long, timer )
1243 __entry->call = call->debug_id;
1245 __entry->ack_at = call->delay_ack_at;
1246 __entry->ack_lost_at = call->ack_lost_at;
1247 __entry->resend_at = call->resend_at;
1248 __entry->expect_rx_by = call->expect_rx_by;
1249 __entry->expect_req_by = call->expect_req_by;
1250 __entry->expect_term_by = call->expect_term_by;
1251 __entry->timer = call->timer.expires;
1254 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1256 __entry->ack_at - __entry->now,
1257 __entry->ack_lost_at - __entry->now,
1258 __entry->resend_at - __entry->now,
1259 __entry->expect_rx_by - __entry->now,
1260 __entry->expect_req_by - __entry->now,
1261 __entry->expect_term_by - __entry->now,
1262 __entry->timer - __entry->now)
1265 TRACE_EVENT(rxrpc_rx_lose,
1266 TP_PROTO(struct rxrpc_skb_priv *sp),
1271 __field_struct(struct rxrpc_host_header, hdr )
1275 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1278 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1279 __entry->hdr.epoch, __entry->hdr.cid,
1280 __entry->hdr.callNumber, __entry->hdr.serviceId,
1281 __entry->hdr.serial, __entry->hdr.seq,
1282 __entry->hdr.type, __entry->hdr.flags,
1283 __entry->hdr.type <= 15 ?
1284 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1287 TRACE_EVENT(rxrpc_propose_ack,
1288 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1289 u8 ack_reason, rxrpc_serial_t serial),
1291 TP_ARGS(call, why, ack_reason, serial),
1294 __field(unsigned int, call )
1295 __field(enum rxrpc_propose_ack_trace, why )
1296 __field(rxrpc_serial_t, serial )
1297 __field(u8, ack_reason )
1301 __entry->call = call->debug_id;
1303 __entry->serial = serial;
1304 __entry->ack_reason = ack_reason;
1307 TP_printk("c=%08x %s %s r=%08x",
1309 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1310 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1314 TRACE_EVENT(rxrpc_send_ack,
1315 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1316 u8 ack_reason, rxrpc_serial_t serial),
1318 TP_ARGS(call, why, ack_reason, serial),
1321 __field(unsigned int, call )
1322 __field(enum rxrpc_propose_ack_trace, why )
1323 __field(rxrpc_serial_t, serial )
1324 __field(u8, ack_reason )
1328 __entry->call = call->debug_id;
1330 __entry->serial = serial;
1331 __entry->ack_reason = ack_reason;
1334 TP_printk("c=%08x %s %s r=%08x",
1336 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1337 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1341 TRACE_EVENT(rxrpc_drop_ack,
1342 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1343 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1345 TP_ARGS(call, why, ack_reason, serial, nobuf),
1348 __field(unsigned int, call )
1349 __field(enum rxrpc_propose_ack_trace, why )
1350 __field(rxrpc_serial_t, serial )
1351 __field(u8, ack_reason )
1352 __field(bool, nobuf )
1356 __entry->call = call->debug_id;
1358 __entry->serial = serial;
1359 __entry->ack_reason = ack_reason;
1360 __entry->nobuf = nobuf;
1363 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1365 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1366 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1367 __entry->serial, __entry->nobuf)
1370 TRACE_EVENT(rxrpc_retransmit,
1371 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1373 TP_ARGS(call, seq, expiry),
1376 __field(unsigned int, call )
1377 __field(rxrpc_seq_t, seq )
1378 __field(s64, expiry )
1382 __entry->call = call->debug_id;
1384 __entry->expiry = expiry;
1387 TP_printk("c=%08x q=%x xp=%lld",
1393 TRACE_EVENT(rxrpc_congest,
1394 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1395 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1397 TP_ARGS(call, summary, ack_serial, change),
1400 __field(unsigned int, call )
1401 __field(enum rxrpc_congest_change, change )
1402 __field(rxrpc_seq_t, hard_ack )
1403 __field(rxrpc_seq_t, top )
1404 __field(rxrpc_seq_t, lowest_nak )
1405 __field(rxrpc_serial_t, ack_serial )
1406 __field_struct(struct rxrpc_ack_summary, sum )
1410 __entry->call = call->debug_id;
1411 __entry->change = change;
1412 __entry->hard_ack = call->acks_hard_ack;
1413 __entry->top = call->tx_top;
1414 __entry->lowest_nak = call->acks_lowest_nak;
1415 __entry->ack_serial = ack_serial;
1416 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1419 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",
1421 __entry->ack_serial,
1422 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1424 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1426 __entry->sum.ssthresh,
1427 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1428 __entry->sum.nr_new_acks,
1429 __entry->sum.nr_rot_new_acks,
1430 __entry->top - __entry->hard_ack,
1431 __entry->sum.cumulative_acks,
1432 __entry->sum.dup_acks,
1433 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1434 __print_symbolic(__entry->change, rxrpc_congest_changes),
1435 __entry->sum.retrans_timeo ? " rTxTo" : "")
1438 TRACE_EVENT(rxrpc_disconnect_call,
1439 TP_PROTO(struct rxrpc_call *call),
1444 __field(unsigned int, call )
1445 __field(u32, abort_code )
1449 __entry->call = call->debug_id;
1450 __entry->abort_code = call->abort_code;
1453 TP_printk("c=%08x ab=%08x",
1455 __entry->abort_code)
1458 TRACE_EVENT(rxrpc_improper_term,
1459 TP_PROTO(struct rxrpc_call *call),
1464 __field(unsigned int, call )
1465 __field(u32, abort_code )
1469 __entry->call = call->debug_id;
1470 __entry->abort_code = call->abort_code;
1473 TP_printk("c=%08x ab=%08x",
1475 __entry->abort_code)
1478 TRACE_EVENT(rxrpc_rx_eproto,
1479 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1482 TP_ARGS(call, serial, why),
1485 __field(unsigned int, call )
1486 __field(rxrpc_serial_t, serial )
1487 __field(const char *, why )
1491 __entry->call = call ? call->debug_id : 0;
1492 __entry->serial = serial;
1496 TP_printk("c=%08x EPROTO %08x %s",
1502 TRACE_EVENT(rxrpc_connect_call,
1503 TP_PROTO(struct rxrpc_call *call),
1508 __field(unsigned int, call )
1509 __field(unsigned long, user_call_ID )
1511 __field(u32, call_id )
1515 __entry->call = call->debug_id;
1516 __entry->user_call_ID = call->user_call_ID;
1517 __entry->cid = call->cid;
1518 __entry->call_id = call->call_id;
1521 TP_printk("c=%08x u=%p %08x:%08x",
1523 (void *)__entry->user_call_ID,
1528 TRACE_EVENT(rxrpc_resend,
1529 TP_PROTO(struct rxrpc_call *call),
1534 __field(unsigned int, call )
1535 __field(rxrpc_seq_t, seq )
1539 __entry->call = call->debug_id;
1540 __entry->seq = call->acks_hard_ack;
1543 TP_printk("c=%08x q=%x",
1548 TRACE_EVENT(rxrpc_rx_icmp,
1549 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1550 struct sockaddr_rxrpc *srx),
1552 TP_ARGS(peer, ee, srx),
1555 __field(unsigned int, peer )
1556 __field_struct(struct sock_extended_err, ee )
1557 __field_struct(struct sockaddr_rxrpc, srx )
1561 __entry->peer = peer->debug_id;
1562 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1563 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1566 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1568 __entry->ee.ee_origin,
1569 __entry->ee.ee_type,
1570 __entry->ee.ee_code,
1571 __entry->ee.ee_info,
1572 __entry->ee.ee_data,
1573 __entry->ee.ee_errno,
1574 &__entry->srx.transport)
1577 TRACE_EVENT(rxrpc_tx_fail,
1578 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1579 enum rxrpc_tx_point where),
1581 TP_ARGS(debug_id, serial, ret, where),
1584 __field(unsigned int, debug_id )
1585 __field(rxrpc_serial_t, serial )
1587 __field(enum rxrpc_tx_point, where )
1591 __entry->debug_id = debug_id;
1592 __entry->serial = serial;
1594 __entry->where = where;
1597 TP_printk("c=%08x r=%x ret=%d %s",
1601 __print_symbolic(__entry->where, rxrpc_tx_points))
1604 TRACE_EVENT(rxrpc_call_reset,
1605 TP_PROTO(struct rxrpc_call *call),
1610 __field(unsigned int, debug_id )
1612 __field(u32, call_id )
1613 __field(rxrpc_serial_t, call_serial )
1614 __field(rxrpc_serial_t, conn_serial )
1615 __field(rxrpc_seq_t, tx_seq )
1616 __field(rxrpc_seq_t, rx_seq )
1620 __entry->debug_id = call->debug_id;
1621 __entry->cid = call->cid;
1622 __entry->call_id = call->call_id;
1623 __entry->call_serial = call->rx_serial;
1624 __entry->conn_serial = call->conn->hi_serial;
1625 __entry->tx_seq = call->acks_hard_ack;
1626 __entry->rx_seq = call->rx_highest_seq;
1629 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1631 __entry->cid, __entry->call_id,
1632 __entry->call_serial, __entry->conn_serial,
1633 __entry->tx_seq, __entry->rx_seq)
1636 TRACE_EVENT(rxrpc_notify_socket,
1637 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1639 TP_ARGS(debug_id, serial),
1642 __field(unsigned int, debug_id )
1643 __field(rxrpc_serial_t, serial )
1647 __entry->debug_id = debug_id;
1648 __entry->serial = serial;
1651 TP_printk("c=%08x r=%08x",
1656 TRACE_EVENT(rxrpc_rx_discard_ack,
1657 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1658 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1659 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1661 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1662 prev_pkt, call_ackr_prev),
1665 __field(unsigned int, debug_id )
1666 __field(rxrpc_serial_t, serial )
1667 __field(rxrpc_seq_t, first_soft_ack)
1668 __field(rxrpc_seq_t, call_ackr_first)
1669 __field(rxrpc_seq_t, prev_pkt)
1670 __field(rxrpc_seq_t, call_ackr_prev)
1674 __entry->debug_id = debug_id;
1675 __entry->serial = serial;
1676 __entry->first_soft_ack = first_soft_ack;
1677 __entry->call_ackr_first = call_ackr_first;
1678 __entry->prev_pkt = prev_pkt;
1679 __entry->call_ackr_prev = call_ackr_prev;
1682 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1685 __entry->first_soft_ack,
1686 __entry->call_ackr_first,
1688 __entry->call_ackr_prev)
1691 TRACE_EVENT(rxrpc_req_ack,
1692 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1693 enum rxrpc_req_ack_trace why),
1695 TP_ARGS(call_debug_id, seq, why),
1698 __field(unsigned int, call_debug_id )
1699 __field(rxrpc_seq_t, seq )
1700 __field(enum rxrpc_req_ack_trace, why )
1704 __entry->call_debug_id = call_debug_id;
1709 TP_printk("c=%08x q=%08x REQ-%s",
1710 __entry->call_debug_id,
1712 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1715 TRACE_EVENT(rxrpc_txbuf,
1716 TP_PROTO(unsigned int debug_id,
1717 unsigned int call_debug_id, rxrpc_seq_t seq,
1718 int ref, enum rxrpc_txbuf_trace what),
1720 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1723 __field(unsigned int, debug_id )
1724 __field(unsigned int, call_debug_id )
1725 __field(rxrpc_seq_t, seq )
1727 __field(enum rxrpc_txbuf_trace, what )
1731 __entry->debug_id = debug_id;
1732 __entry->call_debug_id = call_debug_id;
1735 __entry->what = what;
1738 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1740 __entry->call_debug_id,
1742 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1748 #endif /* _TRACE_RXRPC_H */
1750 /* This part must be outside protection */
1751 #include <trace/define_trace.h>