xref: /openbmc/linux/include/trace/events/rxrpc.h (revision a05754295e01f006a651eec759c5dbe682ef6cef)
1b4d0d230SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2df844fd4SDavid Howells /* AF_RXRPC tracepoints
3df844fd4SDavid Howells  *
4df844fd4SDavid Howells  * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
5df844fd4SDavid Howells  * Written by David Howells (dhowells@redhat.com)
6df844fd4SDavid Howells  */
7df844fd4SDavid Howells #undef TRACE_SYSTEM
8df844fd4SDavid Howells #define TRACE_SYSTEM rxrpc
9df844fd4SDavid Howells 
10df844fd4SDavid Howells #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
11df844fd4SDavid Howells #define _TRACE_RXRPC_H
12df844fd4SDavid Howells 
13df844fd4SDavid Howells #include <linux/tracepoint.h>
14494337c9SDavid Howells #include <linux/errqueue.h>
15df844fd4SDavid Howells 
16b54a134aSDavid Howells /*
17b54a134aSDavid Howells  * Define enums for tracing information.
18b54a134aSDavid Howells  *
19b54a134aSDavid Howells  * These should all be kept sorted, making it easier to match the string
20b54a134aSDavid Howells  * mapping tables further on.
21b54a134aSDavid Howells  */
22b54a134aSDavid Howells #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
23b54a134aSDavid Howells #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
24b54a134aSDavid Howells 
25b54a134aSDavid Howells enum rxrpc_skb_trace {
26987db9f7SDavid Howells 	rxrpc_skb_cleaned,
27987db9f7SDavid Howells 	rxrpc_skb_freed,
28987db9f7SDavid Howells 	rxrpc_skb_got,
29987db9f7SDavid Howells 	rxrpc_skb_lost,
30987db9f7SDavid Howells 	rxrpc_skb_new,
31987db9f7SDavid Howells 	rxrpc_skb_purged,
32987db9f7SDavid Howells 	rxrpc_skb_received,
33987db9f7SDavid Howells 	rxrpc_skb_rotated,
34987db9f7SDavid Howells 	rxrpc_skb_seen,
35d0d5c0cdSDavid Howells 	rxrpc_skb_unshared,
36d0d5c0cdSDavid Howells 	rxrpc_skb_unshared_nomem,
37b54a134aSDavid Howells };
38b54a134aSDavid Howells 
3909d2bf59SDavid Howells enum rxrpc_local_trace {
4009d2bf59SDavid Howells 	rxrpc_local_got,
4109d2bf59SDavid Howells 	rxrpc_local_new,
4209d2bf59SDavid Howells 	rxrpc_local_processing,
4309d2bf59SDavid Howells 	rxrpc_local_put,
4409d2bf59SDavid Howells 	rxrpc_local_queued,
4509d2bf59SDavid Howells };
4609d2bf59SDavid Howells 
471159d4b4SDavid Howells enum rxrpc_peer_trace {
481159d4b4SDavid Howells 	rxrpc_peer_got,
491159d4b4SDavid Howells 	rxrpc_peer_new,
501159d4b4SDavid Howells 	rxrpc_peer_processing,
511159d4b4SDavid Howells 	rxrpc_peer_put,
521159d4b4SDavid Howells };
531159d4b4SDavid Howells 
54b54a134aSDavid Howells enum rxrpc_conn_trace {
55b54a134aSDavid Howells 	rxrpc_conn_got,
56b54a134aSDavid Howells 	rxrpc_conn_new_client,
57b54a134aSDavid Howells 	rxrpc_conn_new_service,
58b54a134aSDavid Howells 	rxrpc_conn_put_client,
59b54a134aSDavid Howells 	rxrpc_conn_put_service,
60b54a134aSDavid Howells 	rxrpc_conn_queued,
61f859ab61SDavid Howells 	rxrpc_conn_reap_service,
62b54a134aSDavid Howells 	rxrpc_conn_seen,
63b54a134aSDavid Howells };
64b54a134aSDavid Howells 
65b54a134aSDavid Howells enum rxrpc_client_trace {
66b54a134aSDavid Howells 	rxrpc_client_activate_chans,
67b54a134aSDavid Howells 	rxrpc_client_alloc,
68b54a134aSDavid Howells 	rxrpc_client_chan_activate,
69b54a134aSDavid Howells 	rxrpc_client_chan_disconnect,
70b54a134aSDavid Howells 	rxrpc_client_chan_pass,
71930c9f91SDavid Howells 	rxrpc_client_chan_wait_failed,
72b54a134aSDavid Howells 	rxrpc_client_cleanup,
73b54a134aSDavid Howells 	rxrpc_client_discard,
74b54a134aSDavid Howells 	rxrpc_client_duplicate,
75b54a134aSDavid Howells 	rxrpc_client_exposed,
76b54a134aSDavid Howells 	rxrpc_client_replace,
77b54a134aSDavid Howells 	rxrpc_client_to_active,
78b54a134aSDavid Howells 	rxrpc_client_to_idle,
79b54a134aSDavid Howells };
80b54a134aSDavid Howells 
81b54a134aSDavid Howells enum rxrpc_call_trace {
82b54a134aSDavid Howells 	rxrpc_call_connected,
83b54a134aSDavid Howells 	rxrpc_call_error,
84b54a134aSDavid Howells 	rxrpc_call_got,
85b54a134aSDavid Howells 	rxrpc_call_got_kernel,
864a7f62f9SDavid Howells 	rxrpc_call_got_timer,
87b54a134aSDavid Howells 	rxrpc_call_got_userid,
88b54a134aSDavid Howells 	rxrpc_call_new_client,
89b54a134aSDavid Howells 	rxrpc_call_new_service,
90b54a134aSDavid Howells 	rxrpc_call_put,
91b54a134aSDavid Howells 	rxrpc_call_put_kernel,
92b54a134aSDavid Howells 	rxrpc_call_put_noqueue,
934a7f62f9SDavid Howells 	rxrpc_call_put_notimer,
944a7f62f9SDavid Howells 	rxrpc_call_put_timer,
95b54a134aSDavid Howells 	rxrpc_call_put_userid,
96b54a134aSDavid Howells 	rxrpc_call_queued,
97b54a134aSDavid Howells 	rxrpc_call_queued_ref,
98b54a134aSDavid Howells 	rxrpc_call_release,
99b54a134aSDavid Howells 	rxrpc_call_seen,
100b54a134aSDavid Howells };
101b54a134aSDavid Howells 
102b54a134aSDavid Howells enum rxrpc_transmit_trace {
103b54a134aSDavid Howells 	rxrpc_transmit_await_reply,
104b54a134aSDavid Howells 	rxrpc_transmit_end,
105b54a134aSDavid Howells 	rxrpc_transmit_queue,
106b54a134aSDavid Howells 	rxrpc_transmit_queue_last,
107b54a134aSDavid Howells 	rxrpc_transmit_rotate,
108b54a134aSDavid Howells 	rxrpc_transmit_rotate_last,
109b54a134aSDavid Howells 	rxrpc_transmit_wait,
110b54a134aSDavid Howells };
111b54a134aSDavid Howells 
112b54a134aSDavid Howells enum rxrpc_receive_trace {
113b54a134aSDavid Howells 	rxrpc_receive_end,
114b54a134aSDavid Howells 	rxrpc_receive_front,
115b54a134aSDavid Howells 	rxrpc_receive_incoming,
116b54a134aSDavid Howells 	rxrpc_receive_queue,
117b54a134aSDavid Howells 	rxrpc_receive_queue_last,
118b54a134aSDavid Howells 	rxrpc_receive_rotate,
119b54a134aSDavid Howells };
120b54a134aSDavid Howells 
121b54a134aSDavid Howells enum rxrpc_recvmsg_trace {
122b54a134aSDavid Howells 	rxrpc_recvmsg_cont,
123b54a134aSDavid Howells 	rxrpc_recvmsg_data_return,
124b54a134aSDavid Howells 	rxrpc_recvmsg_dequeue,
125b54a134aSDavid Howells 	rxrpc_recvmsg_enter,
126b54a134aSDavid Howells 	rxrpc_recvmsg_full,
127b54a134aSDavid Howells 	rxrpc_recvmsg_hole,
128b54a134aSDavid Howells 	rxrpc_recvmsg_next,
129540b1c48SDavid Howells 	rxrpc_recvmsg_requeue,
130b54a134aSDavid Howells 	rxrpc_recvmsg_return,
131b54a134aSDavid Howells 	rxrpc_recvmsg_terminal,
132b54a134aSDavid Howells 	rxrpc_recvmsg_to_be_accepted,
133b54a134aSDavid Howells 	rxrpc_recvmsg_wait,
134b54a134aSDavid Howells };
135b54a134aSDavid Howells 
136b54a134aSDavid Howells enum rxrpc_rtt_tx_trace {
1374700c4d8SDavid Howells 	rxrpc_rtt_tx_cancel,
138b54a134aSDavid Howells 	rxrpc_rtt_tx_data,
1394700c4d8SDavid Howells 	rxrpc_rtt_tx_no_slot,
140b54a134aSDavid Howells 	rxrpc_rtt_tx_ping,
141b54a134aSDavid Howells };
142b54a134aSDavid Howells 
143b54a134aSDavid Howells enum rxrpc_rtt_rx_trace {
1444700c4d8SDavid Howells 	rxrpc_rtt_rx_cancel,
1454700c4d8SDavid Howells 	rxrpc_rtt_rx_lost,
1464700c4d8SDavid Howells 	rxrpc_rtt_rx_obsolete,
147b54a134aSDavid Howells 	rxrpc_rtt_rx_ping_response,
148b54a134aSDavid Howells 	rxrpc_rtt_rx_requested_ack,
149b54a134aSDavid Howells };
150b54a134aSDavid Howells 
151b54a134aSDavid Howells enum rxrpc_timer_trace {
152b54a134aSDavid Howells 	rxrpc_timer_begin,
153a158bdd3SDavid Howells 	rxrpc_timer_exp_ack,
154a158bdd3SDavid Howells 	rxrpc_timer_exp_hard,
155a158bdd3SDavid Howells 	rxrpc_timer_exp_idle,
156415f44e4SDavid Howells 	rxrpc_timer_exp_keepalive,
157bd1fdf8cSDavid Howells 	rxrpc_timer_exp_lost_ack,
158a158bdd3SDavid Howells 	rxrpc_timer_exp_normal,
159a158bdd3SDavid Howells 	rxrpc_timer_exp_ping,
160a158bdd3SDavid Howells 	rxrpc_timer_exp_resend,
161b54a134aSDavid Howells 	rxrpc_timer_expired,
162b54a134aSDavid Howells 	rxrpc_timer_init_for_reply,
163b54a134aSDavid Howells 	rxrpc_timer_init_for_send_reply,
164a158bdd3SDavid Howells 	rxrpc_timer_restart,
165b54a134aSDavid Howells 	rxrpc_timer_set_for_ack,
166a158bdd3SDavid Howells 	rxrpc_timer_set_for_hard,
167a158bdd3SDavid Howells 	rxrpc_timer_set_for_idle,
168415f44e4SDavid Howells 	rxrpc_timer_set_for_keepalive,
169bd1fdf8cSDavid Howells 	rxrpc_timer_set_for_lost_ack,
170a158bdd3SDavid Howells 	rxrpc_timer_set_for_normal,
171b54a134aSDavid Howells 	rxrpc_timer_set_for_ping,
172b54a134aSDavid Howells 	rxrpc_timer_set_for_resend,
173b54a134aSDavid Howells 	rxrpc_timer_set_for_send,
174b54a134aSDavid Howells };
175b54a134aSDavid Howells 
176b54a134aSDavid Howells enum rxrpc_propose_ack_trace {
177b54a134aSDavid Howells 	rxrpc_propose_ack_client_tx_end,
178b54a134aSDavid Howells 	rxrpc_propose_ack_input_data,
1797150ceaaSDavid Howells 	rxrpc_propose_ack_ping_for_check_life,
180415f44e4SDavid Howells 	rxrpc_propose_ack_ping_for_keepalive,
181b54a134aSDavid Howells 	rxrpc_propose_ack_ping_for_lost_ack,
182b54a134aSDavid Howells 	rxrpc_propose_ack_ping_for_lost_reply,
183b54a134aSDavid Howells 	rxrpc_propose_ack_ping_for_params,
184b54a134aSDavid Howells 	rxrpc_propose_ack_processing_op,
185b54a134aSDavid Howells 	rxrpc_propose_ack_respond_to_ack,
186b54a134aSDavid Howells 	rxrpc_propose_ack_respond_to_ping,
187b54a134aSDavid Howells 	rxrpc_propose_ack_retry_tx,
188b54a134aSDavid Howells 	rxrpc_propose_ack_rotate_rx,
189b54a134aSDavid Howells 	rxrpc_propose_ack_terminal_ack,
190b54a134aSDavid Howells };
191b54a134aSDavid Howells 
192b54a134aSDavid Howells enum rxrpc_propose_ack_outcome {
193b54a134aSDavid Howells 	rxrpc_propose_ack_subsume,
194b54a134aSDavid Howells 	rxrpc_propose_ack_update,
195b54a134aSDavid Howells 	rxrpc_propose_ack_use,
196b54a134aSDavid Howells };
197b54a134aSDavid Howells 
198b54a134aSDavid Howells enum rxrpc_congest_change {
199b54a134aSDavid Howells 	rxrpc_cong_begin_retransmission,
200b54a134aSDavid Howells 	rxrpc_cong_cleared_nacks,
201b54a134aSDavid Howells 	rxrpc_cong_new_low_nack,
202b54a134aSDavid Howells 	rxrpc_cong_no_change,
203b54a134aSDavid Howells 	rxrpc_cong_progress,
204b54a134aSDavid Howells 	rxrpc_cong_retransmit_again,
205b54a134aSDavid Howells 	rxrpc_cong_rtt_window_end,
206b54a134aSDavid Howells 	rxrpc_cong_saw_nack,
207b54a134aSDavid Howells };
208b54a134aSDavid Howells 
2094764c0daSDavid Howells enum rxrpc_tx_point {
2104764c0daSDavid Howells 	rxrpc_tx_point_call_abort,
2114764c0daSDavid Howells 	rxrpc_tx_point_call_ack,
2124764c0daSDavid Howells 	rxrpc_tx_point_call_data_frag,
2134764c0daSDavid Howells 	rxrpc_tx_point_call_data_nofrag,
2144764c0daSDavid Howells 	rxrpc_tx_point_call_final_resend,
2154764c0daSDavid Howells 	rxrpc_tx_point_conn_abort,
2164764c0daSDavid Howells 	rxrpc_tx_point_rxkad_challenge,
2174764c0daSDavid Howells 	rxrpc_tx_point_rxkad_response,
2184764c0daSDavid Howells 	rxrpc_tx_point_reject,
2194764c0daSDavid Howells 	rxrpc_tx_point_version_keepalive,
2204764c0daSDavid Howells 	rxrpc_tx_point_version_reply,
2216b47fe1dSDavid Howells };
2226b47fe1dSDavid Howells 
223b54a134aSDavid Howells #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
224b54a134aSDavid Howells 
225b54a134aSDavid Howells /*
226b54a134aSDavid Howells  * Declare tracing information enums and their string mappings for display.
227b54a134aSDavid Howells  */
228b54a134aSDavid Howells #define rxrpc_skb_traces \
229987db9f7SDavid Howells 	EM(rxrpc_skb_cleaned,			"CLN") \
230987db9f7SDavid Howells 	EM(rxrpc_skb_freed,			"FRE") \
231987db9f7SDavid Howells 	EM(rxrpc_skb_got,			"GOT") \
232987db9f7SDavid Howells 	EM(rxrpc_skb_lost,			"*L*") \
233987db9f7SDavid Howells 	EM(rxrpc_skb_new,			"NEW") \
234987db9f7SDavid Howells 	EM(rxrpc_skb_purged,			"PUR") \
235987db9f7SDavid Howells 	EM(rxrpc_skb_received,			"RCV") \
236987db9f7SDavid Howells 	EM(rxrpc_skb_rotated,			"ROT") \
237d0d5c0cdSDavid Howells 	EM(rxrpc_skb_seen,			"SEE") \
238d0d5c0cdSDavid Howells 	EM(rxrpc_skb_unshared,			"UNS") \
239d0d5c0cdSDavid Howells 	E_(rxrpc_skb_unshared_nomem,		"US0")
240b54a134aSDavid Howells 
24109d2bf59SDavid Howells #define rxrpc_local_traces \
24209d2bf59SDavid Howells 	EM(rxrpc_local_got,			"GOT") \
24309d2bf59SDavid Howells 	EM(rxrpc_local_new,			"NEW") \
24409d2bf59SDavid Howells 	EM(rxrpc_local_processing,		"PRO") \
24509d2bf59SDavid Howells 	EM(rxrpc_local_put,			"PUT") \
24609d2bf59SDavid Howells 	E_(rxrpc_local_queued,			"QUE")
24709d2bf59SDavid Howells 
2481159d4b4SDavid Howells #define rxrpc_peer_traces \
2491159d4b4SDavid Howells 	EM(rxrpc_peer_got,			"GOT") \
2501159d4b4SDavid Howells 	EM(rxrpc_peer_new,			"NEW") \
2511159d4b4SDavid Howells 	EM(rxrpc_peer_processing,		"PRO") \
252f3344303SDavid Howells 	E_(rxrpc_peer_put,			"PUT")
2531159d4b4SDavid Howells 
254b54a134aSDavid Howells #define rxrpc_conn_traces \
255b54a134aSDavid Howells 	EM(rxrpc_conn_got,			"GOT") \
256b54a134aSDavid Howells 	EM(rxrpc_conn_new_client,		"NWc") \
257b54a134aSDavid Howells 	EM(rxrpc_conn_new_service,		"NWs") \
258b54a134aSDavid Howells 	EM(rxrpc_conn_put_client,		"PTc") \
259b54a134aSDavid Howells 	EM(rxrpc_conn_put_service,		"PTs") \
260b54a134aSDavid Howells 	EM(rxrpc_conn_queued,			"QUE") \
261f859ab61SDavid Howells 	EM(rxrpc_conn_reap_service,		"RPs") \
262b54a134aSDavid Howells 	E_(rxrpc_conn_seen,			"SEE")
263b54a134aSDavid Howells 
264b54a134aSDavid Howells #define rxrpc_client_traces \
265b54a134aSDavid Howells 	EM(rxrpc_client_activate_chans,		"Activa") \
266b54a134aSDavid Howells 	EM(rxrpc_client_alloc,			"Alloc ") \
267b54a134aSDavid Howells 	EM(rxrpc_client_chan_activate,		"ChActv") \
268b54a134aSDavid Howells 	EM(rxrpc_client_chan_disconnect,	"ChDisc") \
269b54a134aSDavid Howells 	EM(rxrpc_client_chan_pass,		"ChPass") \
270930c9f91SDavid Howells 	EM(rxrpc_client_chan_wait_failed,	"ChWtFl") \
271b54a134aSDavid Howells 	EM(rxrpc_client_cleanup,		"Clean ") \
272b54a134aSDavid Howells 	EM(rxrpc_client_discard,		"Discar") \
273b54a134aSDavid Howells 	EM(rxrpc_client_duplicate,		"Duplic") \
274b54a134aSDavid Howells 	EM(rxrpc_client_exposed,		"Expose") \
275b54a134aSDavid Howells 	EM(rxrpc_client_replace,		"Replac") \
276b54a134aSDavid Howells 	EM(rxrpc_client_to_active,		"->Actv") \
277245500d8SDavid Howells 	E_(rxrpc_client_to_idle,		"->Idle")
278b54a134aSDavid Howells 
279b54a134aSDavid Howells #define rxrpc_call_traces \
280b54a134aSDavid Howells 	EM(rxrpc_call_connected,		"CON") \
281b54a134aSDavid Howells 	EM(rxrpc_call_error,			"*E*") \
282b54a134aSDavid Howells 	EM(rxrpc_call_got,			"GOT") \
283b54a134aSDavid Howells 	EM(rxrpc_call_got_kernel,		"Gke") \
2844a7f62f9SDavid Howells 	EM(rxrpc_call_got_timer,		"GTM") \
285b54a134aSDavid Howells 	EM(rxrpc_call_got_userid,		"Gus") \
286b54a134aSDavid Howells 	EM(rxrpc_call_new_client,		"NWc") \
287b54a134aSDavid Howells 	EM(rxrpc_call_new_service,		"NWs") \
288b54a134aSDavid Howells 	EM(rxrpc_call_put,			"PUT") \
289b54a134aSDavid Howells 	EM(rxrpc_call_put_kernel,		"Pke") \
2904a7f62f9SDavid Howells 	EM(rxrpc_call_put_noqueue,		"PnQ") \
2914a7f62f9SDavid Howells 	EM(rxrpc_call_put_notimer,		"PnT") \
2924a7f62f9SDavid Howells 	EM(rxrpc_call_put_timer,		"PTM") \
293b54a134aSDavid Howells 	EM(rxrpc_call_put_userid,		"Pus") \
294b54a134aSDavid Howells 	EM(rxrpc_call_queued,			"QUE") \
295b54a134aSDavid Howells 	EM(rxrpc_call_queued_ref,		"QUR") \
296b54a134aSDavid Howells 	EM(rxrpc_call_release,			"RLS") \
297b54a134aSDavid Howells 	E_(rxrpc_call_seen,			"SEE")
298b54a134aSDavid Howells 
299b54a134aSDavid Howells #define rxrpc_transmit_traces \
300b54a134aSDavid Howells 	EM(rxrpc_transmit_await_reply,		"AWR") \
301b54a134aSDavid Howells 	EM(rxrpc_transmit_end,			"END") \
302b54a134aSDavid Howells 	EM(rxrpc_transmit_queue,		"QUE") \
303b54a134aSDavid Howells 	EM(rxrpc_transmit_queue_last,		"QLS") \
304b54a134aSDavid Howells 	EM(rxrpc_transmit_rotate,		"ROT") \
305b54a134aSDavid Howells 	EM(rxrpc_transmit_rotate_last,		"RLS") \
306b54a134aSDavid Howells 	E_(rxrpc_transmit_wait,			"WAI")
307b54a134aSDavid Howells 
308b54a134aSDavid Howells #define rxrpc_receive_traces \
309b54a134aSDavid Howells 	EM(rxrpc_receive_end,			"END") \
310b54a134aSDavid Howells 	EM(rxrpc_receive_front,			"FRN") \
311b54a134aSDavid Howells 	EM(rxrpc_receive_incoming,		"INC") \
312b54a134aSDavid Howells 	EM(rxrpc_receive_queue,			"QUE") \
313b54a134aSDavid Howells 	EM(rxrpc_receive_queue_last,		"QLS") \
314b54a134aSDavid Howells 	E_(rxrpc_receive_rotate,		"ROT")
315b54a134aSDavid Howells 
316b54a134aSDavid Howells #define rxrpc_recvmsg_traces \
317b54a134aSDavid Howells 	EM(rxrpc_recvmsg_cont,			"CONT") \
318b54a134aSDavid Howells 	EM(rxrpc_recvmsg_data_return,		"DATA") \
319b54a134aSDavid Howells 	EM(rxrpc_recvmsg_dequeue,		"DEQU") \
320b54a134aSDavid Howells 	EM(rxrpc_recvmsg_enter,			"ENTR") \
321b54a134aSDavid Howells 	EM(rxrpc_recvmsg_full,			"FULL") \
322b54a134aSDavid Howells 	EM(rxrpc_recvmsg_hole,			"HOLE") \
323b54a134aSDavid Howells 	EM(rxrpc_recvmsg_next,			"NEXT") \
324540b1c48SDavid Howells 	EM(rxrpc_recvmsg_requeue,		"REQU") \
325b54a134aSDavid Howells 	EM(rxrpc_recvmsg_return,		"RETN") \
326b54a134aSDavid Howells 	EM(rxrpc_recvmsg_terminal,		"TERM") \
327b54a134aSDavid Howells 	EM(rxrpc_recvmsg_to_be_accepted,	"TBAC") \
328b54a134aSDavid Howells 	E_(rxrpc_recvmsg_wait,			"WAIT")
329b54a134aSDavid Howells 
330b54a134aSDavid Howells #define rxrpc_rtt_tx_traces \
3314700c4d8SDavid Howells 	EM(rxrpc_rtt_tx_cancel,			"CNCE") \
332b54a134aSDavid Howells 	EM(rxrpc_rtt_tx_data,			"DATA") \
3334700c4d8SDavid Howells 	EM(rxrpc_rtt_tx_no_slot,		"FULL") \
334b54a134aSDavid Howells 	E_(rxrpc_rtt_tx_ping,			"PING")
335b54a134aSDavid Howells 
336b54a134aSDavid Howells #define rxrpc_rtt_rx_traces \
3374700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_cancel,			"CNCL") \
3384700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_obsolete,		"OBSL") \
3394700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_lost,			"LOST") \
340b54a134aSDavid Howells 	EM(rxrpc_rtt_rx_ping_response,		"PONG") \
341b54a134aSDavid Howells 	E_(rxrpc_rtt_rx_requested_ack,		"RACK")
342b54a134aSDavid Howells 
343b54a134aSDavid Howells #define rxrpc_timer_traces \
344b54a134aSDavid Howells 	EM(rxrpc_timer_begin,			"Begin ") \
345b54a134aSDavid Howells 	EM(rxrpc_timer_expired,			"*EXPR*") \
346a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_ack,			"ExpAck") \
347a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_hard,		"ExpHrd") \
348a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_idle,		"ExpIdl") \
349415f44e4SDavid Howells 	EM(rxrpc_timer_exp_keepalive,		"ExpKA ") \
350bd1fdf8cSDavid Howells 	EM(rxrpc_timer_exp_lost_ack,		"ExpLoA") \
351a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_normal,		"ExpNml") \
352a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_ping,		"ExpPng") \
353a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_resend,		"ExpRsn") \
354b54a134aSDavid Howells 	EM(rxrpc_timer_init_for_reply,		"IniRpl") \
355b54a134aSDavid Howells 	EM(rxrpc_timer_init_for_send_reply,	"SndRpl") \
356a158bdd3SDavid Howells 	EM(rxrpc_timer_restart,			"Restrt") \
357b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_ack,		"SetAck") \
358a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_hard,		"SetHrd") \
359a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_idle,		"SetIdl") \
360415f44e4SDavid Howells 	EM(rxrpc_timer_set_for_keepalive,	"KeepAl") \
361bd1fdf8cSDavid Howells 	EM(rxrpc_timer_set_for_lost_ack,	"SetLoA") \
362a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_normal,		"SetNml") \
363b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_ping,		"SetPng") \
364b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_resend,		"SetRTx") \
365a158bdd3SDavid Howells 	E_(rxrpc_timer_set_for_send,		"SetSnd")
366b54a134aSDavid Howells 
367b54a134aSDavid Howells #define rxrpc_propose_ack_traces \
368b54a134aSDavid Howells 	EM(rxrpc_propose_ack_client_tx_end,	"ClTxEnd") \
369b54a134aSDavid Howells 	EM(rxrpc_propose_ack_input_data,	"DataIn ") \
3707150ceaaSDavid Howells 	EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
371415f44e4SDavid Howells 	EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
372b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_lost_ack,	"LostAck") \
373b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
374b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_params,	"Params ") \
375b54a134aSDavid Howells 	EM(rxrpc_propose_ack_processing_op,	"ProcOp ") \
376b54a134aSDavid Howells 	EM(rxrpc_propose_ack_respond_to_ack,	"Rsp2Ack") \
377b54a134aSDavid Howells 	EM(rxrpc_propose_ack_respond_to_ping,	"Rsp2Png") \
378b54a134aSDavid Howells 	EM(rxrpc_propose_ack_retry_tx,		"RetryTx") \
379b54a134aSDavid Howells 	EM(rxrpc_propose_ack_rotate_rx,		"RxAck  ") \
380b54a134aSDavid Howells 	E_(rxrpc_propose_ack_terminal_ack,	"ClTerm ")
381b54a134aSDavid Howells 
382b54a134aSDavid Howells #define rxrpc_propose_ack_outcomes \
383b54a134aSDavid Howells 	EM(rxrpc_propose_ack_subsume,		" Subsume") \
384b54a134aSDavid Howells 	EM(rxrpc_propose_ack_update,		" Update") \
385197445afSDavid Howells 	E_(rxrpc_propose_ack_use,		" New")
386b54a134aSDavid Howells 
387b54a134aSDavid Howells #define rxrpc_congest_modes \
388b54a134aSDavid Howells 	EM(RXRPC_CALL_CONGEST_AVOIDANCE,	"CongAvoid") \
389b54a134aSDavid Howells 	EM(RXRPC_CALL_FAST_RETRANSMIT,		"FastReTx ") \
390b54a134aSDavid Howells 	EM(RXRPC_CALL_PACKET_LOSS,		"PktLoss  ") \
391b54a134aSDavid Howells 	E_(RXRPC_CALL_SLOW_START,		"SlowStart")
392b54a134aSDavid Howells 
393b54a134aSDavid Howells #define rxrpc_congest_changes \
394b54a134aSDavid Howells 	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
395b54a134aSDavid Howells 	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
396b54a134aSDavid Howells 	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
397aadf9dceSDavid Howells 	EM(rxrpc_cong_no_change,		" -") \
398b54a134aSDavid Howells 	EM(rxrpc_cong_progress,			" Progres") \
399b54a134aSDavid Howells 	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
400b54a134aSDavid Howells 	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \
401b54a134aSDavid Howells 	E_(rxrpc_cong_saw_nack,			" SawNack")
402b54a134aSDavid Howells 
403b54a134aSDavid Howells #define rxrpc_pkts \
404b54a134aSDavid Howells 	EM(0,					"?00") \
405b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_DATA,		"DATA") \
406b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ACK,		"ACK") \
407b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_BUSY,		"BUSY") \
408b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ABORT,		"ABORT") \
409b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ACKALL,		"ACKALL") \
410b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_CHALLENGE,		"CHALL") \
411b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_RESPONSE,		"RESP") \
412b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_DEBUG,		"DEBUG") \
413b54a134aSDavid Howells 	EM(9,					"?09") \
414b54a134aSDavid Howells 	EM(10,					"?10") \
415b54a134aSDavid Howells 	EM(11,					"?11") \
416b54a134aSDavid Howells 	EM(12,					"?12") \
417b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_VERSION,		"VERSION") \
418b54a134aSDavid Howells 	EM(14,					"?14") \
419b54a134aSDavid Howells 	E_(15,					"?15")
420b54a134aSDavid Howells 
421b54a134aSDavid Howells #define rxrpc_ack_names \
422b54a134aSDavid Howells 	EM(0,					"-0-") \
423b54a134aSDavid Howells 	EM(RXRPC_ACK_REQUESTED,			"REQ") \
424b54a134aSDavid Howells 	EM(RXRPC_ACK_DUPLICATE,			"DUP") \
425b54a134aSDavid Howells 	EM(RXRPC_ACK_OUT_OF_SEQUENCE,		"OOS") \
426b54a134aSDavid Howells 	EM(RXRPC_ACK_EXCEEDS_WINDOW,		"WIN") \
427b54a134aSDavid Howells 	EM(RXRPC_ACK_NOSPACE,			"MEM") \
428b54a134aSDavid Howells 	EM(RXRPC_ACK_PING,			"PNG") \
429b54a134aSDavid Howells 	EM(RXRPC_ACK_PING_RESPONSE,		"PNR") \
430b54a134aSDavid Howells 	EM(RXRPC_ACK_DELAY,			"DLY") \
431b54a134aSDavid Howells 	EM(RXRPC_ACK_IDLE,			"IDL") \
432b54a134aSDavid Howells 	E_(RXRPC_ACK__INVALID,			"-?-")
433b54a134aSDavid Howells 
4341bae5d22SDavid Howells #define rxrpc_completions \
4351bae5d22SDavid Howells 	EM(RXRPC_CALL_SUCCEEDED,		"Succeeded") \
4361bae5d22SDavid Howells 	EM(RXRPC_CALL_REMOTELY_ABORTED,		"RemoteAbort") \
4371bae5d22SDavid Howells 	EM(RXRPC_CALL_LOCALLY_ABORTED,		"LocalAbort") \
4381bae5d22SDavid Howells 	EM(RXRPC_CALL_LOCAL_ERROR,		"LocalError") \
4391bae5d22SDavid Howells 	E_(RXRPC_CALL_NETWORK_ERROR,		"NetError")
4401bae5d22SDavid Howells 
4414764c0daSDavid Howells #define rxrpc_tx_points \
4424764c0daSDavid Howells 	EM(rxrpc_tx_point_call_abort,		"CallAbort") \
4434764c0daSDavid Howells 	EM(rxrpc_tx_point_call_ack,		"CallAck") \
4444764c0daSDavid Howells 	EM(rxrpc_tx_point_call_data_frag,	"CallDataFrag") \
4454764c0daSDavid Howells 	EM(rxrpc_tx_point_call_data_nofrag,	"CallDataNofrag") \
4464764c0daSDavid Howells 	EM(rxrpc_tx_point_call_final_resend,	"CallFinalResend") \
4474764c0daSDavid Howells 	EM(rxrpc_tx_point_conn_abort,		"ConnAbort") \
4484764c0daSDavid Howells 	EM(rxrpc_tx_point_reject,		"Reject") \
4494764c0daSDavid Howells 	EM(rxrpc_tx_point_rxkad_challenge,	"RxkadChall") \
4504764c0daSDavid Howells 	EM(rxrpc_tx_point_rxkad_response,	"RxkadResp") \
4514764c0daSDavid Howells 	EM(rxrpc_tx_point_version_keepalive,	"VerKeepalive") \
4524764c0daSDavid Howells 	E_(rxrpc_tx_point_version_reply,	"VerReply")
4536b47fe1dSDavid Howells 
454b54a134aSDavid Howells /*
455b54a134aSDavid Howells  * Export enum symbols via userspace.
456b54a134aSDavid Howells  */
457b54a134aSDavid Howells #undef EM
458b54a134aSDavid Howells #undef E_
459b54a134aSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a);
460b54a134aSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a);
461b54a134aSDavid Howells 
462b54a134aSDavid Howells rxrpc_skb_traces;
46309d2bf59SDavid Howells rxrpc_local_traces;
464b54a134aSDavid Howells rxrpc_conn_traces;
465b54a134aSDavid Howells rxrpc_client_traces;
466b54a134aSDavid Howells rxrpc_call_traces;
467b54a134aSDavid Howells rxrpc_transmit_traces;
468b54a134aSDavid Howells rxrpc_receive_traces;
469b54a134aSDavid Howells rxrpc_recvmsg_traces;
470b54a134aSDavid Howells rxrpc_rtt_tx_traces;
471b54a134aSDavid Howells rxrpc_rtt_rx_traces;
472b54a134aSDavid Howells rxrpc_timer_traces;
473b54a134aSDavid Howells rxrpc_propose_ack_traces;
474b54a134aSDavid Howells rxrpc_propose_ack_outcomes;
475827efed6SDavid Howells rxrpc_congest_modes;
476b54a134aSDavid Howells rxrpc_congest_changes;
4774764c0daSDavid Howells rxrpc_tx_points;
478b54a134aSDavid Howells 
479b54a134aSDavid Howells /*
480b54a134aSDavid Howells  * Now redefine the EM() and E_() macros to map the enums to the strings that
481b54a134aSDavid Howells  * will be printed in the output.
482b54a134aSDavid Howells  */
483b54a134aSDavid Howells #undef EM
484b54a134aSDavid Howells #undef E_
485b54a134aSDavid Howells #define EM(a, b)	{ a, b },
486b54a134aSDavid Howells #define E_(a, b)	{ a, b }
487b54a134aSDavid Howells 
48809d2bf59SDavid Howells TRACE_EVENT(rxrpc_local,
48906d9532fSDavid Howells 	    TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
49009d2bf59SDavid Howells 		     int usage, const void *where),
49109d2bf59SDavid Howells 
49206d9532fSDavid Howells 	    TP_ARGS(local_debug_id, op, usage, where),
49309d2bf59SDavid Howells 
49409d2bf59SDavid Howells 	    TP_STRUCT__entry(
49509d2bf59SDavid Howells 		    __field(unsigned int,	local		)
49609d2bf59SDavid Howells 		    __field(int,		op		)
49709d2bf59SDavid Howells 		    __field(int,		usage		)
49809d2bf59SDavid Howells 		    __field(const void *,	where		)
49909d2bf59SDavid Howells 			     ),
50009d2bf59SDavid Howells 
50109d2bf59SDavid Howells 	    TP_fast_assign(
50206d9532fSDavid Howells 		    __entry->local = local_debug_id;
50309d2bf59SDavid Howells 		    __entry->op = op;
50409d2bf59SDavid Howells 		    __entry->usage = usage;
50509d2bf59SDavid Howells 		    __entry->where = where;
50609d2bf59SDavid Howells 			   ),
50709d2bf59SDavid Howells 
50809d2bf59SDavid Howells 	    TP_printk("L=%08x %s u=%d sp=%pSR",
50909d2bf59SDavid Howells 		      __entry->local,
51009d2bf59SDavid Howells 		      __print_symbolic(__entry->op, rxrpc_local_traces),
51109d2bf59SDavid Howells 		      __entry->usage,
51209d2bf59SDavid Howells 		      __entry->where)
51309d2bf59SDavid Howells 	    );
51409d2bf59SDavid Howells 
5151159d4b4SDavid Howells TRACE_EVENT(rxrpc_peer,
51655f6c98eSDavid Howells 	    TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op,
5171159d4b4SDavid Howells 		     int usage, const void *where),
5181159d4b4SDavid Howells 
51955f6c98eSDavid Howells 	    TP_ARGS(peer_debug_id, op, usage, where),
5201159d4b4SDavid Howells 
5211159d4b4SDavid Howells 	    TP_STRUCT__entry(
5221159d4b4SDavid Howells 		    __field(unsigned int,	peer		)
5231159d4b4SDavid Howells 		    __field(int,		op		)
5241159d4b4SDavid Howells 		    __field(int,		usage		)
5251159d4b4SDavid Howells 		    __field(const void *,	where		)
5261159d4b4SDavid Howells 			     ),
5271159d4b4SDavid Howells 
5281159d4b4SDavid Howells 	    TP_fast_assign(
52955f6c98eSDavid Howells 		    __entry->peer = peer_debug_id;
5301159d4b4SDavid Howells 		    __entry->op = op;
5311159d4b4SDavid Howells 		    __entry->usage = usage;
5321159d4b4SDavid Howells 		    __entry->where = where;
5331159d4b4SDavid Howells 			   ),
5341159d4b4SDavid Howells 
5351159d4b4SDavid Howells 	    TP_printk("P=%08x %s u=%d sp=%pSR",
5361159d4b4SDavid Howells 		      __entry->peer,
5371159d4b4SDavid Howells 		      __print_symbolic(__entry->op, rxrpc_peer_traces),
5381159d4b4SDavid Howells 		      __entry->usage,
5391159d4b4SDavid Howells 		      __entry->where)
5401159d4b4SDavid Howells 	    );
5411159d4b4SDavid Howells 
542363deeabSDavid Howells TRACE_EVENT(rxrpc_conn,
5434c1295dcSDavid Howells 	    TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op,
544363deeabSDavid Howells 		     int usage, const void *where),
545363deeabSDavid Howells 
5464c1295dcSDavid Howells 	    TP_ARGS(conn_debug_id, op, usage, where),
547363deeabSDavid Howells 
548363deeabSDavid Howells 	    TP_STRUCT__entry(
549a25e21f0SDavid Howells 		    __field(unsigned int,	conn		)
550363deeabSDavid Howells 		    __field(int,		op		)
551363deeabSDavid Howells 		    __field(int,		usage		)
552363deeabSDavid Howells 		    __field(const void *,	where		)
553363deeabSDavid Howells 			     ),
554363deeabSDavid Howells 
555363deeabSDavid Howells 	    TP_fast_assign(
5564c1295dcSDavid Howells 		    __entry->conn = conn_debug_id;
557363deeabSDavid Howells 		    __entry->op = op;
558363deeabSDavid Howells 		    __entry->usage = usage;
559363deeabSDavid Howells 		    __entry->where = where;
560363deeabSDavid Howells 			   ),
561363deeabSDavid Howells 
562a25e21f0SDavid Howells 	    TP_printk("C=%08x %s u=%d sp=%pSR",
563363deeabSDavid Howells 		      __entry->conn,
564b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_conn_traces),
565363deeabSDavid Howells 		      __entry->usage,
566363deeabSDavid Howells 		      __entry->where)
567363deeabSDavid Howells 	    );
568363deeabSDavid Howells 
569363deeabSDavid Howells TRACE_EVENT(rxrpc_client,
570363deeabSDavid Howells 	    TP_PROTO(struct rxrpc_connection *conn, int channel,
571363deeabSDavid Howells 		     enum rxrpc_client_trace op),
572363deeabSDavid Howells 
573363deeabSDavid Howells 	    TP_ARGS(conn, channel, op),
574363deeabSDavid Howells 
575363deeabSDavid Howells 	    TP_STRUCT__entry(
576a25e21f0SDavid Howells 		    __field(unsigned int,		conn		)
577363deeabSDavid Howells 		    __field(u32,			cid		)
578363deeabSDavid Howells 		    __field(int,			channel		)
579363deeabSDavid Howells 		    __field(int,			usage		)
580363deeabSDavid Howells 		    __field(enum rxrpc_client_trace,	op		)
581363deeabSDavid Howells 			     ),
582363deeabSDavid Howells 
583363deeabSDavid Howells 	    TP_fast_assign(
584245500d8SDavid Howells 		    __entry->conn = conn ? conn->debug_id : 0;
585363deeabSDavid Howells 		    __entry->channel = channel;
586*a0575429SDavid Howells 		    __entry->usage = conn ? refcount_read(&conn->ref) : -2;
587363deeabSDavid Howells 		    __entry->op = op;
58896a9c425SDavid Howells 		    __entry->cid = conn ? conn->proto.cid : 0;
589363deeabSDavid Howells 			   ),
590363deeabSDavid Howells 
591245500d8SDavid Howells 	    TP_printk("C=%08x h=%2d %s i=%08x u=%d",
592363deeabSDavid Howells 		      __entry->conn,
593363deeabSDavid Howells 		      __entry->channel,
594b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_client_traces),
595363deeabSDavid Howells 		      __entry->cid,
596363deeabSDavid Howells 		      __entry->usage)
597363deeabSDavid Howells 	    );
598363deeabSDavid Howells 
599e34d4234SDavid Howells TRACE_EVENT(rxrpc_call,
60048c9e0ecSDavid Howells 	    TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
6012ab27215SDavid Howells 		     int usage, const void *where, const void *aux),
602e34d4234SDavid Howells 
60348c9e0ecSDavid Howells 	    TP_ARGS(call_debug_id, op, usage, where, aux),
604e34d4234SDavid Howells 
605e34d4234SDavid Howells 	    TP_STRUCT__entry(
606a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
607e34d4234SDavid Howells 		    __field(int,			op		)
608e34d4234SDavid Howells 		    __field(int,			usage		)
609e34d4234SDavid Howells 		    __field(const void *,		where		)
610e34d4234SDavid Howells 		    __field(const void *,		aux		)
611e34d4234SDavid Howells 			     ),
612e34d4234SDavid Howells 
613e34d4234SDavid Howells 	    TP_fast_assign(
61448c9e0ecSDavid Howells 		    __entry->call = call_debug_id;
615e34d4234SDavid Howells 		    __entry->op = op;
616e34d4234SDavid Howells 		    __entry->usage = usage;
617e34d4234SDavid Howells 		    __entry->where = where;
618e34d4234SDavid Howells 		    __entry->aux = aux;
619e34d4234SDavid Howells 			   ),
620e34d4234SDavid Howells 
621a25e21f0SDavid Howells 	    TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
622e34d4234SDavid Howells 		      __entry->call,
623b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_call_traces),
624e34d4234SDavid Howells 		      __entry->usage,
625e34d4234SDavid Howells 		      __entry->where,
626e34d4234SDavid Howells 		      __entry->aux)
627e34d4234SDavid Howells 	    );
628e34d4234SDavid Howells 
629df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb,
63071f3ca40SDavid Howells 	    TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
631d0d5c0cdSDavid Howells 		     int usage, int mod_count, u8 flags,    const void *where),
632df844fd4SDavid Howells 
633d0d5c0cdSDavid Howells 	    TP_ARGS(skb, op, usage, mod_count, flags, where),
634df844fd4SDavid Howells 
635df844fd4SDavid Howells 	    TP_STRUCT__entry(
636df844fd4SDavid Howells 		    __field(struct sk_buff *,		skb		)
63771f3ca40SDavid Howells 		    __field(enum rxrpc_skb_trace,	op		)
638987db9f7SDavid Howells 		    __field(u8,				flags		)
639df844fd4SDavid Howells 		    __field(int,			usage		)
640df844fd4SDavid Howells 		    __field(int,			mod_count	)
641df844fd4SDavid Howells 		    __field(const void *,		where		)
642df844fd4SDavid Howells 			     ),
643df844fd4SDavid Howells 
644df844fd4SDavid Howells 	    TP_fast_assign(
645df844fd4SDavid Howells 		    __entry->skb = skb;
646d0d5c0cdSDavid Howells 		    __entry->flags = flags;
647df844fd4SDavid Howells 		    __entry->op = op;
648df844fd4SDavid Howells 		    __entry->usage = usage;
649df844fd4SDavid Howells 		    __entry->mod_count = mod_count;
650df844fd4SDavid Howells 		    __entry->where = where;
651df844fd4SDavid Howells 			   ),
652df844fd4SDavid Howells 
653987db9f7SDavid Howells 	    TP_printk("s=%p %cx %s u=%d m=%d p=%pSR",
654df844fd4SDavid Howells 		      __entry->skb,
655987db9f7SDavid Howells 		      __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R',
656b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_skb_traces),
657df844fd4SDavid Howells 		      __entry->usage,
658df844fd4SDavid Howells 		      __entry->mod_count,
659df844fd4SDavid Howells 		      __entry->where)
660df844fd4SDavid Howells 	    );
661df844fd4SDavid Howells 
66249e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet,
66349e19ec7SDavid Howells 	    TP_PROTO(struct rxrpc_skb_priv *sp),
66449e19ec7SDavid Howells 
66549e19ec7SDavid Howells 	    TP_ARGS(sp),
66649e19ec7SDavid Howells 
66749e19ec7SDavid Howells 	    TP_STRUCT__entry(
66849e19ec7SDavid Howells 		    __field_struct(struct rxrpc_host_header,	hdr		)
66949e19ec7SDavid Howells 			     ),
67049e19ec7SDavid Howells 
67149e19ec7SDavid Howells 	    TP_fast_assign(
67249e19ec7SDavid Howells 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
67349e19ec7SDavid Howells 			   ),
67449e19ec7SDavid Howells 
675a3868bfcSDavid Howells 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
67649e19ec7SDavid Howells 		      __entry->hdr.epoch, __entry->hdr.cid,
67749e19ec7SDavid Howells 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
67849e19ec7SDavid Howells 		      __entry->hdr.serial, __entry->hdr.seq,
679a3868bfcSDavid Howells 		      __entry->hdr.type, __entry->hdr.flags,
680b54a134aSDavid Howells 		      __entry->hdr.type <= 15 ?
681b54a134aSDavid Howells 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
68249e19ec7SDavid Howells 	    );
68349e19ec7SDavid Howells 
68449e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done,
68549e19ec7SDavid Howells 	    TP_PROTO(int result, int abort_code),
68649e19ec7SDavid Howells 
68749e19ec7SDavid Howells 	    TP_ARGS(result, abort_code),
68849e19ec7SDavid Howells 
68949e19ec7SDavid Howells 	    TP_STRUCT__entry(
69049e19ec7SDavid Howells 		    __field(int,			result		)
69149e19ec7SDavid Howells 		    __field(int,			abort_code	)
69249e19ec7SDavid Howells 			     ),
69349e19ec7SDavid Howells 
69449e19ec7SDavid Howells 	    TP_fast_assign(
69549e19ec7SDavid Howells 		    __entry->result = result;
69649e19ec7SDavid Howells 		    __entry->abort_code = abort_code;
69749e19ec7SDavid Howells 			   ),
69849e19ec7SDavid Howells 
69949e19ec7SDavid Howells 	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
70049e19ec7SDavid Howells 	    );
70149e19ec7SDavid Howells 
7025a42976dSDavid Howells TRACE_EVENT(rxrpc_abort,
703a25e21f0SDavid Howells 	    TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
704a25e21f0SDavid Howells 		     rxrpc_seq_t seq, int abort_code, int error),
7055a42976dSDavid Howells 
706a25e21f0SDavid Howells 	    TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
7075a42976dSDavid Howells 
7085a42976dSDavid Howells 	    TP_STRUCT__entry(
709a25e21f0SDavid Howells 		    __field(unsigned int,		call_nr		)
7105a42976dSDavid Howells 		    __array(char,			why, 4		)
7115a42976dSDavid Howells 		    __field(u32,			cid		)
7125a42976dSDavid Howells 		    __field(u32,			call_id		)
7135a42976dSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
7145a42976dSDavid Howells 		    __field(int,			abort_code	)
7155a42976dSDavid Howells 		    __field(int,			error		)
7165a42976dSDavid Howells 			     ),
7175a42976dSDavid Howells 
7185a42976dSDavid Howells 	    TP_fast_assign(
7195a42976dSDavid Howells 		    memcpy(__entry->why, why, 4);
720a25e21f0SDavid Howells 		    __entry->call_nr = call_nr;
7215a42976dSDavid Howells 		    __entry->cid = cid;
7225a42976dSDavid Howells 		    __entry->call_id = call_id;
7235a42976dSDavid Howells 		    __entry->abort_code = abort_code;
7245a42976dSDavid Howells 		    __entry->error = error;
7255a42976dSDavid Howells 		    __entry->seq = seq;
7265a42976dSDavid Howells 			   ),
7275a42976dSDavid Howells 
728a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
729a25e21f0SDavid Howells 		      __entry->call_nr,
7305a42976dSDavid Howells 		      __entry->cid, __entry->call_id, __entry->seq,
7315a42976dSDavid Howells 		      __entry->abort_code, __entry->error, __entry->why)
7325a42976dSDavid Howells 	    );
7335a42976dSDavid Howells 
7341bae5d22SDavid Howells TRACE_EVENT(rxrpc_call_complete,
7351bae5d22SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
7361bae5d22SDavid Howells 
7371bae5d22SDavid Howells 	    TP_ARGS(call),
7381bae5d22SDavid Howells 
7391bae5d22SDavid Howells 	    TP_STRUCT__entry(
7401bae5d22SDavid Howells 		    __field(unsigned int,		call		)
7411bae5d22SDavid Howells 		    __field(enum rxrpc_call_completion,	compl		)
7421bae5d22SDavid Howells 		    __field(int,			error		)
7431bae5d22SDavid Howells 		    __field(u32,			abort_code	)
7441bae5d22SDavid Howells 			     ),
7451bae5d22SDavid Howells 
7461bae5d22SDavid Howells 	    TP_fast_assign(
7471bae5d22SDavid Howells 		    __entry->call = call->debug_id;
7481bae5d22SDavid Howells 		    __entry->compl = call->completion;
7491bae5d22SDavid Howells 		    __entry->error = call->error;
7501bae5d22SDavid Howells 		    __entry->abort_code = call->abort_code;
7511bae5d22SDavid Howells 			   ),
7521bae5d22SDavid Howells 
7531bae5d22SDavid Howells 	    TP_printk("c=%08x %s r=%d ac=%d",
7541bae5d22SDavid Howells 		      __entry->call,
7551bae5d22SDavid Howells 		      __print_symbolic(__entry->compl, rxrpc_completions),
7561bae5d22SDavid Howells 		      __entry->error,
7571bae5d22SDavid Howells 		      __entry->abort_code)
7581bae5d22SDavid Howells 	    );
7591bae5d22SDavid Howells 
760a124fe3eSDavid Howells TRACE_EVENT(rxrpc_transmit,
761a124fe3eSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
762a124fe3eSDavid Howells 
763a124fe3eSDavid Howells 	    TP_ARGS(call, why),
764a124fe3eSDavid Howells 
765a124fe3eSDavid Howells 	    TP_STRUCT__entry(
766a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
767a124fe3eSDavid Howells 		    __field(enum rxrpc_transmit_trace,	why		)
768a124fe3eSDavid Howells 		    __field(rxrpc_seq_t,		tx_hard_ack	)
769a124fe3eSDavid Howells 		    __field(rxrpc_seq_t,		tx_top		)
770b1d9f7fdSDavid Howells 		    __field(int,			tx_winsize	)
771a124fe3eSDavid Howells 			     ),
772a124fe3eSDavid Howells 
773a124fe3eSDavid Howells 	    TP_fast_assign(
774a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
775a124fe3eSDavid Howells 		    __entry->why = why;
776a124fe3eSDavid Howells 		    __entry->tx_hard_ack = call->tx_hard_ack;
777a124fe3eSDavid Howells 		    __entry->tx_top = call->tx_top;
778b1d9f7fdSDavid Howells 		    __entry->tx_winsize = call->tx_winsize;
779a124fe3eSDavid Howells 			   ),
780a124fe3eSDavid Howells 
781a25e21f0SDavid Howells 	    TP_printk("c=%08x %s f=%08x n=%u/%u",
782a124fe3eSDavid Howells 		      __entry->call,
783b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_transmit_traces),
784a124fe3eSDavid Howells 		      __entry->tx_hard_ack + 1,
785b1d9f7fdSDavid Howells 		      __entry->tx_top - __entry->tx_hard_ack,
786b1d9f7fdSDavid Howells 		      __entry->tx_winsize)
787a124fe3eSDavid Howells 	    );
788a124fe3eSDavid Howells 
789b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_data,
7904764c0daSDavid Howells 	    TP_PROTO(unsigned int call, rxrpc_seq_t seq,
791b1d9f7fdSDavid Howells 		     rxrpc_serial_t serial, u8 flags, u8 anno),
792ec71eb9aSDavid Howells 
793b1d9f7fdSDavid Howells 	    TP_ARGS(call, seq, serial, flags, anno),
794ec71eb9aSDavid Howells 
795ec71eb9aSDavid Howells 	    TP_STRUCT__entry(
796a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
797b1d9f7fdSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
798b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
799b1d9f7fdSDavid Howells 		    __field(u8,				flags		)
800b1d9f7fdSDavid Howells 		    __field(u8,				anno		)
801b1d9f7fdSDavid Howells 			     ),
802b1d9f7fdSDavid Howells 
803b1d9f7fdSDavid Howells 	    TP_fast_assign(
8044764c0daSDavid Howells 		    __entry->call = call;
805b1d9f7fdSDavid Howells 		    __entry->seq = seq;
806b1d9f7fdSDavid Howells 		    __entry->serial = serial;
807b1d9f7fdSDavid Howells 		    __entry->flags = flags;
808b1d9f7fdSDavid Howells 		    __entry->anno = anno;
809b1d9f7fdSDavid Howells 			   ),
810b1d9f7fdSDavid Howells 
811a25e21f0SDavid Howells 	    TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x",
812b1d9f7fdSDavid Howells 		      __entry->call,
813b1d9f7fdSDavid Howells 		      __entry->serial,
814b1d9f7fdSDavid Howells 		      __entry->seq,
815b1d9f7fdSDavid Howells 		      __entry->flags,
816b1d9f7fdSDavid Howells 		      __entry->anno)
817b1d9f7fdSDavid Howells 	    );
818b1d9f7fdSDavid Howells 
819b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_ack,
820b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call,
821b1d9f7fdSDavid Howells 		     rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
822b1d9f7fdSDavid Howells 		     rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
823b1d9f7fdSDavid Howells 
824b1d9f7fdSDavid Howells 	    TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
825b1d9f7fdSDavid Howells 
826b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
827a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
828b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
829b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		ack_serial	)
830ec71eb9aSDavid Howells 		    __field(rxrpc_seq_t,		first		)
831b1d9f7fdSDavid Howells 		    __field(rxrpc_seq_t,		prev		)
832ec71eb9aSDavid Howells 		    __field(u8,				reason		)
833ec71eb9aSDavid Howells 		    __field(u8,				n_acks		)
834ec71eb9aSDavid Howells 			     ),
835ec71eb9aSDavid Howells 
836ec71eb9aSDavid Howells 	    TP_fast_assign(
837a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
838b1d9f7fdSDavid Howells 		    __entry->serial = serial;
839b1d9f7fdSDavid Howells 		    __entry->ack_serial = ack_serial;
840ec71eb9aSDavid Howells 		    __entry->first = first;
841b1d9f7fdSDavid Howells 		    __entry->prev = prev;
842ec71eb9aSDavid Howells 		    __entry->reason = reason;
843ec71eb9aSDavid Howells 		    __entry->n_acks = n_acks;
844ec71eb9aSDavid Howells 			   ),
845ec71eb9aSDavid Howells 
846a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
847ec71eb9aSDavid Howells 		      __entry->call,
848b1d9f7fdSDavid Howells 		      __entry->serial,
849b54a134aSDavid Howells 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
850b1d9f7fdSDavid Howells 		      __entry->ack_serial,
851ec71eb9aSDavid Howells 		      __entry->first,
852b1d9f7fdSDavid Howells 		      __entry->prev,
853ec71eb9aSDavid Howells 		      __entry->n_acks)
854ec71eb9aSDavid Howells 	    );
855ec71eb9aSDavid Howells 
856005ede28SDavid Howells TRACE_EVENT(rxrpc_rx_abort,
857005ede28SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
858005ede28SDavid Howells 		     u32 abort_code),
859005ede28SDavid Howells 
860005ede28SDavid Howells 	    TP_ARGS(call, serial, abort_code),
861005ede28SDavid Howells 
862005ede28SDavid Howells 	    TP_STRUCT__entry(
863a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
864005ede28SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
865005ede28SDavid Howells 		    __field(u32,			abort_code	)
866005ede28SDavid Howells 			     ),
867005ede28SDavid Howells 
868005ede28SDavid Howells 	    TP_fast_assign(
869a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
870005ede28SDavid Howells 		    __entry->serial = serial;
871005ede28SDavid Howells 		    __entry->abort_code = abort_code;
872005ede28SDavid Howells 			   ),
873005ede28SDavid Howells 
874a25e21f0SDavid Howells 	    TP_printk("c=%08x ABORT %08x ac=%d",
875005ede28SDavid Howells 		      __entry->call,
876005ede28SDavid Howells 		      __entry->serial,
877005ede28SDavid Howells 		      __entry->abort_code)
878005ede28SDavid Howells 	    );
879005ede28SDavid Howells 
880740586d2SDavid Howells TRACE_EVENT(rxrpc_rx_rwind_change,
881740586d2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
882740586d2SDavid Howells 		     u32 rwind, bool wake),
883740586d2SDavid Howells 
884740586d2SDavid Howells 	    TP_ARGS(call, serial, rwind, wake),
885740586d2SDavid Howells 
886740586d2SDavid Howells 	    TP_STRUCT__entry(
887a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
888740586d2SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
889740586d2SDavid Howells 		    __field(u32,			rwind		)
890740586d2SDavid Howells 		    __field(bool,			wake		)
891740586d2SDavid Howells 			     ),
892740586d2SDavid Howells 
893740586d2SDavid Howells 	    TP_fast_assign(
894a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
895740586d2SDavid Howells 		    __entry->serial = serial;
896740586d2SDavid Howells 		    __entry->rwind = rwind;
897740586d2SDavid Howells 		    __entry->wake = wake;
898740586d2SDavid Howells 			   ),
899740586d2SDavid Howells 
900a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x rw=%u%s",
901740586d2SDavid Howells 		      __entry->call,
902740586d2SDavid Howells 		      __entry->serial,
903740586d2SDavid Howells 		      __entry->rwind,
904740586d2SDavid Howells 		      __entry->wake ? " wake" : "")
905740586d2SDavid Howells 	    );
906740586d2SDavid Howells 
9074764c0daSDavid Howells TRACE_EVENT(rxrpc_tx_packet,
9084764c0daSDavid Howells 	    TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
9094764c0daSDavid Howells 		     enum rxrpc_tx_point where),
9104764c0daSDavid Howells 
9114764c0daSDavid Howells 	    TP_ARGS(call_id, whdr, where),
9124764c0daSDavid Howells 
9134764c0daSDavid Howells 	    TP_STRUCT__entry(
9144764c0daSDavid Howells 		    __field(unsigned int,			call	)
9154764c0daSDavid Howells 		    __field(enum rxrpc_tx_point,		where	)
9164764c0daSDavid Howells 		    __field_struct(struct rxrpc_wire_header,	whdr	)
9174764c0daSDavid Howells 			     ),
9184764c0daSDavid Howells 
9194764c0daSDavid Howells 	    TP_fast_assign(
9204764c0daSDavid Howells 		    __entry->call = call_id;
9214764c0daSDavid Howells 		    memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
9224e2abd3cSDavid Howells 		    __entry->where = where;
9234764c0daSDavid Howells 			   ),
9244764c0daSDavid Howells 
9254764c0daSDavid Howells 	    TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
9264764c0daSDavid Howells 		      __entry->call,
9274764c0daSDavid Howells 		      ntohl(__entry->whdr.epoch),
9284764c0daSDavid Howells 		      ntohl(__entry->whdr.cid),
9294764c0daSDavid Howells 		      ntohl(__entry->whdr.callNumber),
9304764c0daSDavid Howells 		      ntohs(__entry->whdr.serviceId),
9314764c0daSDavid Howells 		      ntohl(__entry->whdr.serial),
9324764c0daSDavid Howells 		      ntohl(__entry->whdr.seq),
9334764c0daSDavid Howells 		      __entry->whdr.type, __entry->whdr.flags,
9344764c0daSDavid Howells 		      __entry->whdr.type <= 15 ?
9354764c0daSDavid Howells 		      __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
9364764c0daSDavid Howells 		      __print_symbolic(__entry->where, rxrpc_tx_points))
9374764c0daSDavid Howells 	    );
9384764c0daSDavid Howells 
939be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_data,
940be832aecSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
941a1767077SDavid Howells 		     rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
942f3639df2SDavid Howells 
943a1767077SDavid Howells 	    TP_ARGS(call, seq, serial, flags, retrans, lose),
944f3639df2SDavid Howells 
945f3639df2SDavid Howells 	    TP_STRUCT__entry(
946a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
947be832aecSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
948f3639df2SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
9494764c0daSDavid Howells 		    __field(u32,			cid		)
9504764c0daSDavid Howells 		    __field(u32,			call_id		)
951be832aecSDavid Howells 		    __field(u8,				flags		)
952a1767077SDavid Howells 		    __field(bool,			retrans		)
953be832aecSDavid Howells 		    __field(bool,			lose		)
954be832aecSDavid Howells 			     ),
955be832aecSDavid Howells 
956be832aecSDavid Howells 	    TP_fast_assign(
957a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
9584764c0daSDavid Howells 		    __entry->cid = call->cid;
9594764c0daSDavid Howells 		    __entry->call_id = call->call_id;
960be832aecSDavid Howells 		    __entry->seq = seq;
961be832aecSDavid Howells 		    __entry->serial = serial;
962be832aecSDavid Howells 		    __entry->flags = flags;
963a1767077SDavid Howells 		    __entry->retrans = retrans;
964be832aecSDavid Howells 		    __entry->lose = lose;
965be832aecSDavid Howells 			   ),
966be832aecSDavid Howells 
9674764c0daSDavid Howells 	    TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
968be832aecSDavid Howells 		      __entry->call,
9694764c0daSDavid Howells 		      __entry->cid,
9704764c0daSDavid Howells 		      __entry->call_id,
971be832aecSDavid Howells 		      __entry->serial,
972be832aecSDavid Howells 		      __entry->seq,
973be832aecSDavid Howells 		      __entry->flags,
974265a44bbSDavid Howells 		      __entry->retrans ? " *RETRANS*" : "",
975be832aecSDavid Howells 		      __entry->lose ? " *LOSE*" : "")
976be832aecSDavid Howells 	    );
977be832aecSDavid Howells 
978be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_ack,
9794764c0daSDavid Howells 	    TP_PROTO(unsigned int call, rxrpc_serial_t serial,
980be832aecSDavid Howells 		     rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
981be832aecSDavid Howells 		     u8 reason, u8 n_acks),
982be832aecSDavid Howells 
983be832aecSDavid Howells 	    TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
984be832aecSDavid Howells 
985be832aecSDavid Howells 	    TP_STRUCT__entry(
986a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
987be832aecSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
988be832aecSDavid Howells 		    __field(rxrpc_seq_t,		ack_first	)
989be832aecSDavid Howells 		    __field(rxrpc_serial_t,		ack_serial	)
990f3639df2SDavid Howells 		    __field(u8,				reason		)
991f3639df2SDavid Howells 		    __field(u8,				n_acks		)
992f3639df2SDavid Howells 			     ),
993f3639df2SDavid Howells 
994f3639df2SDavid Howells 	    TP_fast_assign(
9954764c0daSDavid Howells 		    __entry->call = call;
996f3639df2SDavid Howells 		    __entry->serial = serial;
997be832aecSDavid Howells 		    __entry->ack_first = ack_first;
998be832aecSDavid Howells 		    __entry->ack_serial = ack_serial;
999f3639df2SDavid Howells 		    __entry->reason = reason;
1000f3639df2SDavid Howells 		    __entry->n_acks = n_acks;
1001f3639df2SDavid Howells 			   ),
1002f3639df2SDavid Howells 
1003a25e21f0SDavid Howells 	    TP_printk(" c=%08x ACK  %08x %s f=%08x r=%08x n=%u",
1004f3639df2SDavid Howells 		      __entry->call,
1005f3639df2SDavid Howells 		      __entry->serial,
1006b54a134aSDavid Howells 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
1007be832aecSDavid Howells 		      __entry->ack_first,
1008be832aecSDavid Howells 		      __entry->ack_serial,
1009f3639df2SDavid Howells 		      __entry->n_acks)
1010f3639df2SDavid Howells 	    );
1011f3639df2SDavid Howells 
101258dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive,
101358dc63c9SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
101458dc63c9SDavid Howells 		     rxrpc_serial_t serial, rxrpc_seq_t seq),
101558dc63c9SDavid Howells 
101658dc63c9SDavid Howells 	    TP_ARGS(call, why, serial, seq),
101758dc63c9SDavid Howells 
101858dc63c9SDavid Howells 	    TP_STRUCT__entry(
1019a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
102058dc63c9SDavid Howells 		    __field(enum rxrpc_receive_trace,	why		)
102158dc63c9SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
102258dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
102358dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		hard_ack	)
102458dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		top		)
102558dc63c9SDavid Howells 			     ),
102658dc63c9SDavid Howells 
102758dc63c9SDavid Howells 	    TP_fast_assign(
1028a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
102958dc63c9SDavid Howells 		    __entry->why = why;
103058dc63c9SDavid Howells 		    __entry->serial = serial;
103158dc63c9SDavid Howells 		    __entry->seq = seq;
103258dc63c9SDavid Howells 		    __entry->hard_ack = call->rx_hard_ack;
103358dc63c9SDavid Howells 		    __entry->top = call->rx_top;
103458dc63c9SDavid Howells 			   ),
103558dc63c9SDavid Howells 
1036a25e21f0SDavid Howells 	    TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
103758dc63c9SDavid Howells 		      __entry->call,
1038b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_receive_traces),
103958dc63c9SDavid Howells 		      __entry->serial,
104058dc63c9SDavid Howells 		      __entry->seq,
104158dc63c9SDavid Howells 		      __entry->hard_ack,
104258dc63c9SDavid Howells 		      __entry->top)
104358dc63c9SDavid Howells 	    );
104458dc63c9SDavid Howells 
104584997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg,
104684997905SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
104784997905SDavid Howells 		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
104884997905SDavid Howells 		     int ret),
104984997905SDavid Howells 
105084997905SDavid Howells 	    TP_ARGS(call, why, seq, offset, len, ret),
105184997905SDavid Howells 
105284997905SDavid Howells 	    TP_STRUCT__entry(
1053a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
105484997905SDavid Howells 		    __field(enum rxrpc_recvmsg_trace,	why		)
105584997905SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
105684997905SDavid Howells 		    __field(unsigned int,		offset		)
105784997905SDavid Howells 		    __field(unsigned int,		len		)
105884997905SDavid Howells 		    __field(int,			ret		)
105984997905SDavid Howells 			     ),
106084997905SDavid Howells 
106184997905SDavid Howells 	    TP_fast_assign(
1062db9b2e0aSDavid Howells 		    __entry->call = call ? call->debug_id : 0;
106384997905SDavid Howells 		    __entry->why = why;
106484997905SDavid Howells 		    __entry->seq = seq;
106584997905SDavid Howells 		    __entry->offset = offset;
106684997905SDavid Howells 		    __entry->len = len;
106784997905SDavid Howells 		    __entry->ret = ret;
106884997905SDavid Howells 			   ),
106984997905SDavid Howells 
1070a25e21f0SDavid Howells 	    TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
107184997905SDavid Howells 		      __entry->call,
1072b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
107384997905SDavid Howells 		      __entry->seq,
107484997905SDavid Howells 		      __entry->offset,
107584997905SDavid Howells 		      __entry->len,
107684997905SDavid Howells 		      __entry->ret)
107784997905SDavid Howells 	    );
107884997905SDavid Howells 
1079cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx,
1080cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
10814700c4d8SDavid Howells 		     int slot, rxrpc_serial_t send_serial),
1082cf1a6474SDavid Howells 
10834700c4d8SDavid Howells 	    TP_ARGS(call, why, slot, send_serial),
1084cf1a6474SDavid Howells 
1085cf1a6474SDavid Howells 	    TP_STRUCT__entry(
1086a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1087cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_tx_trace,	why		)
10884700c4d8SDavid Howells 		    __field(int,			slot		)
1089cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
1090cf1a6474SDavid Howells 			     ),
1091cf1a6474SDavid Howells 
1092cf1a6474SDavid Howells 	    TP_fast_assign(
1093a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1094cf1a6474SDavid Howells 		    __entry->why = why;
10954700c4d8SDavid Howells 		    __entry->slot = slot;
1096cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
1097cf1a6474SDavid Howells 			   ),
1098cf1a6474SDavid Howells 
10994700c4d8SDavid Howells 	    TP_printk("c=%08x [%d] %s sr=%08x",
1100cf1a6474SDavid Howells 		      __entry->call,
11014700c4d8SDavid Howells 		      __entry->slot,
1102b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1103cf1a6474SDavid Howells 		      __entry->send_serial)
1104cf1a6474SDavid Howells 	    );
1105cf1a6474SDavid Howells 
1106cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx,
1107cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
11084700c4d8SDavid Howells 		     int slot,
1109cf1a6474SDavid Howells 		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1110c410bf01SDavid Howells 		     u32 rtt, u32 rto),
1111cf1a6474SDavid Howells 
11124700c4d8SDavid Howells 	    TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1113cf1a6474SDavid Howells 
1114cf1a6474SDavid Howells 	    TP_STRUCT__entry(
1115a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1116cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_rx_trace,	why		)
11174700c4d8SDavid Howells 		    __field(int,			slot		)
1118cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
1119cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		resp_serial	)
1120c410bf01SDavid Howells 		    __field(u32,			rtt		)
1121c410bf01SDavid Howells 		    __field(u32,			rto		)
1122cf1a6474SDavid Howells 			     ),
1123cf1a6474SDavid Howells 
1124cf1a6474SDavid Howells 	    TP_fast_assign(
1125a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1126cf1a6474SDavid Howells 		    __entry->why = why;
11274700c4d8SDavid Howells 		    __entry->slot = slot;
1128cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
1129cf1a6474SDavid Howells 		    __entry->resp_serial = resp_serial;
1130cf1a6474SDavid Howells 		    __entry->rtt = rtt;
1131c410bf01SDavid Howells 		    __entry->rto = rto;
1132cf1a6474SDavid Howells 			   ),
1133cf1a6474SDavid Howells 
11344700c4d8SDavid Howells 	    TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1135cf1a6474SDavid Howells 		      __entry->call,
11364700c4d8SDavid Howells 		      __entry->slot,
1137b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1138cf1a6474SDavid Howells 		      __entry->send_serial,
1139cf1a6474SDavid Howells 		      __entry->resp_serial,
1140cf1a6474SDavid Howells 		      __entry->rtt,
1141c410bf01SDavid Howells 		      __entry->rto)
1142cf1a6474SDavid Howells 	    );
1143cf1a6474SDavid Howells 
1144fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer,
1145fc7ab6d2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1146a158bdd3SDavid Howells 		     unsigned long now),
1147fc7ab6d2SDavid Howells 
1148a158bdd3SDavid Howells 	    TP_ARGS(call, why, now),
1149fc7ab6d2SDavid Howells 
1150fc7ab6d2SDavid Howells 	    TP_STRUCT__entry(
1151a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
1152fc7ab6d2SDavid Howells 		    __field(enum rxrpc_timer_trace,		why		)
1153a158bdd3SDavid Howells 		    __field(long,				now		)
1154a158bdd3SDavid Howells 		    __field(long,				ack_at		)
1155bd1fdf8cSDavid Howells 		    __field(long,				ack_lost_at	)
1156a158bdd3SDavid Howells 		    __field(long,				resend_at	)
1157a158bdd3SDavid Howells 		    __field(long,				ping_at		)
1158a158bdd3SDavid Howells 		    __field(long,				expect_rx_by	)
1159a158bdd3SDavid Howells 		    __field(long,				expect_req_by	)
1160a158bdd3SDavid Howells 		    __field(long,				expect_term_by	)
1161a158bdd3SDavid Howells 		    __field(long,				timer		)
1162fc7ab6d2SDavid Howells 			     ),
1163fc7ab6d2SDavid Howells 
1164fc7ab6d2SDavid Howells 	    TP_fast_assign(
1165a25e21f0SDavid Howells 		    __entry->call		= call->debug_id;
1166fc7ab6d2SDavid Howells 		    __entry->why		= why;
1167fc7ab6d2SDavid Howells 		    __entry->now		= now;
1168fc7ab6d2SDavid Howells 		    __entry->ack_at		= call->ack_at;
1169bd1fdf8cSDavid Howells 		    __entry->ack_lost_at	= call->ack_lost_at;
1170fc7ab6d2SDavid Howells 		    __entry->resend_at		= call->resend_at;
1171a158bdd3SDavid Howells 		    __entry->expect_rx_by	= call->expect_rx_by;
1172a158bdd3SDavid Howells 		    __entry->expect_req_by	= call->expect_req_by;
1173a158bdd3SDavid Howells 		    __entry->expect_term_by	= call->expect_term_by;
1174fc7ab6d2SDavid Howells 		    __entry->timer		= call->timer.expires;
1175fc7ab6d2SDavid Howells 			   ),
1176fc7ab6d2SDavid Howells 
1177a25e21f0SDavid Howells 	    TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1178fc7ab6d2SDavid Howells 		      __entry->call,
1179b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_timer_traces),
1180a158bdd3SDavid Howells 		      __entry->ack_at - __entry->now,
1181bd1fdf8cSDavid Howells 		      __entry->ack_lost_at - __entry->now,
1182a158bdd3SDavid Howells 		      __entry->resend_at - __entry->now,
1183a158bdd3SDavid Howells 		      __entry->expect_rx_by - __entry->now,
1184a158bdd3SDavid Howells 		      __entry->expect_req_by - __entry->now,
1185a158bdd3SDavid Howells 		      __entry->expect_term_by - __entry->now,
1186a158bdd3SDavid Howells 		      __entry->timer - __entry->now)
1187fc7ab6d2SDavid Howells 	    );
1188fc7ab6d2SDavid Howells 
118989b475abSDavid Howells TRACE_EVENT(rxrpc_rx_lose,
119089b475abSDavid Howells 	    TP_PROTO(struct rxrpc_skb_priv *sp),
119189b475abSDavid Howells 
119289b475abSDavid Howells 	    TP_ARGS(sp),
119389b475abSDavid Howells 
119489b475abSDavid Howells 	    TP_STRUCT__entry(
119589b475abSDavid Howells 		    __field_struct(struct rxrpc_host_header,	hdr		)
119689b475abSDavid Howells 			     ),
119789b475abSDavid Howells 
119889b475abSDavid Howells 	    TP_fast_assign(
119989b475abSDavid Howells 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
120089b475abSDavid Howells 			   ),
120189b475abSDavid Howells 
120289b475abSDavid Howells 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
120389b475abSDavid Howells 		      __entry->hdr.epoch, __entry->hdr.cid,
120489b475abSDavid Howells 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
120589b475abSDavid Howells 		      __entry->hdr.serial, __entry->hdr.seq,
120689b475abSDavid Howells 		      __entry->hdr.type, __entry->hdr.flags,
1207b54a134aSDavid Howells 		      __entry->hdr.type <= 15 ?
1208b54a134aSDavid Howells 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
120989b475abSDavid Howells 	    );
121089b475abSDavid Howells 
12119c7ad434SDavid Howells TRACE_EVENT(rxrpc_propose_ack,
12129c7ad434SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
12139c7ad434SDavid Howells 		     u8 ack_reason, rxrpc_serial_t serial, bool immediate,
12149c7ad434SDavid Howells 		     bool background, enum rxrpc_propose_ack_outcome outcome),
12159c7ad434SDavid Howells 
12169c7ad434SDavid Howells 	    TP_ARGS(call, why, ack_reason, serial, immediate, background,
12179c7ad434SDavid Howells 		    outcome),
12189c7ad434SDavid Howells 
12199c7ad434SDavid Howells 	    TP_STRUCT__entry(
1220a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
12219c7ad434SDavid Howells 		    __field(enum rxrpc_propose_ack_trace,	why		)
12229c7ad434SDavid Howells 		    __field(rxrpc_serial_t,			serial		)
12239c7ad434SDavid Howells 		    __field(u8,					ack_reason	)
12249c7ad434SDavid Howells 		    __field(bool,				immediate	)
12259c7ad434SDavid Howells 		    __field(bool,				background	)
12269c7ad434SDavid Howells 		    __field(enum rxrpc_propose_ack_outcome,	outcome		)
12279c7ad434SDavid Howells 			     ),
12289c7ad434SDavid Howells 
12299c7ad434SDavid Howells 	    TP_fast_assign(
1230a25e21f0SDavid Howells 		    __entry->call	= call->debug_id;
12319c7ad434SDavid Howells 		    __entry->why	= why;
12329c7ad434SDavid Howells 		    __entry->serial	= serial;
12339c7ad434SDavid Howells 		    __entry->ack_reason	= ack_reason;
12349c7ad434SDavid Howells 		    __entry->immediate	= immediate;
12359c7ad434SDavid Howells 		    __entry->background	= background;
12369c7ad434SDavid Howells 		    __entry->outcome	= outcome;
12379c7ad434SDavid Howells 			   ),
12389c7ad434SDavid Howells 
1239a25e21f0SDavid Howells 	    TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s",
12409c7ad434SDavid Howells 		      __entry->call,
1241b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1242b54a134aSDavid Howells 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
12439c7ad434SDavid Howells 		      __entry->serial,
12449c7ad434SDavid Howells 		      __entry->immediate,
12459c7ad434SDavid Howells 		      __entry->background,
1246b54a134aSDavid Howells 		      __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes))
12479c7ad434SDavid Howells 	    );
12489c7ad434SDavid Howells 
1249c6672e3fSDavid Howells TRACE_EVENT(rxrpc_retransmit,
1250c6672e3fSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation,
1251c6672e3fSDavid Howells 		     s64 expiry),
1252c6672e3fSDavid Howells 
1253c6672e3fSDavid Howells 	    TP_ARGS(call, seq, annotation, expiry),
1254c6672e3fSDavid Howells 
1255c6672e3fSDavid Howells 	    TP_STRUCT__entry(
1256a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1257c6672e3fSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
1258c6672e3fSDavid Howells 		    __field(u8,				annotation	)
1259c6672e3fSDavid Howells 		    __field(s64,			expiry		)
1260c6672e3fSDavid Howells 			     ),
1261c6672e3fSDavid Howells 
1262c6672e3fSDavid Howells 	    TP_fast_assign(
1263a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1264c6672e3fSDavid Howells 		    __entry->seq = seq;
1265c6672e3fSDavid Howells 		    __entry->annotation = annotation;
1266c6672e3fSDavid Howells 		    __entry->expiry = expiry;
1267c6672e3fSDavid Howells 			   ),
1268c6672e3fSDavid Howells 
1269a25e21f0SDavid Howells 	    TP_printk("c=%08x q=%x a=%02x xp=%lld",
1270c6672e3fSDavid Howells 		      __entry->call,
1271c6672e3fSDavid Howells 		      __entry->seq,
1272c6672e3fSDavid Howells 		      __entry->annotation,
1273c6672e3fSDavid Howells 		      __entry->expiry)
1274c6672e3fSDavid Howells 	    );
1275c6672e3fSDavid Howells 
127657494343SDavid Howells TRACE_EVENT(rxrpc_congest,
127757494343SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
127857494343SDavid Howells 		     rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
127957494343SDavid Howells 
128057494343SDavid Howells 	    TP_ARGS(call, summary, ack_serial, change),
128157494343SDavid Howells 
128257494343SDavid Howells 	    TP_STRUCT__entry(
1283a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
128457494343SDavid Howells 		    __field(enum rxrpc_congest_change,		change		)
128557494343SDavid Howells 		    __field(rxrpc_seq_t,			hard_ack	)
128657494343SDavid Howells 		    __field(rxrpc_seq_t,			top		)
128757494343SDavid Howells 		    __field(rxrpc_seq_t,			lowest_nak	)
128857494343SDavid Howells 		    __field(rxrpc_serial_t,			ack_serial	)
128957494343SDavid Howells 		    __field_struct(struct rxrpc_ack_summary,	sum		)
129057494343SDavid Howells 			     ),
129157494343SDavid Howells 
129257494343SDavid Howells 	    TP_fast_assign(
1293a25e21f0SDavid Howells 		    __entry->call	= call->debug_id;
129457494343SDavid Howells 		    __entry->change	= change;
129557494343SDavid Howells 		    __entry->hard_ack	= call->tx_hard_ack;
129657494343SDavid Howells 		    __entry->top	= call->tx_top;
129757494343SDavid Howells 		    __entry->lowest_nak	= call->acks_lowest_nak;
129857494343SDavid Howells 		    __entry->ack_serial	= ack_serial;
129957494343SDavid Howells 		    memcpy(&__entry->sum, summary, sizeof(__entry->sum));
130057494343SDavid Howells 			   ),
130157494343SDavid Howells 
1302a25e21f0SDavid Howells 	    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",
130357494343SDavid Howells 		      __entry->call,
130457494343SDavid Howells 		      __entry->ack_serial,
1305b54a134aSDavid Howells 		      __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
130657494343SDavid Howells 		      __entry->hard_ack,
1307b54a134aSDavid Howells 		      __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
130857494343SDavid Howells 		      __entry->sum.cwnd,
130957494343SDavid Howells 		      __entry->sum.ssthresh,
131057494343SDavid Howells 		      __entry->sum.nr_acks, __entry->sum.nr_nacks,
131157494343SDavid Howells 		      __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks,
131257494343SDavid Howells 		      __entry->sum.nr_rot_new_acks,
131357494343SDavid Howells 		      __entry->top - __entry->hard_ack,
131457494343SDavid Howells 		      __entry->sum.cumulative_acks,
131557494343SDavid Howells 		      __entry->sum.dup_acks,
131657494343SDavid Howells 		      __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1317b54a134aSDavid Howells 		      __print_symbolic(__entry->change, rxrpc_congest_changes),
131857494343SDavid Howells 		      __entry->sum.retrans_timeo ? " rTxTo" : "")
131957494343SDavid Howells 	    );
132057494343SDavid Howells 
1321b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_disconnect_call,
1322b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
1323b1d9f7fdSDavid Howells 
1324b1d9f7fdSDavid Howells 	    TP_ARGS(call),
1325b1d9f7fdSDavid Howells 
1326b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
1327a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1328b1d9f7fdSDavid Howells 		    __field(u32,			abort_code	)
1329b1d9f7fdSDavid Howells 			     ),
1330b1d9f7fdSDavid Howells 
1331b1d9f7fdSDavid Howells 	    TP_fast_assign(
1332a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1333b1d9f7fdSDavid Howells 		    __entry->abort_code = call->abort_code;
1334b1d9f7fdSDavid Howells 			   ),
1335b1d9f7fdSDavid Howells 
1336a25e21f0SDavid Howells 	    TP_printk("c=%08x ab=%08x",
1337b1d9f7fdSDavid Howells 		      __entry->call,
1338b1d9f7fdSDavid Howells 		      __entry->abort_code)
1339b1d9f7fdSDavid Howells 	    );
1340b1d9f7fdSDavid Howells 
1341b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_improper_term,
1342b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
1343b1d9f7fdSDavid Howells 
1344b1d9f7fdSDavid Howells 	    TP_ARGS(call),
1345b1d9f7fdSDavid Howells 
1346b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
1347a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1348b1d9f7fdSDavid Howells 		    __field(u32,			abort_code	)
1349b1d9f7fdSDavid Howells 			     ),
1350b1d9f7fdSDavid Howells 
1351b1d9f7fdSDavid Howells 	    TP_fast_assign(
1352a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1353b1d9f7fdSDavid Howells 		    __entry->abort_code = call->abort_code;
1354b1d9f7fdSDavid Howells 			   ),
1355b1d9f7fdSDavid Howells 
1356a25e21f0SDavid Howells 	    TP_printk("c=%08x ab=%08x",
1357b1d9f7fdSDavid Howells 		      __entry->call,
1358b1d9f7fdSDavid Howells 		      __entry->abort_code)
1359b1d9f7fdSDavid Howells 	    );
1360b1d9f7fdSDavid Howells 
1361fb46f6eeSDavid Howells TRACE_EVENT(rxrpc_rx_eproto,
1362fb46f6eeSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1363fb46f6eeSDavid Howells 		     const char *why),
1364fb46f6eeSDavid Howells 
1365fb46f6eeSDavid Howells 	    TP_ARGS(call, serial, why),
1366fb46f6eeSDavid Howells 
1367fb46f6eeSDavid Howells 	    TP_STRUCT__entry(
1368a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1369fb46f6eeSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
1370fb46f6eeSDavid Howells 		    __field(const char *,		why		)
1371fb46f6eeSDavid Howells 			     ),
1372fb46f6eeSDavid Howells 
1373fb46f6eeSDavid Howells 	    TP_fast_assign(
137499f0eae6SDavid Howells 		    __entry->call = call ? call->debug_id : 0;
1375fb46f6eeSDavid Howells 		    __entry->serial = serial;
1376fb46f6eeSDavid Howells 		    __entry->why = why;
1377fb46f6eeSDavid Howells 			   ),
1378fb46f6eeSDavid Howells 
1379a25e21f0SDavid Howells 	    TP_printk("c=%08x EPROTO %08x %s",
1380fb46f6eeSDavid Howells 		      __entry->call,
1381fb46f6eeSDavid Howells 		      __entry->serial,
1382fb46f6eeSDavid Howells 		      __entry->why)
1383fb46f6eeSDavid Howells 	    );
1384fb46f6eeSDavid Howells 
138589ca6948SDavid Howells TRACE_EVENT(rxrpc_connect_call,
138689ca6948SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
138789ca6948SDavid Howells 
138889ca6948SDavid Howells 	    TP_ARGS(call),
138989ca6948SDavid Howells 
139089ca6948SDavid Howells 	    TP_STRUCT__entry(
1391a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
139289ca6948SDavid Howells 		    __field(unsigned long,		user_call_ID	)
139389ca6948SDavid Howells 		    __field(u32,			cid		)
139489ca6948SDavid Howells 		    __field(u32,			call_id		)
139589ca6948SDavid Howells 			     ),
139689ca6948SDavid Howells 
139789ca6948SDavid Howells 	    TP_fast_assign(
1398a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
139989ca6948SDavid Howells 		    __entry->user_call_ID = call->user_call_ID;
140089ca6948SDavid Howells 		    __entry->cid = call->cid;
140189ca6948SDavid Howells 		    __entry->call_id = call->call_id;
140289ca6948SDavid Howells 			   ),
140389ca6948SDavid Howells 
1404a25e21f0SDavid Howells 	    TP_printk("c=%08x u=%p %08x:%08x",
140589ca6948SDavid Howells 		      __entry->call,
140689ca6948SDavid Howells 		      (void *)__entry->user_call_ID,
140789ca6948SDavid Howells 		      __entry->cid,
140889ca6948SDavid Howells 		      __entry->call_id)
140989ca6948SDavid Howells 	    );
141089ca6948SDavid Howells 
1411827efed6SDavid Howells TRACE_EVENT(rxrpc_resend,
1412827efed6SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, int ix),
1413827efed6SDavid Howells 
1414827efed6SDavid Howells 	    TP_ARGS(call, ix),
1415827efed6SDavid Howells 
1416827efed6SDavid Howells 	    TP_STRUCT__entry(
1417a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1418827efed6SDavid Howells 		    __field(int,			ix		)
1419827efed6SDavid Howells 		    __array(u8,				anno, 64	)
1420827efed6SDavid Howells 			     ),
1421827efed6SDavid Howells 
1422827efed6SDavid Howells 	    TP_fast_assign(
1423a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1424827efed6SDavid Howells 		    __entry->ix = ix;
1425827efed6SDavid Howells 		    memcpy(__entry->anno, call->rxtx_annotations, 64);
1426827efed6SDavid Howells 			   ),
1427827efed6SDavid Howells 
1428a25e21f0SDavid Howells 	    TP_printk("c=%08x ix=%u a=%64phN",
1429827efed6SDavid Howells 		      __entry->call,
1430827efed6SDavid Howells 		      __entry->ix,
1431827efed6SDavid Howells 		      __entry->anno)
1432827efed6SDavid Howells 	    );
1433827efed6SDavid Howells 
1434494337c9SDavid Howells TRACE_EVENT(rxrpc_rx_icmp,
1435494337c9SDavid Howells 	    TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1436494337c9SDavid Howells 		     struct sockaddr_rxrpc *srx),
1437494337c9SDavid Howells 
1438494337c9SDavid Howells 	    TP_ARGS(peer, ee, srx),
1439494337c9SDavid Howells 
1440494337c9SDavid Howells 	    TP_STRUCT__entry(
1441494337c9SDavid Howells 		    __field(unsigned int,			peer	)
1442494337c9SDavid Howells 		    __field_struct(struct sock_extended_err,	ee	)
1443494337c9SDavid Howells 		    __field_struct(struct sockaddr_rxrpc,	srx	)
1444494337c9SDavid Howells 			     ),
1445494337c9SDavid Howells 
1446494337c9SDavid Howells 	    TP_fast_assign(
1447494337c9SDavid Howells 		    __entry->peer = peer->debug_id;
1448494337c9SDavid Howells 		    memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1449494337c9SDavid Howells 		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1450494337c9SDavid Howells 			   ),
1451494337c9SDavid Howells 
1452494337c9SDavid Howells 	    TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1453494337c9SDavid Howells 		      __entry->peer,
1454494337c9SDavid Howells 		      __entry->ee.ee_origin,
1455494337c9SDavid Howells 		      __entry->ee.ee_type,
1456494337c9SDavid Howells 		      __entry->ee.ee_code,
1457494337c9SDavid Howells 		      __entry->ee.ee_info,
1458494337c9SDavid Howells 		      __entry->ee.ee_data,
1459494337c9SDavid Howells 		      __entry->ee.ee_errno,
1460494337c9SDavid Howells 		      &__entry->srx.transport)
1461494337c9SDavid Howells 	    );
1462494337c9SDavid Howells 
14636b47fe1dSDavid Howells TRACE_EVENT(rxrpc_tx_fail,
14646b47fe1dSDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
14654764c0daSDavid Howells 		     enum rxrpc_tx_point where),
14666b47fe1dSDavid Howells 
14674764c0daSDavid Howells 	    TP_ARGS(debug_id, serial, ret, where),
14686b47fe1dSDavid Howells 
14696b47fe1dSDavid Howells 	    TP_STRUCT__entry(
14706b47fe1dSDavid Howells 		    __field(unsigned int,		debug_id	)
14716b47fe1dSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
14726b47fe1dSDavid Howells 		    __field(int,			ret		)
14734764c0daSDavid Howells 		    __field(enum rxrpc_tx_point,	where		)
14746b47fe1dSDavid Howells 			     ),
14756b47fe1dSDavid Howells 
14766b47fe1dSDavid Howells 	    TP_fast_assign(
14776b47fe1dSDavid Howells 		    __entry->debug_id = debug_id;
14786b47fe1dSDavid Howells 		    __entry->serial = serial;
14796b47fe1dSDavid Howells 		    __entry->ret = ret;
14804764c0daSDavid Howells 		    __entry->where = where;
14816b47fe1dSDavid Howells 			   ),
14826b47fe1dSDavid Howells 
14836b47fe1dSDavid Howells 	    TP_printk("c=%08x r=%x ret=%d %s",
14846b47fe1dSDavid Howells 		      __entry->debug_id,
14856b47fe1dSDavid Howells 		      __entry->serial,
14866b47fe1dSDavid Howells 		      __entry->ret,
14874764c0daSDavid Howells 		      __print_symbolic(__entry->where, rxrpc_tx_points))
14886b47fe1dSDavid Howells 	    );
14896b47fe1dSDavid Howells 
14901a025028SDavid Howells TRACE_EVENT(rxrpc_call_reset,
14911a025028SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
14921a025028SDavid Howells 
14931a025028SDavid Howells 	    TP_ARGS(call),
14941a025028SDavid Howells 
14951a025028SDavid Howells 	    TP_STRUCT__entry(
14961a025028SDavid Howells 		    __field(unsigned int,		debug_id	)
14971a025028SDavid Howells 		    __field(u32,			cid		)
14981a025028SDavid Howells 		    __field(u32,			call_id		)
14991a025028SDavid Howells 		    __field(rxrpc_serial_t,		call_serial	)
15001a025028SDavid Howells 		    __field(rxrpc_serial_t,		conn_serial	)
15011a025028SDavid Howells 		    __field(rxrpc_seq_t,		tx_seq		)
15021a025028SDavid Howells 		    __field(rxrpc_seq_t,		rx_seq		)
15031a025028SDavid Howells 			     ),
15041a025028SDavid Howells 
15051a025028SDavid Howells 	    TP_fast_assign(
15061a025028SDavid Howells 		    __entry->debug_id = call->debug_id;
15071a025028SDavid Howells 		    __entry->cid = call->cid;
15081a025028SDavid Howells 		    __entry->call_id = call->call_id;
15091a025028SDavid Howells 		    __entry->call_serial = call->rx_serial;
15101a025028SDavid Howells 		    __entry->conn_serial = call->conn->hi_serial;
15111a025028SDavid Howells 		    __entry->tx_seq = call->tx_hard_ack;
15121a025028SDavid Howells 		    __entry->rx_seq = call->ackr_seen;
15131a025028SDavid Howells 			   ),
15141a025028SDavid Howells 
15151a025028SDavid Howells 	    TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
15161a025028SDavid Howells 		      __entry->debug_id,
15171a025028SDavid Howells 		      __entry->cid, __entry->call_id,
15181a025028SDavid Howells 		      __entry->call_serial, __entry->conn_serial,
15191a025028SDavid Howells 		      __entry->tx_seq, __entry->rx_seq)
15201a025028SDavid Howells 	    );
15211a025028SDavid Howells 
15224272d303SDavid Howells TRACE_EVENT(rxrpc_notify_socket,
15234272d303SDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
15244272d303SDavid Howells 
15254272d303SDavid Howells 	    TP_ARGS(debug_id, serial),
15264272d303SDavid Howells 
15274272d303SDavid Howells 	    TP_STRUCT__entry(
15284272d303SDavid Howells 		    __field(unsigned int,		debug_id	)
15294272d303SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
15304272d303SDavid Howells 			     ),
15314272d303SDavid Howells 
15324272d303SDavid Howells 	    TP_fast_assign(
15334272d303SDavid Howells 		    __entry->debug_id = debug_id;
15344272d303SDavid Howells 		    __entry->serial = serial;
15354272d303SDavid Howells 			   ),
15364272d303SDavid Howells 
15374272d303SDavid Howells 	    TP_printk("c=%08x r=%08x",
15384272d303SDavid Howells 		      __entry->debug_id,
15394272d303SDavid Howells 		      __entry->serial)
15404272d303SDavid Howells 	    );
15414272d303SDavid Howells 
1542d1f12947SDavid Howells TRACE_EVENT(rxrpc_rx_discard_ack,
1543d1f12947SDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1544d1f12947SDavid Howells 		     rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1545d1f12947SDavid Howells 		     rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1546d1f12947SDavid Howells 
1547d1f12947SDavid Howells 	    TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1548d1f12947SDavid Howells 		    prev_pkt, call_ackr_prev),
1549d1f12947SDavid Howells 
1550d1f12947SDavid Howells 	    TP_STRUCT__entry(
1551d1f12947SDavid Howells 		    __field(unsigned int,	debug_id	)
1552d1f12947SDavid Howells 		    __field(rxrpc_serial_t,	serial		)
1553d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	first_soft_ack)
1554d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	call_ackr_first)
1555d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	prev_pkt)
1556d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	call_ackr_prev)
1557d1f12947SDavid Howells 			     ),
1558d1f12947SDavid Howells 
1559d1f12947SDavid Howells 	    TP_fast_assign(
1560d1f12947SDavid Howells 		    __entry->debug_id		= debug_id;
1561d1f12947SDavid Howells 		    __entry->serial		= serial;
1562d1f12947SDavid Howells 		    __entry->first_soft_ack	= first_soft_ack;
1563d1f12947SDavid Howells 		    __entry->call_ackr_first	= call_ackr_first;
1564d1f12947SDavid Howells 		    __entry->prev_pkt		= prev_pkt;
1565d1f12947SDavid Howells 		    __entry->call_ackr_prev	= call_ackr_prev;
1566d1f12947SDavid Howells 			   ),
1567d1f12947SDavid Howells 
1568d1f12947SDavid Howells 	    TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1569d1f12947SDavid Howells 		      __entry->debug_id,
1570d1f12947SDavid Howells 		      __entry->serial,
1571d1f12947SDavid Howells 		      __entry->first_soft_ack,
1572d1f12947SDavid Howells 		      __entry->call_ackr_first,
1573d1f12947SDavid Howells 		      __entry->prev_pkt,
1574d1f12947SDavid Howells 		      __entry->call_ackr_prev)
1575d1f12947SDavid Howells 	    );
1576d1f12947SDavid Howells 
1577df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */
1578df844fd4SDavid Howells 
1579df844fd4SDavid Howells /* This part must be outside protection */
1580df844fd4SDavid Howells #include <trace/define_trace.h>
1581