]>
Commit | Line | Data |
---|---|---|
df844fd4 DH |
1 | /* AF_RXRPC tracepoints |
2 | * | |
3 | * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. | |
4 | * Written by David Howells ([email protected]) | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public Licence | |
8 | * as published by the Free Software Foundation; either version | |
9 | * 2 of the Licence, or (at your option) any later version. | |
10 | */ | |
11 | #undef TRACE_SYSTEM | |
12 | #define TRACE_SYSTEM rxrpc | |
13 | ||
14 | #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) | |
15 | #define _TRACE_RXRPC_H | |
16 | ||
17 | #include <linux/tracepoint.h> | |
494337c9 | 18 | #include <linux/errqueue.h> |
df844fd4 | 19 | |
b54a134a DH |
20 | /* |
21 | * Define enums for tracing information. | |
22 | * | |
23 | * These should all be kept sorted, making it easier to match the string | |
24 | * mapping tables further on. | |
25 | */ | |
26 | #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY | |
27 | #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY | |
28 | ||
29 | enum rxrpc_skb_trace { | |
30 | rxrpc_skb_rx_cleaned, | |
31 | rxrpc_skb_rx_freed, | |
32 | rxrpc_skb_rx_got, | |
33 | rxrpc_skb_rx_lost, | |
34 | rxrpc_skb_rx_purged, | |
35 | rxrpc_skb_rx_received, | |
36 | rxrpc_skb_rx_rotated, | |
37 | rxrpc_skb_rx_seen, | |
38 | rxrpc_skb_tx_cleaned, | |
39 | rxrpc_skb_tx_freed, | |
40 | rxrpc_skb_tx_got, | |
41 | rxrpc_skb_tx_new, | |
42 | rxrpc_skb_tx_rotated, | |
43 | rxrpc_skb_tx_seen, | |
44 | }; | |
45 | ||
09d2bf59 DH |
46 | enum rxrpc_local_trace { |
47 | rxrpc_local_got, | |
48 | rxrpc_local_new, | |
49 | rxrpc_local_processing, | |
50 | rxrpc_local_put, | |
51 | rxrpc_local_queued, | |
52 | }; | |
53 | ||
1159d4b4 DH |
54 | enum rxrpc_peer_trace { |
55 | rxrpc_peer_got, | |
56 | rxrpc_peer_new, | |
57 | rxrpc_peer_processing, | |
58 | rxrpc_peer_put, | |
1159d4b4 DH |
59 | }; |
60 | ||
b54a134a DH |
61 | enum rxrpc_conn_trace { |
62 | rxrpc_conn_got, | |
63 | rxrpc_conn_new_client, | |
64 | rxrpc_conn_new_service, | |
65 | rxrpc_conn_put_client, | |
66 | rxrpc_conn_put_service, | |
67 | rxrpc_conn_queued, | |
f859ab61 | 68 | rxrpc_conn_reap_service, |
b54a134a DH |
69 | rxrpc_conn_seen, |
70 | }; | |
71 | ||
72 | enum rxrpc_client_trace { | |
73 | rxrpc_client_activate_chans, | |
74 | rxrpc_client_alloc, | |
75 | rxrpc_client_chan_activate, | |
76 | rxrpc_client_chan_disconnect, | |
77 | rxrpc_client_chan_pass, | |
78 | rxrpc_client_chan_unstarted, | |
79 | rxrpc_client_cleanup, | |
80 | rxrpc_client_count, | |
81 | rxrpc_client_discard, | |
82 | rxrpc_client_duplicate, | |
83 | rxrpc_client_exposed, | |
84 | rxrpc_client_replace, | |
85 | rxrpc_client_to_active, | |
86 | rxrpc_client_to_culled, | |
87 | rxrpc_client_to_idle, | |
88 | rxrpc_client_to_inactive, | |
89 | rxrpc_client_to_upgrade, | |
90 | rxrpc_client_to_waiting, | |
91 | rxrpc_client_uncount, | |
92 | }; | |
93 | ||
94 | enum rxrpc_call_trace { | |
95 | rxrpc_call_connected, | |
96 | rxrpc_call_error, | |
97 | rxrpc_call_got, | |
98 | rxrpc_call_got_kernel, | |
99 | rxrpc_call_got_userid, | |
100 | rxrpc_call_new_client, | |
101 | rxrpc_call_new_service, | |
102 | rxrpc_call_put, | |
103 | rxrpc_call_put_kernel, | |
104 | rxrpc_call_put_noqueue, | |
105 | rxrpc_call_put_userid, | |
106 | rxrpc_call_queued, | |
107 | rxrpc_call_queued_ref, | |
108 | rxrpc_call_release, | |
109 | rxrpc_call_seen, | |
110 | }; | |
111 | ||
112 | enum rxrpc_transmit_trace { | |
113 | rxrpc_transmit_await_reply, | |
114 | rxrpc_transmit_end, | |
115 | rxrpc_transmit_queue, | |
116 | rxrpc_transmit_queue_last, | |
117 | rxrpc_transmit_rotate, | |
118 | rxrpc_transmit_rotate_last, | |
119 | rxrpc_transmit_wait, | |
120 | }; | |
121 | ||
122 | enum rxrpc_receive_trace { | |
123 | rxrpc_receive_end, | |
124 | rxrpc_receive_front, | |
125 | rxrpc_receive_incoming, | |
126 | rxrpc_receive_queue, | |
127 | rxrpc_receive_queue_last, | |
128 | rxrpc_receive_rotate, | |
129 | }; | |
130 | ||
131 | enum rxrpc_recvmsg_trace { | |
132 | rxrpc_recvmsg_cont, | |
133 | rxrpc_recvmsg_data_return, | |
134 | rxrpc_recvmsg_dequeue, | |
135 | rxrpc_recvmsg_enter, | |
136 | rxrpc_recvmsg_full, | |
137 | rxrpc_recvmsg_hole, | |
138 | rxrpc_recvmsg_next, | |
540b1c48 | 139 | rxrpc_recvmsg_requeue, |
b54a134a DH |
140 | rxrpc_recvmsg_return, |
141 | rxrpc_recvmsg_terminal, | |
142 | rxrpc_recvmsg_to_be_accepted, | |
143 | rxrpc_recvmsg_wait, | |
144 | }; | |
145 | ||
146 | enum rxrpc_rtt_tx_trace { | |
147 | rxrpc_rtt_tx_data, | |
148 | rxrpc_rtt_tx_ping, | |
149 | }; | |
150 | ||
151 | enum rxrpc_rtt_rx_trace { | |
152 | rxrpc_rtt_rx_ping_response, | |
153 | rxrpc_rtt_rx_requested_ack, | |
154 | }; | |
155 | ||
156 | enum rxrpc_timer_trace { | |
157 | rxrpc_timer_begin, | |
a158bdd3 DH |
158 | rxrpc_timer_exp_ack, |
159 | rxrpc_timer_exp_hard, | |
160 | rxrpc_timer_exp_idle, | |
415f44e4 | 161 | rxrpc_timer_exp_keepalive, |
bd1fdf8c | 162 | rxrpc_timer_exp_lost_ack, |
a158bdd3 DH |
163 | rxrpc_timer_exp_normal, |
164 | rxrpc_timer_exp_ping, | |
165 | rxrpc_timer_exp_resend, | |
b54a134a DH |
166 | rxrpc_timer_expired, |
167 | rxrpc_timer_init_for_reply, | |
168 | rxrpc_timer_init_for_send_reply, | |
a158bdd3 | 169 | rxrpc_timer_restart, |
b54a134a | 170 | rxrpc_timer_set_for_ack, |
a158bdd3 DH |
171 | rxrpc_timer_set_for_hard, |
172 | rxrpc_timer_set_for_idle, | |
415f44e4 | 173 | rxrpc_timer_set_for_keepalive, |
bd1fdf8c | 174 | rxrpc_timer_set_for_lost_ack, |
a158bdd3 | 175 | rxrpc_timer_set_for_normal, |
b54a134a DH |
176 | rxrpc_timer_set_for_ping, |
177 | rxrpc_timer_set_for_resend, | |
178 | rxrpc_timer_set_for_send, | |
179 | }; | |
180 | ||
181 | enum rxrpc_propose_ack_trace { | |
182 | rxrpc_propose_ack_client_tx_end, | |
183 | rxrpc_propose_ack_input_data, | |
7150ceaa | 184 | rxrpc_propose_ack_ping_for_check_life, |
415f44e4 | 185 | rxrpc_propose_ack_ping_for_keepalive, |
b54a134a DH |
186 | rxrpc_propose_ack_ping_for_lost_ack, |
187 | rxrpc_propose_ack_ping_for_lost_reply, | |
188 | rxrpc_propose_ack_ping_for_params, | |
189 | rxrpc_propose_ack_processing_op, | |
190 | rxrpc_propose_ack_respond_to_ack, | |
191 | rxrpc_propose_ack_respond_to_ping, | |
192 | rxrpc_propose_ack_retry_tx, | |
193 | rxrpc_propose_ack_rotate_rx, | |
194 | rxrpc_propose_ack_terminal_ack, | |
195 | }; | |
196 | ||
197 | enum rxrpc_propose_ack_outcome { | |
198 | rxrpc_propose_ack_subsume, | |
199 | rxrpc_propose_ack_update, | |
200 | rxrpc_propose_ack_use, | |
201 | }; | |
202 | ||
203 | enum rxrpc_congest_change { | |
204 | rxrpc_cong_begin_retransmission, | |
205 | rxrpc_cong_cleared_nacks, | |
206 | rxrpc_cong_new_low_nack, | |
207 | rxrpc_cong_no_change, | |
208 | rxrpc_cong_progress, | |
209 | rxrpc_cong_retransmit_again, | |
210 | rxrpc_cong_rtt_window_end, | |
211 | rxrpc_cong_saw_nack, | |
212 | }; | |
213 | ||
4764c0da DH |
214 | enum rxrpc_tx_point { |
215 | rxrpc_tx_point_call_abort, | |
216 | rxrpc_tx_point_call_ack, | |
217 | rxrpc_tx_point_call_data_frag, | |
218 | rxrpc_tx_point_call_data_nofrag, | |
219 | rxrpc_tx_point_call_final_resend, | |
220 | rxrpc_tx_point_conn_abort, | |
221 | rxrpc_tx_point_rxkad_challenge, | |
222 | rxrpc_tx_point_rxkad_response, | |
223 | rxrpc_tx_point_reject, | |
224 | rxrpc_tx_point_version_keepalive, | |
225 | rxrpc_tx_point_version_reply, | |
6b47fe1d DH |
226 | }; |
227 | ||
b54a134a DH |
228 | #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ |
229 | ||
230 | /* | |
231 | * Declare tracing information enums and their string mappings for display. | |
232 | */ | |
233 | #define rxrpc_skb_traces \ | |
234 | EM(rxrpc_skb_rx_cleaned, "Rx CLN") \ | |
235 | EM(rxrpc_skb_rx_freed, "Rx FRE") \ | |
236 | EM(rxrpc_skb_rx_got, "Rx GOT") \ | |
237 | EM(rxrpc_skb_rx_lost, "Rx *L*") \ | |
238 | EM(rxrpc_skb_rx_purged, "Rx PUR") \ | |
239 | EM(rxrpc_skb_rx_received, "Rx RCV") \ | |
240 | EM(rxrpc_skb_rx_rotated, "Rx ROT") \ | |
241 | EM(rxrpc_skb_rx_seen, "Rx SEE") \ | |
242 | EM(rxrpc_skb_tx_cleaned, "Tx CLN") \ | |
243 | EM(rxrpc_skb_tx_freed, "Tx FRE") \ | |
244 | EM(rxrpc_skb_tx_got, "Tx GOT") \ | |
245 | EM(rxrpc_skb_tx_new, "Tx NEW") \ | |
246 | EM(rxrpc_skb_tx_rotated, "Tx ROT") \ | |
247 | E_(rxrpc_skb_tx_seen, "Tx SEE") | |
248 | ||
09d2bf59 DH |
249 | #define rxrpc_local_traces \ |
250 | EM(rxrpc_local_got, "GOT") \ | |
251 | EM(rxrpc_local_new, "NEW") \ | |
252 | EM(rxrpc_local_processing, "PRO") \ | |
253 | EM(rxrpc_local_put, "PUT") \ | |
254 | E_(rxrpc_local_queued, "QUE") | |
255 | ||
1159d4b4 DH |
256 | #define rxrpc_peer_traces \ |
257 | EM(rxrpc_peer_got, "GOT") \ | |
258 | EM(rxrpc_peer_new, "NEW") \ | |
259 | EM(rxrpc_peer_processing, "PRO") \ | |
f3344303 | 260 | E_(rxrpc_peer_put, "PUT") |
1159d4b4 | 261 | |
b54a134a DH |
262 | #define rxrpc_conn_traces \ |
263 | EM(rxrpc_conn_got, "GOT") \ | |
264 | EM(rxrpc_conn_new_client, "NWc") \ | |
265 | EM(rxrpc_conn_new_service, "NWs") \ | |
266 | EM(rxrpc_conn_put_client, "PTc") \ | |
267 | EM(rxrpc_conn_put_service, "PTs") \ | |
268 | EM(rxrpc_conn_queued, "QUE") \ | |
f859ab61 | 269 | EM(rxrpc_conn_reap_service, "RPs") \ |
b54a134a DH |
270 | E_(rxrpc_conn_seen, "SEE") |
271 | ||
272 | #define rxrpc_client_traces \ | |
273 | EM(rxrpc_client_activate_chans, "Activa") \ | |
274 | EM(rxrpc_client_alloc, "Alloc ") \ | |
275 | EM(rxrpc_client_chan_activate, "ChActv") \ | |
276 | EM(rxrpc_client_chan_disconnect, "ChDisc") \ | |
277 | EM(rxrpc_client_chan_pass, "ChPass") \ | |
278 | EM(rxrpc_client_chan_unstarted, "ChUnst") \ | |
279 | EM(rxrpc_client_cleanup, "Clean ") \ | |
280 | EM(rxrpc_client_count, "Count ") \ | |
281 | EM(rxrpc_client_discard, "Discar") \ | |
282 | EM(rxrpc_client_duplicate, "Duplic") \ | |
283 | EM(rxrpc_client_exposed, "Expose") \ | |
284 | EM(rxrpc_client_replace, "Replac") \ | |
285 | EM(rxrpc_client_to_active, "->Actv") \ | |
286 | EM(rxrpc_client_to_culled, "->Cull") \ | |
287 | EM(rxrpc_client_to_idle, "->Idle") \ | |
288 | EM(rxrpc_client_to_inactive, "->Inac") \ | |
289 | EM(rxrpc_client_to_upgrade, "->Upgd") \ | |
290 | EM(rxrpc_client_to_waiting, "->Wait") \ | |
291 | E_(rxrpc_client_uncount, "Uncoun") | |
292 | ||
293 | #define rxrpc_conn_cache_states \ | |
294 | EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \ | |
295 | EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \ | |
296 | EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \ | |
4e255721 | 297 | EM(RXRPC_CONN_CLIENT_UPGRADE, "Upgd") \ |
b54a134a DH |
298 | EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \ |
299 | E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \ | |
300 | ||
301 | #define rxrpc_call_traces \ | |
302 | EM(rxrpc_call_connected, "CON") \ | |
303 | EM(rxrpc_call_error, "*E*") \ | |
304 | EM(rxrpc_call_got, "GOT") \ | |
305 | EM(rxrpc_call_got_kernel, "Gke") \ | |
306 | EM(rxrpc_call_got_userid, "Gus") \ | |
307 | EM(rxrpc_call_new_client, "NWc") \ | |
308 | EM(rxrpc_call_new_service, "NWs") \ | |
309 | EM(rxrpc_call_put, "PUT") \ | |
310 | EM(rxrpc_call_put_kernel, "Pke") \ | |
311 | EM(rxrpc_call_put_noqueue, "PNQ") \ | |
312 | EM(rxrpc_call_put_userid, "Pus") \ | |
313 | EM(rxrpc_call_queued, "QUE") \ | |
314 | EM(rxrpc_call_queued_ref, "QUR") \ | |
315 | EM(rxrpc_call_release, "RLS") \ | |
316 | E_(rxrpc_call_seen, "SEE") | |
317 | ||
318 | #define rxrpc_transmit_traces \ | |
319 | EM(rxrpc_transmit_await_reply, "AWR") \ | |
320 | EM(rxrpc_transmit_end, "END") \ | |
321 | EM(rxrpc_transmit_queue, "QUE") \ | |
322 | EM(rxrpc_transmit_queue_last, "QLS") \ | |
323 | EM(rxrpc_transmit_rotate, "ROT") \ | |
324 | EM(rxrpc_transmit_rotate_last, "RLS") \ | |
325 | E_(rxrpc_transmit_wait, "WAI") | |
326 | ||
327 | #define rxrpc_receive_traces \ | |
328 | EM(rxrpc_receive_end, "END") \ | |
329 | EM(rxrpc_receive_front, "FRN") \ | |
330 | EM(rxrpc_receive_incoming, "INC") \ | |
331 | EM(rxrpc_receive_queue, "QUE") \ | |
332 | EM(rxrpc_receive_queue_last, "QLS") \ | |
333 | E_(rxrpc_receive_rotate, "ROT") | |
334 | ||
335 | #define rxrpc_recvmsg_traces \ | |
336 | EM(rxrpc_recvmsg_cont, "CONT") \ | |
337 | EM(rxrpc_recvmsg_data_return, "DATA") \ | |
338 | EM(rxrpc_recvmsg_dequeue, "DEQU") \ | |
339 | EM(rxrpc_recvmsg_enter, "ENTR") \ | |
340 | EM(rxrpc_recvmsg_full, "FULL") \ | |
341 | EM(rxrpc_recvmsg_hole, "HOLE") \ | |
342 | EM(rxrpc_recvmsg_next, "NEXT") \ | |
540b1c48 | 343 | EM(rxrpc_recvmsg_requeue, "REQU") \ |
b54a134a DH |
344 | EM(rxrpc_recvmsg_return, "RETN") \ |
345 | EM(rxrpc_recvmsg_terminal, "TERM") \ | |
346 | EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ | |
347 | E_(rxrpc_recvmsg_wait, "WAIT") | |
348 | ||
349 | #define rxrpc_rtt_tx_traces \ | |
350 | EM(rxrpc_rtt_tx_data, "DATA") \ | |
351 | E_(rxrpc_rtt_tx_ping, "PING") | |
352 | ||
353 | #define rxrpc_rtt_rx_traces \ | |
354 | EM(rxrpc_rtt_rx_ping_response, "PONG") \ | |
355 | E_(rxrpc_rtt_rx_requested_ack, "RACK") | |
356 | ||
357 | #define rxrpc_timer_traces \ | |
358 | EM(rxrpc_timer_begin, "Begin ") \ | |
359 | EM(rxrpc_timer_expired, "*EXPR*") \ | |
a158bdd3 DH |
360 | EM(rxrpc_timer_exp_ack, "ExpAck") \ |
361 | EM(rxrpc_timer_exp_hard, "ExpHrd") \ | |
362 | EM(rxrpc_timer_exp_idle, "ExpIdl") \ | |
415f44e4 | 363 | EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ |
bd1fdf8c | 364 | EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ |
a158bdd3 DH |
365 | EM(rxrpc_timer_exp_normal, "ExpNml") \ |
366 | EM(rxrpc_timer_exp_ping, "ExpPng") \ | |
367 | EM(rxrpc_timer_exp_resend, "ExpRsn") \ | |
b54a134a DH |
368 | EM(rxrpc_timer_init_for_reply, "IniRpl") \ |
369 | EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ | |
a158bdd3 | 370 | EM(rxrpc_timer_restart, "Restrt") \ |
b54a134a | 371 | EM(rxrpc_timer_set_for_ack, "SetAck") \ |
a158bdd3 DH |
372 | EM(rxrpc_timer_set_for_hard, "SetHrd") \ |
373 | EM(rxrpc_timer_set_for_idle, "SetIdl") \ | |
415f44e4 | 374 | EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ |
bd1fdf8c | 375 | EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ |
a158bdd3 | 376 | EM(rxrpc_timer_set_for_normal, "SetNml") \ |
b54a134a DH |
377 | EM(rxrpc_timer_set_for_ping, "SetPng") \ |
378 | EM(rxrpc_timer_set_for_resend, "SetRTx") \ | |
a158bdd3 | 379 | E_(rxrpc_timer_set_for_send, "SetSnd") |
b54a134a DH |
380 | |
381 | #define rxrpc_propose_ack_traces \ | |
382 | EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ | |
383 | EM(rxrpc_propose_ack_input_data, "DataIn ") \ | |
7150ceaa | 384 | EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \ |
415f44e4 | 385 | EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ |
b54a134a DH |
386 | EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ |
387 | EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ | |
388 | EM(rxrpc_propose_ack_ping_for_params, "Params ") \ | |
389 | EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ | |
390 | EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ | |
391 | EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ | |
392 | EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ | |
393 | EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ | |
394 | E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") | |
395 | ||
396 | #define rxrpc_propose_ack_outcomes \ | |
397 | EM(rxrpc_propose_ack_subsume, " Subsume") \ | |
398 | EM(rxrpc_propose_ack_update, " Update") \ | |
197445af | 399 | E_(rxrpc_propose_ack_use, " New") |
b54a134a DH |
400 | |
401 | #define rxrpc_congest_modes \ | |
402 | EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ | |
403 | EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ | |
404 | EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ | |
405 | E_(RXRPC_CALL_SLOW_START, "SlowStart") | |
406 | ||
407 | #define rxrpc_congest_changes \ | |
408 | EM(rxrpc_cong_begin_retransmission, " Retrans") \ | |
409 | EM(rxrpc_cong_cleared_nacks, " Cleared") \ | |
410 | EM(rxrpc_cong_new_low_nack, " NewLowN") \ | |
411 | EM(rxrpc_cong_no_change, "") \ | |
412 | EM(rxrpc_cong_progress, " Progres") \ | |
413 | EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ | |
414 | EM(rxrpc_cong_rtt_window_end, " RttWinE") \ | |
415 | E_(rxrpc_cong_saw_nack, " SawNack") | |
416 | ||
417 | #define rxrpc_pkts \ | |
418 | EM(0, "?00") \ | |
419 | EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ | |
420 | EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ | |
421 | EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ | |
422 | EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ | |
423 | EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ | |
424 | EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ | |
425 | EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ | |
426 | EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ | |
427 | EM(9, "?09") \ | |
428 | EM(10, "?10") \ | |
429 | EM(11, "?11") \ | |
430 | EM(12, "?12") \ | |
431 | EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ | |
432 | EM(14, "?14") \ | |
433 | E_(15, "?15") | |
434 | ||
435 | #define rxrpc_ack_names \ | |
436 | EM(0, "-0-") \ | |
437 | EM(RXRPC_ACK_REQUESTED, "REQ") \ | |
438 | EM(RXRPC_ACK_DUPLICATE, "DUP") \ | |
439 | EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ | |
440 | EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ | |
441 | EM(RXRPC_ACK_NOSPACE, "MEM") \ | |
442 | EM(RXRPC_ACK_PING, "PNG") \ | |
443 | EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ | |
444 | EM(RXRPC_ACK_DELAY, "DLY") \ | |
445 | EM(RXRPC_ACK_IDLE, "IDL") \ | |
446 | E_(RXRPC_ACK__INVALID, "-?-") | |
447 | ||
1bae5d22 DH |
448 | #define rxrpc_completions \ |
449 | EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ | |
450 | EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ | |
451 | EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ | |
452 | EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ | |
453 | E_(RXRPC_CALL_NETWORK_ERROR, "NetError") | |
454 | ||
4764c0da DH |
455 | #define rxrpc_tx_points \ |
456 | EM(rxrpc_tx_point_call_abort, "CallAbort") \ | |
457 | EM(rxrpc_tx_point_call_ack, "CallAck") \ | |
458 | EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ | |
459 | EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ | |
460 | EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ | |
461 | EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ | |
462 | EM(rxrpc_tx_point_reject, "Reject") \ | |
463 | EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ | |
464 | EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \ | |
465 | EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ | |
466 | E_(rxrpc_tx_point_version_reply, "VerReply") | |
6b47fe1d | 467 | |
b54a134a DH |
468 | /* |
469 | * Export enum symbols via userspace. | |
470 | */ | |
471 | #undef EM | |
472 | #undef E_ | |
473 | #define EM(a, b) TRACE_DEFINE_ENUM(a); | |
474 | #define E_(a, b) TRACE_DEFINE_ENUM(a); | |
475 | ||
476 | rxrpc_skb_traces; | |
09d2bf59 | 477 | rxrpc_local_traces; |
b54a134a DH |
478 | rxrpc_conn_traces; |
479 | rxrpc_client_traces; | |
480 | rxrpc_call_traces; | |
481 | rxrpc_transmit_traces; | |
482 | rxrpc_receive_traces; | |
483 | rxrpc_recvmsg_traces; | |
484 | rxrpc_rtt_tx_traces; | |
485 | rxrpc_rtt_rx_traces; | |
486 | rxrpc_timer_traces; | |
487 | rxrpc_propose_ack_traces; | |
488 | rxrpc_propose_ack_outcomes; | |
827efed6 | 489 | rxrpc_congest_modes; |
b54a134a | 490 | rxrpc_congest_changes; |
4764c0da | 491 | rxrpc_tx_points; |
b54a134a DH |
492 | |
493 | /* | |
494 | * Now redefine the EM() and E_() macros to map the enums to the strings that | |
495 | * will be printed in the output. | |
496 | */ | |
497 | #undef EM | |
498 | #undef E_ | |
499 | #define EM(a, b) { a, b }, | |
500 | #define E_(a, b) { a, b } | |
501 | ||
09d2bf59 DH |
502 | TRACE_EVENT(rxrpc_local, |
503 | TP_PROTO(struct rxrpc_local *local, enum rxrpc_local_trace op, | |
504 | int usage, const void *where), | |
505 | ||
506 | TP_ARGS(local, op, usage, where), | |
507 | ||
508 | TP_STRUCT__entry( | |
509 | __field(unsigned int, local ) | |
510 | __field(int, op ) | |
511 | __field(int, usage ) | |
512 | __field(const void *, where ) | |
513 | ), | |
514 | ||
515 | TP_fast_assign( | |
516 | __entry->local = local->debug_id; | |
517 | __entry->op = op; | |
518 | __entry->usage = usage; | |
519 | __entry->where = where; | |
520 | ), | |
521 | ||
522 | TP_printk("L=%08x %s u=%d sp=%pSR", | |
523 | __entry->local, | |
524 | __print_symbolic(__entry->op, rxrpc_local_traces), | |
525 | __entry->usage, | |
526 | __entry->where) | |
527 | ); | |
528 | ||
1159d4b4 DH |
529 | TRACE_EVENT(rxrpc_peer, |
530 | TP_PROTO(struct rxrpc_peer *peer, enum rxrpc_peer_trace op, | |
531 | int usage, const void *where), | |
532 | ||
533 | TP_ARGS(peer, op, usage, where), | |
534 | ||
535 | TP_STRUCT__entry( | |
536 | __field(unsigned int, peer ) | |
537 | __field(int, op ) | |
538 | __field(int, usage ) | |
539 | __field(const void *, where ) | |
540 | ), | |
541 | ||
542 | TP_fast_assign( | |
543 | __entry->peer = peer->debug_id; | |
544 | __entry->op = op; | |
545 | __entry->usage = usage; | |
546 | __entry->where = where; | |
547 | ), | |
548 | ||
549 | TP_printk("P=%08x %s u=%d sp=%pSR", | |
550 | __entry->peer, | |
551 | __print_symbolic(__entry->op, rxrpc_peer_traces), | |
552 | __entry->usage, | |
553 | __entry->where) | |
554 | ); | |
555 | ||
363deeab DH |
556 | TRACE_EVENT(rxrpc_conn, |
557 | TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, | |
558 | int usage, const void *where), | |
559 | ||
560 | TP_ARGS(conn, op, usage, where), | |
561 | ||
562 | TP_STRUCT__entry( | |
a25e21f0 DH |
563 | __field(unsigned int, conn ) |
564 | __field(int, op ) | |
565 | __field(int, usage ) | |
566 | __field(const void *, where ) | |
363deeab DH |
567 | ), |
568 | ||
569 | TP_fast_assign( | |
a25e21f0 | 570 | __entry->conn = conn->debug_id; |
363deeab DH |
571 | __entry->op = op; |
572 | __entry->usage = usage; | |
573 | __entry->where = where; | |
574 | ), | |
575 | ||
a25e21f0 | 576 | TP_printk("C=%08x %s u=%d sp=%pSR", |
363deeab | 577 | __entry->conn, |
b54a134a | 578 | __print_symbolic(__entry->op, rxrpc_conn_traces), |
363deeab DH |
579 | __entry->usage, |
580 | __entry->where) | |
581 | ); | |
582 | ||
583 | TRACE_EVENT(rxrpc_client, | |
584 | TP_PROTO(struct rxrpc_connection *conn, int channel, | |
585 | enum rxrpc_client_trace op), | |
586 | ||
587 | TP_ARGS(conn, channel, op), | |
588 | ||
589 | TP_STRUCT__entry( | |
a25e21f0 | 590 | __field(unsigned int, conn ) |
363deeab DH |
591 | __field(u32, cid ) |
592 | __field(int, channel ) | |
593 | __field(int, usage ) | |
594 | __field(enum rxrpc_client_trace, op ) | |
595 | __field(enum rxrpc_conn_cache_state, cs ) | |
596 | ), | |
597 | ||
598 | TP_fast_assign( | |
a25e21f0 | 599 | __entry->conn = conn->debug_id; |
363deeab DH |
600 | __entry->channel = channel; |
601 | __entry->usage = atomic_read(&conn->usage); | |
602 | __entry->op = op; | |
603 | __entry->cid = conn->proto.cid; | |
604 | __entry->cs = conn->cache_state; | |
605 | ), | |
606 | ||
a25e21f0 | 607 | TP_printk("C=%08x h=%2d %s %s i=%08x u=%d", |
363deeab DH |
608 | __entry->conn, |
609 | __entry->channel, | |
b54a134a DH |
610 | __print_symbolic(__entry->op, rxrpc_client_traces), |
611 | __print_symbolic(__entry->cs, rxrpc_conn_cache_states), | |
363deeab DH |
612 | __entry->cid, |
613 | __entry->usage) | |
614 | ); | |
615 | ||
e34d4234 | 616 | TRACE_EVENT(rxrpc_call, |
fff72429 | 617 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op, |
2ab27215 | 618 | int usage, const void *where, const void *aux), |
e34d4234 | 619 | |
2ab27215 | 620 | TP_ARGS(call, op, usage, where, aux), |
e34d4234 DH |
621 | |
622 | TP_STRUCT__entry( | |
a25e21f0 | 623 | __field(unsigned int, call ) |
e34d4234 DH |
624 | __field(int, op ) |
625 | __field(int, usage ) | |
e34d4234 DH |
626 | __field(const void *, where ) |
627 | __field(const void *, aux ) | |
628 | ), | |
629 | ||
630 | TP_fast_assign( | |
a25e21f0 | 631 | __entry->call = call->debug_id; |
e34d4234 DH |
632 | __entry->op = op; |
633 | __entry->usage = usage; | |
e34d4234 DH |
634 | __entry->where = where; |
635 | __entry->aux = aux; | |
636 | ), | |
637 | ||
a25e21f0 | 638 | TP_printk("c=%08x %s u=%d sp=%pSR a=%p", |
e34d4234 | 639 | __entry->call, |
b54a134a | 640 | __print_symbolic(__entry->op, rxrpc_call_traces), |
e34d4234 | 641 | __entry->usage, |
e34d4234 DH |
642 | __entry->where, |
643 | __entry->aux) | |
644 | ); | |
645 | ||
df844fd4 | 646 | TRACE_EVENT(rxrpc_skb, |
71f3ca40 DH |
647 | TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, |
648 | int usage, int mod_count, const void *where), | |
df844fd4 DH |
649 | |
650 | TP_ARGS(skb, op, usage, mod_count, where), | |
651 | ||
652 | TP_STRUCT__entry( | |
653 | __field(struct sk_buff *, skb ) | |
71f3ca40 | 654 | __field(enum rxrpc_skb_trace, op ) |
df844fd4 DH |
655 | __field(int, usage ) |
656 | __field(int, mod_count ) | |
657 | __field(const void *, where ) | |
658 | ), | |
659 | ||
660 | TP_fast_assign( | |
661 | __entry->skb = skb; | |
662 | __entry->op = op; | |
663 | __entry->usage = usage; | |
664 | __entry->mod_count = mod_count; | |
665 | __entry->where = where; | |
666 | ), | |
667 | ||
668 | TP_printk("s=%p %s u=%d m=%d p=%pSR", | |
669 | __entry->skb, | |
b54a134a | 670 | __print_symbolic(__entry->op, rxrpc_skb_traces), |
df844fd4 DH |
671 | __entry->usage, |
672 | __entry->mod_count, | |
673 | __entry->where) | |
674 | ); | |
675 | ||
49e19ec7 DH |
676 | TRACE_EVENT(rxrpc_rx_packet, |
677 | TP_PROTO(struct rxrpc_skb_priv *sp), | |
678 | ||
679 | TP_ARGS(sp), | |
680 | ||
681 | TP_STRUCT__entry( | |
682 | __field_struct(struct rxrpc_host_header, hdr ) | |
683 | ), | |
684 | ||
685 | TP_fast_assign( | |
686 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); | |
687 | ), | |
688 | ||
a3868bfc | 689 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", |
49e19ec7 DH |
690 | __entry->hdr.epoch, __entry->hdr.cid, |
691 | __entry->hdr.callNumber, __entry->hdr.serviceId, | |
692 | __entry->hdr.serial, __entry->hdr.seq, | |
a3868bfc | 693 | __entry->hdr.type, __entry->hdr.flags, |
b54a134a DH |
694 | __entry->hdr.type <= 15 ? |
695 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") | |
49e19ec7 DH |
696 | ); |
697 | ||
698 | TRACE_EVENT(rxrpc_rx_done, | |
699 | TP_PROTO(int result, int abort_code), | |
700 | ||
701 | TP_ARGS(result, abort_code), | |
702 | ||
703 | TP_STRUCT__entry( | |
704 | __field(int, result ) | |
705 | __field(int, abort_code ) | |
706 | ), | |
707 | ||
708 | TP_fast_assign( | |
709 | __entry->result = result; | |
710 | __entry->abort_code = abort_code; | |
711 | ), | |
712 | ||
713 | TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) | |
714 | ); | |
715 | ||
5a42976d | 716 | TRACE_EVENT(rxrpc_abort, |
a25e21f0 DH |
717 | TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id, |
718 | rxrpc_seq_t seq, int abort_code, int error), | |
5a42976d | 719 | |
a25e21f0 | 720 | TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), |
5a42976d DH |
721 | |
722 | TP_STRUCT__entry( | |
a25e21f0 | 723 | __field(unsigned int, call_nr ) |
5a42976d DH |
724 | __array(char, why, 4 ) |
725 | __field(u32, cid ) | |
726 | __field(u32, call_id ) | |
727 | __field(rxrpc_seq_t, seq ) | |
728 | __field(int, abort_code ) | |
729 | __field(int, error ) | |
730 | ), | |
731 | ||
732 | TP_fast_assign( | |
733 | memcpy(__entry->why, why, 4); | |
a25e21f0 | 734 | __entry->call_nr = call_nr; |
5a42976d DH |
735 | __entry->cid = cid; |
736 | __entry->call_id = call_id; | |
737 | __entry->abort_code = abort_code; | |
738 | __entry->error = error; | |
739 | __entry->seq = seq; | |
740 | ), | |
741 | ||
a25e21f0 DH |
742 | TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", |
743 | __entry->call_nr, | |
5a42976d DH |
744 | __entry->cid, __entry->call_id, __entry->seq, |
745 | __entry->abort_code, __entry->error, __entry->why) | |
746 | ); | |
747 | ||
1bae5d22 DH |
748 | TRACE_EVENT(rxrpc_call_complete, |
749 | TP_PROTO(struct rxrpc_call *call), | |
750 | ||
751 | TP_ARGS(call), | |
752 | ||
753 | TP_STRUCT__entry( | |
754 | __field(unsigned int, call ) | |
755 | __field(enum rxrpc_call_completion, compl ) | |
756 | __field(int, error ) | |
757 | __field(u32, abort_code ) | |
758 | ), | |
759 | ||
760 | TP_fast_assign( | |
761 | __entry->call = call->debug_id; | |
762 | __entry->compl = call->completion; | |
763 | __entry->error = call->error; | |
764 | __entry->abort_code = call->abort_code; | |
765 | ), | |
766 | ||
767 | TP_printk("c=%08x %s r=%d ac=%d", | |
768 | __entry->call, | |
769 | __print_symbolic(__entry->compl, rxrpc_completions), | |
770 | __entry->error, | |
771 | __entry->abort_code) | |
772 | ); | |
773 | ||
a124fe3e DH |
774 | TRACE_EVENT(rxrpc_transmit, |
775 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), | |
776 | ||
777 | TP_ARGS(call, why), | |
778 | ||
779 | TP_STRUCT__entry( | |
a25e21f0 | 780 | __field(unsigned int, call ) |
a124fe3e DH |
781 | __field(enum rxrpc_transmit_trace, why ) |
782 | __field(rxrpc_seq_t, tx_hard_ack ) | |
783 | __field(rxrpc_seq_t, tx_top ) | |
b1d9f7fd | 784 | __field(int, tx_winsize ) |
a124fe3e DH |
785 | ), |
786 | ||
787 | TP_fast_assign( | |
a25e21f0 | 788 | __entry->call = call->debug_id; |
a124fe3e DH |
789 | __entry->why = why; |
790 | __entry->tx_hard_ack = call->tx_hard_ack; | |
791 | __entry->tx_top = call->tx_top; | |
b1d9f7fd | 792 | __entry->tx_winsize = call->tx_winsize; |
a124fe3e DH |
793 | ), |
794 | ||
a25e21f0 | 795 | TP_printk("c=%08x %s f=%08x n=%u/%u", |
a124fe3e | 796 | __entry->call, |
b54a134a | 797 | __print_symbolic(__entry->why, rxrpc_transmit_traces), |
a124fe3e | 798 | __entry->tx_hard_ack + 1, |
b1d9f7fd DH |
799 | __entry->tx_top - __entry->tx_hard_ack, |
800 | __entry->tx_winsize) | |
801 | ); | |
802 | ||
803 | TRACE_EVENT(rxrpc_rx_data, | |
4764c0da | 804 | TP_PROTO(unsigned int call, rxrpc_seq_t seq, |
b1d9f7fd DH |
805 | rxrpc_serial_t serial, u8 flags, u8 anno), |
806 | ||
807 | TP_ARGS(call, seq, serial, flags, anno), | |
808 | ||
809 | TP_STRUCT__entry( | |
a25e21f0 | 810 | __field(unsigned int, call ) |
b1d9f7fd DH |
811 | __field(rxrpc_seq_t, seq ) |
812 | __field(rxrpc_serial_t, serial ) | |
813 | __field(u8, flags ) | |
814 | __field(u8, anno ) | |
815 | ), | |
816 | ||
817 | TP_fast_assign( | |
4764c0da | 818 | __entry->call = call; |
b1d9f7fd DH |
819 | __entry->seq = seq; |
820 | __entry->serial = serial; | |
821 | __entry->flags = flags; | |
822 | __entry->anno = anno; | |
823 | ), | |
824 | ||
a25e21f0 | 825 | TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x", |
b1d9f7fd DH |
826 | __entry->call, |
827 | __entry->serial, | |
828 | __entry->seq, | |
829 | __entry->flags, | |
830 | __entry->anno) | |
a124fe3e DH |
831 | ); |
832 | ||
ec71eb9a | 833 | TRACE_EVENT(rxrpc_rx_ack, |
b1d9f7fd DH |
834 | TP_PROTO(struct rxrpc_call *call, |
835 | rxrpc_serial_t serial, rxrpc_serial_t ack_serial, | |
836 | rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), | |
ec71eb9a | 837 | |
b1d9f7fd | 838 | TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), |
ec71eb9a DH |
839 | |
840 | TP_STRUCT__entry( | |
a25e21f0 | 841 | __field(unsigned int, call ) |
b1d9f7fd DH |
842 | __field(rxrpc_serial_t, serial ) |
843 | __field(rxrpc_serial_t, ack_serial ) | |
ec71eb9a | 844 | __field(rxrpc_seq_t, first ) |
b1d9f7fd | 845 | __field(rxrpc_seq_t, prev ) |
ec71eb9a DH |
846 | __field(u8, reason ) |
847 | __field(u8, n_acks ) | |
848 | ), | |
849 | ||
850 | TP_fast_assign( | |
a25e21f0 | 851 | __entry->call = call->debug_id; |
b1d9f7fd DH |
852 | __entry->serial = serial; |
853 | __entry->ack_serial = ack_serial; | |
ec71eb9a | 854 | __entry->first = first; |
b1d9f7fd | 855 | __entry->prev = prev; |
ec71eb9a DH |
856 | __entry->reason = reason; |
857 | __entry->n_acks = n_acks; | |
858 | ), | |
859 | ||
a25e21f0 | 860 | TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", |
ec71eb9a | 861 | __entry->call, |
b1d9f7fd | 862 | __entry->serial, |
b54a134a | 863 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
b1d9f7fd | 864 | __entry->ack_serial, |
ec71eb9a | 865 | __entry->first, |
b1d9f7fd | 866 | __entry->prev, |
ec71eb9a DH |
867 | __entry->n_acks) |
868 | ); | |
869 | ||
005ede28 DH |
870 | TRACE_EVENT(rxrpc_rx_abort, |
871 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, | |
872 | u32 abort_code), | |
873 | ||
874 | TP_ARGS(call, serial, abort_code), | |
875 | ||
876 | TP_STRUCT__entry( | |
a25e21f0 | 877 | __field(unsigned int, call ) |
005ede28 DH |
878 | __field(rxrpc_serial_t, serial ) |
879 | __field(u32, abort_code ) | |
880 | ), | |
881 | ||
882 | TP_fast_assign( | |
a25e21f0 | 883 | __entry->call = call->debug_id; |
005ede28 DH |
884 | __entry->serial = serial; |
885 | __entry->abort_code = abort_code; | |
886 | ), | |
887 | ||
a25e21f0 | 888 | TP_printk("c=%08x ABORT %08x ac=%d", |
005ede28 DH |
889 | __entry->call, |
890 | __entry->serial, | |
891 | __entry->abort_code) | |
892 | ); | |
893 | ||
740586d2 DH |
894 | TRACE_EVENT(rxrpc_rx_rwind_change, |
895 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, | |
896 | u32 rwind, bool wake), | |
897 | ||
898 | TP_ARGS(call, serial, rwind, wake), | |
899 | ||
900 | TP_STRUCT__entry( | |
a25e21f0 | 901 | __field(unsigned int, call ) |
740586d2 DH |
902 | __field(rxrpc_serial_t, serial ) |
903 | __field(u32, rwind ) | |
904 | __field(bool, wake ) | |
905 | ), | |
906 | ||
907 | TP_fast_assign( | |
a25e21f0 | 908 | __entry->call = call->debug_id; |
740586d2 DH |
909 | __entry->serial = serial; |
910 | __entry->rwind = rwind; | |
911 | __entry->wake = wake; | |
912 | ), | |
913 | ||
a25e21f0 | 914 | TP_printk("c=%08x %08x rw=%u%s", |
740586d2 DH |
915 | __entry->call, |
916 | __entry->serial, | |
917 | __entry->rwind, | |
918 | __entry->wake ? " wake" : "") | |
919 | ); | |
920 | ||
4764c0da DH |
921 | TRACE_EVENT(rxrpc_tx_packet, |
922 | TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, | |
923 | enum rxrpc_tx_point where), | |
924 | ||
925 | TP_ARGS(call_id, whdr, where), | |
926 | ||
927 | TP_STRUCT__entry( | |
928 | __field(unsigned int, call ) | |
929 | __field(enum rxrpc_tx_point, where ) | |
930 | __field_struct(struct rxrpc_wire_header, whdr ) | |
931 | ), | |
932 | ||
933 | TP_fast_assign( | |
934 | __entry->call = call_id; | |
935 | memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); | |
4e2abd3c | 936 | __entry->where = where; |
4764c0da DH |
937 | ), |
938 | ||
939 | TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", | |
940 | __entry->call, | |
941 | ntohl(__entry->whdr.epoch), | |
942 | ntohl(__entry->whdr.cid), | |
943 | ntohl(__entry->whdr.callNumber), | |
944 | ntohs(__entry->whdr.serviceId), | |
945 | ntohl(__entry->whdr.serial), | |
946 | ntohl(__entry->whdr.seq), | |
947 | __entry->whdr.type, __entry->whdr.flags, | |
948 | __entry->whdr.type <= 15 ? | |
949 | __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", | |
950 | __print_symbolic(__entry->where, rxrpc_tx_points)) | |
951 | ); | |
952 | ||
be832aec DH |
953 | TRACE_EVENT(rxrpc_tx_data, |
954 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, | |
a1767077 | 955 | rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), |
be832aec | 956 | |
a1767077 | 957 | TP_ARGS(call, seq, serial, flags, retrans, lose), |
be832aec DH |
958 | |
959 | TP_STRUCT__entry( | |
a25e21f0 | 960 | __field(unsigned int, call ) |
be832aec DH |
961 | __field(rxrpc_seq_t, seq ) |
962 | __field(rxrpc_serial_t, serial ) | |
4764c0da DH |
963 | __field(u32, cid ) |
964 | __field(u32, call_id ) | |
be832aec | 965 | __field(u8, flags ) |
a1767077 | 966 | __field(bool, retrans ) |
be832aec DH |
967 | __field(bool, lose ) |
968 | ), | |
969 | ||
970 | TP_fast_assign( | |
a25e21f0 | 971 | __entry->call = call->debug_id; |
4764c0da DH |
972 | __entry->cid = call->cid; |
973 | __entry->call_id = call->call_id; | |
be832aec DH |
974 | __entry->seq = seq; |
975 | __entry->serial = serial; | |
976 | __entry->flags = flags; | |
a1767077 | 977 | __entry->retrans = retrans; |
be832aec DH |
978 | __entry->lose = lose; |
979 | ), | |
980 | ||
4764c0da | 981 | TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s", |
be832aec | 982 | __entry->call, |
4764c0da DH |
983 | __entry->cid, |
984 | __entry->call_id, | |
be832aec DH |
985 | __entry->serial, |
986 | __entry->seq, | |
987 | __entry->flags, | |
265a44bb | 988 | __entry->retrans ? " *RETRANS*" : "", |
be832aec DH |
989 | __entry->lose ? " *LOSE*" : "") |
990 | ); | |
991 | ||
f3639df2 | 992 | TRACE_EVENT(rxrpc_tx_ack, |
4764c0da | 993 | TP_PROTO(unsigned int call, rxrpc_serial_t serial, |
be832aec DH |
994 | rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, |
995 | u8 reason, u8 n_acks), | |
f3639df2 | 996 | |
be832aec | 997 | TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), |
f3639df2 DH |
998 | |
999 | TP_STRUCT__entry( | |
a25e21f0 | 1000 | __field(unsigned int, call ) |
f3639df2 | 1001 | __field(rxrpc_serial_t, serial ) |
be832aec DH |
1002 | __field(rxrpc_seq_t, ack_first ) |
1003 | __field(rxrpc_serial_t, ack_serial ) | |
f3639df2 DH |
1004 | __field(u8, reason ) |
1005 | __field(u8, n_acks ) | |
1006 | ), | |
1007 | ||
1008 | TP_fast_assign( | |
4764c0da | 1009 | __entry->call = call; |
f3639df2 | 1010 | __entry->serial = serial; |
be832aec DH |
1011 | __entry->ack_first = ack_first; |
1012 | __entry->ack_serial = ack_serial; | |
f3639df2 DH |
1013 | __entry->reason = reason; |
1014 | __entry->n_acks = n_acks; | |
1015 | ), | |
1016 | ||
a25e21f0 | 1017 | TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u", |
f3639df2 | 1018 | __entry->call, |
f3639df2 | 1019 | __entry->serial, |
b54a134a | 1020 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
be832aec DH |
1021 | __entry->ack_first, |
1022 | __entry->ack_serial, | |
f3639df2 DH |
1023 | __entry->n_acks) |
1024 | ); | |
1025 | ||
58dc63c9 DH |
1026 | TRACE_EVENT(rxrpc_receive, |
1027 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, | |
1028 | rxrpc_serial_t serial, rxrpc_seq_t seq), | |
1029 | ||
1030 | TP_ARGS(call, why, serial, seq), | |
1031 | ||
1032 | TP_STRUCT__entry( | |
a25e21f0 | 1033 | __field(unsigned int, call ) |
58dc63c9 DH |
1034 | __field(enum rxrpc_receive_trace, why ) |
1035 | __field(rxrpc_serial_t, serial ) | |
1036 | __field(rxrpc_seq_t, seq ) | |
1037 | __field(rxrpc_seq_t, hard_ack ) | |
1038 | __field(rxrpc_seq_t, top ) | |
1039 | ), | |
1040 | ||
1041 | TP_fast_assign( | |
a25e21f0 | 1042 | __entry->call = call->debug_id; |
58dc63c9 DH |
1043 | __entry->why = why; |
1044 | __entry->serial = serial; | |
1045 | __entry->seq = seq; | |
1046 | __entry->hard_ack = call->rx_hard_ack; | |
1047 | __entry->top = call->rx_top; | |
1048 | ), | |
1049 | ||
a25e21f0 | 1050 | TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", |
58dc63c9 | 1051 | __entry->call, |
b54a134a | 1052 | __print_symbolic(__entry->why, rxrpc_receive_traces), |
58dc63c9 DH |
1053 | __entry->serial, |
1054 | __entry->seq, | |
1055 | __entry->hard_ack, | |
1056 | __entry->top) | |
1057 | ); | |
1058 | ||
84997905 DH |
1059 | TRACE_EVENT(rxrpc_recvmsg, |
1060 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, | |
1061 | rxrpc_seq_t seq, unsigned int offset, unsigned int len, | |
1062 | int ret), | |
1063 | ||
1064 | TP_ARGS(call, why, seq, offset, len, ret), | |
1065 | ||
1066 | TP_STRUCT__entry( | |
a25e21f0 | 1067 | __field(unsigned int, call ) |
84997905 DH |
1068 | __field(enum rxrpc_recvmsg_trace, why ) |
1069 | __field(rxrpc_seq_t, seq ) | |
1070 | __field(unsigned int, offset ) | |
1071 | __field(unsigned int, len ) | |
1072 | __field(int, ret ) | |
1073 | ), | |
1074 | ||
1075 | TP_fast_assign( | |
a25e21f0 | 1076 | __entry->call = call->debug_id; |
84997905 DH |
1077 | __entry->why = why; |
1078 | __entry->seq = seq; | |
1079 | __entry->offset = offset; | |
1080 | __entry->len = len; | |
1081 | __entry->ret = ret; | |
1082 | ), | |
1083 | ||
a25e21f0 | 1084 | TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", |
84997905 | 1085 | __entry->call, |
b54a134a | 1086 | __print_symbolic(__entry->why, rxrpc_recvmsg_traces), |
84997905 DH |
1087 | __entry->seq, |
1088 | __entry->offset, | |
1089 | __entry->len, | |
1090 | __entry->ret) | |
1091 | ); | |
1092 | ||
cf1a6474 DH |
1093 | TRACE_EVENT(rxrpc_rtt_tx, |
1094 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, | |
1095 | rxrpc_serial_t send_serial), | |
1096 | ||
1097 | TP_ARGS(call, why, send_serial), | |
1098 | ||
1099 | TP_STRUCT__entry( | |
a25e21f0 | 1100 | __field(unsigned int, call ) |
cf1a6474 DH |
1101 | __field(enum rxrpc_rtt_tx_trace, why ) |
1102 | __field(rxrpc_serial_t, send_serial ) | |
1103 | ), | |
1104 | ||
1105 | TP_fast_assign( | |
a25e21f0 | 1106 | __entry->call = call->debug_id; |
cf1a6474 DH |
1107 | __entry->why = why; |
1108 | __entry->send_serial = send_serial; | |
1109 | ), | |
1110 | ||
a25e21f0 | 1111 | TP_printk("c=%08x %s sr=%08x", |
cf1a6474 | 1112 | __entry->call, |
b54a134a | 1113 | __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), |
cf1a6474 DH |
1114 | __entry->send_serial) |
1115 | ); | |
1116 | ||
1117 | TRACE_EVENT(rxrpc_rtt_rx, | |
1118 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, | |
1119 | rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, | |
1120 | s64 rtt, u8 nr, s64 avg), | |
1121 | ||
1122 | TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg), | |
1123 | ||
1124 | TP_STRUCT__entry( | |
a25e21f0 | 1125 | __field(unsigned int, call ) |
cf1a6474 DH |
1126 | __field(enum rxrpc_rtt_rx_trace, why ) |
1127 | __field(u8, nr ) | |
1128 | __field(rxrpc_serial_t, send_serial ) | |
1129 | __field(rxrpc_serial_t, resp_serial ) | |
1130 | __field(s64, rtt ) | |
1131 | __field(u64, avg ) | |
1132 | ), | |
1133 | ||
1134 | TP_fast_assign( | |
a25e21f0 | 1135 | __entry->call = call->debug_id; |
cf1a6474 DH |
1136 | __entry->why = why; |
1137 | __entry->send_serial = send_serial; | |
1138 | __entry->resp_serial = resp_serial; | |
1139 | __entry->rtt = rtt; | |
1140 | __entry->nr = nr; | |
1141 | __entry->avg = avg; | |
1142 | ), | |
1143 | ||
a25e21f0 | 1144 | TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", |
cf1a6474 | 1145 | __entry->call, |
b54a134a | 1146 | __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), |
cf1a6474 DH |
1147 | __entry->send_serial, |
1148 | __entry->resp_serial, | |
1149 | __entry->rtt, | |
1150 | __entry->nr, | |
1151 | __entry->avg) | |
1152 | ); | |
1153 | ||
fc7ab6d2 DH |
1154 | TRACE_EVENT(rxrpc_timer, |
1155 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, | |
a158bdd3 | 1156 | unsigned long now), |
fc7ab6d2 | 1157 | |
a158bdd3 | 1158 | TP_ARGS(call, why, now), |
fc7ab6d2 DH |
1159 | |
1160 | TP_STRUCT__entry( | |
a25e21f0 | 1161 | __field(unsigned int, call ) |
fc7ab6d2 | 1162 | __field(enum rxrpc_timer_trace, why ) |
a158bdd3 DH |
1163 | __field(long, now ) |
1164 | __field(long, ack_at ) | |
bd1fdf8c | 1165 | __field(long, ack_lost_at ) |
a158bdd3 DH |
1166 | __field(long, resend_at ) |
1167 | __field(long, ping_at ) | |
1168 | __field(long, expect_rx_by ) | |
1169 | __field(long, expect_req_by ) | |
1170 | __field(long, expect_term_by ) | |
1171 | __field(long, timer ) | |
fc7ab6d2 DH |
1172 | ), |
1173 | ||
1174 | TP_fast_assign( | |
a25e21f0 | 1175 | __entry->call = call->debug_id; |
a158bdd3 DH |
1176 | __entry->why = why; |
1177 | __entry->now = now; | |
1178 | __entry->ack_at = call->ack_at; | |
bd1fdf8c | 1179 | __entry->ack_lost_at = call->ack_lost_at; |
a158bdd3 DH |
1180 | __entry->resend_at = call->resend_at; |
1181 | __entry->expect_rx_by = call->expect_rx_by; | |
1182 | __entry->expect_req_by = call->expect_req_by; | |
1183 | __entry->expect_term_by = call->expect_term_by; | |
1184 | __entry->timer = call->timer.expires; | |
fc7ab6d2 DH |
1185 | ), |
1186 | ||
a25e21f0 | 1187 | TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", |
fc7ab6d2 | 1188 | __entry->call, |
b54a134a | 1189 | __print_symbolic(__entry->why, rxrpc_timer_traces), |
a158bdd3 | 1190 | __entry->ack_at - __entry->now, |
bd1fdf8c | 1191 | __entry->ack_lost_at - __entry->now, |
a158bdd3 DH |
1192 | __entry->resend_at - __entry->now, |
1193 | __entry->expect_rx_by - __entry->now, | |
1194 | __entry->expect_req_by - __entry->now, | |
1195 | __entry->expect_term_by - __entry->now, | |
1196 | __entry->timer - __entry->now) | |
fc7ab6d2 DH |
1197 | ); |
1198 | ||
89b475ab DH |
1199 | TRACE_EVENT(rxrpc_rx_lose, |
1200 | TP_PROTO(struct rxrpc_skb_priv *sp), | |
1201 | ||
1202 | TP_ARGS(sp), | |
1203 | ||
1204 | TP_STRUCT__entry( | |
1205 | __field_struct(struct rxrpc_host_header, hdr ) | |
1206 | ), | |
1207 | ||
1208 | TP_fast_assign( | |
1209 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); | |
1210 | ), | |
1211 | ||
1212 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", | |
1213 | __entry->hdr.epoch, __entry->hdr.cid, | |
1214 | __entry->hdr.callNumber, __entry->hdr.serviceId, | |
1215 | __entry->hdr.serial, __entry->hdr.seq, | |
1216 | __entry->hdr.type, __entry->hdr.flags, | |
b54a134a DH |
1217 | __entry->hdr.type <= 15 ? |
1218 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") | |
89b475ab DH |
1219 | ); |
1220 | ||
9c7ad434 DH |
1221 | TRACE_EVENT(rxrpc_propose_ack, |
1222 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, | |
1223 | u8 ack_reason, rxrpc_serial_t serial, bool immediate, | |
1224 | bool background, enum rxrpc_propose_ack_outcome outcome), | |
1225 | ||
1226 | TP_ARGS(call, why, ack_reason, serial, immediate, background, | |
1227 | outcome), | |
1228 | ||
1229 | TP_STRUCT__entry( | |
a25e21f0 | 1230 | __field(unsigned int, call ) |
9c7ad434 DH |
1231 | __field(enum rxrpc_propose_ack_trace, why ) |
1232 | __field(rxrpc_serial_t, serial ) | |
1233 | __field(u8, ack_reason ) | |
1234 | __field(bool, immediate ) | |
1235 | __field(bool, background ) | |
1236 | __field(enum rxrpc_propose_ack_outcome, outcome ) | |
1237 | ), | |
1238 | ||
1239 | TP_fast_assign( | |
a25e21f0 | 1240 | __entry->call = call->debug_id; |
9c7ad434 DH |
1241 | __entry->why = why; |
1242 | __entry->serial = serial; | |
1243 | __entry->ack_reason = ack_reason; | |
1244 | __entry->immediate = immediate; | |
1245 | __entry->background = background; | |
1246 | __entry->outcome = outcome; | |
1247 | ), | |
1248 | ||
a25e21f0 | 1249 | TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s", |
9c7ad434 | 1250 | __entry->call, |
b54a134a DH |
1251 | __print_symbolic(__entry->why, rxrpc_propose_ack_traces), |
1252 | __print_symbolic(__entry->ack_reason, rxrpc_ack_names), | |
9c7ad434 DH |
1253 | __entry->serial, |
1254 | __entry->immediate, | |
1255 | __entry->background, | |
b54a134a | 1256 | __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) |
9c7ad434 DH |
1257 | ); |
1258 | ||
c6672e3f DH |
1259 | TRACE_EVENT(rxrpc_retransmit, |
1260 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation, | |
1261 | s64 expiry), | |
1262 | ||
1263 | TP_ARGS(call, seq, annotation, expiry), | |
1264 | ||
1265 | TP_STRUCT__entry( | |
a25e21f0 | 1266 | __field(unsigned int, call ) |
c6672e3f DH |
1267 | __field(rxrpc_seq_t, seq ) |
1268 | __field(u8, annotation ) | |
1269 | __field(s64, expiry ) | |
1270 | ), | |
1271 | ||
1272 | TP_fast_assign( | |
a25e21f0 | 1273 | __entry->call = call->debug_id; |
c6672e3f DH |
1274 | __entry->seq = seq; |
1275 | __entry->annotation = annotation; | |
1276 | __entry->expiry = expiry; | |
1277 | ), | |
1278 | ||
a25e21f0 | 1279 | TP_printk("c=%08x q=%x a=%02x xp=%lld", |
c6672e3f DH |
1280 | __entry->call, |
1281 | __entry->seq, | |
1282 | __entry->annotation, | |
1283 | __entry->expiry) | |
1284 | ); | |
1285 | ||
57494343 DH |
1286 | TRACE_EVENT(rxrpc_congest, |
1287 | TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, | |
1288 | rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), | |
1289 | ||
1290 | TP_ARGS(call, summary, ack_serial, change), | |
1291 | ||
1292 | TP_STRUCT__entry( | |
a25e21f0 | 1293 | __field(unsigned int, call ) |
57494343 DH |
1294 | __field(enum rxrpc_congest_change, change ) |
1295 | __field(rxrpc_seq_t, hard_ack ) | |
1296 | __field(rxrpc_seq_t, top ) | |
1297 | __field(rxrpc_seq_t, lowest_nak ) | |
1298 | __field(rxrpc_serial_t, ack_serial ) | |
1299 | __field_struct(struct rxrpc_ack_summary, sum ) | |
1300 | ), | |
1301 | ||
1302 | TP_fast_assign( | |
a25e21f0 | 1303 | __entry->call = call->debug_id; |
57494343 DH |
1304 | __entry->change = change; |
1305 | __entry->hard_ack = call->tx_hard_ack; | |
1306 | __entry->top = call->tx_top; | |
1307 | __entry->lowest_nak = call->acks_lowest_nak; | |
1308 | __entry->ack_serial = ack_serial; | |
1309 | memcpy(&__entry->sum, summary, sizeof(__entry->sum)); | |
1310 | ), | |
1311 | ||
a25e21f0 | 1312 | TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s", |
57494343 DH |
1313 | __entry->call, |
1314 | __entry->ack_serial, | |
b54a134a | 1315 | __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), |
57494343 | 1316 | __entry->hard_ack, |
b54a134a | 1317 | __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), |
57494343 DH |
1318 | __entry->sum.cwnd, |
1319 | __entry->sum.ssthresh, | |
1320 | __entry->sum.nr_acks, __entry->sum.nr_nacks, | |
1321 | __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, | |
1322 | __entry->sum.nr_rot_new_acks, | |
1323 | __entry->top - __entry->hard_ack, | |
1324 | __entry->sum.cumulative_acks, | |
1325 | __entry->sum.dup_acks, | |
1326 | __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", | |
b54a134a | 1327 | __print_symbolic(__entry->change, rxrpc_congest_changes), |
57494343 DH |
1328 | __entry->sum.retrans_timeo ? " rTxTo" : "") |
1329 | ); | |
1330 | ||
b1d9f7fd DH |
1331 | TRACE_EVENT(rxrpc_disconnect_call, |
1332 | TP_PROTO(struct rxrpc_call *call), | |
1333 | ||
1334 | TP_ARGS(call), | |
1335 | ||
1336 | TP_STRUCT__entry( | |
a25e21f0 | 1337 | __field(unsigned int, call ) |
b1d9f7fd DH |
1338 | __field(u32, abort_code ) |
1339 | ), | |
1340 | ||
1341 | TP_fast_assign( | |
a25e21f0 | 1342 | __entry->call = call->debug_id; |
b1d9f7fd DH |
1343 | __entry->abort_code = call->abort_code; |
1344 | ), | |
1345 | ||
a25e21f0 | 1346 | TP_printk("c=%08x ab=%08x", |
b1d9f7fd DH |
1347 | __entry->call, |
1348 | __entry->abort_code) | |
1349 | ); | |
1350 | ||
1351 | TRACE_EVENT(rxrpc_improper_term, | |
1352 | TP_PROTO(struct rxrpc_call *call), | |
1353 | ||
1354 | TP_ARGS(call), | |
1355 | ||
1356 | TP_STRUCT__entry( | |
a25e21f0 | 1357 | __field(unsigned int, call ) |
b1d9f7fd DH |
1358 | __field(u32, abort_code ) |
1359 | ), | |
1360 | ||
1361 | TP_fast_assign( | |
a25e21f0 | 1362 | __entry->call = call->debug_id; |
b1d9f7fd DH |
1363 | __entry->abort_code = call->abort_code; |
1364 | ), | |
1365 | ||
a25e21f0 | 1366 | TP_printk("c=%08x ab=%08x", |
b1d9f7fd DH |
1367 | __entry->call, |
1368 | __entry->abort_code) | |
1369 | ); | |
1370 | ||
fb46f6ee DH |
1371 | TRACE_EVENT(rxrpc_rx_eproto, |
1372 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, | |
1373 | const char *why), | |
1374 | ||
1375 | TP_ARGS(call, serial, why), | |
1376 | ||
1377 | TP_STRUCT__entry( | |
a25e21f0 | 1378 | __field(unsigned int, call ) |
fb46f6ee DH |
1379 | __field(rxrpc_serial_t, serial ) |
1380 | __field(const char *, why ) | |
1381 | ), | |
1382 | ||
1383 | TP_fast_assign( | |
a25e21f0 | 1384 | __entry->call = call->debug_id; |
fb46f6ee DH |
1385 | __entry->serial = serial; |
1386 | __entry->why = why; | |
1387 | ), | |
1388 | ||
a25e21f0 | 1389 | TP_printk("c=%08x EPROTO %08x %s", |
fb46f6ee DH |
1390 | __entry->call, |
1391 | __entry->serial, | |
1392 | __entry->why) | |
1393 | ); | |
1394 | ||
89ca6948 DH |
1395 | TRACE_EVENT(rxrpc_connect_call, |
1396 | TP_PROTO(struct rxrpc_call *call), | |
1397 | ||
1398 | TP_ARGS(call), | |
1399 | ||
1400 | TP_STRUCT__entry( | |
a25e21f0 | 1401 | __field(unsigned int, call ) |
89ca6948 DH |
1402 | __field(unsigned long, user_call_ID ) |
1403 | __field(u32, cid ) | |
1404 | __field(u32, call_id ) | |
1405 | ), | |
1406 | ||
1407 | TP_fast_assign( | |
a25e21f0 | 1408 | __entry->call = call->debug_id; |
89ca6948 DH |
1409 | __entry->user_call_ID = call->user_call_ID; |
1410 | __entry->cid = call->cid; | |
1411 | __entry->call_id = call->call_id; | |
1412 | ), | |
1413 | ||
a25e21f0 | 1414 | TP_printk("c=%08x u=%p %08x:%08x", |
89ca6948 DH |
1415 | __entry->call, |
1416 | (void *)__entry->user_call_ID, | |
1417 | __entry->cid, | |
1418 | __entry->call_id) | |
1419 | ); | |
1420 | ||
827efed6 DH |
1421 | TRACE_EVENT(rxrpc_resend, |
1422 | TP_PROTO(struct rxrpc_call *call, int ix), | |
1423 | ||
1424 | TP_ARGS(call, ix), | |
1425 | ||
1426 | TP_STRUCT__entry( | |
a25e21f0 | 1427 | __field(unsigned int, call ) |
827efed6 DH |
1428 | __field(int, ix ) |
1429 | __array(u8, anno, 64 ) | |
1430 | ), | |
1431 | ||
1432 | TP_fast_assign( | |
a25e21f0 | 1433 | __entry->call = call->debug_id; |
827efed6 DH |
1434 | __entry->ix = ix; |
1435 | memcpy(__entry->anno, call->rxtx_annotations, 64); | |
1436 | ), | |
1437 | ||
a25e21f0 | 1438 | TP_printk("c=%08x ix=%u a=%64phN", |
827efed6 DH |
1439 | __entry->call, |
1440 | __entry->ix, | |
1441 | __entry->anno) | |
1442 | ); | |
1443 | ||
494337c9 DH |
1444 | TRACE_EVENT(rxrpc_rx_icmp, |
1445 | TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, | |
1446 | struct sockaddr_rxrpc *srx), | |
1447 | ||
1448 | TP_ARGS(peer, ee, srx), | |
1449 | ||
1450 | TP_STRUCT__entry( | |
1451 | __field(unsigned int, peer ) | |
1452 | __field_struct(struct sock_extended_err, ee ) | |
1453 | __field_struct(struct sockaddr_rxrpc, srx ) | |
1454 | ), | |
1455 | ||
1456 | TP_fast_assign( | |
1457 | __entry->peer = peer->debug_id; | |
1458 | memcpy(&__entry->ee, ee, sizeof(__entry->ee)); | |
1459 | memcpy(&__entry->srx, srx, sizeof(__entry->srx)); | |
1460 | ), | |
1461 | ||
1462 | TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", | |
1463 | __entry->peer, | |
1464 | __entry->ee.ee_origin, | |
1465 | __entry->ee.ee_type, | |
1466 | __entry->ee.ee_code, | |
1467 | __entry->ee.ee_info, | |
1468 | __entry->ee.ee_data, | |
1469 | __entry->ee.ee_errno, | |
1470 | &__entry->srx.transport) | |
1471 | ); | |
1472 | ||
6b47fe1d DH |
1473 | TRACE_EVENT(rxrpc_tx_fail, |
1474 | TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, | |
4764c0da | 1475 | enum rxrpc_tx_point where), |
6b47fe1d | 1476 | |
4764c0da | 1477 | TP_ARGS(debug_id, serial, ret, where), |
6b47fe1d DH |
1478 | |
1479 | TP_STRUCT__entry( | |
1480 | __field(unsigned int, debug_id ) | |
1481 | __field(rxrpc_serial_t, serial ) | |
1482 | __field(int, ret ) | |
4764c0da | 1483 | __field(enum rxrpc_tx_point, where ) |
6b47fe1d DH |
1484 | ), |
1485 | ||
1486 | TP_fast_assign( | |
1487 | __entry->debug_id = debug_id; | |
1488 | __entry->serial = serial; | |
1489 | __entry->ret = ret; | |
4764c0da | 1490 | __entry->where = where; |
6b47fe1d DH |
1491 | ), |
1492 | ||
1493 | TP_printk("c=%08x r=%x ret=%d %s", | |
1494 | __entry->debug_id, | |
1495 | __entry->serial, | |
1496 | __entry->ret, | |
4764c0da | 1497 | __print_symbolic(__entry->where, rxrpc_tx_points)) |
6b47fe1d DH |
1498 | ); |
1499 | ||
1a025028 DH |
1500 | TRACE_EVENT(rxrpc_call_reset, |
1501 | TP_PROTO(struct rxrpc_call *call), | |
1502 | ||
1503 | TP_ARGS(call), | |
1504 | ||
1505 | TP_STRUCT__entry( | |
1506 | __field(unsigned int, debug_id ) | |
1507 | __field(u32, cid ) | |
1508 | __field(u32, call_id ) | |
1509 | __field(rxrpc_serial_t, call_serial ) | |
1510 | __field(rxrpc_serial_t, conn_serial ) | |
1511 | __field(rxrpc_seq_t, tx_seq ) | |
1512 | __field(rxrpc_seq_t, rx_seq ) | |
1513 | ), | |
1514 | ||
1515 | TP_fast_assign( | |
1516 | __entry->debug_id = call->debug_id; | |
1517 | __entry->cid = call->cid; | |
1518 | __entry->call_id = call->call_id; | |
1519 | __entry->call_serial = call->rx_serial; | |
1520 | __entry->conn_serial = call->conn->hi_serial; | |
1521 | __entry->tx_seq = call->tx_hard_ack; | |
1522 | __entry->rx_seq = call->ackr_seen; | |
1523 | ), | |
1524 | ||
1525 | TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", | |
1526 | __entry->debug_id, | |
1527 | __entry->cid, __entry->call_id, | |
1528 | __entry->call_serial, __entry->conn_serial, | |
1529 | __entry->tx_seq, __entry->rx_seq) | |
1530 | ); | |
1531 | ||
4272d303 DH |
1532 | TRACE_EVENT(rxrpc_notify_socket, |
1533 | TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), | |
1534 | ||
1535 | TP_ARGS(debug_id, serial), | |
1536 | ||
1537 | TP_STRUCT__entry( | |
1538 | __field(unsigned int, debug_id ) | |
1539 | __field(rxrpc_serial_t, serial ) | |
1540 | ), | |
1541 | ||
1542 | TP_fast_assign( | |
1543 | __entry->debug_id = debug_id; | |
1544 | __entry->serial = serial; | |
1545 | ), | |
1546 | ||
1547 | TP_printk("c=%08x r=%08x", | |
1548 | __entry->debug_id, | |
1549 | __entry->serial) | |
1550 | ); | |
1551 | ||
df844fd4 DH |
1552 | #endif /* _TRACE_RXRPC_H */ |
1553 | ||
1554 | /* This part must be outside protection */ | |
1555 | #include <trace/define_trace.h> |