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