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