Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / trace / events / rxrpc.h
blobd03e0bd8c028b56357220e8995a444bb66c584d0
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)
6 */
7 #undef TRACE_SYSTEM
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_abort_reasons \
20 /* AFS errors */ \
21 EM(afs_abort_general_error, "afs-error") \
22 EM(afs_abort_interrupted, "afs-intr") \
23 EM(afs_abort_oom, "afs-oom") \
24 EM(afs_abort_op_not_supported, "afs-op-notsupp") \
25 EM(afs_abort_probeuuid_negative, "afs-probeuuid-neg") \
26 EM(afs_abort_send_data_error, "afs-send-data") \
27 EM(afs_abort_unmarshal_error, "afs-unmarshal") \
28 /* rxperf errors */ \
29 EM(rxperf_abort_general_error, "rxperf-error") \
30 EM(rxperf_abort_oom, "rxperf-oom") \
31 EM(rxperf_abort_op_not_supported, "rxperf-op-notsupp") \
32 EM(rxperf_abort_unmarshal_error, "rxperf-unmarshal") \
33 /* RxKAD security errors */ \
34 EM(rxkad_abort_1_short_check, "rxkad1-short-check") \
35 EM(rxkad_abort_1_short_data, "rxkad1-short-data") \
36 EM(rxkad_abort_1_short_encdata, "rxkad1-short-encdata") \
37 EM(rxkad_abort_1_short_header, "rxkad1-short-hdr") \
38 EM(rxkad_abort_2_short_check, "rxkad2-short-check") \
39 EM(rxkad_abort_2_short_data, "rxkad2-short-data") \
40 EM(rxkad_abort_2_short_header, "rxkad2-short-hdr") \
41 EM(rxkad_abort_2_short_len, "rxkad2-short-len") \
42 EM(rxkad_abort_bad_checksum, "rxkad2-bad-cksum") \
43 EM(rxkad_abort_chall_key_expired, "rxkad-chall-key-exp") \
44 EM(rxkad_abort_chall_level, "rxkad-chall-level") \
45 EM(rxkad_abort_chall_no_key, "rxkad-chall-nokey") \
46 EM(rxkad_abort_chall_short, "rxkad-chall-short") \
47 EM(rxkad_abort_chall_version, "rxkad-chall-version") \
48 EM(rxkad_abort_resp_bad_callid, "rxkad-resp-bad-callid") \
49 EM(rxkad_abort_resp_bad_checksum, "rxkad-resp-bad-cksum") \
50 EM(rxkad_abort_resp_bad_param, "rxkad-resp-bad-param") \
51 EM(rxkad_abort_resp_call_ctr, "rxkad-resp-call-ctr") \
52 EM(rxkad_abort_resp_call_state, "rxkad-resp-call-state") \
53 EM(rxkad_abort_resp_key_expired, "rxkad-resp-key-exp") \
54 EM(rxkad_abort_resp_key_rejected, "rxkad-resp-key-rej") \
55 EM(rxkad_abort_resp_level, "rxkad-resp-level") \
56 EM(rxkad_abort_resp_nokey, "rxkad-resp-nokey") \
57 EM(rxkad_abort_resp_ooseq, "rxkad-resp-ooseq") \
58 EM(rxkad_abort_resp_short, "rxkad-resp-short") \
59 EM(rxkad_abort_resp_short_tkt, "rxkad-resp-short-tkt") \
60 EM(rxkad_abort_resp_tkt_aname, "rxkad-resp-tk-aname") \
61 EM(rxkad_abort_resp_tkt_expired, "rxkad-resp-tk-exp") \
62 EM(rxkad_abort_resp_tkt_future, "rxkad-resp-tk-future") \
63 EM(rxkad_abort_resp_tkt_inst, "rxkad-resp-tk-inst") \
64 EM(rxkad_abort_resp_tkt_len, "rxkad-resp-tk-len") \
65 EM(rxkad_abort_resp_tkt_realm, "rxkad-resp-tk-realm") \
66 EM(rxkad_abort_resp_tkt_short, "rxkad-resp-tk-short") \
67 EM(rxkad_abort_resp_tkt_sinst, "rxkad-resp-tk-sinst") \
68 EM(rxkad_abort_resp_tkt_sname, "rxkad-resp-tk-sname") \
69 EM(rxkad_abort_resp_unknown_tkt, "rxkad-resp-unknown-tkt") \
70 EM(rxkad_abort_resp_version, "rxkad-resp-version") \
71 /* rxrpc errors */ \
72 EM(rxrpc_abort_call_improper_term, "call-improper-term") \
73 EM(rxrpc_abort_call_reset, "call-reset") \
74 EM(rxrpc_abort_call_sendmsg, "call-sendmsg") \
75 EM(rxrpc_abort_call_sock_release, "call-sock-rel") \
76 EM(rxrpc_abort_call_sock_release_tba, "call-sock-rel-tba") \
77 EM(rxrpc_abort_call_timeout, "call-timeout") \
78 EM(rxrpc_abort_no_service_key, "no-serv-key") \
79 EM(rxrpc_abort_nomem, "nomem") \
80 EM(rxrpc_abort_service_not_offered, "serv-not-offered") \
81 EM(rxrpc_abort_shut_down, "shut-down") \
82 EM(rxrpc_abort_unsupported_security, "unsup-sec") \
83 EM(rxrpc_badmsg_bad_abort, "bad-abort") \
84 EM(rxrpc_badmsg_bad_jumbo, "bad-jumbo") \
85 EM(rxrpc_badmsg_short_ack, "short-ack") \
86 EM(rxrpc_badmsg_short_ack_trailer, "short-ack-trailer") \
87 EM(rxrpc_badmsg_short_hdr, "short-hdr") \
88 EM(rxrpc_badmsg_unsupported_packet, "unsup-pkt") \
89 EM(rxrpc_badmsg_zero_call, "zero-call") \
90 EM(rxrpc_badmsg_zero_seq, "zero-seq") \
91 EM(rxrpc_badmsg_zero_service, "zero-service") \
92 EM(rxrpc_eproto_ackr_outside_window, "ackr-out-win") \
93 EM(rxrpc_eproto_ackr_sack_overflow, "ackr-sack-over") \
94 EM(rxrpc_eproto_ackr_short_sack, "ackr-short-sack") \
95 EM(rxrpc_eproto_ackr_zero, "ackr-zero") \
96 EM(rxrpc_eproto_bad_upgrade, "bad-upgrade") \
97 EM(rxrpc_eproto_data_after_last, "data-after-last") \
98 EM(rxrpc_eproto_different_last, "diff-last") \
99 EM(rxrpc_eproto_early_reply, "early-reply") \
100 EM(rxrpc_eproto_improper_term, "improper-term") \
101 EM(rxrpc_eproto_no_client_call, "no-cl-call") \
102 EM(rxrpc_eproto_no_client_conn, "no-cl-conn") \
103 EM(rxrpc_eproto_no_service_call, "no-sv-call") \
104 EM(rxrpc_eproto_reupgrade, "re-upgrade") \
105 EM(rxrpc_eproto_rxnull_challenge, "rxnull-chall") \
106 EM(rxrpc_eproto_rxnull_response, "rxnull-resp") \
107 EM(rxrpc_eproto_tx_rot_last, "tx-rot-last") \
108 EM(rxrpc_eproto_unexpected_ack, "unex-ack") \
109 EM(rxrpc_eproto_unexpected_ackall, "unex-ackall") \
110 EM(rxrpc_eproto_unexpected_implicit_end, "unex-impl-end") \
111 EM(rxrpc_eproto_unexpected_reply, "unex-reply") \
112 EM(rxrpc_eproto_wrong_security, "wrong-sec") \
113 EM(rxrpc_recvmsg_excess_data, "recvmsg-excess") \
114 EM(rxrpc_recvmsg_short_data, "recvmsg-short") \
115 E_(rxrpc_sendmsg_late_send, "sendmsg-late")
117 #define rxrpc_call_poke_traces \
118 EM(rxrpc_call_poke_abort, "Abort") \
119 EM(rxrpc_call_poke_complete, "Compl") \
120 EM(rxrpc_call_poke_error, "Error") \
121 EM(rxrpc_call_poke_idle, "Idle") \
122 EM(rxrpc_call_poke_set_timeout, "Set-timo") \
123 EM(rxrpc_call_poke_start, "Start") \
124 EM(rxrpc_call_poke_timer, "Timer") \
125 E_(rxrpc_call_poke_timer_now, "Timer-now")
127 #define rxrpc_skb_traces \
128 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \
129 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \
130 EM(rxrpc_skb_get_conn_secured, "GET conn-secd") \
131 EM(rxrpc_skb_get_conn_work, "GET conn-work") \
132 EM(rxrpc_skb_get_last_nack, "GET last-nack") \
133 EM(rxrpc_skb_get_local_work, "GET locl-work") \
134 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \
135 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
136 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
137 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
138 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
139 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
140 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
141 EM(rxrpc_skb_put_conn_secured, "PUT conn-secd") \
142 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \
143 EM(rxrpc_skb_put_error_report, "PUT error-rep") \
144 EM(rxrpc_skb_put_input, "PUT input ") \
145 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \
146 EM(rxrpc_skb_put_last_nack, "PUT last-nack") \
147 EM(rxrpc_skb_put_purge, "PUT purge ") \
148 EM(rxrpc_skb_put_rotate, "PUT rotate ") \
149 EM(rxrpc_skb_put_unknown, "PUT unknown ") \
150 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \
151 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \
152 EM(rxrpc_skb_see_reject, "SEE reject ") \
153 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
154 E_(rxrpc_skb_see_version, "SEE version ")
156 #define rxrpc_local_traces \
157 EM(rxrpc_local_free, "FREE ") \
158 EM(rxrpc_local_get_call, "GET call ") \
159 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
160 EM(rxrpc_local_get_for_use, "GET for-use ") \
161 EM(rxrpc_local_get_peer, "GET peer ") \
162 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
163 EM(rxrpc_local_new, "NEW ") \
164 EM(rxrpc_local_put_bind, "PUT bind ") \
165 EM(rxrpc_local_put_call, "PUT call ") \
166 EM(rxrpc_local_put_for_use, "PUT for-use ") \
167 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
168 EM(rxrpc_local_put_peer, "PUT peer ") \
169 EM(rxrpc_local_put_prealloc_peer, "PUT peer-pre") \
170 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
171 EM(rxrpc_local_stop, "STOP ") \
172 EM(rxrpc_local_stopped, "STOPPED ") \
173 EM(rxrpc_local_unuse_bind, "UNU bind ") \
174 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
175 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
176 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
177 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
178 EM(rxrpc_local_use_lookup, "USE lookup ") \
179 E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa")
181 #define rxrpc_peer_traces \
182 EM(rxrpc_peer_free, "FREE ") \
183 EM(rxrpc_peer_get_accept, "GET accept ") \
184 EM(rxrpc_peer_get_application, "GET app ") \
185 EM(rxrpc_peer_get_bundle, "GET bundle ") \
186 EM(rxrpc_peer_get_call, "GET call ") \
187 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
188 EM(rxrpc_peer_get_input, "GET input ") \
189 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
190 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
191 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
192 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
193 EM(rxrpc_peer_new_client, "NEW client ") \
194 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
195 EM(rxrpc_peer_put_application, "PUT app ") \
196 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
197 EM(rxrpc_peer_put_call, "PUT call ") \
198 EM(rxrpc_peer_put_conn, "PUT conn ") \
199 EM(rxrpc_peer_put_input, "PUT input ") \
200 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
201 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
203 #define rxrpc_bundle_traces \
204 EM(rxrpc_bundle_free, "FREE ") \
205 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
206 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
207 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
208 EM(rxrpc_bundle_put_call, "PUT call ") \
209 EM(rxrpc_bundle_put_conn, "PUT conn ") \
210 EM(rxrpc_bundle_put_discard, "PUT discard ") \
211 E_(rxrpc_bundle_new, "NEW ")
213 #define rxrpc_conn_traces \
214 EM(rxrpc_conn_free, "FREE ") \
215 EM(rxrpc_conn_get_activate_call, "GET act-call") \
216 EM(rxrpc_conn_get_call_input, "GET inp-call") \
217 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
218 EM(rxrpc_conn_get_idle, "GET idle ") \
219 EM(rxrpc_conn_get_poke_abort, "GET pk-abort") \
220 EM(rxrpc_conn_get_poke_timer, "GET poke ") \
221 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
222 EM(rxrpc_conn_new_client, "NEW client ") \
223 EM(rxrpc_conn_new_service, "NEW service ") \
224 EM(rxrpc_conn_put_call, "PUT call ") \
225 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
226 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
227 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
228 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
229 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
230 EM(rxrpc_conn_put_poke, "PUT poke ") \
231 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \
232 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
233 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
234 EM(rxrpc_conn_put_work, "PUT work ") \
235 EM(rxrpc_conn_queue_challenge, "QUE chall ") \
236 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
237 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
238 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
239 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
240 E_(rxrpc_conn_see_work, "SEE work ")
242 #define rxrpc_client_traces \
243 EM(rxrpc_client_activate_chans, "Activa") \
244 EM(rxrpc_client_alloc, "Alloc ") \
245 EM(rxrpc_client_chan_activate, "ChActv") \
246 EM(rxrpc_client_chan_disconnect, "ChDisc") \
247 EM(rxrpc_client_chan_pass, "ChPass") \
248 EM(rxrpc_client_cleanup, "Clean ") \
249 EM(rxrpc_client_discard, "Discar") \
250 EM(rxrpc_client_exposed, "Expose") \
251 EM(rxrpc_client_replace, "Replac") \
252 EM(rxrpc_client_queue_new_call, "Q-Call") \
253 EM(rxrpc_client_to_active, "->Actv") \
254 E_(rxrpc_client_to_idle, "->Idle")
256 #define rxrpc_call_traces \
257 EM(rxrpc_call_get_io_thread, "GET iothread") \
258 EM(rxrpc_call_get_input, "GET input ") \
259 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
260 EM(rxrpc_call_get_notify_socket, "GET notify ") \
261 EM(rxrpc_call_get_poke, "GET poke ") \
262 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
263 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
264 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
265 EM(rxrpc_call_get_userid, "GET user-id ") \
266 EM(rxrpc_call_new_client, "NEW client ") \
267 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
268 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
269 EM(rxrpc_call_put_discard_error, "PUT disc-err") \
270 EM(rxrpc_call_put_io_thread, "PUT iothread") \
271 EM(rxrpc_call_put_input, "PUT input ") \
272 EM(rxrpc_call_put_kernel, "PUT kernel ") \
273 EM(rxrpc_call_put_poke, "PUT poke ") \
274 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
275 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
276 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
277 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
278 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
279 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
280 EM(rxrpc_call_put_userid, "PUT user-id ") \
281 EM(rxrpc_call_see_accept, "SEE accept ") \
282 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
283 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
284 EM(rxrpc_call_see_connected, "SEE connect ") \
285 EM(rxrpc_call_see_disconnected, "SEE disconn ") \
286 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
287 EM(rxrpc_call_see_input, "SEE input ") \
288 EM(rxrpc_call_see_release, "SEE release ") \
289 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
290 EM(rxrpc_call_see_waiting_call, "SEE q-conn ") \
291 E_(rxrpc_call_see_zap, "SEE zap ")
293 #define rxrpc_txqueue_traces \
294 EM(rxrpc_txqueue_await_reply, "AWR") \
295 EM(rxrpc_txqueue_dequeue, "DEQ") \
296 EM(rxrpc_txqueue_end, "END") \
297 EM(rxrpc_txqueue_queue, "QUE") \
298 EM(rxrpc_txqueue_queue_last, "QLS") \
299 EM(rxrpc_txqueue_rotate, "ROT") \
300 EM(rxrpc_txqueue_rotate_last, "RLS") \
301 E_(rxrpc_txqueue_wait, "WAI")
303 #define rxrpc_receive_traces \
304 EM(rxrpc_receive_end, "END") \
305 EM(rxrpc_receive_front, "FRN") \
306 EM(rxrpc_receive_incoming, "INC") \
307 EM(rxrpc_receive_queue, "QUE") \
308 EM(rxrpc_receive_queue_last, "QLS") \
309 EM(rxrpc_receive_queue_oos, "QUO") \
310 EM(rxrpc_receive_queue_oos_last, "QOL") \
311 EM(rxrpc_receive_oos, "OOS") \
312 EM(rxrpc_receive_oos_last, "OSL") \
313 EM(rxrpc_receive_rotate, "ROT") \
314 E_(rxrpc_receive_rotate_last, "RLS")
316 #define rxrpc_recvmsg_traces \
317 EM(rxrpc_recvmsg_cont, "CONT") \
318 EM(rxrpc_recvmsg_data_return, "DATA") \
319 EM(rxrpc_recvmsg_dequeue, "DEQU") \
320 EM(rxrpc_recvmsg_enter, "ENTR") \
321 EM(rxrpc_recvmsg_full, "FULL") \
322 EM(rxrpc_recvmsg_hole, "HOLE") \
323 EM(rxrpc_recvmsg_next, "NEXT") \
324 EM(rxrpc_recvmsg_requeue, "REQU") \
325 EM(rxrpc_recvmsg_return, "RETN") \
326 EM(rxrpc_recvmsg_terminal, "TERM") \
327 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
328 EM(rxrpc_recvmsg_unqueue, "UNQU") \
329 E_(rxrpc_recvmsg_wait, "WAIT")
331 #define rxrpc_rtt_tx_traces \
332 EM(rxrpc_rtt_tx_cancel, "CNCE") \
333 EM(rxrpc_rtt_tx_data, "DATA") \
334 EM(rxrpc_rtt_tx_no_slot, "FULL") \
335 E_(rxrpc_rtt_tx_ping, "PING")
337 #define rxrpc_rtt_rx_traces \
338 EM(rxrpc_rtt_rx_other_ack, "OACK") \
339 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
340 EM(rxrpc_rtt_rx_lost, "LOST") \
341 EM(rxrpc_rtt_rx_ping_response, "PONG") \
342 E_(rxrpc_rtt_rx_requested_ack, "RACK")
344 #define rxrpc_timer_traces \
345 EM(rxrpc_timer_trace_delayed_ack, "DelayAck ") \
346 EM(rxrpc_timer_trace_expect_rx, "ExpectRx ") \
347 EM(rxrpc_timer_trace_hard, "HardLimit") \
348 EM(rxrpc_timer_trace_idle, "IdleLimit") \
349 EM(rxrpc_timer_trace_keepalive, "KeepAlive") \
350 EM(rxrpc_timer_trace_lost_ack, "LostAck ") \
351 EM(rxrpc_timer_trace_ping, "DelayPing") \
352 EM(rxrpc_timer_trace_resend, "Resend ") \
353 EM(rxrpc_timer_trace_resend_reset, "ResendRst") \
354 E_(rxrpc_timer_trace_resend_tx, "ResendTx ")
356 #define rxrpc_propose_ack_traces \
357 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
358 EM(rxrpc_propose_ack_delayed_ack, "DlydAck") \
359 EM(rxrpc_propose_ack_input_data, "DataIn ") \
360 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
361 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
362 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
363 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
364 EM(rxrpc_propose_ack_ping_for_0_retrans, "0-Retrn") \
365 EM(rxrpc_propose_ack_ping_for_old_rtt, "OldRtt ") \
366 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
367 EM(rxrpc_propose_ack_ping_for_rtt, "Rtt ") \
368 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
369 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
370 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
371 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
372 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
373 EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \
374 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
376 #define rxrpc_congest_modes \
377 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
378 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
379 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
380 E_(RXRPC_CALL_SLOW_START, "SlowStart")
382 #define rxrpc_congest_changes \
383 EM(rxrpc_cong_begin_retransmission, " Retrans") \
384 EM(rxrpc_cong_cleared_nacks, " Cleared") \
385 EM(rxrpc_cong_new_low_nack, " NewLowN") \
386 EM(rxrpc_cong_no_change, " -") \
387 EM(rxrpc_cong_progress, " Progres") \
388 EM(rxrpc_cong_idle_reset, " IdleRes") \
389 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
390 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
391 E_(rxrpc_cong_saw_nack, " SawNack")
393 #define rxrpc_pkts \
394 EM(0, "?00") \
395 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
396 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
397 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
398 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
399 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
400 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
401 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
402 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
403 EM(9, "?09") \
404 EM(10, "?10") \
405 EM(11, "?11") \
406 EM(12, "?12") \
407 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
408 EM(14, "?14") \
409 E_(15, "?15")
411 #define rxrpc_ack_names \
412 EM(0, "-0-") \
413 EM(RXRPC_ACK_REQUESTED, "REQ") \
414 EM(RXRPC_ACK_DUPLICATE, "DUP") \
415 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
416 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
417 EM(RXRPC_ACK_NOSPACE, "MEM") \
418 EM(RXRPC_ACK_PING, "PNG") \
419 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
420 EM(RXRPC_ACK_DELAY, "DLY") \
421 EM(RXRPC_ACK_IDLE, "IDL") \
422 E_(RXRPC_ACK__INVALID, "-?-")
424 #define rxrpc_sack_traces \
425 EM(rxrpc_sack_advance, "ADV") \
426 EM(rxrpc_sack_fill, "FIL") \
427 EM(rxrpc_sack_nack, "NAK") \
428 EM(rxrpc_sack_none, "---") \
429 E_(rxrpc_sack_oos, "OOS")
431 #define rxrpc_completions \
432 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
433 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
434 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
435 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
436 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
438 #define rxrpc_tx_points \
439 EM(rxrpc_tx_point_call_abort, "CallAbort") \
440 EM(rxrpc_tx_point_call_ack, "CallAck") \
441 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
442 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
443 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
444 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
445 EM(rxrpc_tx_point_reject, "Reject") \
446 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
447 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
448 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
449 E_(rxrpc_tx_point_version_reply, "VerReply")
451 #define rxrpc_req_ack_traces \
452 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
453 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
454 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
455 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
456 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
457 EM(rxrpc_reqack_retrans, "RETRANS ") \
458 EM(rxrpc_reqack_slow_start, "SLOW-START") \
459 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
460 /* ---- Must update size of stat_why_req_ack[] if more are added! */
462 #define rxrpc_txbuf_traces \
463 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
464 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
465 EM(rxrpc_txbuf_free, "FREE ") \
466 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
467 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
468 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
469 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
470 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
471 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
472 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
473 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
474 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
475 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
476 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
477 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
480 * Generate enums for tracing information.
482 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
483 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
485 #undef EM
486 #undef E_
487 #define EM(a, b) a,
488 #define E_(a, b) a
490 enum rxrpc_abort_reason { rxrpc_abort_reasons } __mode(byte);
491 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
492 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
493 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
494 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
495 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
496 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
497 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
498 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
499 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
500 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
501 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
502 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
503 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
504 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
505 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
506 enum rxrpc_sack_trace { rxrpc_sack_traces } __mode(byte);
507 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
508 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
509 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
510 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
511 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
513 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
516 * Export enum symbols via userspace.
518 #undef EM
519 #undef E_
521 #ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS
523 #define EM(a, b) TRACE_DEFINE_ENUM(a);
524 #define E_(a, b) TRACE_DEFINE_ENUM(a);
526 rxrpc_abort_reasons;
527 rxrpc_bundle_traces;
528 rxrpc_call_poke_traces;
529 rxrpc_call_traces;
530 rxrpc_client_traces;
531 rxrpc_congest_changes;
532 rxrpc_congest_modes;
533 rxrpc_conn_traces;
534 rxrpc_local_traces;
535 rxrpc_propose_ack_traces;
536 rxrpc_receive_traces;
537 rxrpc_recvmsg_traces;
538 rxrpc_req_ack_traces;
539 rxrpc_rtt_rx_traces;
540 rxrpc_rtt_tx_traces;
541 rxrpc_sack_traces;
542 rxrpc_skb_traces;
543 rxrpc_timer_traces;
544 rxrpc_tx_points;
545 rxrpc_txbuf_traces;
546 rxrpc_txqueue_traces;
549 * Now redefine the EM() and E_() macros to map the enums to the strings that
550 * will be printed in the output.
552 #undef EM
553 #undef E_
554 #define EM(a, b) { a, b },
555 #define E_(a, b) { a, b }
557 TRACE_EVENT(rxrpc_local,
558 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
559 int ref, int usage),
561 TP_ARGS(local_debug_id, op, ref, usage),
563 TP_STRUCT__entry(
564 __field(unsigned int, local)
565 __field(int, op)
566 __field(int, ref)
567 __field(int, usage)
570 TP_fast_assign(
571 __entry->local = local_debug_id;
572 __entry->op = op;
573 __entry->ref = ref;
574 __entry->usage = usage;
577 TP_printk("L=%08x %s r=%d u=%d",
578 __entry->local,
579 __print_symbolic(__entry->op, rxrpc_local_traces),
580 __entry->ref,
581 __entry->usage)
584 TRACE_EVENT(rxrpc_peer,
585 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
587 TP_ARGS(peer_debug_id, ref, why),
589 TP_STRUCT__entry(
590 __field(unsigned int, peer)
591 __field(int, ref)
592 __field(enum rxrpc_peer_trace, why)
595 TP_fast_assign(
596 __entry->peer = peer_debug_id;
597 __entry->ref = ref;
598 __entry->why = why;
601 TP_printk("P=%08x %s r=%d",
602 __entry->peer,
603 __print_symbolic(__entry->why, rxrpc_peer_traces),
604 __entry->ref)
607 TRACE_EVENT(rxrpc_bundle,
608 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
610 TP_ARGS(bundle_debug_id, ref, why),
612 TP_STRUCT__entry(
613 __field(unsigned int, bundle)
614 __field(int, ref)
615 __field(int, why)
618 TP_fast_assign(
619 __entry->bundle = bundle_debug_id;
620 __entry->ref = ref;
621 __entry->why = why;
624 TP_printk("CB=%08x %s r=%d",
625 __entry->bundle,
626 __print_symbolic(__entry->why, rxrpc_bundle_traces),
627 __entry->ref)
630 TRACE_EVENT(rxrpc_conn,
631 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
633 TP_ARGS(conn_debug_id, ref, why),
635 TP_STRUCT__entry(
636 __field(unsigned int, conn)
637 __field(int, ref)
638 __field(int, why)
641 TP_fast_assign(
642 __entry->conn = conn_debug_id;
643 __entry->ref = ref;
644 __entry->why = why;
647 TP_printk("C=%08x %s r=%d",
648 __entry->conn,
649 __print_symbolic(__entry->why, rxrpc_conn_traces),
650 __entry->ref)
653 TRACE_EVENT(rxrpc_client,
654 TP_PROTO(struct rxrpc_connection *conn, int channel,
655 enum rxrpc_client_trace op),
657 TP_ARGS(conn, channel, op),
659 TP_STRUCT__entry(
660 __field(unsigned int, conn)
661 __field(u32, cid)
662 __field(int, channel)
663 __field(int, usage)
664 __field(enum rxrpc_client_trace, op)
667 TP_fast_assign(
668 __entry->conn = conn ? conn->debug_id : 0;
669 __entry->channel = channel;
670 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
671 __entry->op = op;
672 __entry->cid = conn ? conn->proto.cid : 0;
675 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
676 __entry->conn,
677 __entry->channel,
678 __print_symbolic(__entry->op, rxrpc_client_traces),
679 __entry->cid,
680 __entry->usage)
683 TRACE_EVENT(rxrpc_call,
684 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
685 enum rxrpc_call_trace why),
687 TP_ARGS(call_debug_id, ref, aux, why),
689 TP_STRUCT__entry(
690 __field(unsigned int, call)
691 __field(int, ref)
692 __field(int, why)
693 __field(unsigned long, aux)
696 TP_fast_assign(
697 __entry->call = call_debug_id;
698 __entry->ref = ref;
699 __entry->why = why;
700 __entry->aux = aux;
703 TP_printk("c=%08x %s r=%d a=%lx",
704 __entry->call,
705 __print_symbolic(__entry->why, rxrpc_call_traces),
706 __entry->ref,
707 __entry->aux)
710 TRACE_EVENT(rxrpc_skb,
711 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
712 enum rxrpc_skb_trace why),
714 TP_ARGS(skb, usage, mod_count, why),
716 TP_STRUCT__entry(
717 __field(struct sk_buff *, skb)
718 __field(int, usage)
719 __field(int, mod_count)
720 __field(enum rxrpc_skb_trace, why)
723 TP_fast_assign(
724 __entry->skb = skb;
725 __entry->usage = usage;
726 __entry->mod_count = mod_count;
727 __entry->why = why;
730 TP_printk("s=%p Rx %s u=%d m=%d",
731 __entry->skb,
732 __print_symbolic(__entry->why, rxrpc_skb_traces),
733 __entry->usage,
734 __entry->mod_count)
737 TRACE_EVENT(rxrpc_rx_packet,
738 TP_PROTO(struct rxrpc_skb_priv *sp),
740 TP_ARGS(sp),
742 TP_STRUCT__entry(
743 __field_struct(struct rxrpc_host_header, hdr)
746 TP_fast_assign(
747 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
750 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
751 __entry->hdr.epoch, __entry->hdr.cid,
752 __entry->hdr.callNumber, __entry->hdr.serviceId,
753 __entry->hdr.serial, __entry->hdr.seq,
754 __entry->hdr.securityIndex, __entry->hdr.flags,
755 __print_symbolic(__entry->hdr.type, rxrpc_pkts))
758 TRACE_EVENT(rxrpc_rx_done,
759 TP_PROTO(int result, int abort_code),
761 TP_ARGS(result, abort_code),
763 TP_STRUCT__entry(
764 __field(int, result)
765 __field(int, abort_code)
768 TP_fast_assign(
769 __entry->result = result;
770 __entry->abort_code = abort_code;
773 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
776 TRACE_EVENT(rxrpc_abort_call,
777 TP_PROTO(const struct rxrpc_call *call, int abort_code),
779 TP_ARGS(call, abort_code),
781 TP_STRUCT__entry(
782 __field(unsigned int, call_nr)
783 __field(enum rxrpc_abort_reason, why)
784 __field(int, abort_code)
785 __field(int, error)
788 TP_fast_assign(
789 __entry->call_nr = call->debug_id;
790 __entry->why = call->send_abort_why;
791 __entry->abort_code = abort_code;
792 __entry->error = call->send_abort_err;
795 TP_printk("c=%08x a=%d e=%d %s",
796 __entry->call_nr,
797 __entry->abort_code, __entry->error,
798 __print_symbolic(__entry->why, rxrpc_abort_reasons))
801 TRACE_EVENT(rxrpc_abort,
802 TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why,
803 u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error),
805 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
807 TP_STRUCT__entry(
808 __field(unsigned int, call_nr)
809 __field(enum rxrpc_abort_reason, why)
810 __field(u32, cid)
811 __field(u32, call_id)
812 __field(rxrpc_seq_t, seq)
813 __field(int, abort_code)
814 __field(int, error)
817 TP_fast_assign(
818 __entry->call_nr = call_nr;
819 __entry->why = why;
820 __entry->cid = cid;
821 __entry->call_id = call_id;
822 __entry->abort_code = abort_code;
823 __entry->error = error;
824 __entry->seq = seq;
827 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
828 __entry->call_nr,
829 __entry->cid, __entry->call_id, __entry->seq,
830 __entry->abort_code, __entry->error,
831 __print_symbolic(__entry->why, rxrpc_abort_reasons))
834 TRACE_EVENT(rxrpc_call_complete,
835 TP_PROTO(struct rxrpc_call *call),
837 TP_ARGS(call),
839 TP_STRUCT__entry(
840 __field(unsigned int, call)
841 __field(enum rxrpc_call_completion, compl)
842 __field(int, error)
843 __field(u32, abort_code)
846 TP_fast_assign(
847 __entry->call = call->debug_id;
848 __entry->compl = call->completion;
849 __entry->error = call->error;
850 __entry->abort_code = call->abort_code;
853 TP_printk("c=%08x %s r=%d ac=%d",
854 __entry->call,
855 __print_symbolic(__entry->compl, rxrpc_completions),
856 __entry->error,
857 __entry->abort_code)
860 TRACE_EVENT(rxrpc_txqueue,
861 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
863 TP_ARGS(call, why),
865 TP_STRUCT__entry(
866 __field(unsigned int, call)
867 __field(enum rxrpc_txqueue_trace, why)
868 __field(rxrpc_seq_t, acks_hard_ack)
869 __field(rxrpc_seq_t, tx_bottom)
870 __field(rxrpc_seq_t, tx_top)
871 __field(rxrpc_seq_t, tx_prepared)
872 __field(int, tx_winsize)
875 TP_fast_assign(
876 __entry->call = call->debug_id;
877 __entry->why = why;
878 __entry->acks_hard_ack = call->acks_hard_ack;
879 __entry->tx_bottom = call->tx_bottom;
880 __entry->tx_top = call->tx_top;
881 __entry->tx_prepared = call->tx_prepared;
882 __entry->tx_winsize = call->tx_winsize;
885 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
886 __entry->call,
887 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
888 __entry->tx_bottom,
889 __entry->acks_hard_ack,
890 __entry->tx_top - __entry->tx_bottom,
891 __entry->tx_top - __entry->acks_hard_ack,
892 __entry->tx_prepared - __entry->tx_bottom,
893 __entry->tx_winsize)
896 TRACE_EVENT(rxrpc_rx_data,
897 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
898 rxrpc_serial_t serial, u8 flags),
900 TP_ARGS(call, seq, serial, flags),
902 TP_STRUCT__entry(
903 __field(unsigned int, call)
904 __field(rxrpc_seq_t, seq)
905 __field(rxrpc_serial_t, serial)
906 __field(u8, flags)
909 TP_fast_assign(
910 __entry->call = call;
911 __entry->seq = seq;
912 __entry->serial = serial;
913 __entry->flags = flags;
916 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
917 __entry->call,
918 __entry->serial,
919 __entry->seq,
920 __entry->flags)
923 TRACE_EVENT(rxrpc_rx_ack,
924 TP_PROTO(struct rxrpc_call *call,
925 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
926 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
928 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
930 TP_STRUCT__entry(
931 __field(unsigned int, call)
932 __field(rxrpc_serial_t, serial)
933 __field(rxrpc_serial_t, ack_serial)
934 __field(rxrpc_seq_t, first)
935 __field(rxrpc_seq_t, prev)
936 __field(u8, reason)
937 __field(u8, n_acks)
940 TP_fast_assign(
941 __entry->call = call->debug_id;
942 __entry->serial = serial;
943 __entry->ack_serial = ack_serial;
944 __entry->first = first;
945 __entry->prev = prev;
946 __entry->reason = reason;
947 __entry->n_acks = n_acks;
950 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
951 __entry->call,
952 __entry->serial,
953 __print_symbolic(__entry->reason, rxrpc_ack_names),
954 __entry->ack_serial,
955 __entry->first,
956 __entry->prev,
957 __entry->n_acks)
960 TRACE_EVENT(rxrpc_rx_abort,
961 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
962 u32 abort_code),
964 TP_ARGS(call, serial, abort_code),
966 TP_STRUCT__entry(
967 __field(unsigned int, call)
968 __field(rxrpc_serial_t, serial)
969 __field(u32, abort_code)
972 TP_fast_assign(
973 __entry->call = call->debug_id;
974 __entry->serial = serial;
975 __entry->abort_code = abort_code;
978 TP_printk("c=%08x ABORT %08x ac=%d",
979 __entry->call,
980 __entry->serial,
981 __entry->abort_code)
984 TRACE_EVENT(rxrpc_rx_challenge,
985 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
986 u32 version, u32 nonce, u32 min_level),
988 TP_ARGS(conn, serial, version, nonce, min_level),
990 TP_STRUCT__entry(
991 __field(unsigned int, conn)
992 __field(rxrpc_serial_t, serial)
993 __field(u32, version)
994 __field(u32, nonce)
995 __field(u32, min_level)
998 TP_fast_assign(
999 __entry->conn = conn->debug_id;
1000 __entry->serial = serial;
1001 __entry->version = version;
1002 __entry->nonce = nonce;
1003 __entry->min_level = min_level;
1006 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
1007 __entry->conn,
1008 __entry->serial,
1009 __entry->version,
1010 __entry->nonce,
1011 __entry->min_level)
1014 TRACE_EVENT(rxrpc_rx_response,
1015 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
1016 u32 version, u32 kvno, u32 ticket_len),
1018 TP_ARGS(conn, serial, version, kvno, ticket_len),
1020 TP_STRUCT__entry(
1021 __field(unsigned int, conn)
1022 __field(rxrpc_serial_t, serial)
1023 __field(u32, version)
1024 __field(u32, kvno)
1025 __field(u32, ticket_len)
1028 TP_fast_assign(
1029 __entry->conn = conn->debug_id;
1030 __entry->serial = serial;
1031 __entry->version = version;
1032 __entry->kvno = kvno;
1033 __entry->ticket_len = ticket_len;
1036 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
1037 __entry->conn,
1038 __entry->serial,
1039 __entry->version,
1040 __entry->kvno,
1041 __entry->ticket_len)
1044 TRACE_EVENT(rxrpc_rx_rwind_change,
1045 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1046 u32 rwind, bool wake),
1048 TP_ARGS(call, serial, rwind, wake),
1050 TP_STRUCT__entry(
1051 __field(unsigned int, call)
1052 __field(rxrpc_serial_t, serial)
1053 __field(u32, rwind)
1054 __field(bool, wake)
1057 TP_fast_assign(
1058 __entry->call = call->debug_id;
1059 __entry->serial = serial;
1060 __entry->rwind = rwind;
1061 __entry->wake = wake;
1064 TP_printk("c=%08x %08x rw=%u%s",
1065 __entry->call,
1066 __entry->serial,
1067 __entry->rwind,
1068 __entry->wake ? " wake" : "")
1071 TRACE_EVENT(rxrpc_tx_packet,
1072 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
1073 enum rxrpc_tx_point where),
1075 TP_ARGS(call_id, whdr, where),
1077 TP_STRUCT__entry(
1078 __field(unsigned int, call)
1079 __field(enum rxrpc_tx_point, where)
1080 __field_struct(struct rxrpc_wire_header, whdr)
1083 TP_fast_assign(
1084 __entry->call = call_id;
1085 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
1086 __entry->where = where;
1089 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
1090 __entry->call,
1091 ntohl(__entry->whdr.epoch),
1092 ntohl(__entry->whdr.cid),
1093 ntohl(__entry->whdr.callNumber),
1094 ntohs(__entry->whdr.serviceId),
1095 ntohl(__entry->whdr.serial),
1096 ntohl(__entry->whdr.seq),
1097 __entry->whdr.type, __entry->whdr.flags,
1098 __entry->whdr.type <= 15 ?
1099 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
1100 __print_symbolic(__entry->where, rxrpc_tx_points))
1103 TRACE_EVENT(rxrpc_tx_data,
1104 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1105 rxrpc_serial_t serial, unsigned int flags, bool lose),
1107 TP_ARGS(call, seq, serial, flags, lose),
1109 TP_STRUCT__entry(
1110 __field(unsigned int, call)
1111 __field(rxrpc_seq_t, seq)
1112 __field(rxrpc_serial_t, serial)
1113 __field(u32, cid)
1114 __field(u32, call_id)
1115 __field(u16, flags)
1116 __field(bool, lose)
1119 TP_fast_assign(
1120 __entry->call = call->debug_id;
1121 __entry->cid = call->cid;
1122 __entry->call_id = call->call_id;
1123 __entry->seq = seq;
1124 __entry->serial = serial;
1125 __entry->flags = flags;
1126 __entry->lose = lose;
1129 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1130 __entry->call,
1131 __entry->cid,
1132 __entry->call_id,
1133 __entry->serial,
1134 __entry->seq,
1135 __entry->flags & RXRPC_TXBUF_WIRE_FLAGS,
1136 __entry->flags & RXRPC_TXBUF_RESENT ? " *RETRANS*" : "",
1137 __entry->lose ? " *LOSE*" : "")
1140 TRACE_EVENT(rxrpc_tx_ack,
1141 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1142 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1143 u8 reason, u8 n_acks, u16 rwind),
1145 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks, rwind),
1147 TP_STRUCT__entry(
1148 __field(unsigned int, call)
1149 __field(rxrpc_serial_t, serial)
1150 __field(rxrpc_seq_t, ack_first)
1151 __field(rxrpc_serial_t, ack_serial)
1152 __field(u8, reason)
1153 __field(u8, n_acks)
1154 __field(u16, rwind)
1157 TP_fast_assign(
1158 __entry->call = call;
1159 __entry->serial = serial;
1160 __entry->ack_first = ack_first;
1161 __entry->ack_serial = ack_serial;
1162 __entry->reason = reason;
1163 __entry->n_acks = n_acks;
1164 __entry->rwind = rwind;
1167 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u rw=%u",
1168 __entry->call,
1169 __entry->serial,
1170 __print_symbolic(__entry->reason, rxrpc_ack_names),
1171 __entry->ack_first,
1172 __entry->ack_serial,
1173 __entry->n_acks,
1174 __entry->rwind)
1177 TRACE_EVENT(rxrpc_receive,
1178 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1179 rxrpc_serial_t serial, rxrpc_seq_t seq),
1181 TP_ARGS(call, why, serial, seq),
1183 TP_STRUCT__entry(
1184 __field(unsigned int, call)
1185 __field(enum rxrpc_receive_trace, why)
1186 __field(rxrpc_serial_t, serial)
1187 __field(rxrpc_seq_t, seq)
1188 __field(rxrpc_seq_t, window)
1189 __field(rxrpc_seq_t, wtop)
1192 TP_fast_assign(
1193 __entry->call = call->debug_id;
1194 __entry->why = why;
1195 __entry->serial = serial;
1196 __entry->seq = seq;
1197 __entry->window = call->ackr_window;
1198 __entry->wtop = call->ackr_wtop;
1201 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1202 __entry->call,
1203 __print_symbolic(__entry->why, rxrpc_receive_traces),
1204 __entry->serial,
1205 __entry->seq,
1206 __entry->window,
1207 __entry->wtop)
1210 TRACE_EVENT(rxrpc_recvmsg,
1211 TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why,
1212 int ret),
1214 TP_ARGS(call_debug_id, why, ret),
1216 TP_STRUCT__entry(
1217 __field(unsigned int, call)
1218 __field(enum rxrpc_recvmsg_trace, why)
1219 __field(int, ret)
1222 TP_fast_assign(
1223 __entry->call = call_debug_id;
1224 __entry->why = why;
1225 __entry->ret = ret;
1228 TP_printk("c=%08x %s ret=%d",
1229 __entry->call,
1230 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1231 __entry->ret)
1234 TRACE_EVENT(rxrpc_recvdata,
1235 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1236 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1237 int ret),
1239 TP_ARGS(call, why, seq, offset, len, ret),
1241 TP_STRUCT__entry(
1242 __field(unsigned int, call)
1243 __field(enum rxrpc_recvmsg_trace, why)
1244 __field(rxrpc_seq_t, seq)
1245 __field(unsigned int, offset)
1246 __field(unsigned int, len)
1247 __field(int, ret)
1250 TP_fast_assign(
1251 __entry->call = call ? call->debug_id : 0;
1252 __entry->why = why;
1253 __entry->seq = seq;
1254 __entry->offset = offset;
1255 __entry->len = len;
1256 __entry->ret = ret;
1259 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1260 __entry->call,
1261 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1262 __entry->seq,
1263 __entry->offset,
1264 __entry->len,
1265 __entry->ret)
1268 TRACE_EVENT(rxrpc_rtt_tx,
1269 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1270 int slot, rxrpc_serial_t send_serial),
1272 TP_ARGS(call, why, slot, send_serial),
1274 TP_STRUCT__entry(
1275 __field(unsigned int, call)
1276 __field(enum rxrpc_rtt_tx_trace, why)
1277 __field(int, slot)
1278 __field(rxrpc_serial_t, send_serial)
1281 TP_fast_assign(
1282 __entry->call = call->debug_id;
1283 __entry->why = why;
1284 __entry->slot = slot;
1285 __entry->send_serial = send_serial;
1288 TP_printk("c=%08x [%d] %s sr=%08x",
1289 __entry->call,
1290 __entry->slot,
1291 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1292 __entry->send_serial)
1295 TRACE_EVENT(rxrpc_rtt_rx,
1296 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1297 int slot,
1298 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1299 u32 rtt, u32 rto),
1301 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1303 TP_STRUCT__entry(
1304 __field(unsigned int, call)
1305 __field(enum rxrpc_rtt_rx_trace, why)
1306 __field(int, slot)
1307 __field(rxrpc_serial_t, send_serial)
1308 __field(rxrpc_serial_t, resp_serial)
1309 __field(u32, rtt)
1310 __field(u32, rto)
1313 TP_fast_assign(
1314 __entry->call = call->debug_id;
1315 __entry->why = why;
1316 __entry->slot = slot;
1317 __entry->send_serial = send_serial;
1318 __entry->resp_serial = resp_serial;
1319 __entry->rtt = rtt;
1320 __entry->rto = rto;
1323 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1324 __entry->call,
1325 __entry->slot,
1326 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1327 __entry->send_serial,
1328 __entry->resp_serial,
1329 __entry->rtt,
1330 __entry->rto)
1333 TRACE_EVENT(rxrpc_timer_set,
1334 TP_PROTO(struct rxrpc_call *call, ktime_t delay,
1335 enum rxrpc_timer_trace why),
1337 TP_ARGS(call, delay, why),
1339 TP_STRUCT__entry(
1340 __field(unsigned int, call)
1341 __field(enum rxrpc_timer_trace, why)
1342 __field(ktime_t, delay)
1345 TP_fast_assign(
1346 __entry->call = call->debug_id;
1347 __entry->why = why;
1348 __entry->delay = delay;
1351 TP_printk("c=%08x %s to=%lld",
1352 __entry->call,
1353 __print_symbolic(__entry->why, rxrpc_timer_traces),
1354 ktime_to_us(__entry->delay))
1357 TRACE_EVENT(rxrpc_timer_exp,
1358 TP_PROTO(struct rxrpc_call *call, ktime_t delay,
1359 enum rxrpc_timer_trace why),
1361 TP_ARGS(call, delay, why),
1363 TP_STRUCT__entry(
1364 __field(unsigned int, call)
1365 __field(enum rxrpc_timer_trace, why)
1366 __field(ktime_t, delay)
1369 TP_fast_assign(
1370 __entry->call = call->debug_id;
1371 __entry->why = why;
1372 __entry->delay = delay;
1375 TP_printk("c=%08x %s to=%lld",
1376 __entry->call,
1377 __print_symbolic(__entry->why, rxrpc_timer_traces),
1378 ktime_to_us(__entry->delay))
1381 TRACE_EVENT(rxrpc_timer_can,
1382 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why),
1384 TP_ARGS(call, why),
1386 TP_STRUCT__entry(
1387 __field(unsigned int, call)
1388 __field(enum rxrpc_timer_trace, why)
1391 TP_fast_assign(
1392 __entry->call = call->debug_id;
1393 __entry->why = why;
1396 TP_printk("c=%08x %s",
1397 __entry->call,
1398 __print_symbolic(__entry->why, rxrpc_timer_traces))
1401 TRACE_EVENT(rxrpc_timer_restart,
1402 TP_PROTO(struct rxrpc_call *call, ktime_t delay, unsigned long delayj),
1404 TP_ARGS(call, delay, delayj),
1406 TP_STRUCT__entry(
1407 __field(unsigned int, call)
1408 __field(unsigned long, delayj)
1409 __field(ktime_t, delay)
1412 TP_fast_assign(
1413 __entry->call = call->debug_id;
1414 __entry->delayj = delayj;
1415 __entry->delay = delay;
1418 TP_printk("c=%08x to=%lld j=%ld",
1419 __entry->call,
1420 ktime_to_us(__entry->delay),
1421 __entry->delayj)
1424 TRACE_EVENT(rxrpc_timer_expired,
1425 TP_PROTO(struct rxrpc_call *call),
1427 TP_ARGS(call),
1429 TP_STRUCT__entry(
1430 __field(unsigned int, call)
1433 TP_fast_assign(
1434 __entry->call = call->debug_id;
1437 TP_printk("c=%08x EXPIRED",
1438 __entry->call)
1441 TRACE_EVENT(rxrpc_rx_lose,
1442 TP_PROTO(struct rxrpc_skb_priv *sp),
1444 TP_ARGS(sp),
1446 TP_STRUCT__entry(
1447 __field_struct(struct rxrpc_host_header, hdr)
1450 TP_fast_assign(
1451 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1454 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1455 __entry->hdr.epoch, __entry->hdr.cid,
1456 __entry->hdr.callNumber, __entry->hdr.serviceId,
1457 __entry->hdr.serial, __entry->hdr.seq,
1458 __entry->hdr.type, __entry->hdr.flags,
1459 __entry->hdr.type <= 15 ?
1460 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1463 TRACE_EVENT(rxrpc_propose_ack,
1464 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1465 u8 ack_reason, rxrpc_serial_t serial),
1467 TP_ARGS(call, why, ack_reason, serial),
1469 TP_STRUCT__entry(
1470 __field(unsigned int, call)
1471 __field(enum rxrpc_propose_ack_trace, why)
1472 __field(rxrpc_serial_t, serial)
1473 __field(u8, ack_reason)
1476 TP_fast_assign(
1477 __entry->call = call->debug_id;
1478 __entry->why = why;
1479 __entry->serial = serial;
1480 __entry->ack_reason = ack_reason;
1483 TP_printk("c=%08x %s %s r=%08x",
1484 __entry->call,
1485 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1486 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1487 __entry->serial)
1490 TRACE_EVENT(rxrpc_send_ack,
1491 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1492 u8 ack_reason, rxrpc_serial_t serial),
1494 TP_ARGS(call, why, ack_reason, serial),
1496 TP_STRUCT__entry(
1497 __field(unsigned int, call)
1498 __field(enum rxrpc_propose_ack_trace, why)
1499 __field(rxrpc_serial_t, serial)
1500 __field(u8, ack_reason)
1503 TP_fast_assign(
1504 __entry->call = call->debug_id;
1505 __entry->why = why;
1506 __entry->serial = serial;
1507 __entry->ack_reason = ack_reason;
1510 TP_printk("c=%08x %s %s r=%08x",
1511 __entry->call,
1512 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1513 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1514 __entry->serial)
1517 TRACE_EVENT(rxrpc_drop_ack,
1518 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1519 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1521 TP_ARGS(call, why, ack_reason, serial, nobuf),
1523 TP_STRUCT__entry(
1524 __field(unsigned int, call)
1525 __field(enum rxrpc_propose_ack_trace, why)
1526 __field(rxrpc_serial_t, serial)
1527 __field(u8, ack_reason)
1528 __field(bool, nobuf)
1531 TP_fast_assign(
1532 __entry->call = call->debug_id;
1533 __entry->why = why;
1534 __entry->serial = serial;
1535 __entry->ack_reason = ack_reason;
1536 __entry->nobuf = nobuf;
1539 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1540 __entry->call,
1541 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1542 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1543 __entry->serial, __entry->nobuf)
1546 TRACE_EVENT(rxrpc_retransmit,
1547 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1548 rxrpc_serial_t serial, ktime_t expiry),
1550 TP_ARGS(call, seq, serial, expiry),
1552 TP_STRUCT__entry(
1553 __field(unsigned int, call)
1554 __field(rxrpc_seq_t, seq)
1555 __field(rxrpc_serial_t, serial)
1556 __field(ktime_t, expiry)
1559 TP_fast_assign(
1560 __entry->call = call->debug_id;
1561 __entry->seq = seq;
1562 __entry->serial = serial;
1563 __entry->expiry = expiry;
1566 TP_printk("c=%08x q=%x r=%x xp=%lld",
1567 __entry->call,
1568 __entry->seq,
1569 __entry->serial,
1570 ktime_to_us(__entry->expiry))
1573 TRACE_EVENT(rxrpc_congest,
1574 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1575 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1577 TP_ARGS(call, summary, ack_serial, change),
1579 TP_STRUCT__entry(
1580 __field(unsigned int, call)
1581 __field(enum rxrpc_congest_change, change)
1582 __field(rxrpc_seq_t, hard_ack)
1583 __field(rxrpc_seq_t, top)
1584 __field(rxrpc_seq_t, lowest_nak)
1585 __field(rxrpc_serial_t, ack_serial)
1586 __field_struct(struct rxrpc_ack_summary, sum)
1589 TP_fast_assign(
1590 __entry->call = call->debug_id;
1591 __entry->change = change;
1592 __entry->hard_ack = call->acks_hard_ack;
1593 __entry->top = call->tx_top;
1594 __entry->lowest_nak = call->acks_lowest_nak;
1595 __entry->ack_serial = ack_serial;
1596 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1599 TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nA=%u,%u+%u,%u b=%u u=%u d=%u l=%x%s%s%s",
1600 __entry->call,
1601 __entry->ack_serial,
1602 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1603 __entry->hard_ack,
1604 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1605 __entry->sum.cwnd,
1606 __entry->sum.ssthresh,
1607 __entry->sum.nr_acks, __entry->sum.nr_retained_nacks,
1608 __entry->sum.nr_new_acks,
1609 __entry->sum.nr_new_nacks,
1610 __entry->top - __entry->hard_ack,
1611 __entry->sum.cumulative_acks,
1612 __entry->sum.dup_acks,
1613 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1614 __print_symbolic(__entry->change, rxrpc_congest_changes),
1615 __entry->sum.retrans_timeo ? " rTxTo" : "")
1618 TRACE_EVENT(rxrpc_reset_cwnd,
1619 TP_PROTO(struct rxrpc_call *call, ktime_t now),
1621 TP_ARGS(call, now),
1623 TP_STRUCT__entry(
1624 __field(unsigned int, call)
1625 __field(enum rxrpc_congest_mode, mode)
1626 __field(unsigned short, cwnd)
1627 __field(unsigned short, extra)
1628 __field(rxrpc_seq_t, hard_ack)
1629 __field(rxrpc_seq_t, prepared)
1630 __field(ktime_t, since_last_tx)
1631 __field(bool, has_data)
1634 TP_fast_assign(
1635 __entry->call = call->debug_id;
1636 __entry->mode = call->cong_mode;
1637 __entry->cwnd = call->cong_cwnd;
1638 __entry->extra = call->cong_extra;
1639 __entry->hard_ack = call->acks_hard_ack;
1640 __entry->prepared = call->tx_prepared - call->tx_bottom;
1641 __entry->since_last_tx = ktime_sub(now, call->tx_last_sent);
1642 __entry->has_data = !list_empty(&call->tx_sendmsg);
1645 TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u",
1646 __entry->call,
1647 __entry->hard_ack,
1648 __print_symbolic(__entry->mode, rxrpc_congest_modes),
1649 __entry->cwnd,
1650 __entry->extra,
1651 __entry->prepared,
1652 ktime_to_ns(__entry->since_last_tx),
1653 __entry->has_data)
1656 TRACE_EVENT(rxrpc_disconnect_call,
1657 TP_PROTO(struct rxrpc_call *call),
1659 TP_ARGS(call),
1661 TP_STRUCT__entry(
1662 __field(unsigned int, call)
1663 __field(u32, abort_code)
1666 TP_fast_assign(
1667 __entry->call = call->debug_id;
1668 __entry->abort_code = call->abort_code;
1671 TP_printk("c=%08x ab=%08x",
1672 __entry->call,
1673 __entry->abort_code)
1676 TRACE_EVENT(rxrpc_improper_term,
1677 TP_PROTO(struct rxrpc_call *call),
1679 TP_ARGS(call),
1681 TP_STRUCT__entry(
1682 __field(unsigned int, call)
1683 __field(u32, abort_code)
1686 TP_fast_assign(
1687 __entry->call = call->debug_id;
1688 __entry->abort_code = call->abort_code;
1691 TP_printk("c=%08x ab=%08x",
1692 __entry->call,
1693 __entry->abort_code)
1696 TRACE_EVENT(rxrpc_connect_call,
1697 TP_PROTO(struct rxrpc_call *call),
1699 TP_ARGS(call),
1701 TP_STRUCT__entry(
1702 __field(unsigned int, call)
1703 __field(unsigned long, user_call_ID)
1704 __field(u32, cid)
1705 __field(u32, call_id)
1706 __field_struct(struct sockaddr_rxrpc, srx)
1709 TP_fast_assign(
1710 __entry->call = call->debug_id;
1711 __entry->user_call_ID = call->user_call_ID;
1712 __entry->cid = call->cid;
1713 __entry->call_id = call->call_id;
1714 __entry->srx = call->dest_srx;
1717 TP_printk("c=%08x u=%p %08x:%08x dst=%pISp",
1718 __entry->call,
1719 (void *)__entry->user_call_ID,
1720 __entry->cid,
1721 __entry->call_id,
1722 &__entry->srx.transport)
1725 TRACE_EVENT(rxrpc_resend,
1726 TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack),
1728 TP_ARGS(call, ack),
1730 TP_STRUCT__entry(
1731 __field(unsigned int, call)
1732 __field(rxrpc_seq_t, seq)
1733 __field(rxrpc_seq_t, transmitted)
1734 __field(rxrpc_serial_t, ack_serial)
1737 TP_fast_assign(
1738 struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL;
1739 __entry->call = call->debug_id;
1740 __entry->seq = call->acks_hard_ack;
1741 __entry->transmitted = call->tx_transmitted;
1742 __entry->ack_serial = sp ? sp->hdr.serial : 0;
1745 TP_printk("c=%08x r=%x q=%x tq=%x",
1746 __entry->call,
1747 __entry->ack_serial,
1748 __entry->seq,
1749 __entry->transmitted)
1752 TRACE_EVENT(rxrpc_rx_icmp,
1753 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1754 struct sockaddr_rxrpc *srx),
1756 TP_ARGS(peer, ee, srx),
1758 TP_STRUCT__entry(
1759 __field(unsigned int, peer)
1760 __field_struct(struct sock_extended_err, ee)
1761 __field_struct(struct sockaddr_rxrpc, srx)
1764 TP_fast_assign(
1765 __entry->peer = peer->debug_id;
1766 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1767 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1770 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1771 __entry->peer,
1772 __entry->ee.ee_origin,
1773 __entry->ee.ee_type,
1774 __entry->ee.ee_code,
1775 __entry->ee.ee_info,
1776 __entry->ee.ee_data,
1777 __entry->ee.ee_errno,
1778 &__entry->srx.transport)
1781 TRACE_EVENT(rxrpc_tx_fail,
1782 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1783 enum rxrpc_tx_point where),
1785 TP_ARGS(debug_id, serial, ret, where),
1787 TP_STRUCT__entry(
1788 __field(unsigned int, debug_id)
1789 __field(rxrpc_serial_t, serial)
1790 __field(int, ret)
1791 __field(enum rxrpc_tx_point, where)
1794 TP_fast_assign(
1795 __entry->debug_id = debug_id;
1796 __entry->serial = serial;
1797 __entry->ret = ret;
1798 __entry->where = where;
1801 TP_printk("c=%08x r=%x ret=%d %s",
1802 __entry->debug_id,
1803 __entry->serial,
1804 __entry->ret,
1805 __print_symbolic(__entry->where, rxrpc_tx_points))
1808 TRACE_EVENT(rxrpc_call_reset,
1809 TP_PROTO(struct rxrpc_call *call),
1811 TP_ARGS(call),
1813 TP_STRUCT__entry(
1814 __field(unsigned int, debug_id)
1815 __field(u32, cid)
1816 __field(u32, call_id)
1817 __field(rxrpc_serial_t, call_serial)
1818 __field(rxrpc_serial_t, conn_serial)
1819 __field(rxrpc_seq_t, tx_seq)
1820 __field(rxrpc_seq_t, rx_seq)
1823 TP_fast_assign(
1824 __entry->debug_id = call->debug_id;
1825 __entry->cid = call->cid;
1826 __entry->call_id = call->call_id;
1827 __entry->call_serial = call->rx_serial;
1828 __entry->conn_serial = call->conn->hi_serial;
1829 __entry->tx_seq = call->acks_hard_ack;
1830 __entry->rx_seq = call->rx_highest_seq;
1833 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1834 __entry->debug_id,
1835 __entry->cid, __entry->call_id,
1836 __entry->call_serial, __entry->conn_serial,
1837 __entry->tx_seq, __entry->rx_seq)
1840 TRACE_EVENT(rxrpc_notify_socket,
1841 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1843 TP_ARGS(debug_id, serial),
1845 TP_STRUCT__entry(
1846 __field(unsigned int, debug_id)
1847 __field(rxrpc_serial_t, serial)
1850 TP_fast_assign(
1851 __entry->debug_id = debug_id;
1852 __entry->serial = serial;
1855 TP_printk("c=%08x r=%08x",
1856 __entry->debug_id,
1857 __entry->serial)
1860 TRACE_EVENT(rxrpc_rx_discard_ack,
1861 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1862 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1863 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1865 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1866 prev_pkt, call_ackr_prev),
1868 TP_STRUCT__entry(
1869 __field(unsigned int, debug_id)
1870 __field(rxrpc_serial_t, serial)
1871 __field(rxrpc_seq_t, first_soft_ack)
1872 __field(rxrpc_seq_t, call_ackr_first)
1873 __field(rxrpc_seq_t, prev_pkt)
1874 __field(rxrpc_seq_t, call_ackr_prev)
1877 TP_fast_assign(
1878 __entry->debug_id = debug_id;
1879 __entry->serial = serial;
1880 __entry->first_soft_ack = first_soft_ack;
1881 __entry->call_ackr_first = call_ackr_first;
1882 __entry->prev_pkt = prev_pkt;
1883 __entry->call_ackr_prev = call_ackr_prev;
1886 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1887 __entry->debug_id,
1888 __entry->serial,
1889 __entry->first_soft_ack,
1890 __entry->call_ackr_first,
1891 __entry->prev_pkt,
1892 __entry->call_ackr_prev)
1895 TRACE_EVENT(rxrpc_req_ack,
1896 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1897 enum rxrpc_req_ack_trace why),
1899 TP_ARGS(call_debug_id, seq, why),
1901 TP_STRUCT__entry(
1902 __field(unsigned int, call_debug_id)
1903 __field(rxrpc_seq_t, seq)
1904 __field(enum rxrpc_req_ack_trace, why)
1907 TP_fast_assign(
1908 __entry->call_debug_id = call_debug_id;
1909 __entry->seq = seq;
1910 __entry->why = why;
1913 TP_printk("c=%08x q=%08x REQ-%s",
1914 __entry->call_debug_id,
1915 __entry->seq,
1916 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1919 TRACE_EVENT(rxrpc_txbuf,
1920 TP_PROTO(unsigned int debug_id,
1921 unsigned int call_debug_id, rxrpc_seq_t seq,
1922 int ref, enum rxrpc_txbuf_trace what),
1924 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1926 TP_STRUCT__entry(
1927 __field(unsigned int, debug_id)
1928 __field(unsigned int, call_debug_id)
1929 __field(rxrpc_seq_t, seq)
1930 __field(int, ref)
1931 __field(enum rxrpc_txbuf_trace, what)
1934 TP_fast_assign(
1935 __entry->debug_id = debug_id;
1936 __entry->call_debug_id = call_debug_id;
1937 __entry->seq = seq;
1938 __entry->ref = ref;
1939 __entry->what = what;
1942 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1943 __entry->debug_id,
1944 __entry->call_debug_id,
1945 __entry->seq,
1946 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1947 __entry->ref)
1950 TRACE_EVENT(rxrpc_poke_call,
1951 TP_PROTO(struct rxrpc_call *call, bool busy,
1952 enum rxrpc_call_poke_trace what),
1954 TP_ARGS(call, busy, what),
1956 TP_STRUCT__entry(
1957 __field(unsigned int, call_debug_id)
1958 __field(bool, busy)
1959 __field(enum rxrpc_call_poke_trace, what)
1962 TP_fast_assign(
1963 __entry->call_debug_id = call->debug_id;
1964 __entry->busy = busy;
1965 __entry->what = what;
1968 TP_printk("c=%08x %s%s",
1969 __entry->call_debug_id,
1970 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1971 __entry->busy ? "!" : "")
1974 TRACE_EVENT(rxrpc_call_poked,
1975 TP_PROTO(struct rxrpc_call *call),
1977 TP_ARGS(call),
1979 TP_STRUCT__entry(
1980 __field(unsigned int, call_debug_id)
1983 TP_fast_assign(
1984 __entry->call_debug_id = call->debug_id;
1987 TP_printk("c=%08x",
1988 __entry->call_debug_id)
1991 TRACE_EVENT(rxrpc_sack,
1992 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1993 unsigned int sack, enum rxrpc_sack_trace what),
1995 TP_ARGS(call, seq, sack, what),
1997 TP_STRUCT__entry(
1998 __field(unsigned int, call_debug_id)
1999 __field(rxrpc_seq_t, seq)
2000 __field(unsigned int, sack)
2001 __field(enum rxrpc_sack_trace, what)
2004 TP_fast_assign(
2005 __entry->call_debug_id = call->debug_id;
2006 __entry->seq = seq;
2007 __entry->sack = sack;
2008 __entry->what = what;
2011 TP_printk("c=%08x q=%08x %s k=%x",
2012 __entry->call_debug_id,
2013 __entry->seq,
2014 __print_symbolic(__entry->what, rxrpc_sack_traces),
2015 __entry->sack)
2018 #undef EM
2019 #undef E_
2021 #endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */
2022 #endif /* _TRACE_RXRPC_H */
2024 /* This part must be outside protection */
2025 #include <trace/define_trace.h>