xref: /openbmc/linux/include/trace/events/rxrpc.h (revision 02a1935640f8f8539b8f2dbd6eeb539de93b2ce4)
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  * Declare tracing information enums and their string mappings for display.
18b54a134aSDavid Howells  */
19b54a134aSDavid Howells #define rxrpc_skb_traces \
20987db9f7SDavid Howells 	EM(rxrpc_skb_cleaned,			"CLN") \
21987db9f7SDavid Howells 	EM(rxrpc_skb_freed,			"FRE") \
22987db9f7SDavid Howells 	EM(rxrpc_skb_got,			"GOT") \
23987db9f7SDavid Howells 	EM(rxrpc_skb_lost,			"*L*") \
24987db9f7SDavid Howells 	EM(rxrpc_skb_new,			"NEW") \
25987db9f7SDavid Howells 	EM(rxrpc_skb_purged,			"PUR") \
26987db9f7SDavid Howells 	EM(rxrpc_skb_received,			"RCV") \
27987db9f7SDavid Howells 	EM(rxrpc_skb_rotated,			"ROT") \
28d0d5c0cdSDavid Howells 	EM(rxrpc_skb_seen,			"SEE") \
29d0d5c0cdSDavid Howells 	EM(rxrpc_skb_unshared,			"UNS") \
30d0d5c0cdSDavid Howells 	E_(rxrpc_skb_unshared_nomem,		"US0")
31b54a134aSDavid Howells 
3209d2bf59SDavid Howells #define rxrpc_local_traces \
3309d2bf59SDavid Howells 	EM(rxrpc_local_got,			"GOT") \
3409d2bf59SDavid Howells 	EM(rxrpc_local_new,			"NEW") \
3509d2bf59SDavid Howells 	EM(rxrpc_local_processing,		"PRO") \
3609d2bf59SDavid Howells 	EM(rxrpc_local_put,			"PUT") \
3709d2bf59SDavid Howells 	E_(rxrpc_local_queued,			"QUE")
3809d2bf59SDavid Howells 
391159d4b4SDavid Howells #define rxrpc_peer_traces \
401159d4b4SDavid Howells 	EM(rxrpc_peer_got,			"GOT") \
411159d4b4SDavid Howells 	EM(rxrpc_peer_new,			"NEW") \
421159d4b4SDavid Howells 	EM(rxrpc_peer_processing,		"PRO") \
43f3344303SDavid Howells 	E_(rxrpc_peer_put,			"PUT")
441159d4b4SDavid Howells 
45b54a134aSDavid Howells #define rxrpc_conn_traces \
46b54a134aSDavid Howells 	EM(rxrpc_conn_got,			"GOT") \
47b54a134aSDavid Howells 	EM(rxrpc_conn_new_client,		"NWc") \
48b54a134aSDavid Howells 	EM(rxrpc_conn_new_service,		"NWs") \
49b54a134aSDavid Howells 	EM(rxrpc_conn_put_client,		"PTc") \
50b54a134aSDavid Howells 	EM(rxrpc_conn_put_service,		"PTs") \
51b54a134aSDavid Howells 	EM(rxrpc_conn_queued,			"QUE") \
52f859ab61SDavid Howells 	EM(rxrpc_conn_reap_service,		"RPs") \
53b54a134aSDavid Howells 	E_(rxrpc_conn_seen,			"SEE")
54b54a134aSDavid Howells 
55b54a134aSDavid Howells #define rxrpc_client_traces \
56b54a134aSDavid Howells 	EM(rxrpc_client_activate_chans,		"Activa") \
57b54a134aSDavid Howells 	EM(rxrpc_client_alloc,			"Alloc ") \
58b54a134aSDavid Howells 	EM(rxrpc_client_chan_activate,		"ChActv") \
59b54a134aSDavid Howells 	EM(rxrpc_client_chan_disconnect,	"ChDisc") \
60b54a134aSDavid Howells 	EM(rxrpc_client_chan_pass,		"ChPass") \
61930c9f91SDavid Howells 	EM(rxrpc_client_chan_wait_failed,	"ChWtFl") \
62b54a134aSDavid Howells 	EM(rxrpc_client_cleanup,		"Clean ") \
63b54a134aSDavid Howells 	EM(rxrpc_client_discard,		"Discar") \
64b54a134aSDavid Howells 	EM(rxrpc_client_duplicate,		"Duplic") \
65b54a134aSDavid Howells 	EM(rxrpc_client_exposed,		"Expose") \
66b54a134aSDavid Howells 	EM(rxrpc_client_replace,		"Replac") \
67b54a134aSDavid Howells 	EM(rxrpc_client_to_active,		"->Actv") \
68245500d8SDavid Howells 	E_(rxrpc_client_to_idle,		"->Idle")
69b54a134aSDavid Howells 
70b54a134aSDavid Howells #define rxrpc_call_traces \
71b54a134aSDavid Howells 	EM(rxrpc_call_connected,		"CON") \
72b54a134aSDavid Howells 	EM(rxrpc_call_error,			"*E*") \
73b54a134aSDavid Howells 	EM(rxrpc_call_got,			"GOT") \
74b54a134aSDavid Howells 	EM(rxrpc_call_got_kernel,		"Gke") \
754a7f62f9SDavid Howells 	EM(rxrpc_call_got_timer,		"GTM") \
76b54a134aSDavid Howells 	EM(rxrpc_call_got_userid,		"Gus") \
77b54a134aSDavid Howells 	EM(rxrpc_call_new_client,		"NWc") \
78b54a134aSDavid Howells 	EM(rxrpc_call_new_service,		"NWs") \
79b54a134aSDavid Howells 	EM(rxrpc_call_put,			"PUT") \
80b54a134aSDavid Howells 	EM(rxrpc_call_put_kernel,		"Pke") \
814a7f62f9SDavid Howells 	EM(rxrpc_call_put_noqueue,		"PnQ") \
824a7f62f9SDavid Howells 	EM(rxrpc_call_put_notimer,		"PnT") \
834a7f62f9SDavid Howells 	EM(rxrpc_call_put_timer,		"PTM") \
84b54a134aSDavid Howells 	EM(rxrpc_call_put_userid,		"Pus") \
85b54a134aSDavid Howells 	EM(rxrpc_call_queued,			"QUE") \
86b54a134aSDavid Howells 	EM(rxrpc_call_queued_ref,		"QUR") \
87b54a134aSDavid Howells 	EM(rxrpc_call_release,			"RLS") \
88b54a134aSDavid Howells 	E_(rxrpc_call_seen,			"SEE")
89b54a134aSDavid Howells 
90b54a134aSDavid Howells #define rxrpc_transmit_traces \
91b54a134aSDavid Howells 	EM(rxrpc_transmit_await_reply,		"AWR") \
92b54a134aSDavid Howells 	EM(rxrpc_transmit_end,			"END") \
93b54a134aSDavid Howells 	EM(rxrpc_transmit_queue,		"QUE") \
94b54a134aSDavid Howells 	EM(rxrpc_transmit_queue_last,		"QLS") \
95b54a134aSDavid Howells 	EM(rxrpc_transmit_rotate,		"ROT") \
96b54a134aSDavid Howells 	EM(rxrpc_transmit_rotate_last,		"RLS") \
97b54a134aSDavid Howells 	E_(rxrpc_transmit_wait,			"WAI")
98b54a134aSDavid Howells 
99b54a134aSDavid Howells #define rxrpc_receive_traces \
100b54a134aSDavid Howells 	EM(rxrpc_receive_end,			"END") \
101b54a134aSDavid Howells 	EM(rxrpc_receive_front,			"FRN") \
102b54a134aSDavid Howells 	EM(rxrpc_receive_incoming,		"INC") \
103b54a134aSDavid Howells 	EM(rxrpc_receive_queue,			"QUE") \
104b54a134aSDavid Howells 	EM(rxrpc_receive_queue_last,		"QLS") \
105b54a134aSDavid Howells 	E_(rxrpc_receive_rotate,		"ROT")
106b54a134aSDavid Howells 
107b54a134aSDavid Howells #define rxrpc_recvmsg_traces \
108b54a134aSDavid Howells 	EM(rxrpc_recvmsg_cont,			"CONT") \
109b54a134aSDavid Howells 	EM(rxrpc_recvmsg_data_return,		"DATA") \
110b54a134aSDavid Howells 	EM(rxrpc_recvmsg_dequeue,		"DEQU") \
111b54a134aSDavid Howells 	EM(rxrpc_recvmsg_enter,			"ENTR") \
112b54a134aSDavid Howells 	EM(rxrpc_recvmsg_full,			"FULL") \
113b54a134aSDavid Howells 	EM(rxrpc_recvmsg_hole,			"HOLE") \
114b54a134aSDavid Howells 	EM(rxrpc_recvmsg_next,			"NEXT") \
115540b1c48SDavid Howells 	EM(rxrpc_recvmsg_requeue,		"REQU") \
116b54a134aSDavid Howells 	EM(rxrpc_recvmsg_return,		"RETN") \
117b54a134aSDavid Howells 	EM(rxrpc_recvmsg_terminal,		"TERM") \
118b54a134aSDavid Howells 	EM(rxrpc_recvmsg_to_be_accepted,	"TBAC") \
119b54a134aSDavid Howells 	E_(rxrpc_recvmsg_wait,			"WAIT")
120b54a134aSDavid Howells 
121b54a134aSDavid Howells #define rxrpc_rtt_tx_traces \
1224700c4d8SDavid Howells 	EM(rxrpc_rtt_tx_cancel,			"CNCE") \
123b54a134aSDavid Howells 	EM(rxrpc_rtt_tx_data,			"DATA") \
1244700c4d8SDavid Howells 	EM(rxrpc_rtt_tx_no_slot,		"FULL") \
125b54a134aSDavid Howells 	E_(rxrpc_rtt_tx_ping,			"PING")
126b54a134aSDavid Howells 
127b54a134aSDavid Howells #define rxrpc_rtt_rx_traces \
1284700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_cancel,			"CNCL") \
1294700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_obsolete,		"OBSL") \
1304700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_lost,			"LOST") \
131b54a134aSDavid Howells 	EM(rxrpc_rtt_rx_ping_response,		"PONG") \
132b54a134aSDavid Howells 	E_(rxrpc_rtt_rx_requested_ack,		"RACK")
133b54a134aSDavid Howells 
134b54a134aSDavid Howells #define rxrpc_timer_traces \
135b54a134aSDavid Howells 	EM(rxrpc_timer_begin,			"Begin ") \
136a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_ack,			"ExpAck") \
137a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_hard,		"ExpHrd") \
138a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_idle,		"ExpIdl") \
139415f44e4SDavid Howells 	EM(rxrpc_timer_exp_keepalive,		"ExpKA ") \
140bd1fdf8cSDavid Howells 	EM(rxrpc_timer_exp_lost_ack,		"ExpLoA") \
141a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_normal,		"ExpNml") \
142a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_ping,		"ExpPng") \
143a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_resend,		"ExpRsn") \
144b54a134aSDavid Howells 	EM(rxrpc_timer_init_for_reply,		"IniRpl") \
145b54a134aSDavid Howells 	EM(rxrpc_timer_init_for_send_reply,	"SndRpl") \
146a158bdd3SDavid Howells 	EM(rxrpc_timer_restart,			"Restrt") \
147b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_ack,		"SetAck") \
148a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_hard,		"SetHrd") \
149a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_idle,		"SetIdl") \
150415f44e4SDavid Howells 	EM(rxrpc_timer_set_for_keepalive,	"KeepAl") \
151bd1fdf8cSDavid Howells 	EM(rxrpc_timer_set_for_lost_ack,	"SetLoA") \
152a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_normal,		"SetNml") \
153b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_ping,		"SetPng") \
154b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_resend,		"SetRTx") \
155a158bdd3SDavid Howells 	E_(rxrpc_timer_set_for_send,		"SetSnd")
156b54a134aSDavid Howells 
157b54a134aSDavid Howells #define rxrpc_propose_ack_traces \
158b54a134aSDavid Howells 	EM(rxrpc_propose_ack_client_tx_end,	"ClTxEnd") \
159b54a134aSDavid Howells 	EM(rxrpc_propose_ack_input_data,	"DataIn ") \
1607150ceaaSDavid Howells 	EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
161415f44e4SDavid Howells 	EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
162b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_lost_ack,	"LostAck") \
163b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
164b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_params,	"Params ") \
165b54a134aSDavid Howells 	EM(rxrpc_propose_ack_processing_op,	"ProcOp ") \
166b54a134aSDavid Howells 	EM(rxrpc_propose_ack_respond_to_ack,	"Rsp2Ack") \
167b54a134aSDavid Howells 	EM(rxrpc_propose_ack_respond_to_ping,	"Rsp2Png") \
168b54a134aSDavid Howells 	EM(rxrpc_propose_ack_retry_tx,		"RetryTx") \
169b54a134aSDavid Howells 	EM(rxrpc_propose_ack_rotate_rx,		"RxAck  ") \
170b54a134aSDavid Howells 	E_(rxrpc_propose_ack_terminal_ack,	"ClTerm ")
171b54a134aSDavid Howells 
172b54a134aSDavid Howells #define rxrpc_propose_ack_outcomes \
173b54a134aSDavid Howells 	EM(rxrpc_propose_ack_subsume,		" Subsume") \
174b54a134aSDavid Howells 	EM(rxrpc_propose_ack_update,		" Update") \
175197445afSDavid Howells 	E_(rxrpc_propose_ack_use,		" New")
176b54a134aSDavid Howells 
177b54a134aSDavid Howells #define rxrpc_congest_modes \
178b54a134aSDavid Howells 	EM(RXRPC_CALL_CONGEST_AVOIDANCE,	"CongAvoid") \
179b54a134aSDavid Howells 	EM(RXRPC_CALL_FAST_RETRANSMIT,		"FastReTx ") \
180b54a134aSDavid Howells 	EM(RXRPC_CALL_PACKET_LOSS,		"PktLoss  ") \
181b54a134aSDavid Howells 	E_(RXRPC_CALL_SLOW_START,		"SlowStart")
182b54a134aSDavid Howells 
183b54a134aSDavid Howells #define rxrpc_congest_changes \
184b54a134aSDavid Howells 	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
185b54a134aSDavid Howells 	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
186b54a134aSDavid Howells 	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
187aadf9dceSDavid Howells 	EM(rxrpc_cong_no_change,		" -") \
188b54a134aSDavid Howells 	EM(rxrpc_cong_progress,			" Progres") \
189b54a134aSDavid Howells 	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
190b54a134aSDavid Howells 	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \
191b54a134aSDavid Howells 	E_(rxrpc_cong_saw_nack,			" SawNack")
192b54a134aSDavid Howells 
193b54a134aSDavid Howells #define rxrpc_pkts \
194b54a134aSDavid Howells 	EM(0,					"?00") \
195b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_DATA,		"DATA") \
196b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ACK,		"ACK") \
197b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_BUSY,		"BUSY") \
198b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ABORT,		"ABORT") \
199b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ACKALL,		"ACKALL") \
200b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_CHALLENGE,		"CHALL") \
201b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_RESPONSE,		"RESP") \
202b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_DEBUG,		"DEBUG") \
203b54a134aSDavid Howells 	EM(9,					"?09") \
204b54a134aSDavid Howells 	EM(10,					"?10") \
205b54a134aSDavid Howells 	EM(11,					"?11") \
206b54a134aSDavid Howells 	EM(12,					"?12") \
207b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_VERSION,		"VERSION") \
208b54a134aSDavid Howells 	EM(14,					"?14") \
209b54a134aSDavid Howells 	E_(15,					"?15")
210b54a134aSDavid Howells 
211b54a134aSDavid Howells #define rxrpc_ack_names \
212b54a134aSDavid Howells 	EM(0,					"-0-") \
213b54a134aSDavid Howells 	EM(RXRPC_ACK_REQUESTED,			"REQ") \
214b54a134aSDavid Howells 	EM(RXRPC_ACK_DUPLICATE,			"DUP") \
215b54a134aSDavid Howells 	EM(RXRPC_ACK_OUT_OF_SEQUENCE,		"OOS") \
216b54a134aSDavid Howells 	EM(RXRPC_ACK_EXCEEDS_WINDOW,		"WIN") \
217b54a134aSDavid Howells 	EM(RXRPC_ACK_NOSPACE,			"MEM") \
218b54a134aSDavid Howells 	EM(RXRPC_ACK_PING,			"PNG") \
219b54a134aSDavid Howells 	EM(RXRPC_ACK_PING_RESPONSE,		"PNR") \
220b54a134aSDavid Howells 	EM(RXRPC_ACK_DELAY,			"DLY") \
221b54a134aSDavid Howells 	EM(RXRPC_ACK_IDLE,			"IDL") \
222b54a134aSDavid Howells 	E_(RXRPC_ACK__INVALID,			"-?-")
223b54a134aSDavid Howells 
2241bae5d22SDavid Howells #define rxrpc_completions \
2251bae5d22SDavid Howells 	EM(RXRPC_CALL_SUCCEEDED,		"Succeeded") \
2261bae5d22SDavid Howells 	EM(RXRPC_CALL_REMOTELY_ABORTED,		"RemoteAbort") \
2271bae5d22SDavid Howells 	EM(RXRPC_CALL_LOCALLY_ABORTED,		"LocalAbort") \
2281bae5d22SDavid Howells 	EM(RXRPC_CALL_LOCAL_ERROR,		"LocalError") \
2291bae5d22SDavid Howells 	E_(RXRPC_CALL_NETWORK_ERROR,		"NetError")
2301bae5d22SDavid Howells 
2314764c0daSDavid Howells #define rxrpc_tx_points \
2324764c0daSDavid Howells 	EM(rxrpc_tx_point_call_abort,		"CallAbort") \
2334764c0daSDavid Howells 	EM(rxrpc_tx_point_call_ack,		"CallAck") \
2344764c0daSDavid Howells 	EM(rxrpc_tx_point_call_data_frag,	"CallDataFrag") \
2354764c0daSDavid Howells 	EM(rxrpc_tx_point_call_data_nofrag,	"CallDataNofrag") \
2364764c0daSDavid Howells 	EM(rxrpc_tx_point_call_final_resend,	"CallFinalResend") \
2374764c0daSDavid Howells 	EM(rxrpc_tx_point_conn_abort,		"ConnAbort") \
2384764c0daSDavid Howells 	EM(rxrpc_tx_point_reject,		"Reject") \
2394764c0daSDavid Howells 	EM(rxrpc_tx_point_rxkad_challenge,	"RxkadChall") \
2404764c0daSDavid Howells 	EM(rxrpc_tx_point_rxkad_response,	"RxkadResp") \
2414764c0daSDavid Howells 	EM(rxrpc_tx_point_version_keepalive,	"VerKeepalive") \
2424764c0daSDavid Howells 	E_(rxrpc_tx_point_version_reply,	"VerReply")
2436b47fe1dSDavid Howells 
2444d843be5SDavid Howells #define rxrpc_req_ack_traces \
2454d843be5SDavid Howells 	EM(rxrpc_reqack_ack_lost,		"ACK-LOST  ")	\
2464d843be5SDavid Howells 	EM(rxrpc_reqack_already_on,		"ALREADY-ON")	\
2474d843be5SDavid Howells 	EM(rxrpc_reqack_more_rtt,		"MORE-RTT  ")	\
2484d843be5SDavid Howells 	EM(rxrpc_reqack_no_srv_last,		"NO-SRVLAST")	\
2494d843be5SDavid Howells 	EM(rxrpc_reqack_old_rtt,		"OLD-RTT   ")	\
2504d843be5SDavid Howells 	EM(rxrpc_reqack_retrans,		"RETRANS   ")	\
2514d843be5SDavid Howells 	EM(rxrpc_reqack_slow_start,		"SLOW-START")	\
2524d843be5SDavid Howells 	E_(rxrpc_reqack_small_txwin,		"SMALL-TXWN")
253f7fa5242SDavid Howells /* ---- Must update size of stat_why_req_ack[] if more are added! */
2544d843be5SDavid Howells 
255*02a19356SDavid Howells #define rxrpc_txbuf_traces \
256*02a19356SDavid Howells 	EM(rxrpc_txbuf_alloc_ack,		"ALLOC ACK  ")	\
257*02a19356SDavid Howells 	EM(rxrpc_txbuf_alloc_data,		"ALLOC DATA ")	\
258*02a19356SDavid Howells 	EM(rxrpc_txbuf_free,			"FREE       ")	\
259*02a19356SDavid Howells 	EM(rxrpc_txbuf_get_trans,		"GET TRANS  ")	\
260*02a19356SDavid Howells 	EM(rxrpc_txbuf_get_retrans,		"GET RETRANS")	\
261*02a19356SDavid Howells 	EM(rxrpc_txbuf_put_cleaned,		"PUT CLEANED")	\
262*02a19356SDavid Howells 	EM(rxrpc_txbuf_put_rotated,		"PUT ROTATED")	\
263*02a19356SDavid Howells 	EM(rxrpc_txbuf_put_send_aborted,	"PUT SEND-X ")	\
264*02a19356SDavid Howells 	EM(rxrpc_txbuf_see_send_more,		"SEE SEND+  ")	\
265*02a19356SDavid Howells 	E_(rxrpc_txbuf_see_unacked,		"SEE UNACKED")
266*02a19356SDavid Howells 
267b54a134aSDavid Howells /*
268dc9fd093SDavid Howells  * Generate enums for tracing information.
269dc9fd093SDavid Howells  */
270dc9fd093SDavid Howells #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
271dc9fd093SDavid Howells #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
272dc9fd093SDavid Howells 
273dc9fd093SDavid Howells #undef EM
274dc9fd093SDavid Howells #undef E_
275dc9fd093SDavid Howells #define EM(a, b) a,
276dc9fd093SDavid Howells #define E_(a, b) a
277dc9fd093SDavid Howells 
278dc9fd093SDavid Howells enum rxrpc_call_trace		{ rxrpc_call_traces } __mode(byte);
279dc9fd093SDavid Howells enum rxrpc_client_trace		{ rxrpc_client_traces } __mode(byte);
280dc9fd093SDavid Howells enum rxrpc_congest_change	{ rxrpc_congest_changes } __mode(byte);
281dc9fd093SDavid Howells enum rxrpc_conn_trace		{ rxrpc_conn_traces } __mode(byte);
282dc9fd093SDavid Howells enum rxrpc_local_trace		{ rxrpc_local_traces } __mode(byte);
283dc9fd093SDavid Howells enum rxrpc_peer_trace		{ rxrpc_peer_traces } __mode(byte);
284dc9fd093SDavid Howells enum rxrpc_propose_ack_outcome	{ rxrpc_propose_ack_outcomes } __mode(byte);
285dc9fd093SDavid Howells enum rxrpc_propose_ack_trace	{ rxrpc_propose_ack_traces } __mode(byte);
286dc9fd093SDavid Howells enum rxrpc_receive_trace	{ rxrpc_receive_traces } __mode(byte);
287dc9fd093SDavid Howells enum rxrpc_recvmsg_trace	{ rxrpc_recvmsg_traces } __mode(byte);
2884d843be5SDavid Howells enum rxrpc_req_ack_trace	{ rxrpc_req_ack_traces } __mode(byte);
289dc9fd093SDavid Howells enum rxrpc_rtt_rx_trace		{ rxrpc_rtt_rx_traces } __mode(byte);
290dc9fd093SDavid Howells enum rxrpc_rtt_tx_trace		{ rxrpc_rtt_tx_traces } __mode(byte);
291dc9fd093SDavid Howells enum rxrpc_skb_trace		{ rxrpc_skb_traces } __mode(byte);
292dc9fd093SDavid Howells enum rxrpc_timer_trace		{ rxrpc_timer_traces } __mode(byte);
293dc9fd093SDavid Howells enum rxrpc_transmit_trace	{ rxrpc_transmit_traces } __mode(byte);
294dc9fd093SDavid Howells enum rxrpc_tx_point		{ rxrpc_tx_points } __mode(byte);
295*02a19356SDavid Howells enum rxrpc_txbuf_trace		{ rxrpc_txbuf_traces } __mode(byte);
296dc9fd093SDavid Howells 
297dc9fd093SDavid Howells #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
298dc9fd093SDavid Howells 
299dc9fd093SDavid Howells /*
300b54a134aSDavid Howells  * Export enum symbols via userspace.
301b54a134aSDavid Howells  */
302b54a134aSDavid Howells #undef EM
303b54a134aSDavid Howells #undef E_
304b54a134aSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a);
305b54a134aSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a);
306b54a134aSDavid Howells 
307b54a134aSDavid Howells rxrpc_call_traces;
308dc9fd093SDavid Howells rxrpc_client_traces;
309dc9fd093SDavid Howells rxrpc_congest_changes;
310dc9fd093SDavid Howells rxrpc_congest_modes;
311dc9fd093SDavid Howells rxrpc_conn_traces;
312dc9fd093SDavid Howells rxrpc_local_traces;
313dc9fd093SDavid Howells rxrpc_propose_ack_outcomes;
314dc9fd093SDavid Howells rxrpc_propose_ack_traces;
315b54a134aSDavid Howells rxrpc_receive_traces;
316b54a134aSDavid Howells rxrpc_recvmsg_traces;
3174d843be5SDavid Howells rxrpc_req_ack_traces;
318b54a134aSDavid Howells rxrpc_rtt_rx_traces;
319dc9fd093SDavid Howells rxrpc_rtt_tx_traces;
320dc9fd093SDavid Howells rxrpc_skb_traces;
321b54a134aSDavid Howells rxrpc_timer_traces;
322dc9fd093SDavid Howells rxrpc_transmit_traces;
3234764c0daSDavid Howells rxrpc_tx_points;
324*02a19356SDavid Howells rxrpc_txbuf_traces;
325b54a134aSDavid Howells 
326b54a134aSDavid Howells /*
327b54a134aSDavid Howells  * Now redefine the EM() and E_() macros to map the enums to the strings that
328b54a134aSDavid Howells  * will be printed in the output.
329b54a134aSDavid Howells  */
330b54a134aSDavid Howells #undef EM
331b54a134aSDavid Howells #undef E_
332b54a134aSDavid Howells #define EM(a, b)	{ a, b },
333b54a134aSDavid Howells #define E_(a, b)	{ a, b }
334b54a134aSDavid Howells 
33509d2bf59SDavid Howells TRACE_EVENT(rxrpc_local,
33606d9532fSDavid Howells 	    TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
33709d2bf59SDavid Howells 		     int usage, const void *where),
33809d2bf59SDavid Howells 
33906d9532fSDavid Howells 	    TP_ARGS(local_debug_id, op, usage, where),
34009d2bf59SDavid Howells 
34109d2bf59SDavid Howells 	    TP_STRUCT__entry(
34209d2bf59SDavid Howells 		    __field(unsigned int,	local		)
34309d2bf59SDavid Howells 		    __field(int,		op		)
34409d2bf59SDavid Howells 		    __field(int,		usage		)
34509d2bf59SDavid Howells 		    __field(const void *,	where		)
34609d2bf59SDavid Howells 			     ),
34709d2bf59SDavid Howells 
34809d2bf59SDavid Howells 	    TP_fast_assign(
34906d9532fSDavid Howells 		    __entry->local = local_debug_id;
35009d2bf59SDavid Howells 		    __entry->op = op;
35109d2bf59SDavid Howells 		    __entry->usage = usage;
35209d2bf59SDavid Howells 		    __entry->where = where;
35309d2bf59SDavid Howells 			   ),
35409d2bf59SDavid Howells 
35509d2bf59SDavid Howells 	    TP_printk("L=%08x %s u=%d sp=%pSR",
35609d2bf59SDavid Howells 		      __entry->local,
35709d2bf59SDavid Howells 		      __print_symbolic(__entry->op, rxrpc_local_traces),
35809d2bf59SDavid Howells 		      __entry->usage,
35909d2bf59SDavid Howells 		      __entry->where)
36009d2bf59SDavid Howells 	    );
36109d2bf59SDavid Howells 
3621159d4b4SDavid Howells TRACE_EVENT(rxrpc_peer,
36355f6c98eSDavid Howells 	    TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op,
3641159d4b4SDavid Howells 		     int usage, const void *where),
3651159d4b4SDavid Howells 
36655f6c98eSDavid Howells 	    TP_ARGS(peer_debug_id, op, usage, where),
3671159d4b4SDavid Howells 
3681159d4b4SDavid Howells 	    TP_STRUCT__entry(
3691159d4b4SDavid Howells 		    __field(unsigned int,	peer		)
3701159d4b4SDavid Howells 		    __field(int,		op		)
3711159d4b4SDavid Howells 		    __field(int,		usage		)
3721159d4b4SDavid Howells 		    __field(const void *,	where		)
3731159d4b4SDavid Howells 			     ),
3741159d4b4SDavid Howells 
3751159d4b4SDavid Howells 	    TP_fast_assign(
37655f6c98eSDavid Howells 		    __entry->peer = peer_debug_id;
3771159d4b4SDavid Howells 		    __entry->op = op;
3781159d4b4SDavid Howells 		    __entry->usage = usage;
3791159d4b4SDavid Howells 		    __entry->where = where;
3801159d4b4SDavid Howells 			   ),
3811159d4b4SDavid Howells 
3821159d4b4SDavid Howells 	    TP_printk("P=%08x %s u=%d sp=%pSR",
3831159d4b4SDavid Howells 		      __entry->peer,
3841159d4b4SDavid Howells 		      __print_symbolic(__entry->op, rxrpc_peer_traces),
3851159d4b4SDavid Howells 		      __entry->usage,
3861159d4b4SDavid Howells 		      __entry->where)
3871159d4b4SDavid Howells 	    );
3881159d4b4SDavid Howells 
389363deeabSDavid Howells TRACE_EVENT(rxrpc_conn,
3904c1295dcSDavid Howells 	    TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op,
391363deeabSDavid Howells 		     int usage, const void *where),
392363deeabSDavid Howells 
3934c1295dcSDavid Howells 	    TP_ARGS(conn_debug_id, op, usage, where),
394363deeabSDavid Howells 
395363deeabSDavid Howells 	    TP_STRUCT__entry(
396a25e21f0SDavid Howells 		    __field(unsigned int,	conn		)
397363deeabSDavid Howells 		    __field(int,		op		)
398363deeabSDavid Howells 		    __field(int,		usage		)
399363deeabSDavid Howells 		    __field(const void *,	where		)
400363deeabSDavid Howells 			     ),
401363deeabSDavid Howells 
402363deeabSDavid Howells 	    TP_fast_assign(
4034c1295dcSDavid Howells 		    __entry->conn = conn_debug_id;
404363deeabSDavid Howells 		    __entry->op = op;
405363deeabSDavid Howells 		    __entry->usage = usage;
406363deeabSDavid Howells 		    __entry->where = where;
407363deeabSDavid Howells 			   ),
408363deeabSDavid Howells 
409a25e21f0SDavid Howells 	    TP_printk("C=%08x %s u=%d sp=%pSR",
410363deeabSDavid Howells 		      __entry->conn,
411b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_conn_traces),
412363deeabSDavid Howells 		      __entry->usage,
413363deeabSDavid Howells 		      __entry->where)
414363deeabSDavid Howells 	    );
415363deeabSDavid Howells 
416363deeabSDavid Howells TRACE_EVENT(rxrpc_client,
417363deeabSDavid Howells 	    TP_PROTO(struct rxrpc_connection *conn, int channel,
418363deeabSDavid Howells 		     enum rxrpc_client_trace op),
419363deeabSDavid Howells 
420363deeabSDavid Howells 	    TP_ARGS(conn, channel, op),
421363deeabSDavid Howells 
422363deeabSDavid Howells 	    TP_STRUCT__entry(
423a25e21f0SDavid Howells 		    __field(unsigned int,		conn		)
424363deeabSDavid Howells 		    __field(u32,			cid		)
425363deeabSDavid Howells 		    __field(int,			channel		)
426363deeabSDavid Howells 		    __field(int,			usage		)
427363deeabSDavid Howells 		    __field(enum rxrpc_client_trace,	op		)
428363deeabSDavid Howells 			     ),
429363deeabSDavid Howells 
430363deeabSDavid Howells 	    TP_fast_assign(
431245500d8SDavid Howells 		    __entry->conn = conn ? conn->debug_id : 0;
432363deeabSDavid Howells 		    __entry->channel = channel;
433a0575429SDavid Howells 		    __entry->usage = conn ? refcount_read(&conn->ref) : -2;
434363deeabSDavid Howells 		    __entry->op = op;
43596a9c425SDavid Howells 		    __entry->cid = conn ? conn->proto.cid : 0;
436363deeabSDavid Howells 			   ),
437363deeabSDavid Howells 
438245500d8SDavid Howells 	    TP_printk("C=%08x h=%2d %s i=%08x u=%d",
439363deeabSDavid Howells 		      __entry->conn,
440363deeabSDavid Howells 		      __entry->channel,
441b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_client_traces),
442363deeabSDavid Howells 		      __entry->cid,
443363deeabSDavid Howells 		      __entry->usage)
444363deeabSDavid Howells 	    );
445363deeabSDavid Howells 
446e34d4234SDavid Howells TRACE_EVENT(rxrpc_call,
44748c9e0ecSDavid Howells 	    TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
4482ab27215SDavid Howells 		     int usage, const void *where, const void *aux),
449e34d4234SDavid Howells 
45048c9e0ecSDavid Howells 	    TP_ARGS(call_debug_id, op, usage, where, aux),
451e34d4234SDavid Howells 
452e34d4234SDavid Howells 	    TP_STRUCT__entry(
453a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
454e34d4234SDavid Howells 		    __field(int,			op		)
455e34d4234SDavid Howells 		    __field(int,			usage		)
456e34d4234SDavid Howells 		    __field(const void *,		where		)
457e34d4234SDavid Howells 		    __field(const void *,		aux		)
458e34d4234SDavid Howells 			     ),
459e34d4234SDavid Howells 
460e34d4234SDavid Howells 	    TP_fast_assign(
46148c9e0ecSDavid Howells 		    __entry->call = call_debug_id;
462e34d4234SDavid Howells 		    __entry->op = op;
463e34d4234SDavid Howells 		    __entry->usage = usage;
464e34d4234SDavid Howells 		    __entry->where = where;
465e34d4234SDavid Howells 		    __entry->aux = aux;
466e34d4234SDavid Howells 			   ),
467e34d4234SDavid Howells 
468a25e21f0SDavid Howells 	    TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
469e34d4234SDavid Howells 		      __entry->call,
470b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_call_traces),
471e34d4234SDavid Howells 		      __entry->usage,
472e34d4234SDavid Howells 		      __entry->where,
473e34d4234SDavid Howells 		      __entry->aux)
474e34d4234SDavid Howells 	    );
475e34d4234SDavid Howells 
476df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb,
47771f3ca40SDavid Howells 	    TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
47827f699ccSDavid Howells 		     int usage, int mod_count, const void *where),
479df844fd4SDavid Howells 
48027f699ccSDavid Howells 	    TP_ARGS(skb, op, usage, mod_count, where),
481df844fd4SDavid Howells 
482df844fd4SDavid Howells 	    TP_STRUCT__entry(
483df844fd4SDavid Howells 		    __field(struct sk_buff *,		skb		)
48471f3ca40SDavid Howells 		    __field(enum rxrpc_skb_trace,	op		)
485df844fd4SDavid Howells 		    __field(int,			usage		)
486df844fd4SDavid Howells 		    __field(int,			mod_count	)
487df844fd4SDavid Howells 		    __field(const void *,		where		)
488df844fd4SDavid Howells 			     ),
489df844fd4SDavid Howells 
490df844fd4SDavid Howells 	    TP_fast_assign(
491df844fd4SDavid Howells 		    __entry->skb = skb;
492df844fd4SDavid Howells 		    __entry->op = op;
493df844fd4SDavid Howells 		    __entry->usage = usage;
494df844fd4SDavid Howells 		    __entry->mod_count = mod_count;
495df844fd4SDavid Howells 		    __entry->where = where;
496df844fd4SDavid Howells 			   ),
497df844fd4SDavid Howells 
49827f699ccSDavid Howells 	    TP_printk("s=%p Rx %s u=%d m=%d p=%pSR",
499df844fd4SDavid Howells 		      __entry->skb,
500b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_skb_traces),
501df844fd4SDavid Howells 		      __entry->usage,
502df844fd4SDavid Howells 		      __entry->mod_count,
503df844fd4SDavid Howells 		      __entry->where)
504df844fd4SDavid Howells 	    );
505df844fd4SDavid Howells 
50649e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet,
50749e19ec7SDavid Howells 	    TP_PROTO(struct rxrpc_skb_priv *sp),
50849e19ec7SDavid Howells 
50949e19ec7SDavid Howells 	    TP_ARGS(sp),
51049e19ec7SDavid Howells 
51149e19ec7SDavid Howells 	    TP_STRUCT__entry(
51249e19ec7SDavid Howells 		    __field_struct(struct rxrpc_host_header,	hdr		)
51349e19ec7SDavid Howells 			     ),
51449e19ec7SDavid Howells 
51549e19ec7SDavid Howells 	    TP_fast_assign(
51649e19ec7SDavid Howells 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
51749e19ec7SDavid Howells 			   ),
51849e19ec7SDavid Howells 
519a3868bfcSDavid Howells 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
52049e19ec7SDavid Howells 		      __entry->hdr.epoch, __entry->hdr.cid,
52149e19ec7SDavid Howells 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
52249e19ec7SDavid Howells 		      __entry->hdr.serial, __entry->hdr.seq,
523a3868bfcSDavid Howells 		      __entry->hdr.type, __entry->hdr.flags,
524b54a134aSDavid Howells 		      __entry->hdr.type <= 15 ?
525b54a134aSDavid Howells 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
52649e19ec7SDavid Howells 	    );
52749e19ec7SDavid Howells 
52849e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done,
52949e19ec7SDavid Howells 	    TP_PROTO(int result, int abort_code),
53049e19ec7SDavid Howells 
53149e19ec7SDavid Howells 	    TP_ARGS(result, abort_code),
53249e19ec7SDavid Howells 
53349e19ec7SDavid Howells 	    TP_STRUCT__entry(
53449e19ec7SDavid Howells 		    __field(int,			result		)
53549e19ec7SDavid Howells 		    __field(int,			abort_code	)
53649e19ec7SDavid Howells 			     ),
53749e19ec7SDavid Howells 
53849e19ec7SDavid Howells 	    TP_fast_assign(
53949e19ec7SDavid Howells 		    __entry->result = result;
54049e19ec7SDavid Howells 		    __entry->abort_code = abort_code;
54149e19ec7SDavid Howells 			   ),
54249e19ec7SDavid Howells 
54349e19ec7SDavid Howells 	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
54449e19ec7SDavid Howells 	    );
54549e19ec7SDavid Howells 
5465a42976dSDavid Howells TRACE_EVENT(rxrpc_abort,
547a25e21f0SDavid Howells 	    TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
548a25e21f0SDavid Howells 		     rxrpc_seq_t seq, int abort_code, int error),
5495a42976dSDavid Howells 
550a25e21f0SDavid Howells 	    TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
5515a42976dSDavid Howells 
5525a42976dSDavid Howells 	    TP_STRUCT__entry(
553a25e21f0SDavid Howells 		    __field(unsigned int,		call_nr		)
5545a42976dSDavid Howells 		    __array(char,			why, 4		)
5555a42976dSDavid Howells 		    __field(u32,			cid		)
5565a42976dSDavid Howells 		    __field(u32,			call_id		)
5575a42976dSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
5585a42976dSDavid Howells 		    __field(int,			abort_code	)
5595a42976dSDavid Howells 		    __field(int,			error		)
5605a42976dSDavid Howells 			     ),
5615a42976dSDavid Howells 
5625a42976dSDavid Howells 	    TP_fast_assign(
5635a42976dSDavid Howells 		    memcpy(__entry->why, why, 4);
564a25e21f0SDavid Howells 		    __entry->call_nr = call_nr;
5655a42976dSDavid Howells 		    __entry->cid = cid;
5665a42976dSDavid Howells 		    __entry->call_id = call_id;
5675a42976dSDavid Howells 		    __entry->abort_code = abort_code;
5685a42976dSDavid Howells 		    __entry->error = error;
5695a42976dSDavid Howells 		    __entry->seq = seq;
5705a42976dSDavid Howells 			   ),
5715a42976dSDavid Howells 
572a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
573a25e21f0SDavid Howells 		      __entry->call_nr,
5745a42976dSDavid Howells 		      __entry->cid, __entry->call_id, __entry->seq,
5755a42976dSDavid Howells 		      __entry->abort_code, __entry->error, __entry->why)
5765a42976dSDavid Howells 	    );
5775a42976dSDavid Howells 
5781bae5d22SDavid Howells TRACE_EVENT(rxrpc_call_complete,
5791bae5d22SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
5801bae5d22SDavid Howells 
5811bae5d22SDavid Howells 	    TP_ARGS(call),
5821bae5d22SDavid Howells 
5831bae5d22SDavid Howells 	    TP_STRUCT__entry(
5841bae5d22SDavid Howells 		    __field(unsigned int,		call		)
5851bae5d22SDavid Howells 		    __field(enum rxrpc_call_completion,	compl		)
5861bae5d22SDavid Howells 		    __field(int,			error		)
5871bae5d22SDavid Howells 		    __field(u32,			abort_code	)
5881bae5d22SDavid Howells 			     ),
5891bae5d22SDavid Howells 
5901bae5d22SDavid Howells 	    TP_fast_assign(
5911bae5d22SDavid Howells 		    __entry->call = call->debug_id;
5921bae5d22SDavid Howells 		    __entry->compl = call->completion;
5931bae5d22SDavid Howells 		    __entry->error = call->error;
5941bae5d22SDavid Howells 		    __entry->abort_code = call->abort_code;
5951bae5d22SDavid Howells 			   ),
5961bae5d22SDavid Howells 
5971bae5d22SDavid Howells 	    TP_printk("c=%08x %s r=%d ac=%d",
5981bae5d22SDavid Howells 		      __entry->call,
5991bae5d22SDavid Howells 		      __print_symbolic(__entry->compl, rxrpc_completions),
6001bae5d22SDavid Howells 		      __entry->error,
6011bae5d22SDavid Howells 		      __entry->abort_code)
6021bae5d22SDavid Howells 	    );
6031bae5d22SDavid Howells 
604a124fe3eSDavid Howells TRACE_EVENT(rxrpc_transmit,
605a124fe3eSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
606a124fe3eSDavid Howells 
607a124fe3eSDavid Howells 	    TP_ARGS(call, why),
608a124fe3eSDavid Howells 
609a124fe3eSDavid Howells 	    TP_STRUCT__entry(
610a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
611a124fe3eSDavid Howells 		    __field(enum rxrpc_transmit_trace,	why		)
612a124fe3eSDavid Howells 		    __field(rxrpc_seq_t,		tx_hard_ack	)
613a124fe3eSDavid Howells 		    __field(rxrpc_seq_t,		tx_top		)
614b1d9f7fdSDavid Howells 		    __field(int,			tx_winsize	)
615a124fe3eSDavid Howells 			     ),
616a124fe3eSDavid Howells 
617a124fe3eSDavid Howells 	    TP_fast_assign(
618a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
619a124fe3eSDavid Howells 		    __entry->why = why;
620a124fe3eSDavid Howells 		    __entry->tx_hard_ack = call->tx_hard_ack;
621a124fe3eSDavid Howells 		    __entry->tx_top = call->tx_top;
622b1d9f7fdSDavid Howells 		    __entry->tx_winsize = call->tx_winsize;
623a124fe3eSDavid Howells 			   ),
624a124fe3eSDavid Howells 
625a25e21f0SDavid Howells 	    TP_printk("c=%08x %s f=%08x n=%u/%u",
626a124fe3eSDavid Howells 		      __entry->call,
627b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_transmit_traces),
628a124fe3eSDavid Howells 		      __entry->tx_hard_ack + 1,
629b1d9f7fdSDavid Howells 		      __entry->tx_top - __entry->tx_hard_ack,
630b1d9f7fdSDavid Howells 		      __entry->tx_winsize)
631a124fe3eSDavid Howells 	    );
632a124fe3eSDavid Howells 
633b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_data,
6344764c0daSDavid Howells 	    TP_PROTO(unsigned int call, rxrpc_seq_t seq,
635b1d9f7fdSDavid Howells 		     rxrpc_serial_t serial, u8 flags, u8 anno),
636ec71eb9aSDavid Howells 
637b1d9f7fdSDavid Howells 	    TP_ARGS(call, seq, serial, flags, anno),
638ec71eb9aSDavid Howells 
639ec71eb9aSDavid Howells 	    TP_STRUCT__entry(
640a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
641b1d9f7fdSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
642b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
643b1d9f7fdSDavid Howells 		    __field(u8,				flags		)
644b1d9f7fdSDavid Howells 		    __field(u8,				anno		)
645b1d9f7fdSDavid Howells 			     ),
646b1d9f7fdSDavid Howells 
647b1d9f7fdSDavid Howells 	    TP_fast_assign(
6484764c0daSDavid Howells 		    __entry->call = call;
649b1d9f7fdSDavid Howells 		    __entry->seq = seq;
650b1d9f7fdSDavid Howells 		    __entry->serial = serial;
651b1d9f7fdSDavid Howells 		    __entry->flags = flags;
652b1d9f7fdSDavid Howells 		    __entry->anno = anno;
653b1d9f7fdSDavid Howells 			   ),
654b1d9f7fdSDavid Howells 
655a25e21f0SDavid Howells 	    TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x",
656b1d9f7fdSDavid Howells 		      __entry->call,
657b1d9f7fdSDavid Howells 		      __entry->serial,
658b1d9f7fdSDavid Howells 		      __entry->seq,
659b1d9f7fdSDavid Howells 		      __entry->flags,
660b1d9f7fdSDavid Howells 		      __entry->anno)
661b1d9f7fdSDavid Howells 	    );
662b1d9f7fdSDavid Howells 
663b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_ack,
664b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call,
665b1d9f7fdSDavid Howells 		     rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
666b1d9f7fdSDavid Howells 		     rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
667b1d9f7fdSDavid Howells 
668b1d9f7fdSDavid Howells 	    TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
669b1d9f7fdSDavid Howells 
670b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
671a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
672b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
673b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		ack_serial	)
674ec71eb9aSDavid Howells 		    __field(rxrpc_seq_t,		first		)
675b1d9f7fdSDavid Howells 		    __field(rxrpc_seq_t,		prev		)
676ec71eb9aSDavid Howells 		    __field(u8,				reason		)
677ec71eb9aSDavid Howells 		    __field(u8,				n_acks		)
678ec71eb9aSDavid Howells 			     ),
679ec71eb9aSDavid Howells 
680ec71eb9aSDavid Howells 	    TP_fast_assign(
681a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
682b1d9f7fdSDavid Howells 		    __entry->serial = serial;
683b1d9f7fdSDavid Howells 		    __entry->ack_serial = ack_serial;
684ec71eb9aSDavid Howells 		    __entry->first = first;
685b1d9f7fdSDavid Howells 		    __entry->prev = prev;
686ec71eb9aSDavid Howells 		    __entry->reason = reason;
687ec71eb9aSDavid Howells 		    __entry->n_acks = n_acks;
688ec71eb9aSDavid Howells 			   ),
689ec71eb9aSDavid Howells 
690a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
691ec71eb9aSDavid Howells 		      __entry->call,
692b1d9f7fdSDavid Howells 		      __entry->serial,
693b54a134aSDavid Howells 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
694b1d9f7fdSDavid Howells 		      __entry->ack_serial,
695ec71eb9aSDavid Howells 		      __entry->first,
696b1d9f7fdSDavid Howells 		      __entry->prev,
697ec71eb9aSDavid Howells 		      __entry->n_acks)
698ec71eb9aSDavid Howells 	    );
699ec71eb9aSDavid Howells 
700005ede28SDavid Howells TRACE_EVENT(rxrpc_rx_abort,
701005ede28SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
702005ede28SDavid Howells 		     u32 abort_code),
703005ede28SDavid Howells 
704005ede28SDavid Howells 	    TP_ARGS(call, serial, abort_code),
705005ede28SDavid Howells 
706005ede28SDavid Howells 	    TP_STRUCT__entry(
707a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
708005ede28SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
709005ede28SDavid Howells 		    __field(u32,			abort_code	)
710005ede28SDavid Howells 			     ),
711005ede28SDavid Howells 
712005ede28SDavid Howells 	    TP_fast_assign(
713a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
714005ede28SDavid Howells 		    __entry->serial = serial;
715005ede28SDavid Howells 		    __entry->abort_code = abort_code;
716005ede28SDavid Howells 			   ),
717005ede28SDavid Howells 
718a25e21f0SDavid Howells 	    TP_printk("c=%08x ABORT %08x ac=%d",
719005ede28SDavid Howells 		      __entry->call,
720005ede28SDavid Howells 		      __entry->serial,
721005ede28SDavid Howells 		      __entry->abort_code)
722005ede28SDavid Howells 	    );
723005ede28SDavid Howells 
724740586d2SDavid Howells TRACE_EVENT(rxrpc_rx_rwind_change,
725740586d2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
726740586d2SDavid Howells 		     u32 rwind, bool wake),
727740586d2SDavid Howells 
728740586d2SDavid Howells 	    TP_ARGS(call, serial, rwind, wake),
729740586d2SDavid Howells 
730740586d2SDavid Howells 	    TP_STRUCT__entry(
731a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
732740586d2SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
733740586d2SDavid Howells 		    __field(u32,			rwind		)
734740586d2SDavid Howells 		    __field(bool,			wake		)
735740586d2SDavid Howells 			     ),
736740586d2SDavid Howells 
737740586d2SDavid Howells 	    TP_fast_assign(
738a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
739740586d2SDavid Howells 		    __entry->serial = serial;
740740586d2SDavid Howells 		    __entry->rwind = rwind;
741740586d2SDavid Howells 		    __entry->wake = wake;
742740586d2SDavid Howells 			   ),
743740586d2SDavid Howells 
744a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x rw=%u%s",
745740586d2SDavid Howells 		      __entry->call,
746740586d2SDavid Howells 		      __entry->serial,
747740586d2SDavid Howells 		      __entry->rwind,
748740586d2SDavid Howells 		      __entry->wake ? " wake" : "")
749740586d2SDavid Howells 	    );
750740586d2SDavid Howells 
7514764c0daSDavid Howells TRACE_EVENT(rxrpc_tx_packet,
7524764c0daSDavid Howells 	    TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
7534764c0daSDavid Howells 		     enum rxrpc_tx_point where),
7544764c0daSDavid Howells 
7554764c0daSDavid Howells 	    TP_ARGS(call_id, whdr, where),
7564764c0daSDavid Howells 
7574764c0daSDavid Howells 	    TP_STRUCT__entry(
7584764c0daSDavid Howells 		    __field(unsigned int,			call	)
7594764c0daSDavid Howells 		    __field(enum rxrpc_tx_point,		where	)
7604764c0daSDavid Howells 		    __field_struct(struct rxrpc_wire_header,	whdr	)
7614764c0daSDavid Howells 			     ),
7624764c0daSDavid Howells 
7634764c0daSDavid Howells 	    TP_fast_assign(
7644764c0daSDavid Howells 		    __entry->call = call_id;
7654764c0daSDavid Howells 		    memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
7664e2abd3cSDavid Howells 		    __entry->where = where;
7674764c0daSDavid Howells 			   ),
7684764c0daSDavid Howells 
7694764c0daSDavid Howells 	    TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
7704764c0daSDavid Howells 		      __entry->call,
7714764c0daSDavid Howells 		      ntohl(__entry->whdr.epoch),
7724764c0daSDavid Howells 		      ntohl(__entry->whdr.cid),
7734764c0daSDavid Howells 		      ntohl(__entry->whdr.callNumber),
7744764c0daSDavid Howells 		      ntohs(__entry->whdr.serviceId),
7754764c0daSDavid Howells 		      ntohl(__entry->whdr.serial),
7764764c0daSDavid Howells 		      ntohl(__entry->whdr.seq),
7774764c0daSDavid Howells 		      __entry->whdr.type, __entry->whdr.flags,
7784764c0daSDavid Howells 		      __entry->whdr.type <= 15 ?
7794764c0daSDavid Howells 		      __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
7804764c0daSDavid Howells 		      __print_symbolic(__entry->where, rxrpc_tx_points))
7814764c0daSDavid Howells 	    );
7824764c0daSDavid Howells 
783be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_data,
784be832aecSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
785a1767077SDavid Howells 		     rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
786f3639df2SDavid Howells 
787a1767077SDavid Howells 	    TP_ARGS(call, seq, serial, flags, retrans, lose),
788f3639df2SDavid Howells 
789f3639df2SDavid Howells 	    TP_STRUCT__entry(
790a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
791be832aecSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
792f3639df2SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
7934764c0daSDavid Howells 		    __field(u32,			cid		)
7944764c0daSDavid Howells 		    __field(u32,			call_id		)
795be832aecSDavid Howells 		    __field(u8,				flags		)
796a1767077SDavid Howells 		    __field(bool,			retrans		)
797be832aecSDavid Howells 		    __field(bool,			lose		)
798be832aecSDavid Howells 			     ),
799be832aecSDavid Howells 
800be832aecSDavid Howells 	    TP_fast_assign(
801a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
8024764c0daSDavid Howells 		    __entry->cid = call->cid;
8034764c0daSDavid Howells 		    __entry->call_id = call->call_id;
804be832aecSDavid Howells 		    __entry->seq = seq;
805be832aecSDavid Howells 		    __entry->serial = serial;
806be832aecSDavid Howells 		    __entry->flags = flags;
807a1767077SDavid Howells 		    __entry->retrans = retrans;
808be832aecSDavid Howells 		    __entry->lose = lose;
809be832aecSDavid Howells 			   ),
810be832aecSDavid Howells 
8114764c0daSDavid Howells 	    TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
812be832aecSDavid Howells 		      __entry->call,
8134764c0daSDavid Howells 		      __entry->cid,
8144764c0daSDavid Howells 		      __entry->call_id,
815be832aecSDavid Howells 		      __entry->serial,
816be832aecSDavid Howells 		      __entry->seq,
817be832aecSDavid Howells 		      __entry->flags,
818265a44bbSDavid Howells 		      __entry->retrans ? " *RETRANS*" : "",
819be832aecSDavid Howells 		      __entry->lose ? " *LOSE*" : "")
820be832aecSDavid Howells 	    );
821be832aecSDavid Howells 
822be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_ack,
8234764c0daSDavid Howells 	    TP_PROTO(unsigned int call, rxrpc_serial_t serial,
824be832aecSDavid Howells 		     rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
825be832aecSDavid Howells 		     u8 reason, u8 n_acks),
826be832aecSDavid Howells 
827be832aecSDavid Howells 	    TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
828be832aecSDavid Howells 
829be832aecSDavid Howells 	    TP_STRUCT__entry(
830a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
831be832aecSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
832be832aecSDavid Howells 		    __field(rxrpc_seq_t,		ack_first	)
833be832aecSDavid Howells 		    __field(rxrpc_serial_t,		ack_serial	)
834f3639df2SDavid Howells 		    __field(u8,				reason		)
835f3639df2SDavid Howells 		    __field(u8,				n_acks		)
836f3639df2SDavid Howells 			     ),
837f3639df2SDavid Howells 
838f3639df2SDavid Howells 	    TP_fast_assign(
8394764c0daSDavid Howells 		    __entry->call = call;
840f3639df2SDavid Howells 		    __entry->serial = serial;
841be832aecSDavid Howells 		    __entry->ack_first = ack_first;
842be832aecSDavid Howells 		    __entry->ack_serial = ack_serial;
843f3639df2SDavid Howells 		    __entry->reason = reason;
844f3639df2SDavid Howells 		    __entry->n_acks = n_acks;
845f3639df2SDavid Howells 			   ),
846f3639df2SDavid Howells 
847a25e21f0SDavid Howells 	    TP_printk(" c=%08x ACK  %08x %s f=%08x r=%08x n=%u",
848f3639df2SDavid Howells 		      __entry->call,
849f3639df2SDavid Howells 		      __entry->serial,
850b54a134aSDavid Howells 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
851be832aecSDavid Howells 		      __entry->ack_first,
852be832aecSDavid Howells 		      __entry->ack_serial,
853f3639df2SDavid Howells 		      __entry->n_acks)
854f3639df2SDavid Howells 	    );
855f3639df2SDavid Howells 
85658dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive,
85758dc63c9SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
85858dc63c9SDavid Howells 		     rxrpc_serial_t serial, rxrpc_seq_t seq),
85958dc63c9SDavid Howells 
86058dc63c9SDavid Howells 	    TP_ARGS(call, why, serial, seq),
86158dc63c9SDavid Howells 
86258dc63c9SDavid Howells 	    TP_STRUCT__entry(
863a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
86458dc63c9SDavid Howells 		    __field(enum rxrpc_receive_trace,	why		)
86558dc63c9SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
86658dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
86758dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		hard_ack	)
86858dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		top		)
86958dc63c9SDavid Howells 			     ),
87058dc63c9SDavid Howells 
87158dc63c9SDavid Howells 	    TP_fast_assign(
872a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
87358dc63c9SDavid Howells 		    __entry->why = why;
87458dc63c9SDavid Howells 		    __entry->serial = serial;
87558dc63c9SDavid Howells 		    __entry->seq = seq;
87658dc63c9SDavid Howells 		    __entry->hard_ack = call->rx_hard_ack;
87758dc63c9SDavid Howells 		    __entry->top = call->rx_top;
87858dc63c9SDavid Howells 			   ),
87958dc63c9SDavid Howells 
880a25e21f0SDavid Howells 	    TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
88158dc63c9SDavid Howells 		      __entry->call,
882b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_receive_traces),
88358dc63c9SDavid Howells 		      __entry->serial,
88458dc63c9SDavid Howells 		      __entry->seq,
88558dc63c9SDavid Howells 		      __entry->hard_ack,
88658dc63c9SDavid Howells 		      __entry->top)
88758dc63c9SDavid Howells 	    );
88858dc63c9SDavid Howells 
88984997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg,
89084997905SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
89184997905SDavid Howells 		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
89284997905SDavid Howells 		     int ret),
89384997905SDavid Howells 
89484997905SDavid Howells 	    TP_ARGS(call, why, seq, offset, len, ret),
89584997905SDavid Howells 
89684997905SDavid Howells 	    TP_STRUCT__entry(
897a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
89884997905SDavid Howells 		    __field(enum rxrpc_recvmsg_trace,	why		)
89984997905SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
90084997905SDavid Howells 		    __field(unsigned int,		offset		)
90184997905SDavid Howells 		    __field(unsigned int,		len		)
90284997905SDavid Howells 		    __field(int,			ret		)
90384997905SDavid Howells 			     ),
90484997905SDavid Howells 
90584997905SDavid Howells 	    TP_fast_assign(
906db9b2e0aSDavid Howells 		    __entry->call = call ? call->debug_id : 0;
90784997905SDavid Howells 		    __entry->why = why;
90884997905SDavid Howells 		    __entry->seq = seq;
90984997905SDavid Howells 		    __entry->offset = offset;
91084997905SDavid Howells 		    __entry->len = len;
91184997905SDavid Howells 		    __entry->ret = ret;
91284997905SDavid Howells 			   ),
91384997905SDavid Howells 
914a25e21f0SDavid Howells 	    TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
91584997905SDavid Howells 		      __entry->call,
916b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
91784997905SDavid Howells 		      __entry->seq,
91884997905SDavid Howells 		      __entry->offset,
91984997905SDavid Howells 		      __entry->len,
92084997905SDavid Howells 		      __entry->ret)
92184997905SDavid Howells 	    );
92284997905SDavid Howells 
923cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx,
924cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
9254700c4d8SDavid Howells 		     int slot, rxrpc_serial_t send_serial),
926cf1a6474SDavid Howells 
9274700c4d8SDavid Howells 	    TP_ARGS(call, why, slot, send_serial),
928cf1a6474SDavid Howells 
929cf1a6474SDavid Howells 	    TP_STRUCT__entry(
930a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
931cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_tx_trace,	why		)
9324700c4d8SDavid Howells 		    __field(int,			slot		)
933cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
934cf1a6474SDavid Howells 			     ),
935cf1a6474SDavid Howells 
936cf1a6474SDavid Howells 	    TP_fast_assign(
937a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
938cf1a6474SDavid Howells 		    __entry->why = why;
9394700c4d8SDavid Howells 		    __entry->slot = slot;
940cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
941cf1a6474SDavid Howells 			   ),
942cf1a6474SDavid Howells 
9434700c4d8SDavid Howells 	    TP_printk("c=%08x [%d] %s sr=%08x",
944cf1a6474SDavid Howells 		      __entry->call,
9454700c4d8SDavid Howells 		      __entry->slot,
946b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
947cf1a6474SDavid Howells 		      __entry->send_serial)
948cf1a6474SDavid Howells 	    );
949cf1a6474SDavid Howells 
950cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx,
951cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
9524700c4d8SDavid Howells 		     int slot,
953cf1a6474SDavid Howells 		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
954c410bf01SDavid Howells 		     u32 rtt, u32 rto),
955cf1a6474SDavid Howells 
9564700c4d8SDavid Howells 	    TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
957cf1a6474SDavid Howells 
958cf1a6474SDavid Howells 	    TP_STRUCT__entry(
959a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
960cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_rx_trace,	why		)
9614700c4d8SDavid Howells 		    __field(int,			slot		)
962cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
963cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		resp_serial	)
964c410bf01SDavid Howells 		    __field(u32,			rtt		)
965c410bf01SDavid Howells 		    __field(u32,			rto		)
966cf1a6474SDavid Howells 			     ),
967cf1a6474SDavid Howells 
968cf1a6474SDavid Howells 	    TP_fast_assign(
969a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
970cf1a6474SDavid Howells 		    __entry->why = why;
9714700c4d8SDavid Howells 		    __entry->slot = slot;
972cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
973cf1a6474SDavid Howells 		    __entry->resp_serial = resp_serial;
974cf1a6474SDavid Howells 		    __entry->rtt = rtt;
975c410bf01SDavid Howells 		    __entry->rto = rto;
976cf1a6474SDavid Howells 			   ),
977cf1a6474SDavid Howells 
9784700c4d8SDavid Howells 	    TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
979cf1a6474SDavid Howells 		      __entry->call,
9804700c4d8SDavid Howells 		      __entry->slot,
981b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
982cf1a6474SDavid Howells 		      __entry->send_serial,
983cf1a6474SDavid Howells 		      __entry->resp_serial,
984cf1a6474SDavid Howells 		      __entry->rtt,
985c410bf01SDavid Howells 		      __entry->rto)
986cf1a6474SDavid Howells 	    );
987cf1a6474SDavid Howells 
988fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer,
989fc7ab6d2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
990a158bdd3SDavid Howells 		     unsigned long now),
991fc7ab6d2SDavid Howells 
992a158bdd3SDavid Howells 	    TP_ARGS(call, why, now),
993fc7ab6d2SDavid Howells 
994fc7ab6d2SDavid Howells 	    TP_STRUCT__entry(
995a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
996fc7ab6d2SDavid Howells 		    __field(enum rxrpc_timer_trace,		why		)
997a158bdd3SDavid Howells 		    __field(long,				now		)
998a158bdd3SDavid Howells 		    __field(long,				ack_at		)
999bd1fdf8cSDavid Howells 		    __field(long,				ack_lost_at	)
1000a158bdd3SDavid Howells 		    __field(long,				resend_at	)
1001a158bdd3SDavid Howells 		    __field(long,				ping_at		)
1002a158bdd3SDavid Howells 		    __field(long,				expect_rx_by	)
1003a158bdd3SDavid Howells 		    __field(long,				expect_req_by	)
1004a158bdd3SDavid Howells 		    __field(long,				expect_term_by	)
1005a158bdd3SDavid Howells 		    __field(long,				timer		)
1006fc7ab6d2SDavid Howells 			     ),
1007fc7ab6d2SDavid Howells 
1008fc7ab6d2SDavid Howells 	    TP_fast_assign(
1009a25e21f0SDavid Howells 		    __entry->call		= call->debug_id;
1010fc7ab6d2SDavid Howells 		    __entry->why		= why;
1011fc7ab6d2SDavid Howells 		    __entry->now		= now;
1012fc7ab6d2SDavid Howells 		    __entry->ack_at		= call->ack_at;
1013bd1fdf8cSDavid Howells 		    __entry->ack_lost_at	= call->ack_lost_at;
1014fc7ab6d2SDavid Howells 		    __entry->resend_at		= call->resend_at;
1015a158bdd3SDavid Howells 		    __entry->expect_rx_by	= call->expect_rx_by;
1016a158bdd3SDavid Howells 		    __entry->expect_req_by	= call->expect_req_by;
1017a158bdd3SDavid Howells 		    __entry->expect_term_by	= call->expect_term_by;
1018fc7ab6d2SDavid Howells 		    __entry->timer		= call->timer.expires;
1019fc7ab6d2SDavid Howells 			   ),
1020fc7ab6d2SDavid Howells 
1021a25e21f0SDavid Howells 	    TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1022fc7ab6d2SDavid Howells 		      __entry->call,
1023b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_timer_traces),
1024a158bdd3SDavid Howells 		      __entry->ack_at - __entry->now,
1025bd1fdf8cSDavid Howells 		      __entry->ack_lost_at - __entry->now,
1026a158bdd3SDavid Howells 		      __entry->resend_at - __entry->now,
1027a158bdd3SDavid Howells 		      __entry->expect_rx_by - __entry->now,
1028a158bdd3SDavid Howells 		      __entry->expect_req_by - __entry->now,
1029a158bdd3SDavid Howells 		      __entry->expect_term_by - __entry->now,
1030a158bdd3SDavid Howells 		      __entry->timer - __entry->now)
1031fc7ab6d2SDavid Howells 	    );
1032fc7ab6d2SDavid Howells 
1033334dfbfcSDavid Howells TRACE_EVENT(rxrpc_timer_expired,
1034334dfbfcSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, unsigned long now),
1035334dfbfcSDavid Howells 
1036334dfbfcSDavid Howells 	    TP_ARGS(call, now),
1037334dfbfcSDavid Howells 
1038334dfbfcSDavid Howells 	    TP_STRUCT__entry(
1039334dfbfcSDavid Howells 		    __field(unsigned int,			call		)
1040334dfbfcSDavid Howells 		    __field(long,				now		)
1041334dfbfcSDavid Howells 		    __field(long,				ack_at		)
1042334dfbfcSDavid Howells 		    __field(long,				ack_lost_at	)
1043334dfbfcSDavid Howells 		    __field(long,				resend_at	)
1044334dfbfcSDavid Howells 		    __field(long,				ping_at		)
1045334dfbfcSDavid Howells 		    __field(long,				expect_rx_by	)
1046334dfbfcSDavid Howells 		    __field(long,				expect_req_by	)
1047334dfbfcSDavid Howells 		    __field(long,				expect_term_by	)
1048334dfbfcSDavid Howells 		    __field(long,				timer		)
1049334dfbfcSDavid Howells 			     ),
1050334dfbfcSDavid Howells 
1051334dfbfcSDavid Howells 	    TP_fast_assign(
1052334dfbfcSDavid Howells 		    __entry->call		= call->debug_id;
1053334dfbfcSDavid Howells 		    __entry->now		= now;
1054334dfbfcSDavid Howells 		    __entry->ack_at		= call->ack_at;
1055334dfbfcSDavid Howells 		    __entry->ack_lost_at	= call->ack_lost_at;
1056334dfbfcSDavid Howells 		    __entry->resend_at		= call->resend_at;
1057334dfbfcSDavid Howells 		    __entry->expect_rx_by	= call->expect_rx_by;
1058334dfbfcSDavid Howells 		    __entry->expect_req_by	= call->expect_req_by;
1059334dfbfcSDavid Howells 		    __entry->expect_term_by	= call->expect_term_by;
1060334dfbfcSDavid Howells 		    __entry->timer		= call->timer.expires;
1061334dfbfcSDavid Howells 			   ),
1062334dfbfcSDavid Howells 
1063334dfbfcSDavid Howells 	    TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1064334dfbfcSDavid Howells 		      __entry->call,
1065334dfbfcSDavid Howells 		      __entry->ack_at - __entry->now,
1066334dfbfcSDavid Howells 		      __entry->ack_lost_at - __entry->now,
1067334dfbfcSDavid Howells 		      __entry->resend_at - __entry->now,
1068334dfbfcSDavid Howells 		      __entry->expect_rx_by - __entry->now,
1069334dfbfcSDavid Howells 		      __entry->expect_req_by - __entry->now,
1070334dfbfcSDavid Howells 		      __entry->expect_term_by - __entry->now,
1071334dfbfcSDavid Howells 		      __entry->timer - __entry->now)
1072334dfbfcSDavid Howells 	    );
1073334dfbfcSDavid Howells 
107489b475abSDavid Howells TRACE_EVENT(rxrpc_rx_lose,
107589b475abSDavid Howells 	    TP_PROTO(struct rxrpc_skb_priv *sp),
107689b475abSDavid Howells 
107789b475abSDavid Howells 	    TP_ARGS(sp),
107889b475abSDavid Howells 
107989b475abSDavid Howells 	    TP_STRUCT__entry(
108089b475abSDavid Howells 		    __field_struct(struct rxrpc_host_header,	hdr		)
108189b475abSDavid Howells 			     ),
108289b475abSDavid Howells 
108389b475abSDavid Howells 	    TP_fast_assign(
108489b475abSDavid Howells 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
108589b475abSDavid Howells 			   ),
108689b475abSDavid Howells 
108789b475abSDavid Howells 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
108889b475abSDavid Howells 		      __entry->hdr.epoch, __entry->hdr.cid,
108989b475abSDavid Howells 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
109089b475abSDavid Howells 		      __entry->hdr.serial, __entry->hdr.seq,
109189b475abSDavid Howells 		      __entry->hdr.type, __entry->hdr.flags,
1092b54a134aSDavid Howells 		      __entry->hdr.type <= 15 ?
1093b54a134aSDavid Howells 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
109489b475abSDavid Howells 	    );
109589b475abSDavid Howells 
10969c7ad434SDavid Howells TRACE_EVENT(rxrpc_propose_ack,
10979c7ad434SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
10989c7ad434SDavid Howells 		     u8 ack_reason, rxrpc_serial_t serial, bool immediate,
10999c7ad434SDavid Howells 		     bool background, enum rxrpc_propose_ack_outcome outcome),
11009c7ad434SDavid Howells 
11019c7ad434SDavid Howells 	    TP_ARGS(call, why, ack_reason, serial, immediate, background,
11029c7ad434SDavid Howells 		    outcome),
11039c7ad434SDavid Howells 
11049c7ad434SDavid Howells 	    TP_STRUCT__entry(
1105a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
11069c7ad434SDavid Howells 		    __field(enum rxrpc_propose_ack_trace,	why		)
11079c7ad434SDavid Howells 		    __field(rxrpc_serial_t,			serial		)
11089c7ad434SDavid Howells 		    __field(u8,					ack_reason	)
11099c7ad434SDavid Howells 		    __field(bool,				immediate	)
11109c7ad434SDavid Howells 		    __field(bool,				background	)
11119c7ad434SDavid Howells 		    __field(enum rxrpc_propose_ack_outcome,	outcome		)
11129c7ad434SDavid Howells 			     ),
11139c7ad434SDavid Howells 
11149c7ad434SDavid Howells 	    TP_fast_assign(
1115a25e21f0SDavid Howells 		    __entry->call	= call->debug_id;
11169c7ad434SDavid Howells 		    __entry->why	= why;
11179c7ad434SDavid Howells 		    __entry->serial	= serial;
11189c7ad434SDavid Howells 		    __entry->ack_reason	= ack_reason;
11199c7ad434SDavid Howells 		    __entry->immediate	= immediate;
11209c7ad434SDavid Howells 		    __entry->background	= background;
11219c7ad434SDavid Howells 		    __entry->outcome	= outcome;
11229c7ad434SDavid Howells 			   ),
11239c7ad434SDavid Howells 
1124a25e21f0SDavid Howells 	    TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s",
11259c7ad434SDavid Howells 		      __entry->call,
1126b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1127b54a134aSDavid Howells 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
11289c7ad434SDavid Howells 		      __entry->serial,
11299c7ad434SDavid Howells 		      __entry->immediate,
11309c7ad434SDavid Howells 		      __entry->background,
1131b54a134aSDavid Howells 		      __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes))
11329c7ad434SDavid Howells 	    );
11339c7ad434SDavid Howells 
1134c6672e3fSDavid Howells TRACE_EVENT(rxrpc_retransmit,
1135c6672e3fSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation,
1136c6672e3fSDavid Howells 		     s64 expiry),
1137c6672e3fSDavid Howells 
1138c6672e3fSDavid Howells 	    TP_ARGS(call, seq, annotation, expiry),
1139c6672e3fSDavid Howells 
1140c6672e3fSDavid Howells 	    TP_STRUCT__entry(
1141a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1142c6672e3fSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
1143c6672e3fSDavid Howells 		    __field(u8,				annotation	)
1144c6672e3fSDavid Howells 		    __field(s64,			expiry		)
1145c6672e3fSDavid Howells 			     ),
1146c6672e3fSDavid Howells 
1147c6672e3fSDavid Howells 	    TP_fast_assign(
1148a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1149c6672e3fSDavid Howells 		    __entry->seq = seq;
1150c6672e3fSDavid Howells 		    __entry->annotation = annotation;
1151c6672e3fSDavid Howells 		    __entry->expiry = expiry;
1152c6672e3fSDavid Howells 			   ),
1153c6672e3fSDavid Howells 
1154a25e21f0SDavid Howells 	    TP_printk("c=%08x q=%x a=%02x xp=%lld",
1155c6672e3fSDavid Howells 		      __entry->call,
1156c6672e3fSDavid Howells 		      __entry->seq,
1157c6672e3fSDavid Howells 		      __entry->annotation,
1158c6672e3fSDavid Howells 		      __entry->expiry)
1159c6672e3fSDavid Howells 	    );
1160c6672e3fSDavid Howells 
116157494343SDavid Howells TRACE_EVENT(rxrpc_congest,
116257494343SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
116357494343SDavid Howells 		     rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
116457494343SDavid Howells 
116557494343SDavid Howells 	    TP_ARGS(call, summary, ack_serial, change),
116657494343SDavid Howells 
116757494343SDavid Howells 	    TP_STRUCT__entry(
1168a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
116957494343SDavid Howells 		    __field(enum rxrpc_congest_change,		change		)
117057494343SDavid Howells 		    __field(rxrpc_seq_t,			hard_ack	)
117157494343SDavid Howells 		    __field(rxrpc_seq_t,			top		)
117257494343SDavid Howells 		    __field(rxrpc_seq_t,			lowest_nak	)
117357494343SDavid Howells 		    __field(rxrpc_serial_t,			ack_serial	)
117457494343SDavid Howells 		    __field_struct(struct rxrpc_ack_summary,	sum		)
117557494343SDavid Howells 			     ),
117657494343SDavid Howells 
117757494343SDavid Howells 	    TP_fast_assign(
1178a25e21f0SDavid Howells 		    __entry->call	= call->debug_id;
117957494343SDavid Howells 		    __entry->change	= change;
118057494343SDavid Howells 		    __entry->hard_ack	= call->tx_hard_ack;
118157494343SDavid Howells 		    __entry->top	= call->tx_top;
118257494343SDavid Howells 		    __entry->lowest_nak	= call->acks_lowest_nak;
118357494343SDavid Howells 		    __entry->ack_serial	= ack_serial;
118457494343SDavid Howells 		    memcpy(&__entry->sum, summary, sizeof(__entry->sum));
118557494343SDavid Howells 			   ),
118657494343SDavid Howells 
1187a25e21f0SDavid 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",
118857494343SDavid Howells 		      __entry->call,
118957494343SDavid Howells 		      __entry->ack_serial,
1190b54a134aSDavid Howells 		      __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
119157494343SDavid Howells 		      __entry->hard_ack,
1192b54a134aSDavid Howells 		      __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
119357494343SDavid Howells 		      __entry->sum.cwnd,
119457494343SDavid Howells 		      __entry->sum.ssthresh,
119557494343SDavid Howells 		      __entry->sum.nr_acks, __entry->sum.nr_nacks,
119657494343SDavid Howells 		      __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks,
119757494343SDavid Howells 		      __entry->sum.nr_rot_new_acks,
119857494343SDavid Howells 		      __entry->top - __entry->hard_ack,
119957494343SDavid Howells 		      __entry->sum.cumulative_acks,
120057494343SDavid Howells 		      __entry->sum.dup_acks,
120157494343SDavid Howells 		      __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1202b54a134aSDavid Howells 		      __print_symbolic(__entry->change, rxrpc_congest_changes),
120357494343SDavid Howells 		      __entry->sum.retrans_timeo ? " rTxTo" : "")
120457494343SDavid Howells 	    );
120557494343SDavid Howells 
1206b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_disconnect_call,
1207b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
1208b1d9f7fdSDavid Howells 
1209b1d9f7fdSDavid Howells 	    TP_ARGS(call),
1210b1d9f7fdSDavid Howells 
1211b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
1212a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1213b1d9f7fdSDavid Howells 		    __field(u32,			abort_code	)
1214b1d9f7fdSDavid Howells 			     ),
1215b1d9f7fdSDavid Howells 
1216b1d9f7fdSDavid Howells 	    TP_fast_assign(
1217a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1218b1d9f7fdSDavid Howells 		    __entry->abort_code = call->abort_code;
1219b1d9f7fdSDavid Howells 			   ),
1220b1d9f7fdSDavid Howells 
1221a25e21f0SDavid Howells 	    TP_printk("c=%08x ab=%08x",
1222b1d9f7fdSDavid Howells 		      __entry->call,
1223b1d9f7fdSDavid Howells 		      __entry->abort_code)
1224b1d9f7fdSDavid Howells 	    );
1225b1d9f7fdSDavid Howells 
1226b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_improper_term,
1227b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
1228b1d9f7fdSDavid Howells 
1229b1d9f7fdSDavid Howells 	    TP_ARGS(call),
1230b1d9f7fdSDavid Howells 
1231b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
1232a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1233b1d9f7fdSDavid Howells 		    __field(u32,			abort_code	)
1234b1d9f7fdSDavid Howells 			     ),
1235b1d9f7fdSDavid Howells 
1236b1d9f7fdSDavid Howells 	    TP_fast_assign(
1237a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1238b1d9f7fdSDavid Howells 		    __entry->abort_code = call->abort_code;
1239b1d9f7fdSDavid Howells 			   ),
1240b1d9f7fdSDavid Howells 
1241a25e21f0SDavid Howells 	    TP_printk("c=%08x ab=%08x",
1242b1d9f7fdSDavid Howells 		      __entry->call,
1243b1d9f7fdSDavid Howells 		      __entry->abort_code)
1244b1d9f7fdSDavid Howells 	    );
1245b1d9f7fdSDavid Howells 
1246fb46f6eeSDavid Howells TRACE_EVENT(rxrpc_rx_eproto,
1247fb46f6eeSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1248fb46f6eeSDavid Howells 		     const char *why),
1249fb46f6eeSDavid Howells 
1250fb46f6eeSDavid Howells 	    TP_ARGS(call, serial, why),
1251fb46f6eeSDavid Howells 
1252fb46f6eeSDavid Howells 	    TP_STRUCT__entry(
1253a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1254fb46f6eeSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
1255fb46f6eeSDavid Howells 		    __field(const char *,		why		)
1256fb46f6eeSDavid Howells 			     ),
1257fb46f6eeSDavid Howells 
1258fb46f6eeSDavid Howells 	    TP_fast_assign(
125999f0eae6SDavid Howells 		    __entry->call = call ? call->debug_id : 0;
1260fb46f6eeSDavid Howells 		    __entry->serial = serial;
1261fb46f6eeSDavid Howells 		    __entry->why = why;
1262fb46f6eeSDavid Howells 			   ),
1263fb46f6eeSDavid Howells 
1264a25e21f0SDavid Howells 	    TP_printk("c=%08x EPROTO %08x %s",
1265fb46f6eeSDavid Howells 		      __entry->call,
1266fb46f6eeSDavid Howells 		      __entry->serial,
1267fb46f6eeSDavid Howells 		      __entry->why)
1268fb46f6eeSDavid Howells 	    );
1269fb46f6eeSDavid Howells 
127089ca6948SDavid Howells TRACE_EVENT(rxrpc_connect_call,
127189ca6948SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
127289ca6948SDavid Howells 
127389ca6948SDavid Howells 	    TP_ARGS(call),
127489ca6948SDavid Howells 
127589ca6948SDavid Howells 	    TP_STRUCT__entry(
1276a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
127789ca6948SDavid Howells 		    __field(unsigned long,		user_call_ID	)
127889ca6948SDavid Howells 		    __field(u32,			cid		)
127989ca6948SDavid Howells 		    __field(u32,			call_id		)
128089ca6948SDavid Howells 			     ),
128189ca6948SDavid Howells 
128289ca6948SDavid Howells 	    TP_fast_assign(
1283a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
128489ca6948SDavid Howells 		    __entry->user_call_ID = call->user_call_ID;
128589ca6948SDavid Howells 		    __entry->cid = call->cid;
128689ca6948SDavid Howells 		    __entry->call_id = call->call_id;
128789ca6948SDavid Howells 			   ),
128889ca6948SDavid Howells 
1289a25e21f0SDavid Howells 	    TP_printk("c=%08x u=%p %08x:%08x",
129089ca6948SDavid Howells 		      __entry->call,
129189ca6948SDavid Howells 		      (void *)__entry->user_call_ID,
129289ca6948SDavid Howells 		      __entry->cid,
129389ca6948SDavid Howells 		      __entry->call_id)
129489ca6948SDavid Howells 	    );
129589ca6948SDavid Howells 
1296827efed6SDavid Howells TRACE_EVENT(rxrpc_resend,
1297827efed6SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, int ix),
1298827efed6SDavid Howells 
1299827efed6SDavid Howells 	    TP_ARGS(call, ix),
1300827efed6SDavid Howells 
1301827efed6SDavid Howells 	    TP_STRUCT__entry(
1302a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1303827efed6SDavid Howells 		    __field(int,			ix		)
1304827efed6SDavid Howells 		    __array(u8,				anno, 64	)
1305827efed6SDavid Howells 			     ),
1306827efed6SDavid Howells 
1307827efed6SDavid Howells 	    TP_fast_assign(
1308a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1309827efed6SDavid Howells 		    __entry->ix = ix;
1310827efed6SDavid Howells 		    memcpy(__entry->anno, call->rxtx_annotations, 64);
1311827efed6SDavid Howells 			   ),
1312827efed6SDavid Howells 
1313a25e21f0SDavid Howells 	    TP_printk("c=%08x ix=%u a=%64phN",
1314827efed6SDavid Howells 		      __entry->call,
1315827efed6SDavid Howells 		      __entry->ix,
1316827efed6SDavid Howells 		      __entry->anno)
1317827efed6SDavid Howells 	    );
1318827efed6SDavid Howells 
1319494337c9SDavid Howells TRACE_EVENT(rxrpc_rx_icmp,
1320494337c9SDavid Howells 	    TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1321494337c9SDavid Howells 		     struct sockaddr_rxrpc *srx),
1322494337c9SDavid Howells 
1323494337c9SDavid Howells 	    TP_ARGS(peer, ee, srx),
1324494337c9SDavid Howells 
1325494337c9SDavid Howells 	    TP_STRUCT__entry(
1326494337c9SDavid Howells 		    __field(unsigned int,			peer	)
1327494337c9SDavid Howells 		    __field_struct(struct sock_extended_err,	ee	)
1328494337c9SDavid Howells 		    __field_struct(struct sockaddr_rxrpc,	srx	)
1329494337c9SDavid Howells 			     ),
1330494337c9SDavid Howells 
1331494337c9SDavid Howells 	    TP_fast_assign(
1332494337c9SDavid Howells 		    __entry->peer = peer->debug_id;
1333494337c9SDavid Howells 		    memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1334494337c9SDavid Howells 		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1335494337c9SDavid Howells 			   ),
1336494337c9SDavid Howells 
1337494337c9SDavid Howells 	    TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1338494337c9SDavid Howells 		      __entry->peer,
1339494337c9SDavid Howells 		      __entry->ee.ee_origin,
1340494337c9SDavid Howells 		      __entry->ee.ee_type,
1341494337c9SDavid Howells 		      __entry->ee.ee_code,
1342494337c9SDavid Howells 		      __entry->ee.ee_info,
1343494337c9SDavid Howells 		      __entry->ee.ee_data,
1344494337c9SDavid Howells 		      __entry->ee.ee_errno,
1345494337c9SDavid Howells 		      &__entry->srx.transport)
1346494337c9SDavid Howells 	    );
1347494337c9SDavid Howells 
13486b47fe1dSDavid Howells TRACE_EVENT(rxrpc_tx_fail,
13496b47fe1dSDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
13504764c0daSDavid Howells 		     enum rxrpc_tx_point where),
13516b47fe1dSDavid Howells 
13524764c0daSDavid Howells 	    TP_ARGS(debug_id, serial, ret, where),
13536b47fe1dSDavid Howells 
13546b47fe1dSDavid Howells 	    TP_STRUCT__entry(
13556b47fe1dSDavid Howells 		    __field(unsigned int,		debug_id	)
13566b47fe1dSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
13576b47fe1dSDavid Howells 		    __field(int,			ret		)
13584764c0daSDavid Howells 		    __field(enum rxrpc_tx_point,	where		)
13596b47fe1dSDavid Howells 			     ),
13606b47fe1dSDavid Howells 
13616b47fe1dSDavid Howells 	    TP_fast_assign(
13626b47fe1dSDavid Howells 		    __entry->debug_id = debug_id;
13636b47fe1dSDavid Howells 		    __entry->serial = serial;
13646b47fe1dSDavid Howells 		    __entry->ret = ret;
13654764c0daSDavid Howells 		    __entry->where = where;
13666b47fe1dSDavid Howells 			   ),
13676b47fe1dSDavid Howells 
13686b47fe1dSDavid Howells 	    TP_printk("c=%08x r=%x ret=%d %s",
13696b47fe1dSDavid Howells 		      __entry->debug_id,
13706b47fe1dSDavid Howells 		      __entry->serial,
13716b47fe1dSDavid Howells 		      __entry->ret,
13724764c0daSDavid Howells 		      __print_symbolic(__entry->where, rxrpc_tx_points))
13736b47fe1dSDavid Howells 	    );
13746b47fe1dSDavid Howells 
13751a025028SDavid Howells TRACE_EVENT(rxrpc_call_reset,
13761a025028SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
13771a025028SDavid Howells 
13781a025028SDavid Howells 	    TP_ARGS(call),
13791a025028SDavid Howells 
13801a025028SDavid Howells 	    TP_STRUCT__entry(
13811a025028SDavid Howells 		    __field(unsigned int,		debug_id	)
13821a025028SDavid Howells 		    __field(u32,			cid		)
13831a025028SDavid Howells 		    __field(u32,			call_id		)
13841a025028SDavid Howells 		    __field(rxrpc_serial_t,		call_serial	)
13851a025028SDavid Howells 		    __field(rxrpc_serial_t,		conn_serial	)
13861a025028SDavid Howells 		    __field(rxrpc_seq_t,		tx_seq		)
13871a025028SDavid Howells 		    __field(rxrpc_seq_t,		rx_seq		)
13881a025028SDavid Howells 			     ),
13891a025028SDavid Howells 
13901a025028SDavid Howells 	    TP_fast_assign(
13911a025028SDavid Howells 		    __entry->debug_id = call->debug_id;
13921a025028SDavid Howells 		    __entry->cid = call->cid;
13931a025028SDavid Howells 		    __entry->call_id = call->call_id;
13941a025028SDavid Howells 		    __entry->call_serial = call->rx_serial;
13951a025028SDavid Howells 		    __entry->conn_serial = call->conn->hi_serial;
13961a025028SDavid Howells 		    __entry->tx_seq = call->tx_hard_ack;
13979a3dedcfSDavid Howells 		    __entry->rx_seq = call->rx_hard_ack;
13981a025028SDavid Howells 			   ),
13991a025028SDavid Howells 
14001a025028SDavid Howells 	    TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
14011a025028SDavid Howells 		      __entry->debug_id,
14021a025028SDavid Howells 		      __entry->cid, __entry->call_id,
14031a025028SDavid Howells 		      __entry->call_serial, __entry->conn_serial,
14041a025028SDavid Howells 		      __entry->tx_seq, __entry->rx_seq)
14051a025028SDavid Howells 	    );
14061a025028SDavid Howells 
14074272d303SDavid Howells TRACE_EVENT(rxrpc_notify_socket,
14084272d303SDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
14094272d303SDavid Howells 
14104272d303SDavid Howells 	    TP_ARGS(debug_id, serial),
14114272d303SDavid Howells 
14124272d303SDavid Howells 	    TP_STRUCT__entry(
14134272d303SDavid Howells 		    __field(unsigned int,		debug_id	)
14144272d303SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
14154272d303SDavid Howells 			     ),
14164272d303SDavid Howells 
14174272d303SDavid Howells 	    TP_fast_assign(
14184272d303SDavid Howells 		    __entry->debug_id = debug_id;
14194272d303SDavid Howells 		    __entry->serial = serial;
14204272d303SDavid Howells 			   ),
14214272d303SDavid Howells 
14224272d303SDavid Howells 	    TP_printk("c=%08x r=%08x",
14234272d303SDavid Howells 		      __entry->debug_id,
14244272d303SDavid Howells 		      __entry->serial)
14254272d303SDavid Howells 	    );
14264272d303SDavid Howells 
1427d1f12947SDavid Howells TRACE_EVENT(rxrpc_rx_discard_ack,
1428d1f12947SDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1429d1f12947SDavid Howells 		     rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1430d1f12947SDavid Howells 		     rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1431d1f12947SDavid Howells 
1432d1f12947SDavid Howells 	    TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1433d1f12947SDavid Howells 		    prev_pkt, call_ackr_prev),
1434d1f12947SDavid Howells 
1435d1f12947SDavid Howells 	    TP_STRUCT__entry(
1436d1f12947SDavid Howells 		    __field(unsigned int,	debug_id	)
1437d1f12947SDavid Howells 		    __field(rxrpc_serial_t,	serial		)
1438d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	first_soft_ack)
1439d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	call_ackr_first)
1440d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	prev_pkt)
1441d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	call_ackr_prev)
1442d1f12947SDavid Howells 			     ),
1443d1f12947SDavid Howells 
1444d1f12947SDavid Howells 	    TP_fast_assign(
1445d1f12947SDavid Howells 		    __entry->debug_id		= debug_id;
1446d1f12947SDavid Howells 		    __entry->serial		= serial;
1447d1f12947SDavid Howells 		    __entry->first_soft_ack	= first_soft_ack;
1448d1f12947SDavid Howells 		    __entry->call_ackr_first	= call_ackr_first;
1449d1f12947SDavid Howells 		    __entry->prev_pkt		= prev_pkt;
1450d1f12947SDavid Howells 		    __entry->call_ackr_prev	= call_ackr_prev;
1451d1f12947SDavid Howells 			   ),
1452d1f12947SDavid Howells 
1453d1f12947SDavid Howells 	    TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1454d1f12947SDavid Howells 		      __entry->debug_id,
1455d1f12947SDavid Howells 		      __entry->serial,
1456d1f12947SDavid Howells 		      __entry->first_soft_ack,
1457d1f12947SDavid Howells 		      __entry->call_ackr_first,
1458d1f12947SDavid Howells 		      __entry->prev_pkt,
1459d1f12947SDavid Howells 		      __entry->call_ackr_prev)
1460d1f12947SDavid Howells 	    );
1461d1f12947SDavid Howells 
14624d843be5SDavid Howells TRACE_EVENT(rxrpc_req_ack,
14634d843be5SDavid Howells 	    TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
14644d843be5SDavid Howells 		     enum rxrpc_req_ack_trace why),
14654d843be5SDavid Howells 
14664d843be5SDavid Howells 	    TP_ARGS(call_debug_id, seq, why),
14674d843be5SDavid Howells 
14684d843be5SDavid Howells 	    TP_STRUCT__entry(
14694d843be5SDavid Howells 		    __field(unsigned int,		call_debug_id	)
14704d843be5SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
14714d843be5SDavid Howells 		    __field(enum rxrpc_req_ack_trace,	why		)
14724d843be5SDavid Howells 			     ),
14734d843be5SDavid Howells 
14744d843be5SDavid Howells 	    TP_fast_assign(
14754d843be5SDavid Howells 		    __entry->call_debug_id = call_debug_id;
14764d843be5SDavid Howells 		    __entry->seq = seq;
14774d843be5SDavid Howells 		    __entry->why = why;
14784d843be5SDavid Howells 			   ),
14794d843be5SDavid Howells 
14804d843be5SDavid Howells 	    TP_printk("c=%08x q=%08x REQ-%s",
14814d843be5SDavid Howells 		      __entry->call_debug_id,
14824d843be5SDavid Howells 		      __entry->seq,
14834d843be5SDavid Howells 		      __print_symbolic(__entry->why, rxrpc_req_ack_traces))
14844d843be5SDavid Howells 	    );
14854d843be5SDavid Howells 
1486*02a19356SDavid Howells TRACE_EVENT(rxrpc_txbuf,
1487*02a19356SDavid Howells 	    TP_PROTO(unsigned int debug_id,
1488*02a19356SDavid Howells 		     unsigned int call_debug_id, rxrpc_seq_t seq,
1489*02a19356SDavid Howells 		     int ref, enum rxrpc_txbuf_trace what),
1490*02a19356SDavid Howells 
1491*02a19356SDavid Howells 	    TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1492*02a19356SDavid Howells 
1493*02a19356SDavid Howells 	    TP_STRUCT__entry(
1494*02a19356SDavid Howells 		    __field(unsigned int,		debug_id	)
1495*02a19356SDavid Howells 		    __field(unsigned int,		call_debug_id	)
1496*02a19356SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
1497*02a19356SDavid Howells 		    __field(int,			ref		)
1498*02a19356SDavid Howells 		    __field(enum rxrpc_txbuf_trace,	what		)
1499*02a19356SDavid Howells 			     ),
1500*02a19356SDavid Howells 
1501*02a19356SDavid Howells 	    TP_fast_assign(
1502*02a19356SDavid Howells 		    __entry->debug_id = debug_id;
1503*02a19356SDavid Howells 		    __entry->call_debug_id = call_debug_id;
1504*02a19356SDavid Howells 		    __entry->seq = seq;
1505*02a19356SDavid Howells 		    __entry->ref = ref;
1506*02a19356SDavid Howells 		    __entry->what = what;
1507*02a19356SDavid Howells 			   ),
1508*02a19356SDavid Howells 
1509*02a19356SDavid Howells 	    TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1510*02a19356SDavid Howells 		      __entry->debug_id,
1511*02a19356SDavid Howells 		      __entry->call_debug_id,
1512*02a19356SDavid Howells 		      __entry->seq,
1513*02a19356SDavid Howells 		      __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1514*02a19356SDavid Howells 		      __entry->ref)
1515*02a19356SDavid Howells 	    );
1516*02a19356SDavid Howells 
1517dc9fd093SDavid Howells #undef EM
1518dc9fd093SDavid Howells #undef E_
1519df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */
1520df844fd4SDavid Howells 
1521df844fd4SDavid Howells /* This part must be outside protection */
1522df844fd4SDavid Howells #include <trace/define_trace.h>
1523