Loading...
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/* AF_RXRPC tracepoints
3 *
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
9
10#if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
11#define _TRACE_RXRPC_H
12
13#include <linux/tracepoint.h>
14#include <linux/errqueue.h>
15
16/*
17 * Declare tracing information enums and their string mappings for display.
18 */
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")
116
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_conn_abort, "Conn-abort") \
121 EM(rxrpc_call_poke_error, "Error") \
122 EM(rxrpc_call_poke_idle, "Idle") \
123 EM(rxrpc_call_poke_set_timeout, "Set-timo") \
124 EM(rxrpc_call_poke_start, "Start") \
125 EM(rxrpc_call_poke_timer, "Timer") \
126 E_(rxrpc_call_poke_timer_now, "Timer-now")
127
128#define rxrpc_skb_traces \
129 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \
130 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \
131 EM(rxrpc_skb_get_conn_secured, "GET conn-secd") \
132 EM(rxrpc_skb_get_conn_work, "GET conn-work") \
133 EM(rxrpc_skb_get_last_nack, "GET last-nack") \
134 EM(rxrpc_skb_get_local_work, "GET locl-work") \
135 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \
136 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
137 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
138 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
139 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
140 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
141 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
142 EM(rxrpc_skb_put_conn_secured, "PUT conn-secd") \
143 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \
144 EM(rxrpc_skb_put_error_report, "PUT error-rep") \
145 EM(rxrpc_skb_put_input, "PUT input ") \
146 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \
147 EM(rxrpc_skb_put_last_nack, "PUT last-nack") \
148 EM(rxrpc_skb_put_purge, "PUT purge ") \
149 EM(rxrpc_skb_put_rotate, "PUT rotate ") \
150 EM(rxrpc_skb_put_unknown, "PUT unknown ") \
151 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \
152 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \
153 EM(rxrpc_skb_see_reject, "SEE reject ") \
154 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
155 E_(rxrpc_skb_see_version, "SEE version ")
156
157#define rxrpc_local_traces \
158 EM(rxrpc_local_free, "FREE ") \
159 EM(rxrpc_local_get_call, "GET call ") \
160 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
161 EM(rxrpc_local_get_for_use, "GET for-use ") \
162 EM(rxrpc_local_get_peer, "GET peer ") \
163 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
164 EM(rxrpc_local_new, "NEW ") \
165 EM(rxrpc_local_put_bind, "PUT bind ") \
166 EM(rxrpc_local_put_call, "PUT call ") \
167 EM(rxrpc_local_put_for_use, "PUT for-use ") \
168 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
169 EM(rxrpc_local_put_peer, "PUT peer ") \
170 EM(rxrpc_local_put_prealloc_peer, "PUT peer-pre") \
171 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
172 EM(rxrpc_local_stop, "STOP ") \
173 EM(rxrpc_local_stopped, "STOPPED ") \
174 EM(rxrpc_local_unuse_bind, "UNU bind ") \
175 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
176 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
177 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
178 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
179 EM(rxrpc_local_use_lookup, "USE lookup ") \
180 E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa")
181
182#define rxrpc_peer_traces \
183 EM(rxrpc_peer_free, "FREE ") \
184 EM(rxrpc_peer_get_accept, "GET accept ") \
185 EM(rxrpc_peer_get_application, "GET app ") \
186 EM(rxrpc_peer_get_bundle, "GET bundle ") \
187 EM(rxrpc_peer_get_call, "GET call ") \
188 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
189 EM(rxrpc_peer_get_input, "GET input ") \
190 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
191 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
192 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
193 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
194 EM(rxrpc_peer_new_client, "NEW client ") \
195 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
196 EM(rxrpc_peer_put_application, "PUT app ") \
197 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
198 EM(rxrpc_peer_put_call, "PUT call ") \
199 EM(rxrpc_peer_put_conn, "PUT conn ") \
200 EM(rxrpc_peer_put_input, "PUT input ") \
201 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
202 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
203
204#define rxrpc_bundle_traces \
205 EM(rxrpc_bundle_free, "FREE ") \
206 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
207 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
208 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
209 EM(rxrpc_bundle_put_call, "PUT call ") \
210 EM(rxrpc_bundle_put_conn, "PUT conn ") \
211 EM(rxrpc_bundle_put_discard, "PUT discard ") \
212 E_(rxrpc_bundle_new, "NEW ")
213
214#define rxrpc_conn_traces \
215 EM(rxrpc_conn_free, "FREE ") \
216 EM(rxrpc_conn_get_activate_call, "GET act-call") \
217 EM(rxrpc_conn_get_call_input, "GET inp-call") \
218 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
219 EM(rxrpc_conn_get_idle, "GET idle ") \
220 EM(rxrpc_conn_get_poke_abort, "GET pk-abort") \
221 EM(rxrpc_conn_get_poke_secured, "GET secured ") \
222 EM(rxrpc_conn_get_poke_timer, "GET poke ") \
223 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
224 EM(rxrpc_conn_new_client, "NEW client ") \
225 EM(rxrpc_conn_new_service, "NEW service ") \
226 EM(rxrpc_conn_put_call, "PUT call ") \
227 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
228 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
229 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
230 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
231 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
232 EM(rxrpc_conn_put_poke, "PUT poke ") \
233 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \
234 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
235 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
236 EM(rxrpc_conn_put_work, "PUT work ") \
237 EM(rxrpc_conn_queue_challenge, "QUE chall ") \
238 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
239 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
240 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
241 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
242 E_(rxrpc_conn_see_work, "SEE work ")
243
244#define rxrpc_client_traces \
245 EM(rxrpc_client_activate_chans, "Activa") \
246 EM(rxrpc_client_alloc, "Alloc ") \
247 EM(rxrpc_client_chan_activate, "ChActv") \
248 EM(rxrpc_client_chan_disconnect, "ChDisc") \
249 EM(rxrpc_client_chan_pass, "ChPass") \
250 EM(rxrpc_client_cleanup, "Clean ") \
251 EM(rxrpc_client_discard, "Discar") \
252 EM(rxrpc_client_exposed, "Expose") \
253 EM(rxrpc_client_replace, "Replac") \
254 EM(rxrpc_client_queue_new_call, "Q-Call") \
255 EM(rxrpc_client_to_active, "->Actv") \
256 E_(rxrpc_client_to_idle, "->Idle")
257
258#define rxrpc_call_traces \
259 EM(rxrpc_call_get_io_thread, "GET iothread") \
260 EM(rxrpc_call_get_input, "GET input ") \
261 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
262 EM(rxrpc_call_get_notify_socket, "GET notify ") \
263 EM(rxrpc_call_get_poke, "GET poke ") \
264 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
265 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
266 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
267 EM(rxrpc_call_get_userid, "GET user-id ") \
268 EM(rxrpc_call_new_client, "NEW client ") \
269 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
270 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
271 EM(rxrpc_call_put_discard_error, "PUT disc-err") \
272 EM(rxrpc_call_put_io_thread, "PUT iothread") \
273 EM(rxrpc_call_put_input, "PUT input ") \
274 EM(rxrpc_call_put_kernel, "PUT kernel ") \
275 EM(rxrpc_call_put_poke, "PUT poke ") \
276 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
277 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
278 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
279 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
280 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
281 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
282 EM(rxrpc_call_put_userid, "PUT user-id ") \
283 EM(rxrpc_call_see_accept, "SEE accept ") \
284 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
285 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
286 EM(rxrpc_call_see_connected, "SEE connect ") \
287 EM(rxrpc_call_see_conn_abort, "SEE conn-abt") \
288 EM(rxrpc_call_see_disconnected, "SEE disconn ") \
289 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
290 EM(rxrpc_call_see_input, "SEE input ") \
291 EM(rxrpc_call_see_release, "SEE release ") \
292 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
293 EM(rxrpc_call_see_waiting_call, "SEE q-conn ") \
294 E_(rxrpc_call_see_zap, "SEE zap ")
295
296#define rxrpc_txqueue_traces \
297 EM(rxrpc_txqueue_await_reply, "AWR") \
298 EM(rxrpc_txqueue_dequeue, "DEQ") \
299 EM(rxrpc_txqueue_end, "END") \
300 EM(rxrpc_txqueue_queue, "QUE") \
301 EM(rxrpc_txqueue_queue_last, "QLS") \
302 EM(rxrpc_txqueue_rotate, "ROT") \
303 EM(rxrpc_txqueue_rotate_last, "RLS") \
304 E_(rxrpc_txqueue_wait, "WAI")
305
306#define rxrpc_receive_traces \
307 EM(rxrpc_receive_end, "END") \
308 EM(rxrpc_receive_front, "FRN") \
309 EM(rxrpc_receive_incoming, "INC") \
310 EM(rxrpc_receive_queue, "QUE") \
311 EM(rxrpc_receive_queue_last, "QLS") \
312 EM(rxrpc_receive_queue_oos, "QUO") \
313 EM(rxrpc_receive_queue_oos_last, "QOL") \
314 EM(rxrpc_receive_oos, "OOS") \
315 EM(rxrpc_receive_oos_last, "OSL") \
316 EM(rxrpc_receive_rotate, "ROT") \
317 E_(rxrpc_receive_rotate_last, "RLS")
318
319#define rxrpc_recvmsg_traces \
320 EM(rxrpc_recvmsg_cont, "CONT") \
321 EM(rxrpc_recvmsg_data_return, "DATA") \
322 EM(rxrpc_recvmsg_dequeue, "DEQU") \
323 EM(rxrpc_recvmsg_enter, "ENTR") \
324 EM(rxrpc_recvmsg_full, "FULL") \
325 EM(rxrpc_recvmsg_hole, "HOLE") \
326 EM(rxrpc_recvmsg_next, "NEXT") \
327 EM(rxrpc_recvmsg_requeue, "REQU") \
328 EM(rxrpc_recvmsg_return, "RETN") \
329 EM(rxrpc_recvmsg_terminal, "TERM") \
330 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
331 EM(rxrpc_recvmsg_unqueue, "UNQU") \
332 E_(rxrpc_recvmsg_wait, "WAIT")
333
334#define rxrpc_rtt_tx_traces \
335 EM(rxrpc_rtt_tx_cancel, "CNCE") \
336 EM(rxrpc_rtt_tx_data, "DATA") \
337 EM(rxrpc_rtt_tx_no_slot, "FULL") \
338 E_(rxrpc_rtt_tx_ping, "PING")
339
340#define rxrpc_rtt_rx_traces \
341 EM(rxrpc_rtt_rx_other_ack, "OACK") \
342 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
343 EM(rxrpc_rtt_rx_lost, "LOST") \
344 EM(rxrpc_rtt_rx_ping_response, "PONG") \
345 E_(rxrpc_rtt_rx_requested_ack, "RACK")
346
347#define rxrpc_timer_traces \
348 EM(rxrpc_timer_trace_delayed_ack, "DelayAck ") \
349 EM(rxrpc_timer_trace_expect_rx, "ExpectRx ") \
350 EM(rxrpc_timer_trace_hard, "HardLimit") \
351 EM(rxrpc_timer_trace_idle, "IdleLimit") \
352 EM(rxrpc_timer_trace_keepalive, "KeepAlive") \
353 EM(rxrpc_timer_trace_lost_ack, "LostAck ") \
354 EM(rxrpc_timer_trace_ping, "DelayPing") \
355 EM(rxrpc_timer_trace_resend, "Resend ") \
356 EM(rxrpc_timer_trace_resend_reset, "ResendRst") \
357 E_(rxrpc_timer_trace_resend_tx, "ResendTx ")
358
359#define rxrpc_propose_ack_traces \
360 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
361 EM(rxrpc_propose_ack_delayed_ack, "DlydAck") \
362 EM(rxrpc_propose_ack_input_data, "DataIn ") \
363 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
364 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
365 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
366 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
367 EM(rxrpc_propose_ack_ping_for_0_retrans, "0-Retrn") \
368 EM(rxrpc_propose_ack_ping_for_old_rtt, "OldRtt ") \
369 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
370 EM(rxrpc_propose_ack_ping_for_rtt, "Rtt ") \
371 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
372 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
373 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
374 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
375 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
376 EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \
377 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
378
379#define rxrpc_congest_modes \
380 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
381 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
382 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
383 E_(RXRPC_CALL_SLOW_START, "SlowStart")
384
385#define rxrpc_congest_changes \
386 EM(rxrpc_cong_begin_retransmission, " Retrans") \
387 EM(rxrpc_cong_cleared_nacks, " Cleared") \
388 EM(rxrpc_cong_new_low_nack, " NewLowN") \
389 EM(rxrpc_cong_no_change, " -") \
390 EM(rxrpc_cong_progress, " Progres") \
391 EM(rxrpc_cong_idle_reset, " IdleRes") \
392 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
393 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
394 E_(rxrpc_cong_saw_nack, " SawNack")
395
396#define rxrpc_pkts \
397 EM(0, "?00") \
398 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
399 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
400 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
401 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
402 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
403 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
404 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
405 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
406 EM(9, "?09") \
407 EM(10, "?10") \
408 EM(11, "?11") \
409 EM(12, "?12") \
410 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
411 EM(14, "?14") \
412 E_(15, "?15")
413
414#define rxrpc_ack_names \
415 EM(0, "-0-") \
416 EM(RXRPC_ACK_REQUESTED, "REQ") \
417 EM(RXRPC_ACK_DUPLICATE, "DUP") \
418 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
419 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
420 EM(RXRPC_ACK_NOSPACE, "MEM") \
421 EM(RXRPC_ACK_PING, "PNG") \
422 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
423 EM(RXRPC_ACK_DELAY, "DLY") \
424 EM(RXRPC_ACK_IDLE, "IDL") \
425 E_(RXRPC_ACK__INVALID, "-?-")
426
427#define rxrpc_sack_traces \
428 EM(rxrpc_sack_advance, "ADV") \
429 EM(rxrpc_sack_fill, "FIL") \
430 EM(rxrpc_sack_nack, "NAK") \
431 EM(rxrpc_sack_none, "---") \
432 E_(rxrpc_sack_oos, "OOS")
433
434#define rxrpc_completions \
435 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
436 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
437 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
438 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
439 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
440
441#define rxrpc_tx_points \
442 EM(rxrpc_tx_point_call_abort, "CallAbort") \
443 EM(rxrpc_tx_point_call_ack, "CallAck") \
444 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
445 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
446 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
447 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
448 EM(rxrpc_tx_point_reject, "Reject") \
449 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
450 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
451 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
452 E_(rxrpc_tx_point_version_reply, "VerReply")
453
454#define rxrpc_req_ack_traces \
455 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
456 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
457 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
458 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
459 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
460 EM(rxrpc_reqack_retrans, "RETRANS ") \
461 EM(rxrpc_reqack_slow_start, "SLOW-START") \
462 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
463/* ---- Must update size of stat_why_req_ack[] if more are added! */
464
465#define rxrpc_txbuf_traces \
466 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
467 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
468 EM(rxrpc_txbuf_free, "FREE ") \
469 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
470 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
471 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
472 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
473 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
474 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
475 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
476 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
477 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
478 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
479 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
480 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
481
482/*
483 * Generate enums for tracing information.
484 */
485#ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
486#define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
487
488#undef EM
489#undef E_
490#define EM(a, b) a,
491#define E_(a, b) a
492
493enum rxrpc_abort_reason { rxrpc_abort_reasons } __mode(byte);
494enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
495enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
496enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
497enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
498enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
499enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
500enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
501enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
502enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
503enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
504enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
505enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
506enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
507enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
508enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
509enum rxrpc_sack_trace { rxrpc_sack_traces } __mode(byte);
510enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
511enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
512enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
513enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
514enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
515
516#endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
517
518/*
519 * Export enum symbols via userspace.
520 */
521#undef EM
522#undef E_
523
524#ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS
525
526#define EM(a, b) TRACE_DEFINE_ENUM(a);
527#define E_(a, b) TRACE_DEFINE_ENUM(a);
528
529rxrpc_abort_reasons;
530rxrpc_bundle_traces;
531rxrpc_call_poke_traces;
532rxrpc_call_traces;
533rxrpc_client_traces;
534rxrpc_congest_changes;
535rxrpc_congest_modes;
536rxrpc_conn_traces;
537rxrpc_local_traces;
538rxrpc_propose_ack_traces;
539rxrpc_receive_traces;
540rxrpc_recvmsg_traces;
541rxrpc_req_ack_traces;
542rxrpc_rtt_rx_traces;
543rxrpc_rtt_tx_traces;
544rxrpc_sack_traces;
545rxrpc_skb_traces;
546rxrpc_timer_traces;
547rxrpc_tx_points;
548rxrpc_txbuf_traces;
549rxrpc_txqueue_traces;
550
551/*
552 * Now redefine the EM() and E_() macros to map the enums to the strings that
553 * will be printed in the output.
554 */
555#undef EM
556#undef E_
557#define EM(a, b) { a, b },
558#define E_(a, b) { a, b }
559
560TRACE_EVENT(rxrpc_local,
561 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
562 int ref, int usage),
563
564 TP_ARGS(local_debug_id, op, ref, usage),
565
566 TP_STRUCT__entry(
567 __field(unsigned int, local)
568 __field(int, op)
569 __field(int, ref)
570 __field(int, usage)
571 ),
572
573 TP_fast_assign(
574 __entry->local = local_debug_id;
575 __entry->op = op;
576 __entry->ref = ref;
577 __entry->usage = usage;
578 ),
579
580 TP_printk("L=%08x %s r=%d u=%d",
581 __entry->local,
582 __print_symbolic(__entry->op, rxrpc_local_traces),
583 __entry->ref,
584 __entry->usage)
585 );
586
587TRACE_EVENT(rxrpc_peer,
588 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
589
590 TP_ARGS(peer_debug_id, ref, why),
591
592 TP_STRUCT__entry(
593 __field(unsigned int, peer)
594 __field(int, ref)
595 __field(enum rxrpc_peer_trace, why)
596 ),
597
598 TP_fast_assign(
599 __entry->peer = peer_debug_id;
600 __entry->ref = ref;
601 __entry->why = why;
602 ),
603
604 TP_printk("P=%08x %s r=%d",
605 __entry->peer,
606 __print_symbolic(__entry->why, rxrpc_peer_traces),
607 __entry->ref)
608 );
609
610TRACE_EVENT(rxrpc_bundle,
611 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
612
613 TP_ARGS(bundle_debug_id, ref, why),
614
615 TP_STRUCT__entry(
616 __field(unsigned int, bundle)
617 __field(int, ref)
618 __field(int, why)
619 ),
620
621 TP_fast_assign(
622 __entry->bundle = bundle_debug_id;
623 __entry->ref = ref;
624 __entry->why = why;
625 ),
626
627 TP_printk("CB=%08x %s r=%d",
628 __entry->bundle,
629 __print_symbolic(__entry->why, rxrpc_bundle_traces),
630 __entry->ref)
631 );
632
633TRACE_EVENT(rxrpc_conn,
634 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
635
636 TP_ARGS(conn_debug_id, ref, why),
637
638 TP_STRUCT__entry(
639 __field(unsigned int, conn)
640 __field(int, ref)
641 __field(int, why)
642 ),
643
644 TP_fast_assign(
645 __entry->conn = conn_debug_id;
646 __entry->ref = ref;
647 __entry->why = why;
648 ),
649
650 TP_printk("C=%08x %s r=%d",
651 __entry->conn,
652 __print_symbolic(__entry->why, rxrpc_conn_traces),
653 __entry->ref)
654 );
655
656TRACE_EVENT(rxrpc_client,
657 TP_PROTO(struct rxrpc_connection *conn, int channel,
658 enum rxrpc_client_trace op),
659
660 TP_ARGS(conn, channel, op),
661
662 TP_STRUCT__entry(
663 __field(unsigned int, conn)
664 __field(u32, cid)
665 __field(int, channel)
666 __field(int, usage)
667 __field(enum rxrpc_client_trace, op)
668 ),
669
670 TP_fast_assign(
671 __entry->conn = conn ? conn->debug_id : 0;
672 __entry->channel = channel;
673 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
674 __entry->op = op;
675 __entry->cid = conn ? conn->proto.cid : 0;
676 ),
677
678 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
679 __entry->conn,
680 __entry->channel,
681 __print_symbolic(__entry->op, rxrpc_client_traces),
682 __entry->cid,
683 __entry->usage)
684 );
685
686TRACE_EVENT(rxrpc_call,
687 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
688 enum rxrpc_call_trace why),
689
690 TP_ARGS(call_debug_id, ref, aux, why),
691
692 TP_STRUCT__entry(
693 __field(unsigned int, call)
694 __field(int, ref)
695 __field(int, why)
696 __field(unsigned long, aux)
697 ),
698
699 TP_fast_assign(
700 __entry->call = call_debug_id;
701 __entry->ref = ref;
702 __entry->why = why;
703 __entry->aux = aux;
704 ),
705
706 TP_printk("c=%08x %s r=%d a=%lx",
707 __entry->call,
708 __print_symbolic(__entry->why, rxrpc_call_traces),
709 __entry->ref,
710 __entry->aux)
711 );
712
713TRACE_EVENT(rxrpc_skb,
714 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
715 enum rxrpc_skb_trace why),
716
717 TP_ARGS(skb, usage, mod_count, why),
718
719 TP_STRUCT__entry(
720 __field(struct sk_buff *, skb)
721 __field(int, usage)
722 __field(int, mod_count)
723 __field(enum rxrpc_skb_trace, why)
724 ),
725
726 TP_fast_assign(
727 __entry->skb = skb;
728 __entry->usage = usage;
729 __entry->mod_count = mod_count;
730 __entry->why = why;
731 ),
732
733 TP_printk("s=%p Rx %s u=%d m=%d",
734 __entry->skb,
735 __print_symbolic(__entry->why, rxrpc_skb_traces),
736 __entry->usage,
737 __entry->mod_count)
738 );
739
740TRACE_EVENT(rxrpc_rx_packet,
741 TP_PROTO(struct rxrpc_skb_priv *sp),
742
743 TP_ARGS(sp),
744
745 TP_STRUCT__entry(
746 __field_struct(struct rxrpc_host_header, hdr)
747 ),
748
749 TP_fast_assign(
750 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
751 ),
752
753 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
754 __entry->hdr.epoch, __entry->hdr.cid,
755 __entry->hdr.callNumber, __entry->hdr.serviceId,
756 __entry->hdr.serial, __entry->hdr.seq,
757 __entry->hdr.securityIndex, __entry->hdr.flags,
758 __print_symbolic(__entry->hdr.type, rxrpc_pkts))
759 );
760
761TRACE_EVENT(rxrpc_rx_done,
762 TP_PROTO(int result, int abort_code),
763
764 TP_ARGS(result, abort_code),
765
766 TP_STRUCT__entry(
767 __field(int, result)
768 __field(int, abort_code)
769 ),
770
771 TP_fast_assign(
772 __entry->result = result;
773 __entry->abort_code = abort_code;
774 ),
775
776 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
777 );
778
779TRACE_EVENT(rxrpc_abort_call,
780 TP_PROTO(const struct rxrpc_call *call, int abort_code),
781
782 TP_ARGS(call, abort_code),
783
784 TP_STRUCT__entry(
785 __field(unsigned int, call_nr)
786 __field(enum rxrpc_abort_reason, why)
787 __field(int, abort_code)
788 __field(int, error)
789 ),
790
791 TP_fast_assign(
792 __entry->call_nr = call->debug_id;
793 __entry->why = call->send_abort_why;
794 __entry->abort_code = abort_code;
795 __entry->error = call->send_abort_err;
796 ),
797
798 TP_printk("c=%08x a=%d e=%d %s",
799 __entry->call_nr,
800 __entry->abort_code, __entry->error,
801 __print_symbolic(__entry->why, rxrpc_abort_reasons))
802 );
803
804TRACE_EVENT(rxrpc_abort,
805 TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why,
806 u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error),
807
808 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
809
810 TP_STRUCT__entry(
811 __field(unsigned int, call_nr)
812 __field(enum rxrpc_abort_reason, why)
813 __field(u32, cid)
814 __field(u32, call_id)
815 __field(rxrpc_seq_t, seq)
816 __field(int, abort_code)
817 __field(int, error)
818 ),
819
820 TP_fast_assign(
821 __entry->call_nr = call_nr;
822 __entry->why = why;
823 __entry->cid = cid;
824 __entry->call_id = call_id;
825 __entry->abort_code = abort_code;
826 __entry->error = error;
827 __entry->seq = seq;
828 ),
829
830 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
831 __entry->call_nr,
832 __entry->cid, __entry->call_id, __entry->seq,
833 __entry->abort_code, __entry->error,
834 __print_symbolic(__entry->why, rxrpc_abort_reasons))
835 );
836
837TRACE_EVENT(rxrpc_call_complete,
838 TP_PROTO(struct rxrpc_call *call),
839
840 TP_ARGS(call),
841
842 TP_STRUCT__entry(
843 __field(unsigned int, call)
844 __field(enum rxrpc_call_completion, compl)
845 __field(int, error)
846 __field(u32, abort_code)
847 ),
848
849 TP_fast_assign(
850 __entry->call = call->debug_id;
851 __entry->compl = call->completion;
852 __entry->error = call->error;
853 __entry->abort_code = call->abort_code;
854 ),
855
856 TP_printk("c=%08x %s r=%d ac=%d",
857 __entry->call,
858 __print_symbolic(__entry->compl, rxrpc_completions),
859 __entry->error,
860 __entry->abort_code)
861 );
862
863TRACE_EVENT(rxrpc_txqueue,
864 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
865
866 TP_ARGS(call, why),
867
868 TP_STRUCT__entry(
869 __field(unsigned int, call)
870 __field(enum rxrpc_txqueue_trace, why)
871 __field(rxrpc_seq_t, acks_hard_ack)
872 __field(rxrpc_seq_t, tx_bottom)
873 __field(rxrpc_seq_t, tx_top)
874 __field(rxrpc_seq_t, tx_prepared)
875 __field(int, tx_winsize)
876 ),
877
878 TP_fast_assign(
879 __entry->call = call->debug_id;
880 __entry->why = why;
881 __entry->acks_hard_ack = call->acks_hard_ack;
882 __entry->tx_bottom = call->tx_bottom;
883 __entry->tx_top = call->tx_top;
884 __entry->tx_prepared = call->tx_prepared;
885 __entry->tx_winsize = call->tx_winsize;
886 ),
887
888 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
889 __entry->call,
890 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
891 __entry->tx_bottom,
892 __entry->acks_hard_ack,
893 __entry->tx_top - __entry->tx_bottom,
894 __entry->tx_top - __entry->acks_hard_ack,
895 __entry->tx_prepared - __entry->tx_bottom,
896 __entry->tx_winsize)
897 );
898
899TRACE_EVENT(rxrpc_rx_data,
900 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
901 rxrpc_serial_t serial, u8 flags),
902
903 TP_ARGS(call, seq, serial, flags),
904
905 TP_STRUCT__entry(
906 __field(unsigned int, call)
907 __field(rxrpc_seq_t, seq)
908 __field(rxrpc_serial_t, serial)
909 __field(u8, flags)
910 ),
911
912 TP_fast_assign(
913 __entry->call = call;
914 __entry->seq = seq;
915 __entry->serial = serial;
916 __entry->flags = flags;
917 ),
918
919 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
920 __entry->call,
921 __entry->serial,
922 __entry->seq,
923 __entry->flags)
924 );
925
926TRACE_EVENT(rxrpc_rx_ack,
927 TP_PROTO(struct rxrpc_call *call,
928 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
929 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
930
931 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
932
933 TP_STRUCT__entry(
934 __field(unsigned int, call)
935 __field(rxrpc_serial_t, serial)
936 __field(rxrpc_serial_t, ack_serial)
937 __field(rxrpc_seq_t, first)
938 __field(rxrpc_seq_t, prev)
939 __field(u8, reason)
940 __field(u8, n_acks)
941 ),
942
943 TP_fast_assign(
944 __entry->call = call->debug_id;
945 __entry->serial = serial;
946 __entry->ack_serial = ack_serial;
947 __entry->first = first;
948 __entry->prev = prev;
949 __entry->reason = reason;
950 __entry->n_acks = n_acks;
951 ),
952
953 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
954 __entry->call,
955 __entry->serial,
956 __print_symbolic(__entry->reason, rxrpc_ack_names),
957 __entry->ack_serial,
958 __entry->first,
959 __entry->prev,
960 __entry->n_acks)
961 );
962
963TRACE_EVENT(rxrpc_rx_abort,
964 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
965 u32 abort_code),
966
967 TP_ARGS(call, serial, abort_code),
968
969 TP_STRUCT__entry(
970 __field(unsigned int, call)
971 __field(rxrpc_serial_t, serial)
972 __field(u32, abort_code)
973 ),
974
975 TP_fast_assign(
976 __entry->call = call->debug_id;
977 __entry->serial = serial;
978 __entry->abort_code = abort_code;
979 ),
980
981 TP_printk("c=%08x ABORT %08x ac=%d",
982 __entry->call,
983 __entry->serial,
984 __entry->abort_code)
985 );
986
987TRACE_EVENT(rxrpc_rx_conn_abort,
988 TP_PROTO(const struct rxrpc_connection *conn, const struct sk_buff *skb),
989
990 TP_ARGS(conn, skb),
991
992 TP_STRUCT__entry(
993 __field(unsigned int, conn)
994 __field(rxrpc_serial_t, serial)
995 __field(u32, abort_code)
996 ),
997
998 TP_fast_assign(
999 __entry->conn = conn->debug_id;
1000 __entry->serial = rxrpc_skb(skb)->hdr.serial;
1001 __entry->abort_code = skb->priority;
1002 ),
1003
1004 TP_printk("C=%08x ABORT %08x ac=%d",
1005 __entry->conn,
1006 __entry->serial,
1007 __entry->abort_code)
1008 );
1009
1010TRACE_EVENT(rxrpc_rx_challenge,
1011 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
1012 u32 version, u32 nonce, u32 min_level),
1013
1014 TP_ARGS(conn, serial, version, nonce, min_level),
1015
1016 TP_STRUCT__entry(
1017 __field(unsigned int, conn)
1018 __field(rxrpc_serial_t, serial)
1019 __field(u32, version)
1020 __field(u32, nonce)
1021 __field(u32, min_level)
1022 ),
1023
1024 TP_fast_assign(
1025 __entry->conn = conn->debug_id;
1026 __entry->serial = serial;
1027 __entry->version = version;
1028 __entry->nonce = nonce;
1029 __entry->min_level = min_level;
1030 ),
1031
1032 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
1033 __entry->conn,
1034 __entry->serial,
1035 __entry->version,
1036 __entry->nonce,
1037 __entry->min_level)
1038 );
1039
1040TRACE_EVENT(rxrpc_rx_response,
1041 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
1042 u32 version, u32 kvno, u32 ticket_len),
1043
1044 TP_ARGS(conn, serial, version, kvno, ticket_len),
1045
1046 TP_STRUCT__entry(
1047 __field(unsigned int, conn)
1048 __field(rxrpc_serial_t, serial)
1049 __field(u32, version)
1050 __field(u32, kvno)
1051 __field(u32, ticket_len)
1052 ),
1053
1054 TP_fast_assign(
1055 __entry->conn = conn->debug_id;
1056 __entry->serial = serial;
1057 __entry->version = version;
1058 __entry->kvno = kvno;
1059 __entry->ticket_len = ticket_len;
1060 ),
1061
1062 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
1063 __entry->conn,
1064 __entry->serial,
1065 __entry->version,
1066 __entry->kvno,
1067 __entry->ticket_len)
1068 );
1069
1070TRACE_EVENT(rxrpc_rx_rwind_change,
1071 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1072 u32 rwind, bool wake),
1073
1074 TP_ARGS(call, serial, rwind, wake),
1075
1076 TP_STRUCT__entry(
1077 __field(unsigned int, call)
1078 __field(rxrpc_serial_t, serial)
1079 __field(u32, rwind)
1080 __field(bool, wake)
1081 ),
1082
1083 TP_fast_assign(
1084 __entry->call = call->debug_id;
1085 __entry->serial = serial;
1086 __entry->rwind = rwind;
1087 __entry->wake = wake;
1088 ),
1089
1090 TP_printk("c=%08x %08x rw=%u%s",
1091 __entry->call,
1092 __entry->serial,
1093 __entry->rwind,
1094 __entry->wake ? " wake" : "")
1095 );
1096
1097TRACE_EVENT(rxrpc_tx_packet,
1098 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
1099 enum rxrpc_tx_point where),
1100
1101 TP_ARGS(call_id, whdr, where),
1102
1103 TP_STRUCT__entry(
1104 __field(unsigned int, call)
1105 __field(enum rxrpc_tx_point, where)
1106 __field_struct(struct rxrpc_wire_header, whdr)
1107 ),
1108
1109 TP_fast_assign(
1110 __entry->call = call_id;
1111 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
1112 __entry->where = where;
1113 ),
1114
1115 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
1116 __entry->call,
1117 ntohl(__entry->whdr.epoch),
1118 ntohl(__entry->whdr.cid),
1119 ntohl(__entry->whdr.callNumber),
1120 ntohs(__entry->whdr.serviceId),
1121 ntohl(__entry->whdr.serial),
1122 ntohl(__entry->whdr.seq),
1123 __entry->whdr.type, __entry->whdr.flags,
1124 __entry->whdr.type <= 15 ?
1125 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
1126 __print_symbolic(__entry->where, rxrpc_tx_points))
1127 );
1128
1129TRACE_EVENT(rxrpc_tx_data,
1130 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1131 rxrpc_serial_t serial, unsigned int flags, bool lose),
1132
1133 TP_ARGS(call, seq, serial, flags, lose),
1134
1135 TP_STRUCT__entry(
1136 __field(unsigned int, call)
1137 __field(rxrpc_seq_t, seq)
1138 __field(rxrpc_serial_t, serial)
1139 __field(u32, cid)
1140 __field(u32, call_id)
1141 __field(u16, flags)
1142 __field(bool, lose)
1143 ),
1144
1145 TP_fast_assign(
1146 __entry->call = call->debug_id;
1147 __entry->cid = call->cid;
1148 __entry->call_id = call->call_id;
1149 __entry->seq = seq;
1150 __entry->serial = serial;
1151 __entry->flags = flags;
1152 __entry->lose = lose;
1153 ),
1154
1155 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1156 __entry->call,
1157 __entry->cid,
1158 __entry->call_id,
1159 __entry->serial,
1160 __entry->seq,
1161 __entry->flags & RXRPC_TXBUF_WIRE_FLAGS,
1162 __entry->flags & RXRPC_TXBUF_RESENT ? " *RETRANS*" : "",
1163 __entry->lose ? " *LOSE*" : "")
1164 );
1165
1166TRACE_EVENT(rxrpc_tx_ack,
1167 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1168 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1169 u8 reason, u8 n_acks, u16 rwind),
1170
1171 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks, rwind),
1172
1173 TP_STRUCT__entry(
1174 __field(unsigned int, call)
1175 __field(rxrpc_serial_t, serial)
1176 __field(rxrpc_seq_t, ack_first)
1177 __field(rxrpc_serial_t, ack_serial)
1178 __field(u8, reason)
1179 __field(u8, n_acks)
1180 __field(u16, rwind)
1181 ),
1182
1183 TP_fast_assign(
1184 __entry->call = call;
1185 __entry->serial = serial;
1186 __entry->ack_first = ack_first;
1187 __entry->ack_serial = ack_serial;
1188 __entry->reason = reason;
1189 __entry->n_acks = n_acks;
1190 __entry->rwind = rwind;
1191 ),
1192
1193 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u rw=%u",
1194 __entry->call,
1195 __entry->serial,
1196 __print_symbolic(__entry->reason, rxrpc_ack_names),
1197 __entry->ack_first,
1198 __entry->ack_serial,
1199 __entry->n_acks,
1200 __entry->rwind)
1201 );
1202
1203TRACE_EVENT(rxrpc_receive,
1204 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1205 rxrpc_serial_t serial, rxrpc_seq_t seq),
1206
1207 TP_ARGS(call, why, serial, seq),
1208
1209 TP_STRUCT__entry(
1210 __field(unsigned int, call)
1211 __field(enum rxrpc_receive_trace, why)
1212 __field(rxrpc_serial_t, serial)
1213 __field(rxrpc_seq_t, seq)
1214 __field(rxrpc_seq_t, window)
1215 __field(rxrpc_seq_t, wtop)
1216 ),
1217
1218 TP_fast_assign(
1219 __entry->call = call->debug_id;
1220 __entry->why = why;
1221 __entry->serial = serial;
1222 __entry->seq = seq;
1223 __entry->window = call->ackr_window;
1224 __entry->wtop = call->ackr_wtop;
1225 ),
1226
1227 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1228 __entry->call,
1229 __print_symbolic(__entry->why, rxrpc_receive_traces),
1230 __entry->serial,
1231 __entry->seq,
1232 __entry->window,
1233 __entry->wtop)
1234 );
1235
1236TRACE_EVENT(rxrpc_recvmsg,
1237 TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why,
1238 int ret),
1239
1240 TP_ARGS(call_debug_id, why, ret),
1241
1242 TP_STRUCT__entry(
1243 __field(unsigned int, call)
1244 __field(enum rxrpc_recvmsg_trace, why)
1245 __field(int, ret)
1246 ),
1247
1248 TP_fast_assign(
1249 __entry->call = call_debug_id;
1250 __entry->why = why;
1251 __entry->ret = ret;
1252 ),
1253
1254 TP_printk("c=%08x %s ret=%d",
1255 __entry->call,
1256 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1257 __entry->ret)
1258 );
1259
1260TRACE_EVENT(rxrpc_recvdata,
1261 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1262 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1263 int ret),
1264
1265 TP_ARGS(call, why, seq, offset, len, ret),
1266
1267 TP_STRUCT__entry(
1268 __field(unsigned int, call)
1269 __field(enum rxrpc_recvmsg_trace, why)
1270 __field(rxrpc_seq_t, seq)
1271 __field(unsigned int, offset)
1272 __field(unsigned int, len)
1273 __field(int, ret)
1274 ),
1275
1276 TP_fast_assign(
1277 __entry->call = call ? call->debug_id : 0;
1278 __entry->why = why;
1279 __entry->seq = seq;
1280 __entry->offset = offset;
1281 __entry->len = len;
1282 __entry->ret = ret;
1283 ),
1284
1285 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1286 __entry->call,
1287 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1288 __entry->seq,
1289 __entry->offset,
1290 __entry->len,
1291 __entry->ret)
1292 );
1293
1294TRACE_EVENT(rxrpc_rtt_tx,
1295 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1296 int slot, rxrpc_serial_t send_serial),
1297
1298 TP_ARGS(call, why, slot, send_serial),
1299
1300 TP_STRUCT__entry(
1301 __field(unsigned int, call)
1302 __field(enum rxrpc_rtt_tx_trace, why)
1303 __field(int, slot)
1304 __field(rxrpc_serial_t, send_serial)
1305 ),
1306
1307 TP_fast_assign(
1308 __entry->call = call->debug_id;
1309 __entry->why = why;
1310 __entry->slot = slot;
1311 __entry->send_serial = send_serial;
1312 ),
1313
1314 TP_printk("c=%08x [%d] %s sr=%08x",
1315 __entry->call,
1316 __entry->slot,
1317 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1318 __entry->send_serial)
1319 );
1320
1321TRACE_EVENT(rxrpc_rtt_rx,
1322 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1323 int slot,
1324 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1325 u32 rtt, u32 rto),
1326
1327 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1328
1329 TP_STRUCT__entry(
1330 __field(unsigned int, call)
1331 __field(enum rxrpc_rtt_rx_trace, why)
1332 __field(int, slot)
1333 __field(rxrpc_serial_t, send_serial)
1334 __field(rxrpc_serial_t, resp_serial)
1335 __field(u32, rtt)
1336 __field(u32, rto)
1337 ),
1338
1339 TP_fast_assign(
1340 __entry->call = call->debug_id;
1341 __entry->why = why;
1342 __entry->slot = slot;
1343 __entry->send_serial = send_serial;
1344 __entry->resp_serial = resp_serial;
1345 __entry->rtt = rtt;
1346 __entry->rto = rto;
1347 ),
1348
1349 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1350 __entry->call,
1351 __entry->slot,
1352 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1353 __entry->send_serial,
1354 __entry->resp_serial,
1355 __entry->rtt,
1356 __entry->rto)
1357 );
1358
1359TRACE_EVENT(rxrpc_timer_set,
1360 TP_PROTO(struct rxrpc_call *call, ktime_t delay,
1361 enum rxrpc_timer_trace why),
1362
1363 TP_ARGS(call, delay, why),
1364
1365 TP_STRUCT__entry(
1366 __field(unsigned int, call)
1367 __field(enum rxrpc_timer_trace, why)
1368 __field(ktime_t, delay)
1369 ),
1370
1371 TP_fast_assign(
1372 __entry->call = call->debug_id;
1373 __entry->why = why;
1374 __entry->delay = delay;
1375 ),
1376
1377 TP_printk("c=%08x %s to=%lld",
1378 __entry->call,
1379 __print_symbolic(__entry->why, rxrpc_timer_traces),
1380 ktime_to_us(__entry->delay))
1381 );
1382
1383TRACE_EVENT(rxrpc_timer_exp,
1384 TP_PROTO(struct rxrpc_call *call, ktime_t delay,
1385 enum rxrpc_timer_trace why),
1386
1387 TP_ARGS(call, delay, why),
1388
1389 TP_STRUCT__entry(
1390 __field(unsigned int, call)
1391 __field(enum rxrpc_timer_trace, why)
1392 __field(ktime_t, delay)
1393 ),
1394
1395 TP_fast_assign(
1396 __entry->call = call->debug_id;
1397 __entry->why = why;
1398 __entry->delay = delay;
1399 ),
1400
1401 TP_printk("c=%08x %s to=%lld",
1402 __entry->call,
1403 __print_symbolic(__entry->why, rxrpc_timer_traces),
1404 ktime_to_us(__entry->delay))
1405 );
1406
1407TRACE_EVENT(rxrpc_timer_can,
1408 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why),
1409
1410 TP_ARGS(call, why),
1411
1412 TP_STRUCT__entry(
1413 __field(unsigned int, call)
1414 __field(enum rxrpc_timer_trace, why)
1415 ),
1416
1417 TP_fast_assign(
1418 __entry->call = call->debug_id;
1419 __entry->why = why;
1420 ),
1421
1422 TP_printk("c=%08x %s",
1423 __entry->call,
1424 __print_symbolic(__entry->why, rxrpc_timer_traces))
1425 );
1426
1427TRACE_EVENT(rxrpc_timer_restart,
1428 TP_PROTO(struct rxrpc_call *call, ktime_t delay, unsigned long delayj),
1429
1430 TP_ARGS(call, delay, delayj),
1431
1432 TP_STRUCT__entry(
1433 __field(unsigned int, call)
1434 __field(unsigned long, delayj)
1435 __field(ktime_t, delay)
1436 ),
1437
1438 TP_fast_assign(
1439 __entry->call = call->debug_id;
1440 __entry->delayj = delayj;
1441 __entry->delay = delay;
1442 ),
1443
1444 TP_printk("c=%08x to=%lld j=%ld",
1445 __entry->call,
1446 ktime_to_us(__entry->delay),
1447 __entry->delayj)
1448 );
1449
1450TRACE_EVENT(rxrpc_timer_expired,
1451 TP_PROTO(struct rxrpc_call *call),
1452
1453 TP_ARGS(call),
1454
1455 TP_STRUCT__entry(
1456 __field(unsigned int, call)
1457 ),
1458
1459 TP_fast_assign(
1460 __entry->call = call->debug_id;
1461 ),
1462
1463 TP_printk("c=%08x EXPIRED",
1464 __entry->call)
1465 );
1466
1467TRACE_EVENT(rxrpc_rx_lose,
1468 TP_PROTO(struct rxrpc_skb_priv *sp),
1469
1470 TP_ARGS(sp),
1471
1472 TP_STRUCT__entry(
1473 __field_struct(struct rxrpc_host_header, hdr)
1474 ),
1475
1476 TP_fast_assign(
1477 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1478 ),
1479
1480 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1481 __entry->hdr.epoch, __entry->hdr.cid,
1482 __entry->hdr.callNumber, __entry->hdr.serviceId,
1483 __entry->hdr.serial, __entry->hdr.seq,
1484 __entry->hdr.type, __entry->hdr.flags,
1485 __entry->hdr.type <= 15 ?
1486 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1487 );
1488
1489TRACE_EVENT(rxrpc_propose_ack,
1490 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1491 u8 ack_reason, rxrpc_serial_t serial),
1492
1493 TP_ARGS(call, why, ack_reason, serial),
1494
1495 TP_STRUCT__entry(
1496 __field(unsigned int, call)
1497 __field(enum rxrpc_propose_ack_trace, why)
1498 __field(rxrpc_serial_t, serial)
1499 __field(u8, ack_reason)
1500 ),
1501
1502 TP_fast_assign(
1503 __entry->call = call->debug_id;
1504 __entry->why = why;
1505 __entry->serial = serial;
1506 __entry->ack_reason = ack_reason;
1507 ),
1508
1509 TP_printk("c=%08x %s %s r=%08x",
1510 __entry->call,
1511 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1512 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1513 __entry->serial)
1514 );
1515
1516TRACE_EVENT(rxrpc_send_ack,
1517 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1518 u8 ack_reason, rxrpc_serial_t serial),
1519
1520 TP_ARGS(call, why, ack_reason, serial),
1521
1522 TP_STRUCT__entry(
1523 __field(unsigned int, call)
1524 __field(enum rxrpc_propose_ack_trace, why)
1525 __field(rxrpc_serial_t, serial)
1526 __field(u8, ack_reason)
1527 ),
1528
1529 TP_fast_assign(
1530 __entry->call = call->debug_id;
1531 __entry->why = why;
1532 __entry->serial = serial;
1533 __entry->ack_reason = ack_reason;
1534 ),
1535
1536 TP_printk("c=%08x %s %s r=%08x",
1537 __entry->call,
1538 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1539 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1540 __entry->serial)
1541 );
1542
1543TRACE_EVENT(rxrpc_drop_ack,
1544 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1545 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1546
1547 TP_ARGS(call, why, ack_reason, serial, nobuf),
1548
1549 TP_STRUCT__entry(
1550 __field(unsigned int, call)
1551 __field(enum rxrpc_propose_ack_trace, why)
1552 __field(rxrpc_serial_t, serial)
1553 __field(u8, ack_reason)
1554 __field(bool, nobuf)
1555 ),
1556
1557 TP_fast_assign(
1558 __entry->call = call->debug_id;
1559 __entry->why = why;
1560 __entry->serial = serial;
1561 __entry->ack_reason = ack_reason;
1562 __entry->nobuf = nobuf;
1563 ),
1564
1565 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1566 __entry->call,
1567 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1568 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1569 __entry->serial, __entry->nobuf)
1570 );
1571
1572TRACE_EVENT(rxrpc_retransmit,
1573 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1574 rxrpc_serial_t serial, ktime_t expiry),
1575
1576 TP_ARGS(call, seq, serial, expiry),
1577
1578 TP_STRUCT__entry(
1579 __field(unsigned int, call)
1580 __field(rxrpc_seq_t, seq)
1581 __field(rxrpc_serial_t, serial)
1582 __field(ktime_t, expiry)
1583 ),
1584
1585 TP_fast_assign(
1586 __entry->call = call->debug_id;
1587 __entry->seq = seq;
1588 __entry->serial = serial;
1589 __entry->expiry = expiry;
1590 ),
1591
1592 TP_printk("c=%08x q=%x r=%x xp=%lld",
1593 __entry->call,
1594 __entry->seq,
1595 __entry->serial,
1596 ktime_to_us(__entry->expiry))
1597 );
1598
1599TRACE_EVENT(rxrpc_congest,
1600 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1601 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1602
1603 TP_ARGS(call, summary, ack_serial, change),
1604
1605 TP_STRUCT__entry(
1606 __field(unsigned int, call)
1607 __field(enum rxrpc_congest_change, change)
1608 __field(rxrpc_seq_t, hard_ack)
1609 __field(rxrpc_seq_t, top)
1610 __field(rxrpc_seq_t, lowest_nak)
1611 __field(rxrpc_serial_t, ack_serial)
1612 __field_struct(struct rxrpc_ack_summary, sum)
1613 ),
1614
1615 TP_fast_assign(
1616 __entry->call = call->debug_id;
1617 __entry->change = change;
1618 __entry->hard_ack = call->acks_hard_ack;
1619 __entry->top = call->tx_top;
1620 __entry->lowest_nak = call->acks_lowest_nak;
1621 __entry->ack_serial = ack_serial;
1622 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1623 ),
1624
1625 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",
1626 __entry->call,
1627 __entry->ack_serial,
1628 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1629 __entry->hard_ack,
1630 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1631 __entry->sum.cwnd,
1632 __entry->sum.ssthresh,
1633 __entry->sum.nr_acks, __entry->sum.nr_retained_nacks,
1634 __entry->sum.nr_new_acks,
1635 __entry->sum.nr_new_nacks,
1636 __entry->top - __entry->hard_ack,
1637 __entry->sum.cumulative_acks,
1638 __entry->sum.dup_acks,
1639 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1640 __print_symbolic(__entry->change, rxrpc_congest_changes),
1641 __entry->sum.retrans_timeo ? " rTxTo" : "")
1642 );
1643
1644TRACE_EVENT(rxrpc_reset_cwnd,
1645 TP_PROTO(struct rxrpc_call *call, ktime_t now),
1646
1647 TP_ARGS(call, now),
1648
1649 TP_STRUCT__entry(
1650 __field(unsigned int, call)
1651 __field(enum rxrpc_congest_mode, mode)
1652 __field(unsigned short, cwnd)
1653 __field(unsigned short, extra)
1654 __field(rxrpc_seq_t, hard_ack)
1655 __field(rxrpc_seq_t, prepared)
1656 __field(ktime_t, since_last_tx)
1657 __field(bool, has_data)
1658 ),
1659
1660 TP_fast_assign(
1661 __entry->call = call->debug_id;
1662 __entry->mode = call->cong_mode;
1663 __entry->cwnd = call->cong_cwnd;
1664 __entry->extra = call->cong_extra;
1665 __entry->hard_ack = call->acks_hard_ack;
1666 __entry->prepared = call->tx_prepared - call->tx_bottom;
1667 __entry->since_last_tx = ktime_sub(now, call->tx_last_sent);
1668 __entry->has_data = !list_empty(&call->tx_sendmsg);
1669 ),
1670
1671 TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u",
1672 __entry->call,
1673 __entry->hard_ack,
1674 __print_symbolic(__entry->mode, rxrpc_congest_modes),
1675 __entry->cwnd,
1676 __entry->extra,
1677 __entry->prepared,
1678 ktime_to_ns(__entry->since_last_tx),
1679 __entry->has_data)
1680 );
1681
1682TRACE_EVENT(rxrpc_disconnect_call,
1683 TP_PROTO(struct rxrpc_call *call),
1684
1685 TP_ARGS(call),
1686
1687 TP_STRUCT__entry(
1688 __field(unsigned int, call)
1689 __field(u32, abort_code)
1690 ),
1691
1692 TP_fast_assign(
1693 __entry->call = call->debug_id;
1694 __entry->abort_code = call->abort_code;
1695 ),
1696
1697 TP_printk("c=%08x ab=%08x",
1698 __entry->call,
1699 __entry->abort_code)
1700 );
1701
1702TRACE_EVENT(rxrpc_improper_term,
1703 TP_PROTO(struct rxrpc_call *call),
1704
1705 TP_ARGS(call),
1706
1707 TP_STRUCT__entry(
1708 __field(unsigned int, call)
1709 __field(u32, abort_code)
1710 ),
1711
1712 TP_fast_assign(
1713 __entry->call = call->debug_id;
1714 __entry->abort_code = call->abort_code;
1715 ),
1716
1717 TP_printk("c=%08x ab=%08x",
1718 __entry->call,
1719 __entry->abort_code)
1720 );
1721
1722TRACE_EVENT(rxrpc_connect_call,
1723 TP_PROTO(struct rxrpc_call *call),
1724
1725 TP_ARGS(call),
1726
1727 TP_STRUCT__entry(
1728 __field(unsigned int, call)
1729 __field(unsigned long, user_call_ID)
1730 __field(u32, cid)
1731 __field(u32, call_id)
1732 __field_struct(struct sockaddr_rxrpc, srx)
1733 ),
1734
1735 TP_fast_assign(
1736 __entry->call = call->debug_id;
1737 __entry->user_call_ID = call->user_call_ID;
1738 __entry->cid = call->cid;
1739 __entry->call_id = call->call_id;
1740 __entry->srx = call->dest_srx;
1741 ),
1742
1743 TP_printk("c=%08x u=%p %08x:%08x dst=%pISp",
1744 __entry->call,
1745 (void *)__entry->user_call_ID,
1746 __entry->cid,
1747 __entry->call_id,
1748 &__entry->srx.transport)
1749 );
1750
1751TRACE_EVENT(rxrpc_resend,
1752 TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack),
1753
1754 TP_ARGS(call, ack),
1755
1756 TP_STRUCT__entry(
1757 __field(unsigned int, call)
1758 __field(rxrpc_seq_t, seq)
1759 __field(rxrpc_seq_t, transmitted)
1760 __field(rxrpc_serial_t, ack_serial)
1761 ),
1762
1763 TP_fast_assign(
1764 struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL;
1765 __entry->call = call->debug_id;
1766 __entry->seq = call->acks_hard_ack;
1767 __entry->transmitted = call->tx_transmitted;
1768 __entry->ack_serial = sp ? sp->hdr.serial : 0;
1769 ),
1770
1771 TP_printk("c=%08x r=%x q=%x tq=%x",
1772 __entry->call,
1773 __entry->ack_serial,
1774 __entry->seq,
1775 __entry->transmitted)
1776 );
1777
1778TRACE_EVENT(rxrpc_rx_icmp,
1779 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1780 struct sockaddr_rxrpc *srx),
1781
1782 TP_ARGS(peer, ee, srx),
1783
1784 TP_STRUCT__entry(
1785 __field(unsigned int, peer)
1786 __field_struct(struct sock_extended_err, ee)
1787 __field_struct(struct sockaddr_rxrpc, srx)
1788 ),
1789
1790 TP_fast_assign(
1791 __entry->peer = peer->debug_id;
1792 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1793 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1794 ),
1795
1796 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1797 __entry->peer,
1798 __entry->ee.ee_origin,
1799 __entry->ee.ee_type,
1800 __entry->ee.ee_code,
1801 __entry->ee.ee_info,
1802 __entry->ee.ee_data,
1803 __entry->ee.ee_errno,
1804 &__entry->srx.transport)
1805 );
1806
1807TRACE_EVENT(rxrpc_tx_fail,
1808 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1809 enum rxrpc_tx_point where),
1810
1811 TP_ARGS(debug_id, serial, ret, where),
1812
1813 TP_STRUCT__entry(
1814 __field(unsigned int, debug_id)
1815 __field(rxrpc_serial_t, serial)
1816 __field(int, ret)
1817 __field(enum rxrpc_tx_point, where)
1818 ),
1819
1820 TP_fast_assign(
1821 __entry->debug_id = debug_id;
1822 __entry->serial = serial;
1823 __entry->ret = ret;
1824 __entry->where = where;
1825 ),
1826
1827 TP_printk("c=%08x r=%x ret=%d %s",
1828 __entry->debug_id,
1829 __entry->serial,
1830 __entry->ret,
1831 __print_symbolic(__entry->where, rxrpc_tx_points))
1832 );
1833
1834TRACE_EVENT(rxrpc_call_reset,
1835 TP_PROTO(struct rxrpc_call *call),
1836
1837 TP_ARGS(call),
1838
1839 TP_STRUCT__entry(
1840 __field(unsigned int, debug_id)
1841 __field(u32, cid)
1842 __field(u32, call_id)
1843 __field(rxrpc_serial_t, call_serial)
1844 __field(rxrpc_serial_t, conn_serial)
1845 __field(rxrpc_seq_t, tx_seq)
1846 __field(rxrpc_seq_t, rx_seq)
1847 ),
1848
1849 TP_fast_assign(
1850 __entry->debug_id = call->debug_id;
1851 __entry->cid = call->cid;
1852 __entry->call_id = call->call_id;
1853 __entry->call_serial = call->rx_serial;
1854 __entry->conn_serial = call->conn->hi_serial;
1855 __entry->tx_seq = call->acks_hard_ack;
1856 __entry->rx_seq = call->rx_highest_seq;
1857 ),
1858
1859 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1860 __entry->debug_id,
1861 __entry->cid, __entry->call_id,
1862 __entry->call_serial, __entry->conn_serial,
1863 __entry->tx_seq, __entry->rx_seq)
1864 );
1865
1866TRACE_EVENT(rxrpc_notify_socket,
1867 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1868
1869 TP_ARGS(debug_id, serial),
1870
1871 TP_STRUCT__entry(
1872 __field(unsigned int, debug_id)
1873 __field(rxrpc_serial_t, serial)
1874 ),
1875
1876 TP_fast_assign(
1877 __entry->debug_id = debug_id;
1878 __entry->serial = serial;
1879 ),
1880
1881 TP_printk("c=%08x r=%08x",
1882 __entry->debug_id,
1883 __entry->serial)
1884 );
1885
1886TRACE_EVENT(rxrpc_rx_discard_ack,
1887 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1888 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1889 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1890
1891 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1892 prev_pkt, call_ackr_prev),
1893
1894 TP_STRUCT__entry(
1895 __field(unsigned int, debug_id)
1896 __field(rxrpc_serial_t, serial)
1897 __field(rxrpc_seq_t, first_soft_ack)
1898 __field(rxrpc_seq_t, call_ackr_first)
1899 __field(rxrpc_seq_t, prev_pkt)
1900 __field(rxrpc_seq_t, call_ackr_prev)
1901 ),
1902
1903 TP_fast_assign(
1904 __entry->debug_id = debug_id;
1905 __entry->serial = serial;
1906 __entry->first_soft_ack = first_soft_ack;
1907 __entry->call_ackr_first = call_ackr_first;
1908 __entry->prev_pkt = prev_pkt;
1909 __entry->call_ackr_prev = call_ackr_prev;
1910 ),
1911
1912 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1913 __entry->debug_id,
1914 __entry->serial,
1915 __entry->first_soft_ack,
1916 __entry->call_ackr_first,
1917 __entry->prev_pkt,
1918 __entry->call_ackr_prev)
1919 );
1920
1921TRACE_EVENT(rxrpc_req_ack,
1922 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1923 enum rxrpc_req_ack_trace why),
1924
1925 TP_ARGS(call_debug_id, seq, why),
1926
1927 TP_STRUCT__entry(
1928 __field(unsigned int, call_debug_id)
1929 __field(rxrpc_seq_t, seq)
1930 __field(enum rxrpc_req_ack_trace, why)
1931 ),
1932
1933 TP_fast_assign(
1934 __entry->call_debug_id = call_debug_id;
1935 __entry->seq = seq;
1936 __entry->why = why;
1937 ),
1938
1939 TP_printk("c=%08x q=%08x REQ-%s",
1940 __entry->call_debug_id,
1941 __entry->seq,
1942 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1943 );
1944
1945TRACE_EVENT(rxrpc_txbuf,
1946 TP_PROTO(unsigned int debug_id,
1947 unsigned int call_debug_id, rxrpc_seq_t seq,
1948 int ref, enum rxrpc_txbuf_trace what),
1949
1950 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1951
1952 TP_STRUCT__entry(
1953 __field(unsigned int, debug_id)
1954 __field(unsigned int, call_debug_id)
1955 __field(rxrpc_seq_t, seq)
1956 __field(int, ref)
1957 __field(enum rxrpc_txbuf_trace, what)
1958 ),
1959
1960 TP_fast_assign(
1961 __entry->debug_id = debug_id;
1962 __entry->call_debug_id = call_debug_id;
1963 __entry->seq = seq;
1964 __entry->ref = ref;
1965 __entry->what = what;
1966 ),
1967
1968 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1969 __entry->debug_id,
1970 __entry->call_debug_id,
1971 __entry->seq,
1972 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1973 __entry->ref)
1974 );
1975
1976TRACE_EVENT(rxrpc_poke_call,
1977 TP_PROTO(struct rxrpc_call *call, bool busy,
1978 enum rxrpc_call_poke_trace what),
1979
1980 TP_ARGS(call, busy, what),
1981
1982 TP_STRUCT__entry(
1983 __field(unsigned int, call_debug_id)
1984 __field(bool, busy)
1985 __field(enum rxrpc_call_poke_trace, what)
1986 ),
1987
1988 TP_fast_assign(
1989 __entry->call_debug_id = call->debug_id;
1990 __entry->busy = busy;
1991 __entry->what = what;
1992 ),
1993
1994 TP_printk("c=%08x %s%s",
1995 __entry->call_debug_id,
1996 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1997 __entry->busy ? "!" : "")
1998 );
1999
2000TRACE_EVENT(rxrpc_call_poked,
2001 TP_PROTO(struct rxrpc_call *call),
2002
2003 TP_ARGS(call),
2004
2005 TP_STRUCT__entry(
2006 __field(unsigned int, call_debug_id)
2007 ),
2008
2009 TP_fast_assign(
2010 __entry->call_debug_id = call->debug_id;
2011 ),
2012
2013 TP_printk("c=%08x",
2014 __entry->call_debug_id)
2015 );
2016
2017TRACE_EVENT(rxrpc_sack,
2018 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
2019 unsigned int sack, enum rxrpc_sack_trace what),
2020
2021 TP_ARGS(call, seq, sack, what),
2022
2023 TP_STRUCT__entry(
2024 __field(unsigned int, call_debug_id)
2025 __field(rxrpc_seq_t, seq)
2026 __field(unsigned int, sack)
2027 __field(enum rxrpc_sack_trace, what)
2028 ),
2029
2030 TP_fast_assign(
2031 __entry->call_debug_id = call->debug_id;
2032 __entry->seq = seq;
2033 __entry->sack = sack;
2034 __entry->what = what;
2035 ),
2036
2037 TP_printk("c=%08x q=%08x %s k=%x",
2038 __entry->call_debug_id,
2039 __entry->seq,
2040 __print_symbolic(__entry->what, rxrpc_sack_traces),
2041 __entry->sack)
2042 );
2043
2044#undef EM
2045#undef E_
2046
2047#endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */
2048#endif /* _TRACE_RXRPC_H */
2049
2050/* This part must be outside protection */
2051#include <trace/define_trace.h>
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/* AF_RXRPC tracepoints
3 *
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
9
10#if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
11#define _TRACE_RXRPC_H
12
13#include <linux/tracepoint.h>
14#include <linux/errqueue.h>
15
16/*
17 * Declare tracing information enums and their string mappings for display.
18 */
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_info, "short-ack-info") \
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")
116
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_start, "Start") \
123 EM(rxrpc_call_poke_timer, "Timer") \
124 E_(rxrpc_call_poke_timer_now, "Timer-now")
125
126#define rxrpc_skb_traces \
127 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \
128 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \
129 EM(rxrpc_skb_get_conn_secured, "GET conn-secd") \
130 EM(rxrpc_skb_get_conn_work, "GET conn-work") \
131 EM(rxrpc_skb_get_last_nack, "GET last-nack") \
132 EM(rxrpc_skb_get_local_work, "GET locl-work") \
133 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \
134 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \
135 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \
136 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \
137 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \
138 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \
139 EM(rxrpc_skb_new_unshared, "NEW unshared ") \
140 EM(rxrpc_skb_put_conn_secured, "PUT conn-secd") \
141 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \
142 EM(rxrpc_skb_put_error_report, "PUT error-rep") \
143 EM(rxrpc_skb_put_input, "PUT input ") \
144 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \
145 EM(rxrpc_skb_put_last_nack, "PUT last-nack") \
146 EM(rxrpc_skb_put_purge, "PUT purge ") \
147 EM(rxrpc_skb_put_rotate, "PUT rotate ") \
148 EM(rxrpc_skb_put_unknown, "PUT unknown ") \
149 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \
150 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \
151 EM(rxrpc_skb_see_reject, "SEE reject ") \
152 EM(rxrpc_skb_see_rotate, "SEE rotate ") \
153 E_(rxrpc_skb_see_version, "SEE version ")
154
155#define rxrpc_local_traces \
156 EM(rxrpc_local_free, "FREE ") \
157 EM(rxrpc_local_get_call, "GET call ") \
158 EM(rxrpc_local_get_client_conn, "GET conn-cln") \
159 EM(rxrpc_local_get_for_use, "GET for-use ") \
160 EM(rxrpc_local_get_peer, "GET peer ") \
161 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \
162 EM(rxrpc_local_new, "NEW ") \
163 EM(rxrpc_local_put_bind, "PUT bind ") \
164 EM(rxrpc_local_put_call, "PUT call ") \
165 EM(rxrpc_local_put_for_use, "PUT for-use ") \
166 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \
167 EM(rxrpc_local_put_peer, "PUT peer ") \
168 EM(rxrpc_local_put_prealloc_peer, "PUT peer-pre") \
169 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \
170 EM(rxrpc_local_stop, "STOP ") \
171 EM(rxrpc_local_stopped, "STOPPED ") \
172 EM(rxrpc_local_unuse_bind, "UNU bind ") \
173 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \
174 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \
175 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \
176 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \
177 EM(rxrpc_local_use_lookup, "USE lookup ") \
178 E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa")
179
180#define rxrpc_peer_traces \
181 EM(rxrpc_peer_free, "FREE ") \
182 EM(rxrpc_peer_get_accept, "GET accept ") \
183 EM(rxrpc_peer_get_application, "GET app ") \
184 EM(rxrpc_peer_get_bundle, "GET bundle ") \
185 EM(rxrpc_peer_get_call, "GET call ") \
186 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \
187 EM(rxrpc_peer_get_input, "GET input ") \
188 EM(rxrpc_peer_get_input_error, "GET inpt-err") \
189 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \
190 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \
191 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \
192 EM(rxrpc_peer_new_client, "NEW client ") \
193 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \
194 EM(rxrpc_peer_put_application, "PUT app ") \
195 EM(rxrpc_peer_put_bundle, "PUT bundle ") \
196 EM(rxrpc_peer_put_call, "PUT call ") \
197 EM(rxrpc_peer_put_conn, "PUT conn ") \
198 EM(rxrpc_peer_put_input, "PUT input ") \
199 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \
200 E_(rxrpc_peer_put_keepalive, "PUT keepaliv")
201
202#define rxrpc_bundle_traces \
203 EM(rxrpc_bundle_free, "FREE ") \
204 EM(rxrpc_bundle_get_client_call, "GET clt-call") \
205 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \
206 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \
207 EM(rxrpc_bundle_put_call, "PUT call ") \
208 EM(rxrpc_bundle_put_conn, "PUT conn ") \
209 EM(rxrpc_bundle_put_discard, "PUT discard ") \
210 E_(rxrpc_bundle_new, "NEW ")
211
212#define rxrpc_conn_traces \
213 EM(rxrpc_conn_free, "FREE ") \
214 EM(rxrpc_conn_get_activate_call, "GET act-call") \
215 EM(rxrpc_conn_get_call_input, "GET inp-call") \
216 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \
217 EM(rxrpc_conn_get_idle, "GET idle ") \
218 EM(rxrpc_conn_get_poke_abort, "GET pk-abort") \
219 EM(rxrpc_conn_get_poke_timer, "GET poke ") \
220 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \
221 EM(rxrpc_conn_new_client, "NEW client ") \
222 EM(rxrpc_conn_new_service, "NEW service ") \
223 EM(rxrpc_conn_put_call, "PUT call ") \
224 EM(rxrpc_conn_put_call_input, "PUT inp-call") \
225 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \
226 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \
227 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \
228 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \
229 EM(rxrpc_conn_put_poke, "PUT poke ") \
230 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \
231 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \
232 EM(rxrpc_conn_put_unidle, "PUT unidle ") \
233 EM(rxrpc_conn_put_work, "PUT work ") \
234 EM(rxrpc_conn_queue_challenge, "QUE chall ") \
235 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
236 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
237 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
238 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \
239 E_(rxrpc_conn_see_work, "SEE work ")
240
241#define rxrpc_client_traces \
242 EM(rxrpc_client_activate_chans, "Activa") \
243 EM(rxrpc_client_alloc, "Alloc ") \
244 EM(rxrpc_client_chan_activate, "ChActv") \
245 EM(rxrpc_client_chan_disconnect, "ChDisc") \
246 EM(rxrpc_client_chan_pass, "ChPass") \
247 EM(rxrpc_client_cleanup, "Clean ") \
248 EM(rxrpc_client_discard, "Discar") \
249 EM(rxrpc_client_exposed, "Expose") \
250 EM(rxrpc_client_replace, "Replac") \
251 EM(rxrpc_client_queue_new_call, "Q-Call") \
252 EM(rxrpc_client_to_active, "->Actv") \
253 E_(rxrpc_client_to_idle, "->Idle")
254
255#define rxrpc_call_traces \
256 EM(rxrpc_call_get_io_thread, "GET iothread") \
257 EM(rxrpc_call_get_input, "GET input ") \
258 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \
259 EM(rxrpc_call_get_notify_socket, "GET notify ") \
260 EM(rxrpc_call_get_poke, "GET poke ") \
261 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \
262 EM(rxrpc_call_get_release_sock, "GET rel-sock") \
263 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \
264 EM(rxrpc_call_get_userid, "GET user-id ") \
265 EM(rxrpc_call_new_client, "NEW client ") \
266 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \
267 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \
268 EM(rxrpc_call_put_discard_error, "PUT disc-err") \
269 EM(rxrpc_call_put_io_thread, "PUT iothread") \
270 EM(rxrpc_call_put_input, "PUT input ") \
271 EM(rxrpc_call_put_kernel, "PUT kernel ") \
272 EM(rxrpc_call_put_poke, "PUT poke ") \
273 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \
274 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \
275 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \
276 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \
277 EM(rxrpc_call_put_unnotify, "PUT unnotify") \
278 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \
279 EM(rxrpc_call_put_userid, "PUT user-id ") \
280 EM(rxrpc_call_see_accept, "SEE accept ") \
281 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
282 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
283 EM(rxrpc_call_see_connected, "SEE connect ") \
284 EM(rxrpc_call_see_disconnected, "SEE disconn ") \
285 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
286 EM(rxrpc_call_see_input, "SEE input ") \
287 EM(rxrpc_call_see_release, "SEE release ") \
288 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
289 E_(rxrpc_call_see_zap, "SEE zap ")
290
291#define rxrpc_txqueue_traces \
292 EM(rxrpc_txqueue_await_reply, "AWR") \
293 EM(rxrpc_txqueue_dequeue, "DEQ") \
294 EM(rxrpc_txqueue_end, "END") \
295 EM(rxrpc_txqueue_queue, "QUE") \
296 EM(rxrpc_txqueue_queue_last, "QLS") \
297 EM(rxrpc_txqueue_rotate, "ROT") \
298 EM(rxrpc_txqueue_rotate_last, "RLS") \
299 E_(rxrpc_txqueue_wait, "WAI")
300
301#define rxrpc_receive_traces \
302 EM(rxrpc_receive_end, "END") \
303 EM(rxrpc_receive_front, "FRN") \
304 EM(rxrpc_receive_incoming, "INC") \
305 EM(rxrpc_receive_queue, "QUE") \
306 EM(rxrpc_receive_queue_last, "QLS") \
307 EM(rxrpc_receive_queue_oos, "QUO") \
308 EM(rxrpc_receive_queue_oos_last, "QOL") \
309 EM(rxrpc_receive_oos, "OOS") \
310 EM(rxrpc_receive_oos_last, "OSL") \
311 EM(rxrpc_receive_rotate, "ROT") \
312 E_(rxrpc_receive_rotate_last, "RLS")
313
314#define rxrpc_recvmsg_traces \
315 EM(rxrpc_recvmsg_cont, "CONT") \
316 EM(rxrpc_recvmsg_data_return, "DATA") \
317 EM(rxrpc_recvmsg_dequeue, "DEQU") \
318 EM(rxrpc_recvmsg_enter, "ENTR") \
319 EM(rxrpc_recvmsg_full, "FULL") \
320 EM(rxrpc_recvmsg_hole, "HOLE") \
321 EM(rxrpc_recvmsg_next, "NEXT") \
322 EM(rxrpc_recvmsg_requeue, "REQU") \
323 EM(rxrpc_recvmsg_return, "RETN") \
324 EM(rxrpc_recvmsg_terminal, "TERM") \
325 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
326 EM(rxrpc_recvmsg_unqueue, "UNQU") \
327 E_(rxrpc_recvmsg_wait, "WAIT")
328
329#define rxrpc_rtt_tx_traces \
330 EM(rxrpc_rtt_tx_cancel, "CNCE") \
331 EM(rxrpc_rtt_tx_data, "DATA") \
332 EM(rxrpc_rtt_tx_no_slot, "FULL") \
333 E_(rxrpc_rtt_tx_ping, "PING")
334
335#define rxrpc_rtt_rx_traces \
336 EM(rxrpc_rtt_rx_other_ack, "OACK") \
337 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
338 EM(rxrpc_rtt_rx_lost, "LOST") \
339 EM(rxrpc_rtt_rx_ping_response, "PONG") \
340 E_(rxrpc_rtt_rx_requested_ack, "RACK")
341
342#define rxrpc_timer_traces \
343 EM(rxrpc_timer_begin, "Begin ") \
344 EM(rxrpc_timer_exp_ack, "ExpAck") \
345 EM(rxrpc_timer_exp_hard, "ExpHrd") \
346 EM(rxrpc_timer_exp_idle, "ExpIdl") \
347 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
348 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
349 EM(rxrpc_timer_exp_normal, "ExpNml") \
350 EM(rxrpc_timer_exp_ping, "ExpPng") \
351 EM(rxrpc_timer_exp_resend, "ExpRsn") \
352 EM(rxrpc_timer_init_for_reply, "IniRpl") \
353 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
354 EM(rxrpc_timer_restart, "Restrt") \
355 EM(rxrpc_timer_set_for_ack, "SetAck") \
356 EM(rxrpc_timer_set_for_hard, "SetHrd") \
357 EM(rxrpc_timer_set_for_idle, "SetIdl") \
358 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
359 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
360 EM(rxrpc_timer_set_for_normal, "SetNml") \
361 EM(rxrpc_timer_set_for_ping, "SetPng") \
362 EM(rxrpc_timer_set_for_resend, "SetRTx") \
363 E_(rxrpc_timer_set_for_send, "SetSnd")
364
365#define rxrpc_propose_ack_traces \
366 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
367 EM(rxrpc_propose_ack_input_data, "DataIn ") \
368 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
369 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
370 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
371 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
372 EM(rxrpc_propose_ack_ping_for_old_rtt, "OldRtt ") \
373 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
374 EM(rxrpc_propose_ack_ping_for_rtt, "Rtt ") \
375 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
376 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
377 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
378 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
379 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
380 EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \
381 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
382
383#define rxrpc_congest_modes \
384 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
385 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
386 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
387 E_(RXRPC_CALL_SLOW_START, "SlowStart")
388
389#define rxrpc_congest_changes \
390 EM(rxrpc_cong_begin_retransmission, " Retrans") \
391 EM(rxrpc_cong_cleared_nacks, " Cleared") \
392 EM(rxrpc_cong_new_low_nack, " NewLowN") \
393 EM(rxrpc_cong_no_change, " -") \
394 EM(rxrpc_cong_progress, " Progres") \
395 EM(rxrpc_cong_idle_reset, " IdleRes") \
396 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
397 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
398 E_(rxrpc_cong_saw_nack, " SawNack")
399
400#define rxrpc_pkts \
401 EM(0, "?00") \
402 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
403 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
404 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
405 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
406 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
407 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
408 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
409 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
410 EM(9, "?09") \
411 EM(10, "?10") \
412 EM(11, "?11") \
413 EM(12, "?12") \
414 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
415 EM(14, "?14") \
416 E_(15, "?15")
417
418#define rxrpc_ack_names \
419 EM(0, "-0-") \
420 EM(RXRPC_ACK_REQUESTED, "REQ") \
421 EM(RXRPC_ACK_DUPLICATE, "DUP") \
422 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
423 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
424 EM(RXRPC_ACK_NOSPACE, "MEM") \
425 EM(RXRPC_ACK_PING, "PNG") \
426 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
427 EM(RXRPC_ACK_DELAY, "DLY") \
428 EM(RXRPC_ACK_IDLE, "IDL") \
429 E_(RXRPC_ACK__INVALID, "-?-")
430
431#define rxrpc_sack_traces \
432 EM(rxrpc_sack_advance, "ADV") \
433 EM(rxrpc_sack_fill, "FIL") \
434 EM(rxrpc_sack_nack, "NAK") \
435 EM(rxrpc_sack_none, "---") \
436 E_(rxrpc_sack_oos, "OOS")
437
438#define rxrpc_completions \
439 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
440 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
441 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
442 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
443 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
444
445#define rxrpc_tx_points \
446 EM(rxrpc_tx_point_call_abort, "CallAbort") \
447 EM(rxrpc_tx_point_call_ack, "CallAck") \
448 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
449 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
450 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
451 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
452 EM(rxrpc_tx_point_reject, "Reject") \
453 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
454 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
455 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
456 E_(rxrpc_tx_point_version_reply, "VerReply")
457
458#define rxrpc_req_ack_traces \
459 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
460 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
461 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
462 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
463 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
464 EM(rxrpc_reqack_retrans, "RETRANS ") \
465 EM(rxrpc_reqack_slow_start, "SLOW-START") \
466 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
467/* ---- Must update size of stat_why_req_ack[] if more are added! */
468
469#define rxrpc_txbuf_traces \
470 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
471 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
472 EM(rxrpc_txbuf_free, "FREE ") \
473 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
474 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
475 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
476 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
477 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
478 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
479 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
480 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
481 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
482 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \
483 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
484 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
485
486/*
487 * Generate enums for tracing information.
488 */
489#ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
490#define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
491
492#undef EM
493#undef E_
494#define EM(a, b) a,
495#define E_(a, b) a
496
497enum rxrpc_abort_reason { rxrpc_abort_reasons } __mode(byte);
498enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte);
499enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte);
500enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
501enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
502enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
503enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
504enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
505enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
506enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
507enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
508enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
509enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
510enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
511enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
512enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
513enum rxrpc_sack_trace { rxrpc_sack_traces } __mode(byte);
514enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
515enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
516enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
517enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
518enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
519
520#endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
521
522/*
523 * Export enum symbols via userspace.
524 */
525#undef EM
526#undef E_
527
528#ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS
529
530#define EM(a, b) TRACE_DEFINE_ENUM(a);
531#define E_(a, b) TRACE_DEFINE_ENUM(a);
532
533rxrpc_abort_reasons;
534rxrpc_bundle_traces;
535rxrpc_call_poke_traces;
536rxrpc_call_traces;
537rxrpc_client_traces;
538rxrpc_congest_changes;
539rxrpc_congest_modes;
540rxrpc_conn_traces;
541rxrpc_local_traces;
542rxrpc_propose_ack_traces;
543rxrpc_receive_traces;
544rxrpc_recvmsg_traces;
545rxrpc_req_ack_traces;
546rxrpc_rtt_rx_traces;
547rxrpc_rtt_tx_traces;
548rxrpc_sack_traces;
549rxrpc_skb_traces;
550rxrpc_timer_traces;
551rxrpc_tx_points;
552rxrpc_txbuf_traces;
553rxrpc_txqueue_traces;
554
555/*
556 * Now redefine the EM() and E_() macros to map the enums to the strings that
557 * will be printed in the output.
558 */
559#undef EM
560#undef E_
561#define EM(a, b) { a, b },
562#define E_(a, b) { a, b }
563
564TRACE_EVENT(rxrpc_local,
565 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
566 int ref, int usage),
567
568 TP_ARGS(local_debug_id, op, ref, usage),
569
570 TP_STRUCT__entry(
571 __field(unsigned int, local)
572 __field(int, op)
573 __field(int, ref)
574 __field(int, usage)
575 ),
576
577 TP_fast_assign(
578 __entry->local = local_debug_id;
579 __entry->op = op;
580 __entry->ref = ref;
581 __entry->usage = usage;
582 ),
583
584 TP_printk("L=%08x %s r=%d u=%d",
585 __entry->local,
586 __print_symbolic(__entry->op, rxrpc_local_traces),
587 __entry->ref,
588 __entry->usage)
589 );
590
591TRACE_EVENT(rxrpc_peer,
592 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
593
594 TP_ARGS(peer_debug_id, ref, why),
595
596 TP_STRUCT__entry(
597 __field(unsigned int, peer)
598 __field(int, ref)
599 __field(enum rxrpc_peer_trace, why)
600 ),
601
602 TP_fast_assign(
603 __entry->peer = peer_debug_id;
604 __entry->ref = ref;
605 __entry->why = why;
606 ),
607
608 TP_printk("P=%08x %s r=%d",
609 __entry->peer,
610 __print_symbolic(__entry->why, rxrpc_peer_traces),
611 __entry->ref)
612 );
613
614TRACE_EVENT(rxrpc_bundle,
615 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
616
617 TP_ARGS(bundle_debug_id, ref, why),
618
619 TP_STRUCT__entry(
620 __field(unsigned int, bundle)
621 __field(int, ref)
622 __field(int, why)
623 ),
624
625 TP_fast_assign(
626 __entry->bundle = bundle_debug_id;
627 __entry->ref = ref;
628 __entry->why = why;
629 ),
630
631 TP_printk("CB=%08x %s r=%d",
632 __entry->bundle,
633 __print_symbolic(__entry->why, rxrpc_bundle_traces),
634 __entry->ref)
635 );
636
637TRACE_EVENT(rxrpc_conn,
638 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
639
640 TP_ARGS(conn_debug_id, ref, why),
641
642 TP_STRUCT__entry(
643 __field(unsigned int, conn)
644 __field(int, ref)
645 __field(int, why)
646 ),
647
648 TP_fast_assign(
649 __entry->conn = conn_debug_id;
650 __entry->ref = ref;
651 __entry->why = why;
652 ),
653
654 TP_printk("C=%08x %s r=%d",
655 __entry->conn,
656 __print_symbolic(__entry->why, rxrpc_conn_traces),
657 __entry->ref)
658 );
659
660TRACE_EVENT(rxrpc_client,
661 TP_PROTO(struct rxrpc_connection *conn, int channel,
662 enum rxrpc_client_trace op),
663
664 TP_ARGS(conn, channel, op),
665
666 TP_STRUCT__entry(
667 __field(unsigned int, conn)
668 __field(u32, cid)
669 __field(int, channel)
670 __field(int, usage)
671 __field(enum rxrpc_client_trace, op)
672 ),
673
674 TP_fast_assign(
675 __entry->conn = conn ? conn->debug_id : 0;
676 __entry->channel = channel;
677 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
678 __entry->op = op;
679 __entry->cid = conn ? conn->proto.cid : 0;
680 ),
681
682 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
683 __entry->conn,
684 __entry->channel,
685 __print_symbolic(__entry->op, rxrpc_client_traces),
686 __entry->cid,
687 __entry->usage)
688 );
689
690TRACE_EVENT(rxrpc_call,
691 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
692 enum rxrpc_call_trace why),
693
694 TP_ARGS(call_debug_id, ref, aux, why),
695
696 TP_STRUCT__entry(
697 __field(unsigned int, call)
698 __field(int, ref)
699 __field(int, why)
700 __field(unsigned long, aux)
701 ),
702
703 TP_fast_assign(
704 __entry->call = call_debug_id;
705 __entry->ref = ref;
706 __entry->why = why;
707 __entry->aux = aux;
708 ),
709
710 TP_printk("c=%08x %s r=%d a=%lx",
711 __entry->call,
712 __print_symbolic(__entry->why, rxrpc_call_traces),
713 __entry->ref,
714 __entry->aux)
715 );
716
717TRACE_EVENT(rxrpc_skb,
718 TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
719 enum rxrpc_skb_trace why),
720
721 TP_ARGS(skb, usage, mod_count, why),
722
723 TP_STRUCT__entry(
724 __field(struct sk_buff *, skb)
725 __field(int, usage)
726 __field(int, mod_count)
727 __field(enum rxrpc_skb_trace, why)
728 ),
729
730 TP_fast_assign(
731 __entry->skb = skb;
732 __entry->usage = usage;
733 __entry->mod_count = mod_count;
734 __entry->why = why;
735 ),
736
737 TP_printk("s=%p Rx %s u=%d m=%d",
738 __entry->skb,
739 __print_symbolic(__entry->why, rxrpc_skb_traces),
740 __entry->usage,
741 __entry->mod_count)
742 );
743
744TRACE_EVENT(rxrpc_rx_packet,
745 TP_PROTO(struct rxrpc_skb_priv *sp),
746
747 TP_ARGS(sp),
748
749 TP_STRUCT__entry(
750 __field_struct(struct rxrpc_host_header, hdr)
751 ),
752
753 TP_fast_assign(
754 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
755 ),
756
757 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
758 __entry->hdr.epoch, __entry->hdr.cid,
759 __entry->hdr.callNumber, __entry->hdr.serviceId,
760 __entry->hdr.serial, __entry->hdr.seq,
761 __entry->hdr.securityIndex, __entry->hdr.flags,
762 __print_symbolic(__entry->hdr.type, rxrpc_pkts))
763 );
764
765TRACE_EVENT(rxrpc_rx_done,
766 TP_PROTO(int result, int abort_code),
767
768 TP_ARGS(result, abort_code),
769
770 TP_STRUCT__entry(
771 __field(int, result)
772 __field(int, abort_code)
773 ),
774
775 TP_fast_assign(
776 __entry->result = result;
777 __entry->abort_code = abort_code;
778 ),
779
780 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
781 );
782
783TRACE_EVENT(rxrpc_abort,
784 TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why,
785 u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error),
786
787 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
788
789 TP_STRUCT__entry(
790 __field(unsigned int, call_nr)
791 __field(enum rxrpc_abort_reason, why)
792 __field(u32, cid)
793 __field(u32, call_id)
794 __field(rxrpc_seq_t, seq)
795 __field(int, abort_code)
796 __field(int, error)
797 ),
798
799 TP_fast_assign(
800 __entry->call_nr = call_nr;
801 __entry->why = why;
802 __entry->cid = cid;
803 __entry->call_id = call_id;
804 __entry->abort_code = abort_code;
805 __entry->error = error;
806 __entry->seq = seq;
807 ),
808
809 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
810 __entry->call_nr,
811 __entry->cid, __entry->call_id, __entry->seq,
812 __entry->abort_code, __entry->error,
813 __print_symbolic(__entry->why, rxrpc_abort_reasons))
814 );
815
816TRACE_EVENT(rxrpc_call_complete,
817 TP_PROTO(struct rxrpc_call *call),
818
819 TP_ARGS(call),
820
821 TP_STRUCT__entry(
822 __field(unsigned int, call)
823 __field(enum rxrpc_call_completion, compl)
824 __field(int, error)
825 __field(u32, abort_code)
826 ),
827
828 TP_fast_assign(
829 __entry->call = call->debug_id;
830 __entry->compl = call->completion;
831 __entry->error = call->error;
832 __entry->abort_code = call->abort_code;
833 ),
834
835 TP_printk("c=%08x %s r=%d ac=%d",
836 __entry->call,
837 __print_symbolic(__entry->compl, rxrpc_completions),
838 __entry->error,
839 __entry->abort_code)
840 );
841
842TRACE_EVENT(rxrpc_txqueue,
843 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
844
845 TP_ARGS(call, why),
846
847 TP_STRUCT__entry(
848 __field(unsigned int, call)
849 __field(enum rxrpc_txqueue_trace, why)
850 __field(rxrpc_seq_t, acks_hard_ack)
851 __field(rxrpc_seq_t, tx_bottom)
852 __field(rxrpc_seq_t, tx_top)
853 __field(rxrpc_seq_t, tx_prepared)
854 __field(int, tx_winsize)
855 ),
856
857 TP_fast_assign(
858 __entry->call = call->debug_id;
859 __entry->why = why;
860 __entry->acks_hard_ack = call->acks_hard_ack;
861 __entry->tx_bottom = call->tx_bottom;
862 __entry->tx_top = call->tx_top;
863 __entry->tx_prepared = call->tx_prepared;
864 __entry->tx_winsize = call->tx_winsize;
865 ),
866
867 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
868 __entry->call,
869 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
870 __entry->tx_bottom,
871 __entry->acks_hard_ack,
872 __entry->tx_top - __entry->tx_bottom,
873 __entry->tx_top - __entry->acks_hard_ack,
874 __entry->tx_prepared - __entry->tx_bottom,
875 __entry->tx_winsize)
876 );
877
878TRACE_EVENT(rxrpc_rx_data,
879 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
880 rxrpc_serial_t serial, u8 flags),
881
882 TP_ARGS(call, seq, serial, flags),
883
884 TP_STRUCT__entry(
885 __field(unsigned int, call)
886 __field(rxrpc_seq_t, seq)
887 __field(rxrpc_serial_t, serial)
888 __field(u8, flags)
889 ),
890
891 TP_fast_assign(
892 __entry->call = call;
893 __entry->seq = seq;
894 __entry->serial = serial;
895 __entry->flags = flags;
896 ),
897
898 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
899 __entry->call,
900 __entry->serial,
901 __entry->seq,
902 __entry->flags)
903 );
904
905TRACE_EVENT(rxrpc_rx_ack,
906 TP_PROTO(struct rxrpc_call *call,
907 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
908 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
909
910 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
911
912 TP_STRUCT__entry(
913 __field(unsigned int, call)
914 __field(rxrpc_serial_t, serial)
915 __field(rxrpc_serial_t, ack_serial)
916 __field(rxrpc_seq_t, first)
917 __field(rxrpc_seq_t, prev)
918 __field(u8, reason)
919 __field(u8, n_acks)
920 ),
921
922 TP_fast_assign(
923 __entry->call = call->debug_id;
924 __entry->serial = serial;
925 __entry->ack_serial = ack_serial;
926 __entry->first = first;
927 __entry->prev = prev;
928 __entry->reason = reason;
929 __entry->n_acks = n_acks;
930 ),
931
932 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
933 __entry->call,
934 __entry->serial,
935 __print_symbolic(__entry->reason, rxrpc_ack_names),
936 __entry->ack_serial,
937 __entry->first,
938 __entry->prev,
939 __entry->n_acks)
940 );
941
942TRACE_EVENT(rxrpc_rx_abort,
943 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
944 u32 abort_code),
945
946 TP_ARGS(call, serial, abort_code),
947
948 TP_STRUCT__entry(
949 __field(unsigned int, call)
950 __field(rxrpc_serial_t, serial)
951 __field(u32, abort_code)
952 ),
953
954 TP_fast_assign(
955 __entry->call = call->debug_id;
956 __entry->serial = serial;
957 __entry->abort_code = abort_code;
958 ),
959
960 TP_printk("c=%08x ABORT %08x ac=%d",
961 __entry->call,
962 __entry->serial,
963 __entry->abort_code)
964 );
965
966TRACE_EVENT(rxrpc_rx_challenge,
967 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
968 u32 version, u32 nonce, u32 min_level),
969
970 TP_ARGS(conn, serial, version, nonce, min_level),
971
972 TP_STRUCT__entry(
973 __field(unsigned int, conn)
974 __field(rxrpc_serial_t, serial)
975 __field(u32, version)
976 __field(u32, nonce)
977 __field(u32, min_level)
978 ),
979
980 TP_fast_assign(
981 __entry->conn = conn->debug_id;
982 __entry->serial = serial;
983 __entry->version = version;
984 __entry->nonce = nonce;
985 __entry->min_level = min_level;
986 ),
987
988 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
989 __entry->conn,
990 __entry->serial,
991 __entry->version,
992 __entry->nonce,
993 __entry->min_level)
994 );
995
996TRACE_EVENT(rxrpc_rx_response,
997 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
998 u32 version, u32 kvno, u32 ticket_len),
999
1000 TP_ARGS(conn, serial, version, kvno, ticket_len),
1001
1002 TP_STRUCT__entry(
1003 __field(unsigned int, conn)
1004 __field(rxrpc_serial_t, serial)
1005 __field(u32, version)
1006 __field(u32, kvno)
1007 __field(u32, ticket_len)
1008 ),
1009
1010 TP_fast_assign(
1011 __entry->conn = conn->debug_id;
1012 __entry->serial = serial;
1013 __entry->version = version;
1014 __entry->kvno = kvno;
1015 __entry->ticket_len = ticket_len;
1016 ),
1017
1018 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
1019 __entry->conn,
1020 __entry->serial,
1021 __entry->version,
1022 __entry->kvno,
1023 __entry->ticket_len)
1024 );
1025
1026TRACE_EVENT(rxrpc_rx_rwind_change,
1027 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1028 u32 rwind, bool wake),
1029
1030 TP_ARGS(call, serial, rwind, wake),
1031
1032 TP_STRUCT__entry(
1033 __field(unsigned int, call)
1034 __field(rxrpc_serial_t, serial)
1035 __field(u32, rwind)
1036 __field(bool, wake)
1037 ),
1038
1039 TP_fast_assign(
1040 __entry->call = call->debug_id;
1041 __entry->serial = serial;
1042 __entry->rwind = rwind;
1043 __entry->wake = wake;
1044 ),
1045
1046 TP_printk("c=%08x %08x rw=%u%s",
1047 __entry->call,
1048 __entry->serial,
1049 __entry->rwind,
1050 __entry->wake ? " wake" : "")
1051 );
1052
1053TRACE_EVENT(rxrpc_tx_packet,
1054 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
1055 enum rxrpc_tx_point where),
1056
1057 TP_ARGS(call_id, whdr, where),
1058
1059 TP_STRUCT__entry(
1060 __field(unsigned int, call)
1061 __field(enum rxrpc_tx_point, where)
1062 __field_struct(struct rxrpc_wire_header, whdr)
1063 ),
1064
1065 TP_fast_assign(
1066 __entry->call = call_id;
1067 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
1068 __entry->where = where;
1069 ),
1070
1071 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
1072 __entry->call,
1073 ntohl(__entry->whdr.epoch),
1074 ntohl(__entry->whdr.cid),
1075 ntohl(__entry->whdr.callNumber),
1076 ntohs(__entry->whdr.serviceId),
1077 ntohl(__entry->whdr.serial),
1078 ntohl(__entry->whdr.seq),
1079 __entry->whdr.type, __entry->whdr.flags,
1080 __entry->whdr.type <= 15 ?
1081 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
1082 __print_symbolic(__entry->where, rxrpc_tx_points))
1083 );
1084
1085TRACE_EVENT(rxrpc_tx_data,
1086 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1087 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
1088
1089 TP_ARGS(call, seq, serial, flags, retrans, lose),
1090
1091 TP_STRUCT__entry(
1092 __field(unsigned int, call)
1093 __field(rxrpc_seq_t, seq)
1094 __field(rxrpc_serial_t, serial)
1095 __field(u32, cid)
1096 __field(u32, call_id)
1097 __field(u8, flags)
1098 __field(bool, retrans)
1099 __field(bool, lose)
1100 ),
1101
1102 TP_fast_assign(
1103 __entry->call = call->debug_id;
1104 __entry->cid = call->cid;
1105 __entry->call_id = call->call_id;
1106 __entry->seq = seq;
1107 __entry->serial = serial;
1108 __entry->flags = flags;
1109 __entry->retrans = retrans;
1110 __entry->lose = lose;
1111 ),
1112
1113 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1114 __entry->call,
1115 __entry->cid,
1116 __entry->call_id,
1117 __entry->serial,
1118 __entry->seq,
1119 __entry->flags,
1120 __entry->retrans ? " *RETRANS*" : "",
1121 __entry->lose ? " *LOSE*" : "")
1122 );
1123
1124TRACE_EVENT(rxrpc_tx_ack,
1125 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1126 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1127 u8 reason, u8 n_acks, u16 rwind),
1128
1129 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks, rwind),
1130
1131 TP_STRUCT__entry(
1132 __field(unsigned int, call)
1133 __field(rxrpc_serial_t, serial)
1134 __field(rxrpc_seq_t, ack_first)
1135 __field(rxrpc_serial_t, ack_serial)
1136 __field(u8, reason)
1137 __field(u8, n_acks)
1138 __field(u16, rwind)
1139 ),
1140
1141 TP_fast_assign(
1142 __entry->call = call;
1143 __entry->serial = serial;
1144 __entry->ack_first = ack_first;
1145 __entry->ack_serial = ack_serial;
1146 __entry->reason = reason;
1147 __entry->n_acks = n_acks;
1148 __entry->rwind = rwind;
1149 ),
1150
1151 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u rw=%u",
1152 __entry->call,
1153 __entry->serial,
1154 __print_symbolic(__entry->reason, rxrpc_ack_names),
1155 __entry->ack_first,
1156 __entry->ack_serial,
1157 __entry->n_acks,
1158 __entry->rwind)
1159 );
1160
1161TRACE_EVENT(rxrpc_receive,
1162 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1163 rxrpc_serial_t serial, rxrpc_seq_t seq),
1164
1165 TP_ARGS(call, why, serial, seq),
1166
1167 TP_STRUCT__entry(
1168 __field(unsigned int, call)
1169 __field(enum rxrpc_receive_trace, why)
1170 __field(rxrpc_serial_t, serial)
1171 __field(rxrpc_seq_t, seq)
1172 __field(rxrpc_seq_t, window)
1173 __field(rxrpc_seq_t, wtop)
1174 ),
1175
1176 TP_fast_assign(
1177 __entry->call = call->debug_id;
1178 __entry->why = why;
1179 __entry->serial = serial;
1180 __entry->seq = seq;
1181 __entry->window = call->ackr_window;
1182 __entry->wtop = call->ackr_wtop;
1183 ),
1184
1185 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1186 __entry->call,
1187 __print_symbolic(__entry->why, rxrpc_receive_traces),
1188 __entry->serial,
1189 __entry->seq,
1190 __entry->window,
1191 __entry->wtop)
1192 );
1193
1194TRACE_EVENT(rxrpc_recvmsg,
1195 TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why,
1196 int ret),
1197
1198 TP_ARGS(call_debug_id, why, ret),
1199
1200 TP_STRUCT__entry(
1201 __field(unsigned int, call)
1202 __field(enum rxrpc_recvmsg_trace, why)
1203 __field(int, ret)
1204 ),
1205
1206 TP_fast_assign(
1207 __entry->call = call_debug_id;
1208 __entry->why = why;
1209 __entry->ret = ret;
1210 ),
1211
1212 TP_printk("c=%08x %s ret=%d",
1213 __entry->call,
1214 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1215 __entry->ret)
1216 );
1217
1218TRACE_EVENT(rxrpc_recvdata,
1219 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1220 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1221 int ret),
1222
1223 TP_ARGS(call, why, seq, offset, len, ret),
1224
1225 TP_STRUCT__entry(
1226 __field(unsigned int, call)
1227 __field(enum rxrpc_recvmsg_trace, why)
1228 __field(rxrpc_seq_t, seq)
1229 __field(unsigned int, offset)
1230 __field(unsigned int, len)
1231 __field(int, ret)
1232 ),
1233
1234 TP_fast_assign(
1235 __entry->call = call ? call->debug_id : 0;
1236 __entry->why = why;
1237 __entry->seq = seq;
1238 __entry->offset = offset;
1239 __entry->len = len;
1240 __entry->ret = ret;
1241 ),
1242
1243 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1244 __entry->call,
1245 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1246 __entry->seq,
1247 __entry->offset,
1248 __entry->len,
1249 __entry->ret)
1250 );
1251
1252TRACE_EVENT(rxrpc_rtt_tx,
1253 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1254 int slot, rxrpc_serial_t send_serial),
1255
1256 TP_ARGS(call, why, slot, send_serial),
1257
1258 TP_STRUCT__entry(
1259 __field(unsigned int, call)
1260 __field(enum rxrpc_rtt_tx_trace, why)
1261 __field(int, slot)
1262 __field(rxrpc_serial_t, send_serial)
1263 ),
1264
1265 TP_fast_assign(
1266 __entry->call = call->debug_id;
1267 __entry->why = why;
1268 __entry->slot = slot;
1269 __entry->send_serial = send_serial;
1270 ),
1271
1272 TP_printk("c=%08x [%d] %s sr=%08x",
1273 __entry->call,
1274 __entry->slot,
1275 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1276 __entry->send_serial)
1277 );
1278
1279TRACE_EVENT(rxrpc_rtt_rx,
1280 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1281 int slot,
1282 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1283 u32 rtt, u32 rto),
1284
1285 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1286
1287 TP_STRUCT__entry(
1288 __field(unsigned int, call)
1289 __field(enum rxrpc_rtt_rx_trace, why)
1290 __field(int, slot)
1291 __field(rxrpc_serial_t, send_serial)
1292 __field(rxrpc_serial_t, resp_serial)
1293 __field(u32, rtt)
1294 __field(u32, rto)
1295 ),
1296
1297 TP_fast_assign(
1298 __entry->call = call->debug_id;
1299 __entry->why = why;
1300 __entry->slot = slot;
1301 __entry->send_serial = send_serial;
1302 __entry->resp_serial = resp_serial;
1303 __entry->rtt = rtt;
1304 __entry->rto = rto;
1305 ),
1306
1307 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1308 __entry->call,
1309 __entry->slot,
1310 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1311 __entry->send_serial,
1312 __entry->resp_serial,
1313 __entry->rtt,
1314 __entry->rto)
1315 );
1316
1317TRACE_EVENT(rxrpc_timer,
1318 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1319 unsigned long now),
1320
1321 TP_ARGS(call, why, now),
1322
1323 TP_STRUCT__entry(
1324 __field(unsigned int, call)
1325 __field(enum rxrpc_timer_trace, why)
1326 __field(long, now)
1327 __field(long, ack_at)
1328 __field(long, ack_lost_at)
1329 __field(long, resend_at)
1330 __field(long, ping_at)
1331 __field(long, expect_rx_by)
1332 __field(long, expect_req_by)
1333 __field(long, expect_term_by)
1334 __field(long, timer)
1335 ),
1336
1337 TP_fast_assign(
1338 __entry->call = call->debug_id;
1339 __entry->why = why;
1340 __entry->now = now;
1341 __entry->ack_at = call->delay_ack_at;
1342 __entry->ack_lost_at = call->ack_lost_at;
1343 __entry->resend_at = call->resend_at;
1344 __entry->expect_rx_by = call->expect_rx_by;
1345 __entry->expect_req_by = call->expect_req_by;
1346 __entry->expect_term_by = call->expect_term_by;
1347 __entry->timer = call->timer.expires;
1348 ),
1349
1350 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1351 __entry->call,
1352 __print_symbolic(__entry->why, rxrpc_timer_traces),
1353 __entry->ack_at - __entry->now,
1354 __entry->ack_lost_at - __entry->now,
1355 __entry->resend_at - __entry->now,
1356 __entry->expect_rx_by - __entry->now,
1357 __entry->expect_req_by - __entry->now,
1358 __entry->expect_term_by - __entry->now,
1359 __entry->timer - __entry->now)
1360 );
1361
1362TRACE_EVENT(rxrpc_timer_expired,
1363 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1364
1365 TP_ARGS(call, now),
1366
1367 TP_STRUCT__entry(
1368 __field(unsigned int, call)
1369 __field(long, now)
1370 __field(long, ack_at)
1371 __field(long, ack_lost_at)
1372 __field(long, resend_at)
1373 __field(long, ping_at)
1374 __field(long, expect_rx_by)
1375 __field(long, expect_req_by)
1376 __field(long, expect_term_by)
1377 __field(long, timer)
1378 ),
1379
1380 TP_fast_assign(
1381 __entry->call = call->debug_id;
1382 __entry->now = now;
1383 __entry->ack_at = call->delay_ack_at;
1384 __entry->ack_lost_at = call->ack_lost_at;
1385 __entry->resend_at = call->resend_at;
1386 __entry->expect_rx_by = call->expect_rx_by;
1387 __entry->expect_req_by = call->expect_req_by;
1388 __entry->expect_term_by = call->expect_term_by;
1389 __entry->timer = call->timer.expires;
1390 ),
1391
1392 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1393 __entry->call,
1394 __entry->ack_at - __entry->now,
1395 __entry->ack_lost_at - __entry->now,
1396 __entry->resend_at - __entry->now,
1397 __entry->expect_rx_by - __entry->now,
1398 __entry->expect_req_by - __entry->now,
1399 __entry->expect_term_by - __entry->now,
1400 __entry->timer - __entry->now)
1401 );
1402
1403TRACE_EVENT(rxrpc_rx_lose,
1404 TP_PROTO(struct rxrpc_skb_priv *sp),
1405
1406 TP_ARGS(sp),
1407
1408 TP_STRUCT__entry(
1409 __field_struct(struct rxrpc_host_header, hdr)
1410 ),
1411
1412 TP_fast_assign(
1413 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1414 ),
1415
1416 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1417 __entry->hdr.epoch, __entry->hdr.cid,
1418 __entry->hdr.callNumber, __entry->hdr.serviceId,
1419 __entry->hdr.serial, __entry->hdr.seq,
1420 __entry->hdr.type, __entry->hdr.flags,
1421 __entry->hdr.type <= 15 ?
1422 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1423 );
1424
1425TRACE_EVENT(rxrpc_propose_ack,
1426 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1427 u8 ack_reason, rxrpc_serial_t serial),
1428
1429 TP_ARGS(call, why, ack_reason, serial),
1430
1431 TP_STRUCT__entry(
1432 __field(unsigned int, call)
1433 __field(enum rxrpc_propose_ack_trace, why)
1434 __field(rxrpc_serial_t, serial)
1435 __field(u8, ack_reason)
1436 ),
1437
1438 TP_fast_assign(
1439 __entry->call = call->debug_id;
1440 __entry->why = why;
1441 __entry->serial = serial;
1442 __entry->ack_reason = ack_reason;
1443 ),
1444
1445 TP_printk("c=%08x %s %s r=%08x",
1446 __entry->call,
1447 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1448 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1449 __entry->serial)
1450 );
1451
1452TRACE_EVENT(rxrpc_send_ack,
1453 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1454 u8 ack_reason, rxrpc_serial_t serial),
1455
1456 TP_ARGS(call, why, ack_reason, serial),
1457
1458 TP_STRUCT__entry(
1459 __field(unsigned int, call)
1460 __field(enum rxrpc_propose_ack_trace, why)
1461 __field(rxrpc_serial_t, serial)
1462 __field(u8, ack_reason)
1463 ),
1464
1465 TP_fast_assign(
1466 __entry->call = call->debug_id;
1467 __entry->why = why;
1468 __entry->serial = serial;
1469 __entry->ack_reason = ack_reason;
1470 ),
1471
1472 TP_printk("c=%08x %s %s r=%08x",
1473 __entry->call,
1474 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1475 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1476 __entry->serial)
1477 );
1478
1479TRACE_EVENT(rxrpc_drop_ack,
1480 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1481 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1482
1483 TP_ARGS(call, why, ack_reason, serial, nobuf),
1484
1485 TP_STRUCT__entry(
1486 __field(unsigned int, call)
1487 __field(enum rxrpc_propose_ack_trace, why)
1488 __field(rxrpc_serial_t, serial)
1489 __field(u8, ack_reason)
1490 __field(bool, nobuf)
1491 ),
1492
1493 TP_fast_assign(
1494 __entry->call = call->debug_id;
1495 __entry->why = why;
1496 __entry->serial = serial;
1497 __entry->ack_reason = ack_reason;
1498 __entry->nobuf = nobuf;
1499 ),
1500
1501 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1502 __entry->call,
1503 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1504 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1505 __entry->serial, __entry->nobuf)
1506 );
1507
1508TRACE_EVENT(rxrpc_retransmit,
1509 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1510
1511 TP_ARGS(call, seq, expiry),
1512
1513 TP_STRUCT__entry(
1514 __field(unsigned int, call)
1515 __field(rxrpc_seq_t, seq)
1516 __field(s64, expiry)
1517 ),
1518
1519 TP_fast_assign(
1520 __entry->call = call->debug_id;
1521 __entry->seq = seq;
1522 __entry->expiry = expiry;
1523 ),
1524
1525 TP_printk("c=%08x q=%x xp=%lld",
1526 __entry->call,
1527 __entry->seq,
1528 __entry->expiry)
1529 );
1530
1531TRACE_EVENT(rxrpc_congest,
1532 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1533 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1534
1535 TP_ARGS(call, summary, ack_serial, change),
1536
1537 TP_STRUCT__entry(
1538 __field(unsigned int, call)
1539 __field(enum rxrpc_congest_change, change)
1540 __field(rxrpc_seq_t, hard_ack)
1541 __field(rxrpc_seq_t, top)
1542 __field(rxrpc_seq_t, lowest_nak)
1543 __field(rxrpc_serial_t, ack_serial)
1544 __field_struct(struct rxrpc_ack_summary, sum)
1545 ),
1546
1547 TP_fast_assign(
1548 __entry->call = call->debug_id;
1549 __entry->change = change;
1550 __entry->hard_ack = call->acks_hard_ack;
1551 __entry->top = call->tx_top;
1552 __entry->lowest_nak = call->acks_lowest_nak;
1553 __entry->ack_serial = ack_serial;
1554 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1555 ),
1556
1557 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",
1558 __entry->call,
1559 __entry->ack_serial,
1560 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1561 __entry->hard_ack,
1562 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1563 __entry->sum.cwnd,
1564 __entry->sum.ssthresh,
1565 __entry->sum.nr_acks, __entry->sum.nr_retained_nacks,
1566 __entry->sum.nr_new_acks,
1567 __entry->sum.nr_new_nacks,
1568 __entry->top - __entry->hard_ack,
1569 __entry->sum.cumulative_acks,
1570 __entry->sum.dup_acks,
1571 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1572 __print_symbolic(__entry->change, rxrpc_congest_changes),
1573 __entry->sum.retrans_timeo ? " rTxTo" : "")
1574 );
1575
1576TRACE_EVENT(rxrpc_reset_cwnd,
1577 TP_PROTO(struct rxrpc_call *call, ktime_t now),
1578
1579 TP_ARGS(call, now),
1580
1581 TP_STRUCT__entry(
1582 __field(unsigned int, call)
1583 __field(enum rxrpc_congest_mode, mode)
1584 __field(unsigned short, cwnd)
1585 __field(unsigned short, extra)
1586 __field(rxrpc_seq_t, hard_ack)
1587 __field(rxrpc_seq_t, prepared)
1588 __field(ktime_t, since_last_tx)
1589 __field(bool, has_data)
1590 ),
1591
1592 TP_fast_assign(
1593 __entry->call = call->debug_id;
1594 __entry->mode = call->cong_mode;
1595 __entry->cwnd = call->cong_cwnd;
1596 __entry->extra = call->cong_extra;
1597 __entry->hard_ack = call->acks_hard_ack;
1598 __entry->prepared = call->tx_prepared - call->tx_bottom;
1599 __entry->since_last_tx = ktime_sub(now, call->tx_last_sent);
1600 __entry->has_data = !list_empty(&call->tx_sendmsg);
1601 ),
1602
1603 TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u",
1604 __entry->call,
1605 __entry->hard_ack,
1606 __print_symbolic(__entry->mode, rxrpc_congest_modes),
1607 __entry->cwnd,
1608 __entry->extra,
1609 __entry->prepared,
1610 ktime_to_ns(__entry->since_last_tx),
1611 __entry->has_data)
1612 );
1613
1614TRACE_EVENT(rxrpc_disconnect_call,
1615 TP_PROTO(struct rxrpc_call *call),
1616
1617 TP_ARGS(call),
1618
1619 TP_STRUCT__entry(
1620 __field(unsigned int, call)
1621 __field(u32, abort_code)
1622 ),
1623
1624 TP_fast_assign(
1625 __entry->call = call->debug_id;
1626 __entry->abort_code = call->abort_code;
1627 ),
1628
1629 TP_printk("c=%08x ab=%08x",
1630 __entry->call,
1631 __entry->abort_code)
1632 );
1633
1634TRACE_EVENT(rxrpc_improper_term,
1635 TP_PROTO(struct rxrpc_call *call),
1636
1637 TP_ARGS(call),
1638
1639 TP_STRUCT__entry(
1640 __field(unsigned int, call)
1641 __field(u32, abort_code)
1642 ),
1643
1644 TP_fast_assign(
1645 __entry->call = call->debug_id;
1646 __entry->abort_code = call->abort_code;
1647 ),
1648
1649 TP_printk("c=%08x ab=%08x",
1650 __entry->call,
1651 __entry->abort_code)
1652 );
1653
1654TRACE_EVENT(rxrpc_connect_call,
1655 TP_PROTO(struct rxrpc_call *call),
1656
1657 TP_ARGS(call),
1658
1659 TP_STRUCT__entry(
1660 __field(unsigned int, call)
1661 __field(unsigned long, user_call_ID)
1662 __field(u32, cid)
1663 __field(u32, call_id)
1664 __field_struct(struct sockaddr_rxrpc, srx)
1665 ),
1666
1667 TP_fast_assign(
1668 __entry->call = call->debug_id;
1669 __entry->user_call_ID = call->user_call_ID;
1670 __entry->cid = call->cid;
1671 __entry->call_id = call->call_id;
1672 __entry->srx = call->dest_srx;
1673 ),
1674
1675 TP_printk("c=%08x u=%p %08x:%08x dst=%pISp",
1676 __entry->call,
1677 (void *)__entry->user_call_ID,
1678 __entry->cid,
1679 __entry->call_id,
1680 &__entry->srx.transport)
1681 );
1682
1683TRACE_EVENT(rxrpc_resend,
1684 TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack),
1685
1686 TP_ARGS(call, ack),
1687
1688 TP_STRUCT__entry(
1689 __field(unsigned int, call)
1690 __field(rxrpc_seq_t, seq)
1691 __field(rxrpc_seq_t, transmitted)
1692 __field(rxrpc_serial_t, ack_serial)
1693 ),
1694
1695 TP_fast_assign(
1696 struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL;
1697 __entry->call = call->debug_id;
1698 __entry->seq = call->acks_hard_ack;
1699 __entry->transmitted = call->tx_transmitted;
1700 __entry->ack_serial = sp ? sp->hdr.serial : 0;
1701 ),
1702
1703 TP_printk("c=%08x r=%x q=%x tq=%x",
1704 __entry->call,
1705 __entry->ack_serial,
1706 __entry->seq,
1707 __entry->transmitted)
1708 );
1709
1710TRACE_EVENT(rxrpc_rx_icmp,
1711 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1712 struct sockaddr_rxrpc *srx),
1713
1714 TP_ARGS(peer, ee, srx),
1715
1716 TP_STRUCT__entry(
1717 __field(unsigned int, peer)
1718 __field_struct(struct sock_extended_err, ee)
1719 __field_struct(struct sockaddr_rxrpc, srx)
1720 ),
1721
1722 TP_fast_assign(
1723 __entry->peer = peer->debug_id;
1724 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1725 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1726 ),
1727
1728 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1729 __entry->peer,
1730 __entry->ee.ee_origin,
1731 __entry->ee.ee_type,
1732 __entry->ee.ee_code,
1733 __entry->ee.ee_info,
1734 __entry->ee.ee_data,
1735 __entry->ee.ee_errno,
1736 &__entry->srx.transport)
1737 );
1738
1739TRACE_EVENT(rxrpc_tx_fail,
1740 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1741 enum rxrpc_tx_point where),
1742
1743 TP_ARGS(debug_id, serial, ret, where),
1744
1745 TP_STRUCT__entry(
1746 __field(unsigned int, debug_id)
1747 __field(rxrpc_serial_t, serial)
1748 __field(int, ret)
1749 __field(enum rxrpc_tx_point, where)
1750 ),
1751
1752 TP_fast_assign(
1753 __entry->debug_id = debug_id;
1754 __entry->serial = serial;
1755 __entry->ret = ret;
1756 __entry->where = where;
1757 ),
1758
1759 TP_printk("c=%08x r=%x ret=%d %s",
1760 __entry->debug_id,
1761 __entry->serial,
1762 __entry->ret,
1763 __print_symbolic(__entry->where, rxrpc_tx_points))
1764 );
1765
1766TRACE_EVENT(rxrpc_call_reset,
1767 TP_PROTO(struct rxrpc_call *call),
1768
1769 TP_ARGS(call),
1770
1771 TP_STRUCT__entry(
1772 __field(unsigned int, debug_id)
1773 __field(u32, cid)
1774 __field(u32, call_id)
1775 __field(rxrpc_serial_t, call_serial)
1776 __field(rxrpc_serial_t, conn_serial)
1777 __field(rxrpc_seq_t, tx_seq)
1778 __field(rxrpc_seq_t, rx_seq)
1779 ),
1780
1781 TP_fast_assign(
1782 __entry->debug_id = call->debug_id;
1783 __entry->cid = call->cid;
1784 __entry->call_id = call->call_id;
1785 __entry->call_serial = call->rx_serial;
1786 __entry->conn_serial = call->conn->hi_serial;
1787 __entry->tx_seq = call->acks_hard_ack;
1788 __entry->rx_seq = call->rx_highest_seq;
1789 ),
1790
1791 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1792 __entry->debug_id,
1793 __entry->cid, __entry->call_id,
1794 __entry->call_serial, __entry->conn_serial,
1795 __entry->tx_seq, __entry->rx_seq)
1796 );
1797
1798TRACE_EVENT(rxrpc_notify_socket,
1799 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1800
1801 TP_ARGS(debug_id, serial),
1802
1803 TP_STRUCT__entry(
1804 __field(unsigned int, debug_id)
1805 __field(rxrpc_serial_t, serial)
1806 ),
1807
1808 TP_fast_assign(
1809 __entry->debug_id = debug_id;
1810 __entry->serial = serial;
1811 ),
1812
1813 TP_printk("c=%08x r=%08x",
1814 __entry->debug_id,
1815 __entry->serial)
1816 );
1817
1818TRACE_EVENT(rxrpc_rx_discard_ack,
1819 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1820 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1821 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1822
1823 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1824 prev_pkt, call_ackr_prev),
1825
1826 TP_STRUCT__entry(
1827 __field(unsigned int, debug_id)
1828 __field(rxrpc_serial_t, serial)
1829 __field(rxrpc_seq_t, first_soft_ack)
1830 __field(rxrpc_seq_t, call_ackr_first)
1831 __field(rxrpc_seq_t, prev_pkt)
1832 __field(rxrpc_seq_t, call_ackr_prev)
1833 ),
1834
1835 TP_fast_assign(
1836 __entry->debug_id = debug_id;
1837 __entry->serial = serial;
1838 __entry->first_soft_ack = first_soft_ack;
1839 __entry->call_ackr_first = call_ackr_first;
1840 __entry->prev_pkt = prev_pkt;
1841 __entry->call_ackr_prev = call_ackr_prev;
1842 ),
1843
1844 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1845 __entry->debug_id,
1846 __entry->serial,
1847 __entry->first_soft_ack,
1848 __entry->call_ackr_first,
1849 __entry->prev_pkt,
1850 __entry->call_ackr_prev)
1851 );
1852
1853TRACE_EVENT(rxrpc_req_ack,
1854 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1855 enum rxrpc_req_ack_trace why),
1856
1857 TP_ARGS(call_debug_id, seq, why),
1858
1859 TP_STRUCT__entry(
1860 __field(unsigned int, call_debug_id)
1861 __field(rxrpc_seq_t, seq)
1862 __field(enum rxrpc_req_ack_trace, why)
1863 ),
1864
1865 TP_fast_assign(
1866 __entry->call_debug_id = call_debug_id;
1867 __entry->seq = seq;
1868 __entry->why = why;
1869 ),
1870
1871 TP_printk("c=%08x q=%08x REQ-%s",
1872 __entry->call_debug_id,
1873 __entry->seq,
1874 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1875 );
1876
1877TRACE_EVENT(rxrpc_txbuf,
1878 TP_PROTO(unsigned int debug_id,
1879 unsigned int call_debug_id, rxrpc_seq_t seq,
1880 int ref, enum rxrpc_txbuf_trace what),
1881
1882 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1883
1884 TP_STRUCT__entry(
1885 __field(unsigned int, debug_id)
1886 __field(unsigned int, call_debug_id)
1887 __field(rxrpc_seq_t, seq)
1888 __field(int, ref)
1889 __field(enum rxrpc_txbuf_trace, what)
1890 ),
1891
1892 TP_fast_assign(
1893 __entry->debug_id = debug_id;
1894 __entry->call_debug_id = call_debug_id;
1895 __entry->seq = seq;
1896 __entry->ref = ref;
1897 __entry->what = what;
1898 ),
1899
1900 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1901 __entry->debug_id,
1902 __entry->call_debug_id,
1903 __entry->seq,
1904 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1905 __entry->ref)
1906 );
1907
1908TRACE_EVENT(rxrpc_poke_call,
1909 TP_PROTO(struct rxrpc_call *call, bool busy,
1910 enum rxrpc_call_poke_trace what),
1911
1912 TP_ARGS(call, busy, what),
1913
1914 TP_STRUCT__entry(
1915 __field(unsigned int, call_debug_id)
1916 __field(bool, busy)
1917 __field(enum rxrpc_call_poke_trace, what)
1918 ),
1919
1920 TP_fast_assign(
1921 __entry->call_debug_id = call->debug_id;
1922 __entry->busy = busy;
1923 __entry->what = what;
1924 ),
1925
1926 TP_printk("c=%08x %s%s",
1927 __entry->call_debug_id,
1928 __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1929 __entry->busy ? "!" : "")
1930 );
1931
1932TRACE_EVENT(rxrpc_call_poked,
1933 TP_PROTO(struct rxrpc_call *call),
1934
1935 TP_ARGS(call),
1936
1937 TP_STRUCT__entry(
1938 __field(unsigned int, call_debug_id)
1939 ),
1940
1941 TP_fast_assign(
1942 __entry->call_debug_id = call->debug_id;
1943 ),
1944
1945 TP_printk("c=%08x",
1946 __entry->call_debug_id)
1947 );
1948
1949TRACE_EVENT(rxrpc_sack,
1950 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1951 unsigned int sack, enum rxrpc_sack_trace what),
1952
1953 TP_ARGS(call, seq, sack, what),
1954
1955 TP_STRUCT__entry(
1956 __field(unsigned int, call_debug_id)
1957 __field(rxrpc_seq_t, seq)
1958 __field(unsigned int, sack)
1959 __field(enum rxrpc_sack_trace, what)
1960 ),
1961
1962 TP_fast_assign(
1963 __entry->call_debug_id = call->debug_id;
1964 __entry->seq = seq;
1965 __entry->sack = sack;
1966 __entry->what = what;
1967 ),
1968
1969 TP_printk("c=%08x q=%08x %s k=%x",
1970 __entry->call_debug_id,
1971 __entry->seq,
1972 __print_symbolic(__entry->what, rxrpc_sack_traces),
1973 __entry->sack)
1974 );
1975
1976#undef EM
1977#undef E_
1978
1979#endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */
1980#endif /* _TRACE_RXRPC_H */
1981
1982/* This part must be outside protection */
1983#include <trace/define_trace.h>