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