xref: /openbmc/linux/include/trace/events/rxrpc.h (revision 3feda9d69c83983b530cea6287ba4fea0e5c3b87)
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 \
209a36a6bcSDavid Howells 	EM(rxrpc_skb_eaten_by_unshare,		"ETN unshare  ") \
219a36a6bcSDavid Howells 	EM(rxrpc_skb_eaten_by_unshare_nomem,	"ETN unshar-nm") \
229a36a6bcSDavid Howells 	EM(rxrpc_skb_get_ack,			"GET ack      ") \
239a36a6bcSDavid Howells 	EM(rxrpc_skb_get_conn_work,		"GET conn-work") \
249a36a6bcSDavid Howells 	EM(rxrpc_skb_get_to_recvmsg,		"GET to-recv  ") \
259a36a6bcSDavid Howells 	EM(rxrpc_skb_get_to_recvmsg_oos,	"GET to-recv-o") \
269a36a6bcSDavid Howells 	EM(rxrpc_skb_new_encap_rcv,		"NEW encap-rcv") \
279a36a6bcSDavid Howells 	EM(rxrpc_skb_new_error_report,		"NEW error-rpt") \
289a36a6bcSDavid Howells 	EM(rxrpc_skb_new_jumbo_subpacket,	"NEW jumbo-sub") \
299a36a6bcSDavid Howells 	EM(rxrpc_skb_new_unshared,		"NEW unshared ") \
309a36a6bcSDavid Howells 	EM(rxrpc_skb_put_ack,			"PUT ack      ") \
319a36a6bcSDavid Howells 	EM(rxrpc_skb_put_conn_work,		"PUT conn-work") \
329a36a6bcSDavid Howells 	EM(rxrpc_skb_put_error_report,		"PUT error-rep") \
339a36a6bcSDavid Howells 	EM(rxrpc_skb_put_input,			"PUT input    ") \
349a36a6bcSDavid Howells 	EM(rxrpc_skb_put_jumbo_subpacket,	"PUT jumbo-sub") \
359a36a6bcSDavid Howells 	EM(rxrpc_skb_put_lose,			"PUT lose     ") \
369a36a6bcSDavid Howells 	EM(rxrpc_skb_put_purge,			"PUT purge    ") \
379a36a6bcSDavid Howells 	EM(rxrpc_skb_put_rotate,		"PUT rotate   ") \
389a36a6bcSDavid Howells 	EM(rxrpc_skb_put_unknown,		"PUT unknown  ") \
399a36a6bcSDavid Howells 	EM(rxrpc_skb_see_conn_work,		"SEE conn-work") \
409a36a6bcSDavid Howells 	EM(rxrpc_skb_see_local_work,		"SEE locl-work") \
419a36a6bcSDavid Howells 	EM(rxrpc_skb_see_recvmsg,		"SEE recvmsg  ") \
429a36a6bcSDavid Howells 	EM(rxrpc_skb_see_reject,		"SEE reject   ") \
439a36a6bcSDavid Howells 	EM(rxrpc_skb_see_rotate,		"SEE rotate   ") \
449a36a6bcSDavid Howells 	E_(rxrpc_skb_see_version,		"SEE version  ")
45b54a134aSDavid Howells 
4609d2bf59SDavid Howells #define rxrpc_local_traces \
470fde882fSDavid Howells 	EM(rxrpc_local_free,			"FREE        ") \
480fde882fSDavid Howells 	EM(rxrpc_local_get_client_conn,		"GET conn-cln") \
490fde882fSDavid Howells 	EM(rxrpc_local_get_for_use,		"GET for-use ") \
500fde882fSDavid Howells 	EM(rxrpc_local_get_peer,		"GET peer    ") \
510fde882fSDavid Howells 	EM(rxrpc_local_get_prealloc_conn,	"GET conn-pre") \
520fde882fSDavid Howells 	EM(rxrpc_local_get_queue,		"GET queue   ") \
5309d2bf59SDavid Howells 	EM(rxrpc_local_new,			"NEW         ") \
540fde882fSDavid Howells 	EM(rxrpc_local_processing,		"PROCESSING  ") \
550fde882fSDavid Howells 	EM(rxrpc_local_put_already_queued,	"PUT alreadyq") \
560fde882fSDavid Howells 	EM(rxrpc_local_put_bind,		"PUT bind    ") \
570fde882fSDavid Howells 	EM(rxrpc_local_put_for_use,		"PUT for-use ") \
580fde882fSDavid Howells 	EM(rxrpc_local_put_kill_conn,		"PUT conn-kil") \
590fde882fSDavid Howells 	EM(rxrpc_local_put_peer,		"PUT peer    ") \
600fde882fSDavid Howells 	EM(rxrpc_local_put_prealloc_conn,	"PUT conn-pre") \
610fde882fSDavid Howells 	EM(rxrpc_local_put_release_sock,	"PUT rel-sock") \
620fde882fSDavid Howells 	EM(rxrpc_local_put_queue,		"PUT queue   ") \
630fde882fSDavid Howells 	EM(rxrpc_local_queued,			"QUEUED      ") \
640fde882fSDavid Howells 	EM(rxrpc_local_see_tx_ack,		"SEE tx-ack  ") \
650fde882fSDavid Howells 	EM(rxrpc_local_stop,			"STOP        ") \
660fde882fSDavid Howells 	EM(rxrpc_local_stopped,			"STOPPED     ") \
670fde882fSDavid Howells 	EM(rxrpc_local_unuse_bind,		"UNU bind    ") \
680fde882fSDavid Howells 	EM(rxrpc_local_unuse_conn_work,		"UNU conn-wrk") \
690fde882fSDavid Howells 	EM(rxrpc_local_unuse_peer_keepalive,	"UNU peer-kpa") \
700fde882fSDavid Howells 	EM(rxrpc_local_unuse_release_sock,	"UNU rel-sock") \
710fde882fSDavid Howells 	EM(rxrpc_local_unuse_work,		"UNU work    ") \
720fde882fSDavid Howells 	EM(rxrpc_local_use_conn_work,		"USE conn-wrk") \
730fde882fSDavid Howells 	EM(rxrpc_local_use_lookup,		"USE lookup  ") \
740fde882fSDavid Howells 	EM(rxrpc_local_use_peer_keepalive,	"USE peer-kpa") \
750fde882fSDavid Howells 	E_(rxrpc_local_use_work,		"USE work    ")
7609d2bf59SDavid Howells 
771159d4b4SDavid Howells #define rxrpc_peer_traces \
7847c810a7SDavid Howells 	EM(rxrpc_peer_free,			"FREE        ") \
7947c810a7SDavid Howells 	EM(rxrpc_peer_get_accept,		"GET accept  ") \
8047c810a7SDavid Howells 	EM(rxrpc_peer_get_activate_call,	"GET act-call") \
8147c810a7SDavid Howells 	EM(rxrpc_peer_get_bundle,		"GET bundle  ") \
8247c810a7SDavid Howells 	EM(rxrpc_peer_get_client_conn,		"GET cln-conn") \
8347c810a7SDavid Howells 	EM(rxrpc_peer_get_input_error,		"GET inpt-err") \
8447c810a7SDavid Howells 	EM(rxrpc_peer_get_keepalive,		"GET keepaliv") \
8547c810a7SDavid Howells 	EM(rxrpc_peer_get_lookup_client,	"GET look-cln") \
8647c810a7SDavid Howells 	EM(rxrpc_peer_get_service_conn,		"GET srv-conn") \
8747c810a7SDavid Howells 	EM(rxrpc_peer_new_client,		"NEW client  ") \
8847c810a7SDavid Howells 	EM(rxrpc_peer_new_prealloc,		"NEW prealloc") \
8947c810a7SDavid Howells 	EM(rxrpc_peer_put_bundle,		"PUT bundle  ") \
9047c810a7SDavid Howells 	EM(rxrpc_peer_put_call,			"PUT call    ") \
9147c810a7SDavid Howells 	EM(rxrpc_peer_put_conn,			"PUT conn    ") \
9247c810a7SDavid Howells 	EM(rxrpc_peer_put_discard_tmp,		"PUT disc-tmp") \
9347c810a7SDavid Howells 	EM(rxrpc_peer_put_input_error,		"PUT inpt-err") \
9447c810a7SDavid Howells 	E_(rxrpc_peer_put_keepalive,		"PUT keepaliv")
951159d4b4SDavid Howells 
96fa3492abSDavid Howells #define rxrpc_bundle_traces \
97fa3492abSDavid Howells 	EM(rxrpc_bundle_free,			"FREE        ") \
98fa3492abSDavid Howells 	EM(rxrpc_bundle_get_client_call,	"GET clt-call") \
99fa3492abSDavid Howells 	EM(rxrpc_bundle_get_client_conn,	"GET clt-conn") \
100fa3492abSDavid Howells 	EM(rxrpc_bundle_get_service_conn,	"GET svc-conn") \
101fa3492abSDavid Howells 	EM(rxrpc_bundle_put_conn,		"PUT conn    ") \
102fa3492abSDavid Howells 	EM(rxrpc_bundle_put_discard,		"PUT discard ") \
103fa3492abSDavid Howells 	E_(rxrpc_bundle_new,			"NEW         ")
104fa3492abSDavid Howells 
105b54a134aSDavid Howells #define rxrpc_conn_traces \
1067fa25105SDavid Howells 	EM(rxrpc_conn_free,			"FREE        ") \
1077fa25105SDavid Howells 	EM(rxrpc_conn_get_activate_call,	"GET act-call") \
1087fa25105SDavid Howells 	EM(rxrpc_conn_get_call_input,		"GET inp-call") \
1097fa25105SDavid Howells 	EM(rxrpc_conn_get_conn_input,		"GET inp-conn") \
1107fa25105SDavid Howells 	EM(rxrpc_conn_get_idle,			"GET idle    ") \
1117fa25105SDavid Howells 	EM(rxrpc_conn_get_poke,			"GET poke    ") \
1127fa25105SDavid Howells 	EM(rxrpc_conn_get_service_conn,		"GET svc-conn") \
1137fa25105SDavid Howells 	EM(rxrpc_conn_new_client,		"NEW client  ") \
1147fa25105SDavid Howells 	EM(rxrpc_conn_new_service,		"NEW service ") \
1157fa25105SDavid Howells 	EM(rxrpc_conn_put_already_queued,	"PUT alreadyq") \
1167fa25105SDavid Howells 	EM(rxrpc_conn_put_call,			"PUT call    ") \
1177fa25105SDavid Howells 	EM(rxrpc_conn_put_call_input,		"PUT inp-call") \
1187fa25105SDavid Howells 	EM(rxrpc_conn_put_conn_input,		"PUT inp-conn") \
1197fa25105SDavid Howells 	EM(rxrpc_conn_put_discard,		"PUT discard ") \
1207fa25105SDavid Howells 	EM(rxrpc_conn_put_discard_idle,		"PUT disc-idl") \
1217fa25105SDavid Howells 	EM(rxrpc_conn_put_local_dead,		"PUT loc-dead") \
1227fa25105SDavid Howells 	EM(rxrpc_conn_put_noreuse,		"PUT noreuse ") \
1237fa25105SDavid Howells 	EM(rxrpc_conn_put_poke,			"PUT poke    ") \
1247fa25105SDavid Howells 	EM(rxrpc_conn_put_unbundle,		"PUT unbundle") \
1257fa25105SDavid Howells 	EM(rxrpc_conn_put_unidle,		"PUT unidle  ") \
1267fa25105SDavid Howells 	EM(rxrpc_conn_put_work,			"PUT work    ") \
1277fa25105SDavid Howells 	EM(rxrpc_conn_queue_challenge,		"GQ  chall   ") \
1287fa25105SDavid Howells 	EM(rxrpc_conn_queue_retry_work,		"GQ  retry-wk") \
1297fa25105SDavid Howells 	EM(rxrpc_conn_queue_rx_work,		"GQ  rx-work ") \
1307fa25105SDavid Howells 	EM(rxrpc_conn_queue_timer,		"GQ  timer   ") \
1317fa25105SDavid Howells 	EM(rxrpc_conn_see_new_service_conn,	"SEE new-svc ") \
1327fa25105SDavid Howells 	EM(rxrpc_conn_see_reap_service,		"SEE reap-svc") \
1337fa25105SDavid Howells 	E_(rxrpc_conn_see_work,			"SEE work    ")
134b54a134aSDavid Howells 
135b54a134aSDavid Howells #define rxrpc_client_traces \
136b54a134aSDavid Howells 	EM(rxrpc_client_activate_chans,		"Activa") \
137b54a134aSDavid Howells 	EM(rxrpc_client_alloc,			"Alloc ") \
138b54a134aSDavid Howells 	EM(rxrpc_client_chan_activate,		"ChActv") \
139b54a134aSDavid Howells 	EM(rxrpc_client_chan_disconnect,	"ChDisc") \
140b54a134aSDavid Howells 	EM(rxrpc_client_chan_pass,		"ChPass") \
141930c9f91SDavid Howells 	EM(rxrpc_client_chan_wait_failed,	"ChWtFl") \
142b54a134aSDavid Howells 	EM(rxrpc_client_cleanup,		"Clean ") \
143b54a134aSDavid Howells 	EM(rxrpc_client_discard,		"Discar") \
144b54a134aSDavid Howells 	EM(rxrpc_client_duplicate,		"Duplic") \
145b54a134aSDavid Howells 	EM(rxrpc_client_exposed,		"Expose") \
146b54a134aSDavid Howells 	EM(rxrpc_client_replace,		"Replac") \
147b54a134aSDavid Howells 	EM(rxrpc_client_to_active,		"->Actv") \
148245500d8SDavid Howells 	E_(rxrpc_client_to_idle,		"->Idle")
149b54a134aSDavid Howells 
150b54a134aSDavid Howells #define rxrpc_call_traces \
151cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_input,		"GET input   ") \
152cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_kernel_service,	"GET krnl-srv") \
153cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_notify_socket,	"GET notify  ") \
154cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_recvmsg,		"GET recvmsg ") \
155cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_release_sock,		"GET rel-sock") \
156cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_sendmsg,		"GET sendmsg ") \
157cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_send_ack,		"GET send-ack") \
158cb0fc0c9SDavid Howells 	EM(rxrpc_call_get_userid,		"GET user-id ") \
159cb0fc0c9SDavid Howells 	EM(rxrpc_call_new_client,		"NEW client  ") \
160cb0fc0c9SDavid Howells 	EM(rxrpc_call_new_prealloc_service,	"NEW prealloc") \
161cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_discard_prealloc,	"PUT disc-pre") \
162cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_input,		"PUT input   ") \
163cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_kernel,		"PUT kernel  ") \
164cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_recvmsg,		"PUT recvmsg ") \
165cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_release_sock,		"PUT rls-sock") \
166cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_release_sock_tba,	"PUT rls-sk-a") \
167cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_send_ack,		"PUT send-ack") \
168cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_sendmsg,		"PUT sendmsg ") \
169cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_unnotify,		"PUT unnotify") \
170cb0fc0c9SDavid Howells 	EM(rxrpc_call_put_userid_exists,	"PUT u-exists") \
171cb0fc0c9SDavid Howells 	EM(rxrpc_call_queue_abort,		"QUE abort   ") \
172cb0fc0c9SDavid Howells 	EM(rxrpc_call_queue_requeue,		"QUE requeue ") \
173cb0fc0c9SDavid Howells 	EM(rxrpc_call_queue_resend,		"QUE resend  ") \
174cb0fc0c9SDavid Howells 	EM(rxrpc_call_queue_timer,		"QUE timer   ") \
175cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_accept,		"SEE accept  ") \
176cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_activate_client,	"SEE act-clnt") \
177cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_connect_failed,	"SEE con-fail") \
178cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_connected,		"SEE connect ") \
179cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_distribute_error,	"SEE dist-err") \
180cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_input,		"SEE input   ") \
181cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_release,		"SEE release ") \
182cb0fc0c9SDavid Howells 	EM(rxrpc_call_see_userid_exists,	"SEE u-exists") \
183cb0fc0c9SDavid Howells 	E_(rxrpc_call_see_zap,			"SEE zap     ")
184b54a134aSDavid Howells 
185a4ea4c47SDavid Howells #define rxrpc_txqueue_traces \
186a4ea4c47SDavid Howells 	EM(rxrpc_txqueue_await_reply,		"AWR") \
187a4ea4c47SDavid Howells 	EM(rxrpc_txqueue_dequeue,		"DEQ") \
188a4ea4c47SDavid Howells 	EM(rxrpc_txqueue_end,			"END") \
189a4ea4c47SDavid Howells 	EM(rxrpc_txqueue_queue,			"QUE") \
190a4ea4c47SDavid Howells 	EM(rxrpc_txqueue_queue_last,		"QLS") \
191a4ea4c47SDavid Howells 	EM(rxrpc_txqueue_rotate,		"ROT") \
192a4ea4c47SDavid Howells 	EM(rxrpc_txqueue_rotate_last,		"RLS") \
193a4ea4c47SDavid Howells 	E_(rxrpc_txqueue_wait,			"WAI")
194b54a134aSDavid Howells 
195b54a134aSDavid Howells #define rxrpc_receive_traces \
196b54a134aSDavid Howells 	EM(rxrpc_receive_end,			"END") \
197b54a134aSDavid Howells 	EM(rxrpc_receive_front,			"FRN") \
198b54a134aSDavid Howells 	EM(rxrpc_receive_incoming,		"INC") \
199b54a134aSDavid Howells 	EM(rxrpc_receive_queue,			"QUE") \
200b54a134aSDavid Howells 	EM(rxrpc_receive_queue_last,		"QLS") \
2015d7edbc9SDavid Howells 	EM(rxrpc_receive_queue_oos,		"QUO") \
2025d7edbc9SDavid Howells 	EM(rxrpc_receive_queue_oos_last,	"QOL") \
2035d7edbc9SDavid Howells 	EM(rxrpc_receive_oos,			"OOS") \
2045d7edbc9SDavid Howells 	EM(rxrpc_receive_oos_last,		"OSL") \
2055d7edbc9SDavid Howells 	EM(rxrpc_receive_rotate,		"ROT") \
2065d7edbc9SDavid Howells 	E_(rxrpc_receive_rotate_last,		"RLS")
207b54a134aSDavid Howells 
208b54a134aSDavid Howells #define rxrpc_recvmsg_traces \
209b54a134aSDavid Howells 	EM(rxrpc_recvmsg_cont,			"CONT") \
210b54a134aSDavid Howells 	EM(rxrpc_recvmsg_data_return,		"DATA") \
211b54a134aSDavid Howells 	EM(rxrpc_recvmsg_dequeue,		"DEQU") \
212b54a134aSDavid Howells 	EM(rxrpc_recvmsg_enter,			"ENTR") \
213b54a134aSDavid Howells 	EM(rxrpc_recvmsg_full,			"FULL") \
214b54a134aSDavid Howells 	EM(rxrpc_recvmsg_hole,			"HOLE") \
215b54a134aSDavid Howells 	EM(rxrpc_recvmsg_next,			"NEXT") \
216540b1c48SDavid Howells 	EM(rxrpc_recvmsg_requeue,		"REQU") \
217b54a134aSDavid Howells 	EM(rxrpc_recvmsg_return,		"RETN") \
218b54a134aSDavid Howells 	EM(rxrpc_recvmsg_terminal,		"TERM") \
219b54a134aSDavid Howells 	EM(rxrpc_recvmsg_to_be_accepted,	"TBAC") \
220b54a134aSDavid Howells 	E_(rxrpc_recvmsg_wait,			"WAIT")
221b54a134aSDavid Howells 
222b54a134aSDavid Howells #define rxrpc_rtt_tx_traces \
2234700c4d8SDavid Howells 	EM(rxrpc_rtt_tx_cancel,			"CNCE") \
224b54a134aSDavid Howells 	EM(rxrpc_rtt_tx_data,			"DATA") \
2254700c4d8SDavid Howells 	EM(rxrpc_rtt_tx_no_slot,		"FULL") \
226b54a134aSDavid Howells 	E_(rxrpc_rtt_tx_ping,			"PING")
227b54a134aSDavid Howells 
228b54a134aSDavid Howells #define rxrpc_rtt_rx_traces \
2294700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_cancel,			"CNCL") \
2304700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_obsolete,		"OBSL") \
2314700c4d8SDavid Howells 	EM(rxrpc_rtt_rx_lost,			"LOST") \
232b54a134aSDavid Howells 	EM(rxrpc_rtt_rx_ping_response,		"PONG") \
233b54a134aSDavid Howells 	E_(rxrpc_rtt_rx_requested_ack,		"RACK")
234b54a134aSDavid Howells 
235b54a134aSDavid Howells #define rxrpc_timer_traces \
236b54a134aSDavid Howells 	EM(rxrpc_timer_begin,			"Begin ") \
237a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_ack,			"ExpAck") \
238a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_hard,		"ExpHrd") \
239a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_idle,		"ExpIdl") \
240415f44e4SDavid Howells 	EM(rxrpc_timer_exp_keepalive,		"ExpKA ") \
241bd1fdf8cSDavid Howells 	EM(rxrpc_timer_exp_lost_ack,		"ExpLoA") \
242a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_normal,		"ExpNml") \
243a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_ping,		"ExpPng") \
244a158bdd3SDavid Howells 	EM(rxrpc_timer_exp_resend,		"ExpRsn") \
245b54a134aSDavid Howells 	EM(rxrpc_timer_init_for_reply,		"IniRpl") \
246b54a134aSDavid Howells 	EM(rxrpc_timer_init_for_send_reply,	"SndRpl") \
247a158bdd3SDavid Howells 	EM(rxrpc_timer_restart,			"Restrt") \
248b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_ack,		"SetAck") \
249a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_hard,		"SetHrd") \
250a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_idle,		"SetIdl") \
251415f44e4SDavid Howells 	EM(rxrpc_timer_set_for_keepalive,	"KeepAl") \
252bd1fdf8cSDavid Howells 	EM(rxrpc_timer_set_for_lost_ack,	"SetLoA") \
253a158bdd3SDavid Howells 	EM(rxrpc_timer_set_for_normal,		"SetNml") \
254b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_ping,		"SetPng") \
255b54a134aSDavid Howells 	EM(rxrpc_timer_set_for_resend,		"SetRTx") \
256a158bdd3SDavid Howells 	E_(rxrpc_timer_set_for_send,		"SetSnd")
257b54a134aSDavid Howells 
258b54a134aSDavid Howells #define rxrpc_propose_ack_traces \
259b54a134aSDavid Howells 	EM(rxrpc_propose_ack_client_tx_end,	"ClTxEnd") \
260b54a134aSDavid Howells 	EM(rxrpc_propose_ack_input_data,	"DataIn ") \
261530403d9SDavid Howells 	EM(rxrpc_propose_ack_input_data_hole,	"DataInH") \
2627150ceaaSDavid Howells 	EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
263415f44e4SDavid Howells 	EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
264b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_lost_ack,	"LostAck") \
265b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
266b54a134aSDavid Howells 	EM(rxrpc_propose_ack_ping_for_params,	"Params ") \
267b54a134aSDavid Howells 	EM(rxrpc_propose_ack_processing_op,	"ProcOp ") \
268b54a134aSDavid Howells 	EM(rxrpc_propose_ack_respond_to_ack,	"Rsp2Ack") \
269b54a134aSDavid Howells 	EM(rxrpc_propose_ack_respond_to_ping,	"Rsp2Png") \
270b54a134aSDavid Howells 	EM(rxrpc_propose_ack_retry_tx,		"RetryTx") \
271b54a134aSDavid Howells 	EM(rxrpc_propose_ack_rotate_rx,		"RxAck  ") \
272b54a134aSDavid Howells 	E_(rxrpc_propose_ack_terminal_ack,	"ClTerm ")
273b54a134aSDavid Howells 
274b54a134aSDavid Howells #define rxrpc_congest_modes \
275b54a134aSDavid Howells 	EM(RXRPC_CALL_CONGEST_AVOIDANCE,	"CongAvoid") \
276b54a134aSDavid Howells 	EM(RXRPC_CALL_FAST_RETRANSMIT,		"FastReTx ") \
277b54a134aSDavid Howells 	EM(RXRPC_CALL_PACKET_LOSS,		"PktLoss  ") \
278b54a134aSDavid Howells 	E_(RXRPC_CALL_SLOW_START,		"SlowStart")
279b54a134aSDavid Howells 
280b54a134aSDavid Howells #define rxrpc_congest_changes \
281b54a134aSDavid Howells 	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
282b54a134aSDavid Howells 	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
283b54a134aSDavid Howells 	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
284aadf9dceSDavid Howells 	EM(rxrpc_cong_no_change,		" -") \
285b54a134aSDavid Howells 	EM(rxrpc_cong_progress,			" Progres") \
2861fc4fa2aSDavid Howells 	EM(rxrpc_cong_idle_reset,		" IdleRes") \
287b54a134aSDavid Howells 	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
288b54a134aSDavid Howells 	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \
289b54a134aSDavid Howells 	E_(rxrpc_cong_saw_nack,			" SawNack")
290b54a134aSDavid Howells 
291b54a134aSDavid Howells #define rxrpc_pkts \
292b54a134aSDavid Howells 	EM(0,					"?00") \
293b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_DATA,		"DATA") \
294b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ACK,		"ACK") \
295b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_BUSY,		"BUSY") \
296b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ABORT,		"ABORT") \
297b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_ACKALL,		"ACKALL") \
298b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_CHALLENGE,		"CHALL") \
299b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_RESPONSE,		"RESP") \
300b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_DEBUG,		"DEBUG") \
301b54a134aSDavid Howells 	EM(9,					"?09") \
302b54a134aSDavid Howells 	EM(10,					"?10") \
303b54a134aSDavid Howells 	EM(11,					"?11") \
304b54a134aSDavid Howells 	EM(12,					"?12") \
305b54a134aSDavid Howells 	EM(RXRPC_PACKET_TYPE_VERSION,		"VERSION") \
306b54a134aSDavid Howells 	EM(14,					"?14") \
307b54a134aSDavid Howells 	E_(15,					"?15")
308b54a134aSDavid Howells 
309b54a134aSDavid Howells #define rxrpc_ack_names \
310b54a134aSDavid Howells 	EM(0,					"-0-") \
311b54a134aSDavid Howells 	EM(RXRPC_ACK_REQUESTED,			"REQ") \
312b54a134aSDavid Howells 	EM(RXRPC_ACK_DUPLICATE,			"DUP") \
313b54a134aSDavid Howells 	EM(RXRPC_ACK_OUT_OF_SEQUENCE,		"OOS") \
314b54a134aSDavid Howells 	EM(RXRPC_ACK_EXCEEDS_WINDOW,		"WIN") \
315b54a134aSDavid Howells 	EM(RXRPC_ACK_NOSPACE,			"MEM") \
316b54a134aSDavid Howells 	EM(RXRPC_ACK_PING,			"PNG") \
317b54a134aSDavid Howells 	EM(RXRPC_ACK_PING_RESPONSE,		"PNR") \
318b54a134aSDavid Howells 	EM(RXRPC_ACK_DELAY,			"DLY") \
319b54a134aSDavid Howells 	EM(RXRPC_ACK_IDLE,			"IDL") \
320b54a134aSDavid Howells 	E_(RXRPC_ACK__INVALID,			"-?-")
321b54a134aSDavid Howells 
3221bae5d22SDavid Howells #define rxrpc_completions \
3231bae5d22SDavid Howells 	EM(RXRPC_CALL_SUCCEEDED,		"Succeeded") \
3241bae5d22SDavid Howells 	EM(RXRPC_CALL_REMOTELY_ABORTED,		"RemoteAbort") \
3251bae5d22SDavid Howells 	EM(RXRPC_CALL_LOCALLY_ABORTED,		"LocalAbort") \
3261bae5d22SDavid Howells 	EM(RXRPC_CALL_LOCAL_ERROR,		"LocalError") \
3271bae5d22SDavid Howells 	E_(RXRPC_CALL_NETWORK_ERROR,		"NetError")
3281bae5d22SDavid Howells 
3294764c0daSDavid Howells #define rxrpc_tx_points \
3304764c0daSDavid Howells 	EM(rxrpc_tx_point_call_abort,		"CallAbort") \
3314764c0daSDavid Howells 	EM(rxrpc_tx_point_call_ack,		"CallAck") \
3324764c0daSDavid Howells 	EM(rxrpc_tx_point_call_data_frag,	"CallDataFrag") \
3334764c0daSDavid Howells 	EM(rxrpc_tx_point_call_data_nofrag,	"CallDataNofrag") \
3344764c0daSDavid Howells 	EM(rxrpc_tx_point_call_final_resend,	"CallFinalResend") \
3354764c0daSDavid Howells 	EM(rxrpc_tx_point_conn_abort,		"ConnAbort") \
3364764c0daSDavid Howells 	EM(rxrpc_tx_point_reject,		"Reject") \
3374764c0daSDavid Howells 	EM(rxrpc_tx_point_rxkad_challenge,	"RxkadChall") \
3384764c0daSDavid Howells 	EM(rxrpc_tx_point_rxkad_response,	"RxkadResp") \
3394764c0daSDavid Howells 	EM(rxrpc_tx_point_version_keepalive,	"VerKeepalive") \
3404764c0daSDavid Howells 	E_(rxrpc_tx_point_version_reply,	"VerReply")
3416b47fe1dSDavid Howells 
3424d843be5SDavid Howells #define rxrpc_req_ack_traces \
3434d843be5SDavid Howells 	EM(rxrpc_reqack_ack_lost,		"ACK-LOST  ")	\
3444d843be5SDavid Howells 	EM(rxrpc_reqack_already_on,		"ALREADY-ON")	\
3454d843be5SDavid Howells 	EM(rxrpc_reqack_more_rtt,		"MORE-RTT  ")	\
3464d843be5SDavid Howells 	EM(rxrpc_reqack_no_srv_last,		"NO-SRVLAST")	\
3474d843be5SDavid Howells 	EM(rxrpc_reqack_old_rtt,		"OLD-RTT   ")	\
3484d843be5SDavid Howells 	EM(rxrpc_reqack_retrans,		"RETRANS   ")	\
3494d843be5SDavid Howells 	EM(rxrpc_reqack_slow_start,		"SLOW-START")	\
3504d843be5SDavid Howells 	E_(rxrpc_reqack_small_txwin,		"SMALL-TXWN")
351f7fa5242SDavid Howells /* ---- Must update size of stat_why_req_ack[] if more are added! */
3524d843be5SDavid Howells 
35302a19356SDavid Howells #define rxrpc_txbuf_traces \
35402a19356SDavid Howells 	EM(rxrpc_txbuf_alloc_ack,		"ALLOC ACK  ")	\
35502a19356SDavid Howells 	EM(rxrpc_txbuf_alloc_data,		"ALLOC DATA ")	\
35602a19356SDavid Howells 	EM(rxrpc_txbuf_free,			"FREE       ")	\
357a4ea4c47SDavid Howells 	EM(rxrpc_txbuf_get_buffer,		"GET BUFFER ")	\
35802a19356SDavid Howells 	EM(rxrpc_txbuf_get_trans,		"GET TRANS  ")	\
35902a19356SDavid Howells 	EM(rxrpc_txbuf_get_retrans,		"GET RETRANS")	\
36072f0c6fbSDavid Howells 	EM(rxrpc_txbuf_put_ack_tx,		"PUT ACK TX ")	\
36102a19356SDavid Howells 	EM(rxrpc_txbuf_put_cleaned,		"PUT CLEANED")	\
36272f0c6fbSDavid Howells 	EM(rxrpc_txbuf_put_nomem,		"PUT NOMEM  ")	\
36302a19356SDavid Howells 	EM(rxrpc_txbuf_put_rotated,		"PUT ROTATED")	\
36402a19356SDavid Howells 	EM(rxrpc_txbuf_put_send_aborted,	"PUT SEND-X ")	\
365a4ea4c47SDavid Howells 	EM(rxrpc_txbuf_put_trans,		"PUT TRANS  ")	\
366*3feda9d6SDavid Howells 	EM(rxrpc_txbuf_see_out_of_step,		"OUT-OF-STEP")	\
36702a19356SDavid Howells 	EM(rxrpc_txbuf_see_send_more,		"SEE SEND+  ")	\
36802a19356SDavid Howells 	E_(rxrpc_txbuf_see_unacked,		"SEE UNACKED")
36902a19356SDavid Howells 
370b54a134aSDavid Howells /*
371dc9fd093SDavid Howells  * Generate enums for tracing information.
372dc9fd093SDavid Howells  */
373dc9fd093SDavid Howells #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
374dc9fd093SDavid Howells #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
375dc9fd093SDavid Howells 
376dc9fd093SDavid Howells #undef EM
377dc9fd093SDavid Howells #undef E_
378dc9fd093SDavid Howells #define EM(a, b) a,
379dc9fd093SDavid Howells #define E_(a, b) a
380dc9fd093SDavid Howells 
381fa3492abSDavid Howells enum rxrpc_bundle_trace		{ rxrpc_bundle_traces } __mode(byte);
382dc9fd093SDavid Howells enum rxrpc_call_trace		{ rxrpc_call_traces } __mode(byte);
383dc9fd093SDavid Howells enum rxrpc_client_trace		{ rxrpc_client_traces } __mode(byte);
384dc9fd093SDavid Howells enum rxrpc_congest_change	{ rxrpc_congest_changes } __mode(byte);
385dc9fd093SDavid Howells enum rxrpc_conn_trace		{ rxrpc_conn_traces } __mode(byte);
386dc9fd093SDavid Howells enum rxrpc_local_trace		{ rxrpc_local_traces } __mode(byte);
387dc9fd093SDavid Howells enum rxrpc_peer_trace		{ rxrpc_peer_traces } __mode(byte);
388dc9fd093SDavid Howells enum rxrpc_propose_ack_outcome	{ rxrpc_propose_ack_outcomes } __mode(byte);
389dc9fd093SDavid Howells enum rxrpc_propose_ack_trace	{ rxrpc_propose_ack_traces } __mode(byte);
390dc9fd093SDavid Howells enum rxrpc_receive_trace	{ rxrpc_receive_traces } __mode(byte);
391dc9fd093SDavid Howells enum rxrpc_recvmsg_trace	{ rxrpc_recvmsg_traces } __mode(byte);
3924d843be5SDavid Howells enum rxrpc_req_ack_trace	{ rxrpc_req_ack_traces } __mode(byte);
393dc9fd093SDavid Howells enum rxrpc_rtt_rx_trace		{ rxrpc_rtt_rx_traces } __mode(byte);
394dc9fd093SDavid Howells enum rxrpc_rtt_tx_trace		{ rxrpc_rtt_tx_traces } __mode(byte);
395dc9fd093SDavid Howells enum rxrpc_skb_trace		{ rxrpc_skb_traces } __mode(byte);
396dc9fd093SDavid Howells enum rxrpc_timer_trace		{ rxrpc_timer_traces } __mode(byte);
397dc9fd093SDavid Howells enum rxrpc_tx_point		{ rxrpc_tx_points } __mode(byte);
39802a19356SDavid Howells enum rxrpc_txbuf_trace		{ rxrpc_txbuf_traces } __mode(byte);
399a4ea4c47SDavid Howells enum rxrpc_txqueue_trace	{ rxrpc_txqueue_traces } __mode(byte);
400dc9fd093SDavid Howells 
401dc9fd093SDavid Howells #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
402dc9fd093SDavid Howells 
403dc9fd093SDavid Howells /*
404b54a134aSDavid Howells  * Export enum symbols via userspace.
405b54a134aSDavid Howells  */
406b54a134aSDavid Howells #undef EM
407b54a134aSDavid Howells #undef E_
408b54a134aSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a);
409b54a134aSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a);
410b54a134aSDavid Howells 
411fa3492abSDavid Howells rxrpc_bundle_traces;
412b54a134aSDavid Howells rxrpc_call_traces;
413dc9fd093SDavid Howells rxrpc_client_traces;
414dc9fd093SDavid Howells rxrpc_congest_changes;
415dc9fd093SDavid Howells rxrpc_congest_modes;
416dc9fd093SDavid Howells rxrpc_conn_traces;
417dc9fd093SDavid Howells rxrpc_local_traces;
418dc9fd093SDavid Howells rxrpc_propose_ack_traces;
419b54a134aSDavid Howells rxrpc_receive_traces;
420b54a134aSDavid Howells rxrpc_recvmsg_traces;
4214d843be5SDavid Howells rxrpc_req_ack_traces;
422b54a134aSDavid Howells rxrpc_rtt_rx_traces;
423dc9fd093SDavid Howells rxrpc_rtt_tx_traces;
424dc9fd093SDavid Howells rxrpc_skb_traces;
425b54a134aSDavid Howells rxrpc_timer_traces;
4264764c0daSDavid Howells rxrpc_tx_points;
42702a19356SDavid Howells rxrpc_txbuf_traces;
428a4ea4c47SDavid Howells rxrpc_txqueue_traces;
429b54a134aSDavid Howells 
430b54a134aSDavid Howells /*
431b54a134aSDavid Howells  * Now redefine the EM() and E_() macros to map the enums to the strings that
432b54a134aSDavid Howells  * will be printed in the output.
433b54a134aSDavid Howells  */
434b54a134aSDavid Howells #undef EM
435b54a134aSDavid Howells #undef E_
436b54a134aSDavid Howells #define EM(a, b)	{ a, b },
437b54a134aSDavid Howells #define E_(a, b)	{ a, b }
438b54a134aSDavid Howells 
43909d2bf59SDavid Howells TRACE_EVENT(rxrpc_local,
44006d9532fSDavid Howells 	    TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
4410fde882fSDavid Howells 		     int ref, int usage),
44209d2bf59SDavid Howells 
4430fde882fSDavid Howells 	    TP_ARGS(local_debug_id, op, ref, usage),
44409d2bf59SDavid Howells 
44509d2bf59SDavid Howells 	    TP_STRUCT__entry(
44609d2bf59SDavid Howells 		    __field(unsigned int,	local		)
44709d2bf59SDavid Howells 		    __field(int,		op		)
4480fde882fSDavid Howells 		    __field(int,		ref		)
44909d2bf59SDavid Howells 		    __field(int,		usage		)
45009d2bf59SDavid Howells 			     ),
45109d2bf59SDavid Howells 
45209d2bf59SDavid Howells 	    TP_fast_assign(
45306d9532fSDavid Howells 		    __entry->local = local_debug_id;
45409d2bf59SDavid Howells 		    __entry->op = op;
4550fde882fSDavid Howells 		    __entry->ref = ref;
45609d2bf59SDavid Howells 		    __entry->usage = usage;
45709d2bf59SDavid Howells 			   ),
45809d2bf59SDavid Howells 
4590fde882fSDavid Howells 	    TP_printk("L=%08x %s r=%d u=%d",
46009d2bf59SDavid Howells 		      __entry->local,
46109d2bf59SDavid Howells 		      __print_symbolic(__entry->op, rxrpc_local_traces),
4620fde882fSDavid Howells 		      __entry->ref,
4630fde882fSDavid Howells 		      __entry->usage)
46409d2bf59SDavid Howells 	    );
46509d2bf59SDavid Howells 
4661159d4b4SDavid Howells TRACE_EVENT(rxrpc_peer,
46747c810a7SDavid Howells 	    TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
4681159d4b4SDavid Howells 
46947c810a7SDavid Howells 	    TP_ARGS(peer_debug_id, ref, why),
4701159d4b4SDavid Howells 
4711159d4b4SDavid Howells 	    TP_STRUCT__entry(
4721159d4b4SDavid Howells 		    __field(unsigned int,	peer		)
47347c810a7SDavid Howells 		    __field(int,		ref		)
47447c810a7SDavid Howells 		    __field(int,		why		)
4751159d4b4SDavid Howells 			     ),
4761159d4b4SDavid Howells 
4771159d4b4SDavid Howells 	    TP_fast_assign(
47855f6c98eSDavid Howells 		    __entry->peer = peer_debug_id;
47947c810a7SDavid Howells 		    __entry->ref = ref;
48047c810a7SDavid Howells 		    __entry->why = why;
4811159d4b4SDavid Howells 			   ),
4821159d4b4SDavid Howells 
48347c810a7SDavid Howells 	    TP_printk("P=%08x %s r=%d",
4841159d4b4SDavid Howells 		      __entry->peer,
48547c810a7SDavid Howells 		      __print_symbolic(__entry->why, rxrpc_peer_traces),
48647c810a7SDavid Howells 		      __entry->ref)
4871159d4b4SDavid Howells 	    );
4881159d4b4SDavid Howells 
489fa3492abSDavid Howells TRACE_EVENT(rxrpc_bundle,
490fa3492abSDavid Howells 	    TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
491fa3492abSDavid Howells 
492fa3492abSDavid Howells 	    TP_ARGS(bundle_debug_id, ref, why),
493fa3492abSDavid Howells 
494fa3492abSDavid Howells 	    TP_STRUCT__entry(
495fa3492abSDavid Howells 		    __field(unsigned int,	bundle		)
496fa3492abSDavid Howells 		    __field(int,		ref		)
497fa3492abSDavid Howells 		    __field(int,		why		)
498fa3492abSDavid Howells 			     ),
499fa3492abSDavid Howells 
500fa3492abSDavid Howells 	    TP_fast_assign(
501fa3492abSDavid Howells 		    __entry->bundle = bundle_debug_id;
502fa3492abSDavid Howells 		    __entry->ref = ref;
503fa3492abSDavid Howells 		    __entry->why = why;
504fa3492abSDavid Howells 			   ),
505fa3492abSDavid Howells 
506fa3492abSDavid Howells 	    TP_printk("CB=%08x %s r=%d",
507fa3492abSDavid Howells 		      __entry->bundle,
508fa3492abSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_bundle_traces),
509fa3492abSDavid Howells 		      __entry->ref)
510fa3492abSDavid Howells 	    );
511fa3492abSDavid Howells 
512363deeabSDavid Howells TRACE_EVENT(rxrpc_conn,
5137fa25105SDavid Howells 	    TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
514363deeabSDavid Howells 
5157fa25105SDavid Howells 	    TP_ARGS(conn_debug_id, ref, why),
516363deeabSDavid Howells 
517363deeabSDavid Howells 	    TP_STRUCT__entry(
518a25e21f0SDavid Howells 		    __field(unsigned int,	conn		)
5197fa25105SDavid Howells 		    __field(int,		ref		)
5207fa25105SDavid Howells 		    __field(int,		why		)
521363deeabSDavid Howells 			     ),
522363deeabSDavid Howells 
523363deeabSDavid Howells 	    TP_fast_assign(
5244c1295dcSDavid Howells 		    __entry->conn = conn_debug_id;
5257fa25105SDavid Howells 		    __entry->ref = ref;
5267fa25105SDavid Howells 		    __entry->why = why;
527363deeabSDavid Howells 			   ),
528363deeabSDavid Howells 
5297fa25105SDavid Howells 	    TP_printk("C=%08x %s r=%d",
530363deeabSDavid Howells 		      __entry->conn,
5317fa25105SDavid Howells 		      __print_symbolic(__entry->why, rxrpc_conn_traces),
5327fa25105SDavid Howells 		      __entry->ref)
533363deeabSDavid Howells 	    );
534363deeabSDavid Howells 
535363deeabSDavid Howells TRACE_EVENT(rxrpc_client,
536363deeabSDavid Howells 	    TP_PROTO(struct rxrpc_connection *conn, int channel,
537363deeabSDavid Howells 		     enum rxrpc_client_trace op),
538363deeabSDavid Howells 
539363deeabSDavid Howells 	    TP_ARGS(conn, channel, op),
540363deeabSDavid Howells 
541363deeabSDavid Howells 	    TP_STRUCT__entry(
542a25e21f0SDavid Howells 		    __field(unsigned int,		conn		)
543363deeabSDavid Howells 		    __field(u32,			cid		)
544363deeabSDavid Howells 		    __field(int,			channel		)
545363deeabSDavid Howells 		    __field(int,			usage		)
546363deeabSDavid Howells 		    __field(enum rxrpc_client_trace,	op		)
547363deeabSDavid Howells 			     ),
548363deeabSDavid Howells 
549363deeabSDavid Howells 	    TP_fast_assign(
550245500d8SDavid Howells 		    __entry->conn = conn ? conn->debug_id : 0;
551363deeabSDavid Howells 		    __entry->channel = channel;
552a0575429SDavid Howells 		    __entry->usage = conn ? refcount_read(&conn->ref) : -2;
553363deeabSDavid Howells 		    __entry->op = op;
55496a9c425SDavid Howells 		    __entry->cid = conn ? conn->proto.cid : 0;
555363deeabSDavid Howells 			   ),
556363deeabSDavid Howells 
557245500d8SDavid Howells 	    TP_printk("C=%08x h=%2d %s i=%08x u=%d",
558363deeabSDavid Howells 		      __entry->conn,
559363deeabSDavid Howells 		      __entry->channel,
560b54a134aSDavid Howells 		      __print_symbolic(__entry->op, rxrpc_client_traces),
561363deeabSDavid Howells 		      __entry->cid,
562363deeabSDavid Howells 		      __entry->usage)
563363deeabSDavid Howells 	    );
564363deeabSDavid Howells 
565e34d4234SDavid Howells TRACE_EVENT(rxrpc_call,
566cb0fc0c9SDavid Howells 	    TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
567cb0fc0c9SDavid Howells 		     enum rxrpc_call_trace why),
568e34d4234SDavid Howells 
569cb0fc0c9SDavid Howells 	    TP_ARGS(call_debug_id, ref, aux, why),
570e34d4234SDavid Howells 
571e34d4234SDavid Howells 	    TP_STRUCT__entry(
572a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
573cb0fc0c9SDavid Howells 		    __field(int,			ref		)
574cb0fc0c9SDavid Howells 		    __field(int,			why		)
575cb0fc0c9SDavid Howells 		    __field(unsigned long,		aux		)
576e34d4234SDavid Howells 			     ),
577e34d4234SDavid Howells 
578e34d4234SDavid Howells 	    TP_fast_assign(
57948c9e0ecSDavid Howells 		    __entry->call = call_debug_id;
580cb0fc0c9SDavid Howells 		    __entry->ref = ref;
581cb0fc0c9SDavid Howells 		    __entry->why = why;
582e34d4234SDavid Howells 		    __entry->aux = aux;
583e34d4234SDavid Howells 			   ),
584e34d4234SDavid Howells 
585cb0fc0c9SDavid Howells 	    TP_printk("c=%08x %s r=%d a=%lx",
586e34d4234SDavid Howells 		      __entry->call,
587cb0fc0c9SDavid Howells 		      __print_symbolic(__entry->why, rxrpc_call_traces),
588cb0fc0c9SDavid Howells 		      __entry->ref,
589e34d4234SDavid Howells 		      __entry->aux)
590e34d4234SDavid Howells 	    );
591e34d4234SDavid Howells 
592df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb,
5939a36a6bcSDavid Howells 	    TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
5949a36a6bcSDavid Howells 		     enum rxrpc_skb_trace why),
595df844fd4SDavid Howells 
5969a36a6bcSDavid Howells 	    TP_ARGS(skb, usage, mod_count, why),
597df844fd4SDavid Howells 
598df844fd4SDavid Howells 	    TP_STRUCT__entry(
599df844fd4SDavid Howells 		    __field(struct sk_buff *,		skb		)
600df844fd4SDavid Howells 		    __field(int,			usage		)
601df844fd4SDavid Howells 		    __field(int,			mod_count	)
6029a36a6bcSDavid Howells 		    __field(enum rxrpc_skb_trace,	why		)
603df844fd4SDavid Howells 			     ),
604df844fd4SDavid Howells 
605df844fd4SDavid Howells 	    TP_fast_assign(
606df844fd4SDavid Howells 		    __entry->skb = skb;
607df844fd4SDavid Howells 		    __entry->usage = usage;
608df844fd4SDavid Howells 		    __entry->mod_count = mod_count;
6099a36a6bcSDavid Howells 		    __entry->why = why;
610df844fd4SDavid Howells 			   ),
611df844fd4SDavid Howells 
6129a36a6bcSDavid Howells 	    TP_printk("s=%p Rx %s u=%d m=%d",
613df844fd4SDavid Howells 		      __entry->skb,
6149a36a6bcSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_skb_traces),
615df844fd4SDavid Howells 		      __entry->usage,
6169a36a6bcSDavid Howells 		      __entry->mod_count)
617df844fd4SDavid Howells 	    );
618df844fd4SDavid Howells 
61949e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet,
62049e19ec7SDavid Howells 	    TP_PROTO(struct rxrpc_skb_priv *sp),
62149e19ec7SDavid Howells 
62249e19ec7SDavid Howells 	    TP_ARGS(sp),
62349e19ec7SDavid Howells 
62449e19ec7SDavid Howells 	    TP_STRUCT__entry(
62549e19ec7SDavid Howells 		    __field_struct(struct rxrpc_host_header,	hdr		)
62649e19ec7SDavid Howells 			     ),
62749e19ec7SDavid Howells 
62849e19ec7SDavid Howells 	    TP_fast_assign(
62949e19ec7SDavid Howells 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
63049e19ec7SDavid Howells 			   ),
63149e19ec7SDavid Howells 
632a3868bfcSDavid Howells 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
63349e19ec7SDavid Howells 		      __entry->hdr.epoch, __entry->hdr.cid,
63449e19ec7SDavid Howells 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
63549e19ec7SDavid Howells 		      __entry->hdr.serial, __entry->hdr.seq,
636a3868bfcSDavid Howells 		      __entry->hdr.type, __entry->hdr.flags,
637b54a134aSDavid Howells 		      __entry->hdr.type <= 15 ?
638b54a134aSDavid Howells 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
63949e19ec7SDavid Howells 	    );
64049e19ec7SDavid Howells 
64149e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done,
64249e19ec7SDavid Howells 	    TP_PROTO(int result, int abort_code),
64349e19ec7SDavid Howells 
64449e19ec7SDavid Howells 	    TP_ARGS(result, abort_code),
64549e19ec7SDavid Howells 
64649e19ec7SDavid Howells 	    TP_STRUCT__entry(
64749e19ec7SDavid Howells 		    __field(int,			result		)
64849e19ec7SDavid Howells 		    __field(int,			abort_code	)
64949e19ec7SDavid Howells 			     ),
65049e19ec7SDavid Howells 
65149e19ec7SDavid Howells 	    TP_fast_assign(
65249e19ec7SDavid Howells 		    __entry->result = result;
65349e19ec7SDavid Howells 		    __entry->abort_code = abort_code;
65449e19ec7SDavid Howells 			   ),
65549e19ec7SDavid Howells 
65649e19ec7SDavid Howells 	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
65749e19ec7SDavid Howells 	    );
65849e19ec7SDavid Howells 
6595a42976dSDavid Howells TRACE_EVENT(rxrpc_abort,
660a25e21f0SDavid Howells 	    TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
661a25e21f0SDavid Howells 		     rxrpc_seq_t seq, int abort_code, int error),
6625a42976dSDavid Howells 
663a25e21f0SDavid Howells 	    TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
6645a42976dSDavid Howells 
6655a42976dSDavid Howells 	    TP_STRUCT__entry(
666a25e21f0SDavid Howells 		    __field(unsigned int,		call_nr		)
6675a42976dSDavid Howells 		    __array(char,			why, 4		)
6685a42976dSDavid Howells 		    __field(u32,			cid		)
6695a42976dSDavid Howells 		    __field(u32,			call_id		)
6705a42976dSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
6715a42976dSDavid Howells 		    __field(int,			abort_code	)
6725a42976dSDavid Howells 		    __field(int,			error		)
6735a42976dSDavid Howells 			     ),
6745a42976dSDavid Howells 
6755a42976dSDavid Howells 	    TP_fast_assign(
6765a42976dSDavid Howells 		    memcpy(__entry->why, why, 4);
677a25e21f0SDavid Howells 		    __entry->call_nr = call_nr;
6785a42976dSDavid Howells 		    __entry->cid = cid;
6795a42976dSDavid Howells 		    __entry->call_id = call_id;
6805a42976dSDavid Howells 		    __entry->abort_code = abort_code;
6815a42976dSDavid Howells 		    __entry->error = error;
6825a42976dSDavid Howells 		    __entry->seq = seq;
6835a42976dSDavid Howells 			   ),
6845a42976dSDavid Howells 
685a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
686a25e21f0SDavid Howells 		      __entry->call_nr,
6875a42976dSDavid Howells 		      __entry->cid, __entry->call_id, __entry->seq,
6885a42976dSDavid Howells 		      __entry->abort_code, __entry->error, __entry->why)
6895a42976dSDavid Howells 	    );
6905a42976dSDavid Howells 
6911bae5d22SDavid Howells TRACE_EVENT(rxrpc_call_complete,
6921bae5d22SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
6931bae5d22SDavid Howells 
6941bae5d22SDavid Howells 	    TP_ARGS(call),
6951bae5d22SDavid Howells 
6961bae5d22SDavid Howells 	    TP_STRUCT__entry(
6971bae5d22SDavid Howells 		    __field(unsigned int,		call		)
6981bae5d22SDavid Howells 		    __field(enum rxrpc_call_completion,	compl		)
6991bae5d22SDavid Howells 		    __field(int,			error		)
7001bae5d22SDavid Howells 		    __field(u32,			abort_code	)
7011bae5d22SDavid Howells 			     ),
7021bae5d22SDavid Howells 
7031bae5d22SDavid Howells 	    TP_fast_assign(
7041bae5d22SDavid Howells 		    __entry->call = call->debug_id;
7051bae5d22SDavid Howells 		    __entry->compl = call->completion;
7061bae5d22SDavid Howells 		    __entry->error = call->error;
7071bae5d22SDavid Howells 		    __entry->abort_code = call->abort_code;
7081bae5d22SDavid Howells 			   ),
7091bae5d22SDavid Howells 
7101bae5d22SDavid Howells 	    TP_printk("c=%08x %s r=%d ac=%d",
7111bae5d22SDavid Howells 		      __entry->call,
7121bae5d22SDavid Howells 		      __print_symbolic(__entry->compl, rxrpc_completions),
7131bae5d22SDavid Howells 		      __entry->error,
7141bae5d22SDavid Howells 		      __entry->abort_code)
7151bae5d22SDavid Howells 	    );
7161bae5d22SDavid Howells 
717a4ea4c47SDavid Howells TRACE_EVENT(rxrpc_txqueue,
718a4ea4c47SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
719a124fe3eSDavid Howells 
720a124fe3eSDavid Howells 	    TP_ARGS(call, why),
721a124fe3eSDavid Howells 
722a124fe3eSDavid Howells 	    TP_STRUCT__entry(
723a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
724a4ea4c47SDavid Howells 		    __field(enum rxrpc_txqueue_trace,	why		)
725a4ea4c47SDavid Howells 		    __field(rxrpc_seq_t,		acks_hard_ack	)
726a4ea4c47SDavid Howells 		    __field(rxrpc_seq_t,		tx_bottom	)
727a124fe3eSDavid Howells 		    __field(rxrpc_seq_t,		tx_top		)
728b1d9f7fdSDavid Howells 		    __field(int,			tx_winsize	)
729a124fe3eSDavid Howells 			     ),
730a124fe3eSDavid Howells 
731a124fe3eSDavid Howells 	    TP_fast_assign(
732a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
733a124fe3eSDavid Howells 		    __entry->why = why;
734a4ea4c47SDavid Howells 		    __entry->acks_hard_ack = call->acks_hard_ack;
735a4ea4c47SDavid Howells 		    __entry->tx_bottom = call->tx_bottom;
736a124fe3eSDavid Howells 		    __entry->tx_top = call->tx_top;
737b1d9f7fdSDavid Howells 		    __entry->tx_winsize = call->tx_winsize;
738a124fe3eSDavid Howells 			   ),
739a124fe3eSDavid Howells 
740a4ea4c47SDavid Howells 	    TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
741a124fe3eSDavid Howells 		      __entry->call,
742a4ea4c47SDavid Howells 		      __print_symbolic(__entry->why, rxrpc_txqueue_traces),
743a4ea4c47SDavid Howells 		      __entry->tx_bottom,
744a4ea4c47SDavid Howells 		      __entry->acks_hard_ack,
745a4ea4c47SDavid Howells 		      __entry->tx_top - __entry->tx_bottom,
746a4ea4c47SDavid Howells 		      __entry->tx_top - __entry->acks_hard_ack,
747b1d9f7fdSDavid Howells 		      __entry->tx_winsize)
748a124fe3eSDavid Howells 	    );
749a124fe3eSDavid Howells 
750b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_data,
7514764c0daSDavid Howells 	    TP_PROTO(unsigned int call, rxrpc_seq_t seq,
752d4d02d8bSDavid Howells 		     rxrpc_serial_t serial, u8 flags),
753ec71eb9aSDavid Howells 
754d4d02d8bSDavid Howells 	    TP_ARGS(call, seq, serial, flags),
755ec71eb9aSDavid Howells 
756ec71eb9aSDavid Howells 	    TP_STRUCT__entry(
757a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
758b1d9f7fdSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
759b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
760b1d9f7fdSDavid Howells 		    __field(u8,				flags		)
761b1d9f7fdSDavid Howells 			     ),
762b1d9f7fdSDavid Howells 
763b1d9f7fdSDavid Howells 	    TP_fast_assign(
7644764c0daSDavid Howells 		    __entry->call = call;
765b1d9f7fdSDavid Howells 		    __entry->seq = seq;
766b1d9f7fdSDavid Howells 		    __entry->serial = serial;
767b1d9f7fdSDavid Howells 		    __entry->flags = flags;
768b1d9f7fdSDavid Howells 			   ),
769b1d9f7fdSDavid Howells 
770d4d02d8bSDavid Howells 	    TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
771b1d9f7fdSDavid Howells 		      __entry->call,
772b1d9f7fdSDavid Howells 		      __entry->serial,
773b1d9f7fdSDavid Howells 		      __entry->seq,
774d4d02d8bSDavid Howells 		      __entry->flags)
775b1d9f7fdSDavid Howells 	    );
776b1d9f7fdSDavid Howells 
777b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_ack,
778b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call,
779b1d9f7fdSDavid Howells 		     rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
780b1d9f7fdSDavid Howells 		     rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
781b1d9f7fdSDavid Howells 
782b1d9f7fdSDavid Howells 	    TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
783b1d9f7fdSDavid Howells 
784b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
785a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
786b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
787b1d9f7fdSDavid Howells 		    __field(rxrpc_serial_t,		ack_serial	)
788ec71eb9aSDavid Howells 		    __field(rxrpc_seq_t,		first		)
789b1d9f7fdSDavid Howells 		    __field(rxrpc_seq_t,		prev		)
790ec71eb9aSDavid Howells 		    __field(u8,				reason		)
791ec71eb9aSDavid Howells 		    __field(u8,				n_acks		)
792ec71eb9aSDavid Howells 			     ),
793ec71eb9aSDavid Howells 
794ec71eb9aSDavid Howells 	    TP_fast_assign(
795a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
796b1d9f7fdSDavid Howells 		    __entry->serial = serial;
797b1d9f7fdSDavid Howells 		    __entry->ack_serial = ack_serial;
798ec71eb9aSDavid Howells 		    __entry->first = first;
799b1d9f7fdSDavid Howells 		    __entry->prev = prev;
800ec71eb9aSDavid Howells 		    __entry->reason = reason;
801ec71eb9aSDavid Howells 		    __entry->n_acks = n_acks;
802ec71eb9aSDavid Howells 			   ),
803ec71eb9aSDavid Howells 
804a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
805ec71eb9aSDavid Howells 		      __entry->call,
806b1d9f7fdSDavid Howells 		      __entry->serial,
807b54a134aSDavid Howells 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
808b1d9f7fdSDavid Howells 		      __entry->ack_serial,
809ec71eb9aSDavid Howells 		      __entry->first,
810b1d9f7fdSDavid Howells 		      __entry->prev,
811ec71eb9aSDavid Howells 		      __entry->n_acks)
812ec71eb9aSDavid Howells 	    );
813ec71eb9aSDavid Howells 
814005ede28SDavid Howells TRACE_EVENT(rxrpc_rx_abort,
815005ede28SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
816005ede28SDavid Howells 		     u32 abort_code),
817005ede28SDavid Howells 
818005ede28SDavid Howells 	    TP_ARGS(call, serial, abort_code),
819005ede28SDavid Howells 
820005ede28SDavid Howells 	    TP_STRUCT__entry(
821a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
822005ede28SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
823005ede28SDavid Howells 		    __field(u32,			abort_code	)
824005ede28SDavid Howells 			     ),
825005ede28SDavid Howells 
826005ede28SDavid Howells 	    TP_fast_assign(
827a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
828005ede28SDavid Howells 		    __entry->serial = serial;
829005ede28SDavid Howells 		    __entry->abort_code = abort_code;
830005ede28SDavid Howells 			   ),
831005ede28SDavid Howells 
832a25e21f0SDavid Howells 	    TP_printk("c=%08x ABORT %08x ac=%d",
833005ede28SDavid Howells 		      __entry->call,
834005ede28SDavid Howells 		      __entry->serial,
835005ede28SDavid Howells 		      __entry->abort_code)
836005ede28SDavid Howells 	    );
837005ede28SDavid Howells 
8382ebdb26eSDavid Howells TRACE_EVENT(rxrpc_rx_challenge,
8392ebdb26eSDavid Howells 	    TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
8402ebdb26eSDavid Howells 		     u32 version, u32 nonce, u32 min_level),
8412ebdb26eSDavid Howells 
8422ebdb26eSDavid Howells 	    TP_ARGS(conn, serial, version, nonce, min_level),
8432ebdb26eSDavid Howells 
8442ebdb26eSDavid Howells 	    TP_STRUCT__entry(
8452ebdb26eSDavid Howells 		    __field(unsigned int,		conn		)
8462ebdb26eSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
8472ebdb26eSDavid Howells 		    __field(u32,			version		)
8482ebdb26eSDavid Howells 		    __field(u32,			nonce		)
8492ebdb26eSDavid Howells 		    __field(u32,			min_level	)
8502ebdb26eSDavid Howells 			     ),
8512ebdb26eSDavid Howells 
8522ebdb26eSDavid Howells 	    TP_fast_assign(
8532ebdb26eSDavid Howells 		    __entry->conn = conn->debug_id;
8542ebdb26eSDavid Howells 		    __entry->serial = serial;
8552ebdb26eSDavid Howells 		    __entry->version = version;
8562ebdb26eSDavid Howells 		    __entry->nonce = nonce;
8572ebdb26eSDavid Howells 		    __entry->min_level = min_level;
8582ebdb26eSDavid Howells 			   ),
8592ebdb26eSDavid Howells 
8602ebdb26eSDavid Howells 	    TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
8612ebdb26eSDavid Howells 		      __entry->conn,
8622ebdb26eSDavid Howells 		      __entry->serial,
8632ebdb26eSDavid Howells 		      __entry->version,
8642ebdb26eSDavid Howells 		      __entry->nonce,
8652ebdb26eSDavid Howells 		      __entry->min_level)
8662ebdb26eSDavid Howells 	    );
8672ebdb26eSDavid Howells 
8682ebdb26eSDavid Howells TRACE_EVENT(rxrpc_rx_response,
8692ebdb26eSDavid Howells 	    TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
8702ebdb26eSDavid Howells 		     u32 version, u32 kvno, u32 ticket_len),
8712ebdb26eSDavid Howells 
8722ebdb26eSDavid Howells 	    TP_ARGS(conn, serial, version, kvno, ticket_len),
8732ebdb26eSDavid Howells 
8742ebdb26eSDavid Howells 	    TP_STRUCT__entry(
8752ebdb26eSDavid Howells 		    __field(unsigned int,		conn		)
8762ebdb26eSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
8772ebdb26eSDavid Howells 		    __field(u32,			version		)
8782ebdb26eSDavid Howells 		    __field(u32,			kvno		)
8792ebdb26eSDavid Howells 		    __field(u32,			ticket_len	)
8802ebdb26eSDavid Howells 			     ),
8812ebdb26eSDavid Howells 
8822ebdb26eSDavid Howells 	    TP_fast_assign(
8832ebdb26eSDavid Howells 		    __entry->conn = conn->debug_id;
8842ebdb26eSDavid Howells 		    __entry->serial = serial;
8852ebdb26eSDavid Howells 		    __entry->version = version;
8862ebdb26eSDavid Howells 		    __entry->kvno = kvno;
8872ebdb26eSDavid Howells 		    __entry->ticket_len = ticket_len;
8882ebdb26eSDavid Howells 			   ),
8892ebdb26eSDavid Howells 
8902ebdb26eSDavid Howells 	    TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
8912ebdb26eSDavid Howells 		      __entry->conn,
8922ebdb26eSDavid Howells 		      __entry->serial,
8932ebdb26eSDavid Howells 		      __entry->version,
8942ebdb26eSDavid Howells 		      __entry->kvno,
8952ebdb26eSDavid Howells 		      __entry->ticket_len)
8962ebdb26eSDavid Howells 	    );
8972ebdb26eSDavid Howells 
898740586d2SDavid Howells TRACE_EVENT(rxrpc_rx_rwind_change,
899740586d2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
900740586d2SDavid Howells 		     u32 rwind, bool wake),
901740586d2SDavid Howells 
902740586d2SDavid Howells 	    TP_ARGS(call, serial, rwind, wake),
903740586d2SDavid Howells 
904740586d2SDavid Howells 	    TP_STRUCT__entry(
905a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
906740586d2SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
907740586d2SDavid Howells 		    __field(u32,			rwind		)
908740586d2SDavid Howells 		    __field(bool,			wake		)
909740586d2SDavid Howells 			     ),
910740586d2SDavid Howells 
911740586d2SDavid Howells 	    TP_fast_assign(
912a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
913740586d2SDavid Howells 		    __entry->serial = serial;
914740586d2SDavid Howells 		    __entry->rwind = rwind;
915740586d2SDavid Howells 		    __entry->wake = wake;
916740586d2SDavid Howells 			   ),
917740586d2SDavid Howells 
918a25e21f0SDavid Howells 	    TP_printk("c=%08x %08x rw=%u%s",
919740586d2SDavid Howells 		      __entry->call,
920740586d2SDavid Howells 		      __entry->serial,
921740586d2SDavid Howells 		      __entry->rwind,
922740586d2SDavid Howells 		      __entry->wake ? " wake" : "")
923740586d2SDavid Howells 	    );
924740586d2SDavid Howells 
9254764c0daSDavid Howells TRACE_EVENT(rxrpc_tx_packet,
9264764c0daSDavid Howells 	    TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
9274764c0daSDavid Howells 		     enum rxrpc_tx_point where),
9284764c0daSDavid Howells 
9294764c0daSDavid Howells 	    TP_ARGS(call_id, whdr, where),
9304764c0daSDavid Howells 
9314764c0daSDavid Howells 	    TP_STRUCT__entry(
9324764c0daSDavid Howells 		    __field(unsigned int,			call	)
9334764c0daSDavid Howells 		    __field(enum rxrpc_tx_point,		where	)
9344764c0daSDavid Howells 		    __field_struct(struct rxrpc_wire_header,	whdr	)
9354764c0daSDavid Howells 			     ),
9364764c0daSDavid Howells 
9374764c0daSDavid Howells 	    TP_fast_assign(
9384764c0daSDavid Howells 		    __entry->call = call_id;
9394764c0daSDavid Howells 		    memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
9404e2abd3cSDavid Howells 		    __entry->where = where;
9414764c0daSDavid Howells 			   ),
9424764c0daSDavid Howells 
9434764c0daSDavid Howells 	    TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
9444764c0daSDavid Howells 		      __entry->call,
9454764c0daSDavid Howells 		      ntohl(__entry->whdr.epoch),
9464764c0daSDavid Howells 		      ntohl(__entry->whdr.cid),
9474764c0daSDavid Howells 		      ntohl(__entry->whdr.callNumber),
9484764c0daSDavid Howells 		      ntohs(__entry->whdr.serviceId),
9494764c0daSDavid Howells 		      ntohl(__entry->whdr.serial),
9504764c0daSDavid Howells 		      ntohl(__entry->whdr.seq),
9514764c0daSDavid Howells 		      __entry->whdr.type, __entry->whdr.flags,
9524764c0daSDavid Howells 		      __entry->whdr.type <= 15 ?
9534764c0daSDavid Howells 		      __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
9544764c0daSDavid Howells 		      __print_symbolic(__entry->where, rxrpc_tx_points))
9554764c0daSDavid Howells 	    );
9564764c0daSDavid Howells 
957be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_data,
958be832aecSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
959a1767077SDavid Howells 		     rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
960f3639df2SDavid Howells 
961a1767077SDavid Howells 	    TP_ARGS(call, seq, serial, flags, retrans, lose),
962f3639df2SDavid Howells 
963f3639df2SDavid Howells 	    TP_STRUCT__entry(
964a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
965be832aecSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
966f3639df2SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
9674764c0daSDavid Howells 		    __field(u32,			cid		)
9684764c0daSDavid Howells 		    __field(u32,			call_id		)
969be832aecSDavid Howells 		    __field(u8,				flags		)
970a1767077SDavid Howells 		    __field(bool,			retrans		)
971be832aecSDavid Howells 		    __field(bool,			lose		)
972be832aecSDavid Howells 			     ),
973be832aecSDavid Howells 
974be832aecSDavid Howells 	    TP_fast_assign(
975a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
9764764c0daSDavid Howells 		    __entry->cid = call->cid;
9774764c0daSDavid Howells 		    __entry->call_id = call->call_id;
978be832aecSDavid Howells 		    __entry->seq = seq;
979be832aecSDavid Howells 		    __entry->serial = serial;
980be832aecSDavid Howells 		    __entry->flags = flags;
981a1767077SDavid Howells 		    __entry->retrans = retrans;
982be832aecSDavid Howells 		    __entry->lose = lose;
983be832aecSDavid Howells 			   ),
984be832aecSDavid Howells 
9854764c0daSDavid Howells 	    TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
986be832aecSDavid Howells 		      __entry->call,
9874764c0daSDavid Howells 		      __entry->cid,
9884764c0daSDavid Howells 		      __entry->call_id,
989be832aecSDavid Howells 		      __entry->serial,
990be832aecSDavid Howells 		      __entry->seq,
991be832aecSDavid Howells 		      __entry->flags,
992265a44bbSDavid Howells 		      __entry->retrans ? " *RETRANS*" : "",
993be832aecSDavid Howells 		      __entry->lose ? " *LOSE*" : "")
994be832aecSDavid Howells 	    );
995be832aecSDavid Howells 
996be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_ack,
9974764c0daSDavid Howells 	    TP_PROTO(unsigned int call, rxrpc_serial_t serial,
998be832aecSDavid Howells 		     rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
999be832aecSDavid Howells 		     u8 reason, u8 n_acks),
1000be832aecSDavid Howells 
1001be832aecSDavid Howells 	    TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1002be832aecSDavid Howells 
1003be832aecSDavid Howells 	    TP_STRUCT__entry(
1004a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1005be832aecSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
1006be832aecSDavid Howells 		    __field(rxrpc_seq_t,		ack_first	)
1007be832aecSDavid Howells 		    __field(rxrpc_serial_t,		ack_serial	)
1008f3639df2SDavid Howells 		    __field(u8,				reason		)
1009f3639df2SDavid Howells 		    __field(u8,				n_acks		)
1010f3639df2SDavid Howells 			     ),
1011f3639df2SDavid Howells 
1012f3639df2SDavid Howells 	    TP_fast_assign(
10134764c0daSDavid Howells 		    __entry->call = call;
1014f3639df2SDavid Howells 		    __entry->serial = serial;
1015be832aecSDavid Howells 		    __entry->ack_first = ack_first;
1016be832aecSDavid Howells 		    __entry->ack_serial = ack_serial;
1017f3639df2SDavid Howells 		    __entry->reason = reason;
1018f3639df2SDavid Howells 		    __entry->n_acks = n_acks;
1019f3639df2SDavid Howells 			   ),
1020f3639df2SDavid Howells 
1021a25e21f0SDavid Howells 	    TP_printk(" c=%08x ACK  %08x %s f=%08x r=%08x n=%u",
1022f3639df2SDavid Howells 		      __entry->call,
1023f3639df2SDavid Howells 		      __entry->serial,
1024b54a134aSDavid Howells 		      __print_symbolic(__entry->reason, rxrpc_ack_names),
1025be832aecSDavid Howells 		      __entry->ack_first,
1026be832aecSDavid Howells 		      __entry->ack_serial,
1027f3639df2SDavid Howells 		      __entry->n_acks)
1028f3639df2SDavid Howells 	    );
1029f3639df2SDavid Howells 
103058dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive,
103158dc63c9SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
103258dc63c9SDavid Howells 		     rxrpc_serial_t serial, rxrpc_seq_t seq),
103358dc63c9SDavid Howells 
103458dc63c9SDavid Howells 	    TP_ARGS(call, why, serial, seq),
103558dc63c9SDavid Howells 
103658dc63c9SDavid Howells 	    TP_STRUCT__entry(
1037a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
103858dc63c9SDavid Howells 		    __field(enum rxrpc_receive_trace,	why		)
103958dc63c9SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
104058dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
10415d7edbc9SDavid Howells 		    __field(u64,			window		)
104258dc63c9SDavid Howells 			     ),
104358dc63c9SDavid Howells 
104458dc63c9SDavid Howells 	    TP_fast_assign(
1045a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
104658dc63c9SDavid Howells 		    __entry->why = why;
104758dc63c9SDavid Howells 		    __entry->serial = serial;
104858dc63c9SDavid Howells 		    __entry->seq = seq;
10495d7edbc9SDavid Howells 		    __entry->window = atomic64_read(&call->ackr_window);
105058dc63c9SDavid Howells 			   ),
105158dc63c9SDavid Howells 
1052a25e21f0SDavid Howells 	    TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
105358dc63c9SDavid Howells 		      __entry->call,
1054b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_receive_traces),
105558dc63c9SDavid Howells 		      __entry->serial,
105658dc63c9SDavid Howells 		      __entry->seq,
10575d7edbc9SDavid Howells 		      lower_32_bits(__entry->window),
10585d7edbc9SDavid Howells 		      upper_32_bits(__entry->window))
105958dc63c9SDavid Howells 	    );
106058dc63c9SDavid Howells 
106184997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg,
106284997905SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1063faf92e8dSDavid Howells 		     int ret),
1064faf92e8dSDavid Howells 
1065faf92e8dSDavid Howells 	    TP_ARGS(call, why, ret),
1066faf92e8dSDavid Howells 
1067faf92e8dSDavid Howells 	    TP_STRUCT__entry(
1068faf92e8dSDavid Howells 		    __field(unsigned int,		call		)
1069faf92e8dSDavid Howells 		    __field(enum rxrpc_recvmsg_trace,	why		)
1070faf92e8dSDavid Howells 		    __field(int,			ret		)
1071faf92e8dSDavid Howells 			     ),
1072faf92e8dSDavid Howells 
1073faf92e8dSDavid Howells 	    TP_fast_assign(
1074faf92e8dSDavid Howells 		    __entry->call = call ? call->debug_id : 0;
1075faf92e8dSDavid Howells 		    __entry->why = why;
1076faf92e8dSDavid Howells 		    __entry->ret = ret;
1077faf92e8dSDavid Howells 			   ),
1078faf92e8dSDavid Howells 
1079faf92e8dSDavid Howells 	    TP_printk("c=%08x %s ret=%d",
1080faf92e8dSDavid Howells 		      __entry->call,
1081faf92e8dSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1082faf92e8dSDavid Howells 		      __entry->ret)
1083faf92e8dSDavid Howells 	    );
1084faf92e8dSDavid Howells 
1085faf92e8dSDavid Howells TRACE_EVENT(rxrpc_recvdata,
1086faf92e8dSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
108784997905SDavid Howells 		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
108884997905SDavid Howells 		     int ret),
108984997905SDavid Howells 
109084997905SDavid Howells 	    TP_ARGS(call, why, seq, offset, len, ret),
109184997905SDavid Howells 
109284997905SDavid Howells 	    TP_STRUCT__entry(
1093a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
109484997905SDavid Howells 		    __field(enum rxrpc_recvmsg_trace,	why		)
109584997905SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
109684997905SDavid Howells 		    __field(unsigned int,		offset		)
109784997905SDavid Howells 		    __field(unsigned int,		len		)
109884997905SDavid Howells 		    __field(int,			ret		)
109984997905SDavid Howells 			     ),
110084997905SDavid Howells 
110184997905SDavid Howells 	    TP_fast_assign(
1102db9b2e0aSDavid Howells 		    __entry->call = call ? call->debug_id : 0;
110384997905SDavid Howells 		    __entry->why = why;
110484997905SDavid Howells 		    __entry->seq = seq;
110584997905SDavid Howells 		    __entry->offset = offset;
110684997905SDavid Howells 		    __entry->len = len;
110784997905SDavid Howells 		    __entry->ret = ret;
110884997905SDavid Howells 			   ),
110984997905SDavid Howells 
1110a25e21f0SDavid Howells 	    TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
111184997905SDavid Howells 		      __entry->call,
1112b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
111384997905SDavid Howells 		      __entry->seq,
111484997905SDavid Howells 		      __entry->offset,
111584997905SDavid Howells 		      __entry->len,
111684997905SDavid Howells 		      __entry->ret)
111784997905SDavid Howells 	    );
111884997905SDavid Howells 
1119cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx,
1120cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
11214700c4d8SDavid Howells 		     int slot, rxrpc_serial_t send_serial),
1122cf1a6474SDavid Howells 
11234700c4d8SDavid Howells 	    TP_ARGS(call, why, slot, send_serial),
1124cf1a6474SDavid Howells 
1125cf1a6474SDavid Howells 	    TP_STRUCT__entry(
1126a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1127cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_tx_trace,	why		)
11284700c4d8SDavid Howells 		    __field(int,			slot		)
1129cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
1130cf1a6474SDavid Howells 			     ),
1131cf1a6474SDavid Howells 
1132cf1a6474SDavid Howells 	    TP_fast_assign(
1133a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1134cf1a6474SDavid Howells 		    __entry->why = why;
11354700c4d8SDavid Howells 		    __entry->slot = slot;
1136cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
1137cf1a6474SDavid Howells 			   ),
1138cf1a6474SDavid Howells 
11394700c4d8SDavid Howells 	    TP_printk("c=%08x [%d] %s sr=%08x",
1140cf1a6474SDavid Howells 		      __entry->call,
11414700c4d8SDavid Howells 		      __entry->slot,
1142b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1143cf1a6474SDavid Howells 		      __entry->send_serial)
1144cf1a6474SDavid Howells 	    );
1145cf1a6474SDavid Howells 
1146cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx,
1147cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
11484700c4d8SDavid Howells 		     int slot,
1149cf1a6474SDavid Howells 		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1150c410bf01SDavid Howells 		     u32 rtt, u32 rto),
1151cf1a6474SDavid Howells 
11524700c4d8SDavid Howells 	    TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1153cf1a6474SDavid Howells 
1154cf1a6474SDavid Howells 	    TP_STRUCT__entry(
1155a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1156cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_rx_trace,	why		)
11574700c4d8SDavid Howells 		    __field(int,			slot		)
1158cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
1159cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		resp_serial	)
1160c410bf01SDavid Howells 		    __field(u32,			rtt		)
1161c410bf01SDavid Howells 		    __field(u32,			rto		)
1162cf1a6474SDavid Howells 			     ),
1163cf1a6474SDavid Howells 
1164cf1a6474SDavid Howells 	    TP_fast_assign(
1165a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1166cf1a6474SDavid Howells 		    __entry->why = why;
11674700c4d8SDavid Howells 		    __entry->slot = slot;
1168cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
1169cf1a6474SDavid Howells 		    __entry->resp_serial = resp_serial;
1170cf1a6474SDavid Howells 		    __entry->rtt = rtt;
1171c410bf01SDavid Howells 		    __entry->rto = rto;
1172cf1a6474SDavid Howells 			   ),
1173cf1a6474SDavid Howells 
11744700c4d8SDavid Howells 	    TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1175cf1a6474SDavid Howells 		      __entry->call,
11764700c4d8SDavid Howells 		      __entry->slot,
1177b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1178cf1a6474SDavid Howells 		      __entry->send_serial,
1179cf1a6474SDavid Howells 		      __entry->resp_serial,
1180cf1a6474SDavid Howells 		      __entry->rtt,
1181c410bf01SDavid Howells 		      __entry->rto)
1182cf1a6474SDavid Howells 	    );
1183cf1a6474SDavid Howells 
1184fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer,
1185fc7ab6d2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1186a158bdd3SDavid Howells 		     unsigned long now),
1187fc7ab6d2SDavid Howells 
1188a158bdd3SDavid Howells 	    TP_ARGS(call, why, now),
1189fc7ab6d2SDavid Howells 
1190fc7ab6d2SDavid Howells 	    TP_STRUCT__entry(
1191a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
1192fc7ab6d2SDavid Howells 		    __field(enum rxrpc_timer_trace,		why		)
1193a158bdd3SDavid Howells 		    __field(long,				now		)
1194a158bdd3SDavid Howells 		    __field(long,				ack_at		)
1195bd1fdf8cSDavid Howells 		    __field(long,				ack_lost_at	)
1196a158bdd3SDavid Howells 		    __field(long,				resend_at	)
1197a158bdd3SDavid Howells 		    __field(long,				ping_at		)
1198a158bdd3SDavid Howells 		    __field(long,				expect_rx_by	)
1199a158bdd3SDavid Howells 		    __field(long,				expect_req_by	)
1200a158bdd3SDavid Howells 		    __field(long,				expect_term_by	)
1201a158bdd3SDavid Howells 		    __field(long,				timer		)
1202fc7ab6d2SDavid Howells 			     ),
1203fc7ab6d2SDavid Howells 
1204fc7ab6d2SDavid Howells 	    TP_fast_assign(
1205a25e21f0SDavid Howells 		    __entry->call		= call->debug_id;
1206fc7ab6d2SDavid Howells 		    __entry->why		= why;
1207fc7ab6d2SDavid Howells 		    __entry->now		= now;
1208530403d9SDavid Howells 		    __entry->ack_at		= call->delay_ack_at;
1209bd1fdf8cSDavid Howells 		    __entry->ack_lost_at	= call->ack_lost_at;
1210fc7ab6d2SDavid Howells 		    __entry->resend_at		= call->resend_at;
1211a158bdd3SDavid Howells 		    __entry->expect_rx_by	= call->expect_rx_by;
1212a158bdd3SDavid Howells 		    __entry->expect_req_by	= call->expect_req_by;
1213a158bdd3SDavid Howells 		    __entry->expect_term_by	= call->expect_term_by;
1214fc7ab6d2SDavid Howells 		    __entry->timer		= call->timer.expires;
1215fc7ab6d2SDavid Howells 			   ),
1216fc7ab6d2SDavid Howells 
1217a25e21f0SDavid Howells 	    TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1218fc7ab6d2SDavid Howells 		      __entry->call,
1219b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_timer_traces),
1220a158bdd3SDavid Howells 		      __entry->ack_at - __entry->now,
1221bd1fdf8cSDavid Howells 		      __entry->ack_lost_at - __entry->now,
1222a158bdd3SDavid Howells 		      __entry->resend_at - __entry->now,
1223a158bdd3SDavid Howells 		      __entry->expect_rx_by - __entry->now,
1224a158bdd3SDavid Howells 		      __entry->expect_req_by - __entry->now,
1225a158bdd3SDavid Howells 		      __entry->expect_term_by - __entry->now,
1226a158bdd3SDavid Howells 		      __entry->timer - __entry->now)
1227fc7ab6d2SDavid Howells 	    );
1228fc7ab6d2SDavid Howells 
1229334dfbfcSDavid Howells TRACE_EVENT(rxrpc_timer_expired,
1230334dfbfcSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, unsigned long now),
1231334dfbfcSDavid Howells 
1232334dfbfcSDavid Howells 	    TP_ARGS(call, now),
1233334dfbfcSDavid Howells 
1234334dfbfcSDavid Howells 	    TP_STRUCT__entry(
1235334dfbfcSDavid Howells 		    __field(unsigned int,			call		)
1236334dfbfcSDavid Howells 		    __field(long,				now		)
1237334dfbfcSDavid Howells 		    __field(long,				ack_at		)
1238334dfbfcSDavid Howells 		    __field(long,				ack_lost_at	)
1239334dfbfcSDavid Howells 		    __field(long,				resend_at	)
1240334dfbfcSDavid Howells 		    __field(long,				ping_at		)
1241334dfbfcSDavid Howells 		    __field(long,				expect_rx_by	)
1242334dfbfcSDavid Howells 		    __field(long,				expect_req_by	)
1243334dfbfcSDavid Howells 		    __field(long,				expect_term_by	)
1244334dfbfcSDavid Howells 		    __field(long,				timer		)
1245334dfbfcSDavid Howells 			     ),
1246334dfbfcSDavid Howells 
1247334dfbfcSDavid Howells 	    TP_fast_assign(
1248334dfbfcSDavid Howells 		    __entry->call		= call->debug_id;
1249334dfbfcSDavid Howells 		    __entry->now		= now;
1250530403d9SDavid Howells 		    __entry->ack_at		= call->delay_ack_at;
1251334dfbfcSDavid Howells 		    __entry->ack_lost_at	= call->ack_lost_at;
1252334dfbfcSDavid Howells 		    __entry->resend_at		= call->resend_at;
1253334dfbfcSDavid Howells 		    __entry->expect_rx_by	= call->expect_rx_by;
1254334dfbfcSDavid Howells 		    __entry->expect_req_by	= call->expect_req_by;
1255334dfbfcSDavid Howells 		    __entry->expect_term_by	= call->expect_term_by;
1256334dfbfcSDavid Howells 		    __entry->timer		= call->timer.expires;
1257334dfbfcSDavid Howells 			   ),
1258334dfbfcSDavid Howells 
1259334dfbfcSDavid Howells 	    TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1260334dfbfcSDavid Howells 		      __entry->call,
1261334dfbfcSDavid Howells 		      __entry->ack_at - __entry->now,
1262334dfbfcSDavid Howells 		      __entry->ack_lost_at - __entry->now,
1263334dfbfcSDavid Howells 		      __entry->resend_at - __entry->now,
1264334dfbfcSDavid Howells 		      __entry->expect_rx_by - __entry->now,
1265334dfbfcSDavid Howells 		      __entry->expect_req_by - __entry->now,
1266334dfbfcSDavid Howells 		      __entry->expect_term_by - __entry->now,
1267334dfbfcSDavid Howells 		      __entry->timer - __entry->now)
1268334dfbfcSDavid Howells 	    );
1269334dfbfcSDavid Howells 
127089b475abSDavid Howells TRACE_EVENT(rxrpc_rx_lose,
127189b475abSDavid Howells 	    TP_PROTO(struct rxrpc_skb_priv *sp),
127289b475abSDavid Howells 
127389b475abSDavid Howells 	    TP_ARGS(sp),
127489b475abSDavid Howells 
127589b475abSDavid Howells 	    TP_STRUCT__entry(
127689b475abSDavid Howells 		    __field_struct(struct rxrpc_host_header,	hdr		)
127789b475abSDavid Howells 			     ),
127889b475abSDavid Howells 
127989b475abSDavid Howells 	    TP_fast_assign(
128089b475abSDavid Howells 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
128189b475abSDavid Howells 			   ),
128289b475abSDavid Howells 
128389b475abSDavid Howells 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
128489b475abSDavid Howells 		      __entry->hdr.epoch, __entry->hdr.cid,
128589b475abSDavid Howells 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
128689b475abSDavid Howells 		      __entry->hdr.serial, __entry->hdr.seq,
128789b475abSDavid Howells 		      __entry->hdr.type, __entry->hdr.flags,
1288b54a134aSDavid Howells 		      __entry->hdr.type <= 15 ?
1289b54a134aSDavid Howells 		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
129089b475abSDavid Howells 	    );
129189b475abSDavid Howells 
12929c7ad434SDavid Howells TRACE_EVENT(rxrpc_propose_ack,
12939c7ad434SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1294530403d9SDavid Howells 		     u8 ack_reason, rxrpc_serial_t serial),
12959c7ad434SDavid Howells 
1296530403d9SDavid Howells 	    TP_ARGS(call, why, ack_reason, serial),
12979c7ad434SDavid Howells 
12989c7ad434SDavid Howells 	    TP_STRUCT__entry(
1299a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
13009c7ad434SDavid Howells 		    __field(enum rxrpc_propose_ack_trace,	why		)
13019c7ad434SDavid Howells 		    __field(rxrpc_serial_t,			serial		)
13029c7ad434SDavid Howells 		    __field(u8,					ack_reason	)
13039c7ad434SDavid Howells 			     ),
13049c7ad434SDavid Howells 
13059c7ad434SDavid Howells 	    TP_fast_assign(
1306a25e21f0SDavid Howells 		    __entry->call	= call->debug_id;
13079c7ad434SDavid Howells 		    __entry->why	= why;
13089c7ad434SDavid Howells 		    __entry->serial	= serial;
13099c7ad434SDavid Howells 		    __entry->ack_reason	= ack_reason;
13109c7ad434SDavid Howells 			   ),
13119c7ad434SDavid Howells 
1312530403d9SDavid Howells 	    TP_printk("c=%08x %s %s r=%08x",
13139c7ad434SDavid Howells 		      __entry->call,
1314b54a134aSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1315b54a134aSDavid Howells 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1316530403d9SDavid Howells 		      __entry->serial)
13179c7ad434SDavid Howells 	    );
13189c7ad434SDavid Howells 
131972f0c6fbSDavid Howells TRACE_EVENT(rxrpc_send_ack,
132072f0c6fbSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
132172f0c6fbSDavid Howells 		     u8 ack_reason, rxrpc_serial_t serial),
132272f0c6fbSDavid Howells 
132372f0c6fbSDavid Howells 	    TP_ARGS(call, why, ack_reason, serial),
132472f0c6fbSDavid Howells 
132572f0c6fbSDavid Howells 	    TP_STRUCT__entry(
132672f0c6fbSDavid Howells 		    __field(unsigned int,			call		)
132772f0c6fbSDavid Howells 		    __field(enum rxrpc_propose_ack_trace,	why		)
132872f0c6fbSDavid Howells 		    __field(rxrpc_serial_t,			serial		)
132972f0c6fbSDavid Howells 		    __field(u8,					ack_reason	)
133072f0c6fbSDavid Howells 			     ),
133172f0c6fbSDavid Howells 
133272f0c6fbSDavid Howells 	    TP_fast_assign(
133372f0c6fbSDavid Howells 		    __entry->call	= call->debug_id;
133472f0c6fbSDavid Howells 		    __entry->why	= why;
133572f0c6fbSDavid Howells 		    __entry->serial	= serial;
133672f0c6fbSDavid Howells 		    __entry->ack_reason	= ack_reason;
133772f0c6fbSDavid Howells 			   ),
133872f0c6fbSDavid Howells 
133972f0c6fbSDavid Howells 	    TP_printk("c=%08x %s %s r=%08x",
134072f0c6fbSDavid Howells 		      __entry->call,
134172f0c6fbSDavid Howells 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
134272f0c6fbSDavid Howells 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
134372f0c6fbSDavid Howells 		      __entry->serial)
134472f0c6fbSDavid Howells 	    );
134572f0c6fbSDavid Howells 
1346530403d9SDavid Howells TRACE_EVENT(rxrpc_drop_ack,
1347530403d9SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1348530403d9SDavid Howells 		     u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1349530403d9SDavid Howells 
1350530403d9SDavid Howells 	    TP_ARGS(call, why, ack_reason, serial, nobuf),
1351530403d9SDavid Howells 
1352530403d9SDavid Howells 	    TP_STRUCT__entry(
1353530403d9SDavid Howells 		    __field(unsigned int,			call		)
1354530403d9SDavid Howells 		    __field(enum rxrpc_propose_ack_trace,	why		)
1355530403d9SDavid Howells 		    __field(rxrpc_serial_t,			serial		)
1356530403d9SDavid Howells 		    __field(u8,					ack_reason	)
1357530403d9SDavid Howells 		    __field(bool,				nobuf		)
1358530403d9SDavid Howells 			     ),
1359530403d9SDavid Howells 
1360530403d9SDavid Howells 	    TP_fast_assign(
1361530403d9SDavid Howells 		    __entry->call	= call->debug_id;
1362530403d9SDavid Howells 		    __entry->why	= why;
1363530403d9SDavid Howells 		    __entry->serial	= serial;
1364530403d9SDavid Howells 		    __entry->ack_reason	= ack_reason;
1365530403d9SDavid Howells 		    __entry->nobuf	= nobuf;
1366530403d9SDavid Howells 			   ),
1367530403d9SDavid Howells 
1368530403d9SDavid Howells 	    TP_printk("c=%08x %s %s r=%08x nbf=%u",
1369530403d9SDavid Howells 		      __entry->call,
1370530403d9SDavid Howells 		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1371530403d9SDavid Howells 		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1372530403d9SDavid Howells 		      __entry->serial, __entry->nobuf)
1373530403d9SDavid Howells 	    );
1374530403d9SDavid Howells 
1375c6672e3fSDavid Howells TRACE_EVENT(rxrpc_retransmit,
1376a4ea4c47SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1377c6672e3fSDavid Howells 
1378a4ea4c47SDavid Howells 	    TP_ARGS(call, seq, expiry),
1379c6672e3fSDavid Howells 
1380c6672e3fSDavid Howells 	    TP_STRUCT__entry(
1381a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1382c6672e3fSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
1383c6672e3fSDavid Howells 		    __field(s64,			expiry		)
1384c6672e3fSDavid Howells 			     ),
1385c6672e3fSDavid Howells 
1386c6672e3fSDavid Howells 	    TP_fast_assign(
1387a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1388c6672e3fSDavid Howells 		    __entry->seq = seq;
1389c6672e3fSDavid Howells 		    __entry->expiry = expiry;
1390c6672e3fSDavid Howells 			   ),
1391c6672e3fSDavid Howells 
1392a4ea4c47SDavid Howells 	    TP_printk("c=%08x q=%x xp=%lld",
1393c6672e3fSDavid Howells 		      __entry->call,
1394c6672e3fSDavid Howells 		      __entry->seq,
1395c6672e3fSDavid Howells 		      __entry->expiry)
1396c6672e3fSDavid Howells 	    );
1397c6672e3fSDavid Howells 
139857494343SDavid Howells TRACE_EVENT(rxrpc_congest,
139957494343SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
140057494343SDavid Howells 		     rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
140157494343SDavid Howells 
140257494343SDavid Howells 	    TP_ARGS(call, summary, ack_serial, change),
140357494343SDavid Howells 
140457494343SDavid Howells 	    TP_STRUCT__entry(
1405a25e21f0SDavid Howells 		    __field(unsigned int,			call		)
140657494343SDavid Howells 		    __field(enum rxrpc_congest_change,		change		)
140757494343SDavid Howells 		    __field(rxrpc_seq_t,			hard_ack	)
140857494343SDavid Howells 		    __field(rxrpc_seq_t,			top		)
140957494343SDavid Howells 		    __field(rxrpc_seq_t,			lowest_nak	)
141057494343SDavid Howells 		    __field(rxrpc_serial_t,			ack_serial	)
141157494343SDavid Howells 		    __field_struct(struct rxrpc_ack_summary,	sum		)
141257494343SDavid Howells 			     ),
141357494343SDavid Howells 
141457494343SDavid Howells 	    TP_fast_assign(
1415a25e21f0SDavid Howells 		    __entry->call	= call->debug_id;
141657494343SDavid Howells 		    __entry->change	= change;
1417a4ea4c47SDavid Howells 		    __entry->hard_ack	= call->acks_hard_ack;
141857494343SDavid Howells 		    __entry->top	= call->tx_top;
141957494343SDavid Howells 		    __entry->lowest_nak	= call->acks_lowest_nak;
142057494343SDavid Howells 		    __entry->ack_serial	= ack_serial;
142157494343SDavid Howells 		    memcpy(&__entry->sum, summary, sizeof(__entry->sum));
142257494343SDavid Howells 			   ),
142357494343SDavid Howells 
1424d57a3a15SDavid Howells 	    TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nA=%u,%u+%u r=%u b=%u u=%u d=%u l=%x%s%s%s",
142557494343SDavid Howells 		      __entry->call,
142657494343SDavid Howells 		      __entry->ack_serial,
1427b54a134aSDavid Howells 		      __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
142857494343SDavid Howells 		      __entry->hard_ack,
1429b54a134aSDavid Howells 		      __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
143057494343SDavid Howells 		      __entry->sum.cwnd,
143157494343SDavid Howells 		      __entry->sum.ssthresh,
1432d57a3a15SDavid Howells 		      __entry->sum.nr_acks, __entry->sum.saw_nacks,
1433d57a3a15SDavid Howells 		      __entry->sum.nr_new_acks,
143457494343SDavid Howells 		      __entry->sum.nr_rot_new_acks,
143557494343SDavid Howells 		      __entry->top - __entry->hard_ack,
143657494343SDavid Howells 		      __entry->sum.cumulative_acks,
143757494343SDavid Howells 		      __entry->sum.dup_acks,
143857494343SDavid Howells 		      __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1439b54a134aSDavid Howells 		      __print_symbolic(__entry->change, rxrpc_congest_changes),
144057494343SDavid Howells 		      __entry->sum.retrans_timeo ? " rTxTo" : "")
144157494343SDavid Howells 	    );
144257494343SDavid Howells 
1443b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_disconnect_call,
1444b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
1445b1d9f7fdSDavid Howells 
1446b1d9f7fdSDavid Howells 	    TP_ARGS(call),
1447b1d9f7fdSDavid Howells 
1448b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
1449a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1450b1d9f7fdSDavid Howells 		    __field(u32,			abort_code	)
1451b1d9f7fdSDavid Howells 			     ),
1452b1d9f7fdSDavid Howells 
1453b1d9f7fdSDavid Howells 	    TP_fast_assign(
1454a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1455b1d9f7fdSDavid Howells 		    __entry->abort_code = call->abort_code;
1456b1d9f7fdSDavid Howells 			   ),
1457b1d9f7fdSDavid Howells 
1458a25e21f0SDavid Howells 	    TP_printk("c=%08x ab=%08x",
1459b1d9f7fdSDavid Howells 		      __entry->call,
1460b1d9f7fdSDavid Howells 		      __entry->abort_code)
1461b1d9f7fdSDavid Howells 	    );
1462b1d9f7fdSDavid Howells 
1463b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_improper_term,
1464b1d9f7fdSDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
1465b1d9f7fdSDavid Howells 
1466b1d9f7fdSDavid Howells 	    TP_ARGS(call),
1467b1d9f7fdSDavid Howells 
1468b1d9f7fdSDavid Howells 	    TP_STRUCT__entry(
1469a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1470b1d9f7fdSDavid Howells 		    __field(u32,			abort_code	)
1471b1d9f7fdSDavid Howells 			     ),
1472b1d9f7fdSDavid Howells 
1473b1d9f7fdSDavid Howells 	    TP_fast_assign(
1474a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1475b1d9f7fdSDavid Howells 		    __entry->abort_code = call->abort_code;
1476b1d9f7fdSDavid Howells 			   ),
1477b1d9f7fdSDavid Howells 
1478a25e21f0SDavid Howells 	    TP_printk("c=%08x ab=%08x",
1479b1d9f7fdSDavid Howells 		      __entry->call,
1480b1d9f7fdSDavid Howells 		      __entry->abort_code)
1481b1d9f7fdSDavid Howells 	    );
1482b1d9f7fdSDavid Howells 
1483fb46f6eeSDavid Howells TRACE_EVENT(rxrpc_rx_eproto,
1484fb46f6eeSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1485fb46f6eeSDavid Howells 		     const char *why),
1486fb46f6eeSDavid Howells 
1487fb46f6eeSDavid Howells 	    TP_ARGS(call, serial, why),
1488fb46f6eeSDavid Howells 
1489fb46f6eeSDavid Howells 	    TP_STRUCT__entry(
1490a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1491fb46f6eeSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
1492fb46f6eeSDavid Howells 		    __field(const char *,		why		)
1493fb46f6eeSDavid Howells 			     ),
1494fb46f6eeSDavid Howells 
1495fb46f6eeSDavid Howells 	    TP_fast_assign(
149699f0eae6SDavid Howells 		    __entry->call = call ? call->debug_id : 0;
1497fb46f6eeSDavid Howells 		    __entry->serial = serial;
1498fb46f6eeSDavid Howells 		    __entry->why = why;
1499fb46f6eeSDavid Howells 			   ),
1500fb46f6eeSDavid Howells 
1501a25e21f0SDavid Howells 	    TP_printk("c=%08x EPROTO %08x %s",
1502fb46f6eeSDavid Howells 		      __entry->call,
1503fb46f6eeSDavid Howells 		      __entry->serial,
1504fb46f6eeSDavid Howells 		      __entry->why)
1505fb46f6eeSDavid Howells 	    );
1506fb46f6eeSDavid Howells 
150789ca6948SDavid Howells TRACE_EVENT(rxrpc_connect_call,
150889ca6948SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
150989ca6948SDavid Howells 
151089ca6948SDavid Howells 	    TP_ARGS(call),
151189ca6948SDavid Howells 
151289ca6948SDavid Howells 	    TP_STRUCT__entry(
1513a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
151489ca6948SDavid Howells 		    __field(unsigned long,		user_call_ID	)
151589ca6948SDavid Howells 		    __field(u32,			cid		)
151689ca6948SDavid Howells 		    __field(u32,			call_id		)
151789ca6948SDavid Howells 			     ),
151889ca6948SDavid Howells 
151989ca6948SDavid Howells 	    TP_fast_assign(
1520a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
152189ca6948SDavid Howells 		    __entry->user_call_ID = call->user_call_ID;
152289ca6948SDavid Howells 		    __entry->cid = call->cid;
152389ca6948SDavid Howells 		    __entry->call_id = call->call_id;
152489ca6948SDavid Howells 			   ),
152589ca6948SDavid Howells 
1526a25e21f0SDavid Howells 	    TP_printk("c=%08x u=%p %08x:%08x",
152789ca6948SDavid Howells 		      __entry->call,
152889ca6948SDavid Howells 		      (void *)__entry->user_call_ID,
152989ca6948SDavid Howells 		      __entry->cid,
153089ca6948SDavid Howells 		      __entry->call_id)
153189ca6948SDavid Howells 	    );
153289ca6948SDavid Howells 
1533827efed6SDavid Howells TRACE_EVENT(rxrpc_resend,
1534a4ea4c47SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
1535827efed6SDavid Howells 
1536a4ea4c47SDavid Howells 	    TP_ARGS(call),
1537827efed6SDavid Howells 
1538827efed6SDavid Howells 	    TP_STRUCT__entry(
1539a25e21f0SDavid Howells 		    __field(unsigned int,		call		)
1540a4ea4c47SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
1541827efed6SDavid Howells 			     ),
1542827efed6SDavid Howells 
1543827efed6SDavid Howells 	    TP_fast_assign(
1544a25e21f0SDavid Howells 		    __entry->call = call->debug_id;
1545a4ea4c47SDavid Howells 		    __entry->seq = call->acks_hard_ack;
1546827efed6SDavid Howells 			   ),
1547827efed6SDavid Howells 
1548a4ea4c47SDavid Howells 	    TP_printk("c=%08x q=%x",
1549827efed6SDavid Howells 		      __entry->call,
1550a4ea4c47SDavid Howells 		      __entry->seq)
1551827efed6SDavid Howells 	    );
1552827efed6SDavid Howells 
1553494337c9SDavid Howells TRACE_EVENT(rxrpc_rx_icmp,
1554494337c9SDavid Howells 	    TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1555494337c9SDavid Howells 		     struct sockaddr_rxrpc *srx),
1556494337c9SDavid Howells 
1557494337c9SDavid Howells 	    TP_ARGS(peer, ee, srx),
1558494337c9SDavid Howells 
1559494337c9SDavid Howells 	    TP_STRUCT__entry(
1560494337c9SDavid Howells 		    __field(unsigned int,			peer	)
1561494337c9SDavid Howells 		    __field_struct(struct sock_extended_err,	ee	)
1562494337c9SDavid Howells 		    __field_struct(struct sockaddr_rxrpc,	srx	)
1563494337c9SDavid Howells 			     ),
1564494337c9SDavid Howells 
1565494337c9SDavid Howells 	    TP_fast_assign(
1566494337c9SDavid Howells 		    __entry->peer = peer->debug_id;
1567494337c9SDavid Howells 		    memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1568494337c9SDavid Howells 		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1569494337c9SDavid Howells 			   ),
1570494337c9SDavid Howells 
1571494337c9SDavid Howells 	    TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1572494337c9SDavid Howells 		      __entry->peer,
1573494337c9SDavid Howells 		      __entry->ee.ee_origin,
1574494337c9SDavid Howells 		      __entry->ee.ee_type,
1575494337c9SDavid Howells 		      __entry->ee.ee_code,
1576494337c9SDavid Howells 		      __entry->ee.ee_info,
1577494337c9SDavid Howells 		      __entry->ee.ee_data,
1578494337c9SDavid Howells 		      __entry->ee.ee_errno,
1579494337c9SDavid Howells 		      &__entry->srx.transport)
1580494337c9SDavid Howells 	    );
1581494337c9SDavid Howells 
15826b47fe1dSDavid Howells TRACE_EVENT(rxrpc_tx_fail,
15836b47fe1dSDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
15844764c0daSDavid Howells 		     enum rxrpc_tx_point where),
15856b47fe1dSDavid Howells 
15864764c0daSDavid Howells 	    TP_ARGS(debug_id, serial, ret, where),
15876b47fe1dSDavid Howells 
15886b47fe1dSDavid Howells 	    TP_STRUCT__entry(
15896b47fe1dSDavid Howells 		    __field(unsigned int,		debug_id	)
15906b47fe1dSDavid Howells 		    __field(rxrpc_serial_t,		serial		)
15916b47fe1dSDavid Howells 		    __field(int,			ret		)
15924764c0daSDavid Howells 		    __field(enum rxrpc_tx_point,	where		)
15936b47fe1dSDavid Howells 			     ),
15946b47fe1dSDavid Howells 
15956b47fe1dSDavid Howells 	    TP_fast_assign(
15966b47fe1dSDavid Howells 		    __entry->debug_id = debug_id;
15976b47fe1dSDavid Howells 		    __entry->serial = serial;
15986b47fe1dSDavid Howells 		    __entry->ret = ret;
15994764c0daSDavid Howells 		    __entry->where = where;
16006b47fe1dSDavid Howells 			   ),
16016b47fe1dSDavid Howells 
16026b47fe1dSDavid Howells 	    TP_printk("c=%08x r=%x ret=%d %s",
16036b47fe1dSDavid Howells 		      __entry->debug_id,
16046b47fe1dSDavid Howells 		      __entry->serial,
16056b47fe1dSDavid Howells 		      __entry->ret,
16064764c0daSDavid Howells 		      __print_symbolic(__entry->where, rxrpc_tx_points))
16076b47fe1dSDavid Howells 	    );
16086b47fe1dSDavid Howells 
16091a025028SDavid Howells TRACE_EVENT(rxrpc_call_reset,
16101a025028SDavid Howells 	    TP_PROTO(struct rxrpc_call *call),
16111a025028SDavid Howells 
16121a025028SDavid Howells 	    TP_ARGS(call),
16131a025028SDavid Howells 
16141a025028SDavid Howells 	    TP_STRUCT__entry(
16151a025028SDavid Howells 		    __field(unsigned int,		debug_id	)
16161a025028SDavid Howells 		    __field(u32,			cid		)
16171a025028SDavid Howells 		    __field(u32,			call_id		)
16181a025028SDavid Howells 		    __field(rxrpc_serial_t,		call_serial	)
16191a025028SDavid Howells 		    __field(rxrpc_serial_t,		conn_serial	)
16201a025028SDavid Howells 		    __field(rxrpc_seq_t,		tx_seq		)
16211a025028SDavid Howells 		    __field(rxrpc_seq_t,		rx_seq		)
16221a025028SDavid Howells 			     ),
16231a025028SDavid Howells 
16241a025028SDavid Howells 	    TP_fast_assign(
16251a025028SDavid Howells 		    __entry->debug_id = call->debug_id;
16261a025028SDavid Howells 		    __entry->cid = call->cid;
16271a025028SDavid Howells 		    __entry->call_id = call->call_id;
16281a025028SDavid Howells 		    __entry->call_serial = call->rx_serial;
16291a025028SDavid Howells 		    __entry->conn_serial = call->conn->hi_serial;
1630a4ea4c47SDavid Howells 		    __entry->tx_seq = call->acks_hard_ack;
16315d7edbc9SDavid Howells 		    __entry->rx_seq = call->rx_highest_seq;
16321a025028SDavid Howells 			   ),
16331a025028SDavid Howells 
16341a025028SDavid Howells 	    TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
16351a025028SDavid Howells 		      __entry->debug_id,
16361a025028SDavid Howells 		      __entry->cid, __entry->call_id,
16371a025028SDavid Howells 		      __entry->call_serial, __entry->conn_serial,
16381a025028SDavid Howells 		      __entry->tx_seq, __entry->rx_seq)
16391a025028SDavid Howells 	    );
16401a025028SDavid Howells 
16414272d303SDavid Howells TRACE_EVENT(rxrpc_notify_socket,
16424272d303SDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
16434272d303SDavid Howells 
16444272d303SDavid Howells 	    TP_ARGS(debug_id, serial),
16454272d303SDavid Howells 
16464272d303SDavid Howells 	    TP_STRUCT__entry(
16474272d303SDavid Howells 		    __field(unsigned int,		debug_id	)
16484272d303SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
16494272d303SDavid Howells 			     ),
16504272d303SDavid Howells 
16514272d303SDavid Howells 	    TP_fast_assign(
16524272d303SDavid Howells 		    __entry->debug_id = debug_id;
16534272d303SDavid Howells 		    __entry->serial = serial;
16544272d303SDavid Howells 			   ),
16554272d303SDavid Howells 
16564272d303SDavid Howells 	    TP_printk("c=%08x r=%08x",
16574272d303SDavid Howells 		      __entry->debug_id,
16584272d303SDavid Howells 		      __entry->serial)
16594272d303SDavid Howells 	    );
16604272d303SDavid Howells 
1661d1f12947SDavid Howells TRACE_EVENT(rxrpc_rx_discard_ack,
1662d1f12947SDavid Howells 	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1663d1f12947SDavid Howells 		     rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1664d1f12947SDavid Howells 		     rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1665d1f12947SDavid Howells 
1666d1f12947SDavid Howells 	    TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1667d1f12947SDavid Howells 		    prev_pkt, call_ackr_prev),
1668d1f12947SDavid Howells 
1669d1f12947SDavid Howells 	    TP_STRUCT__entry(
1670d1f12947SDavid Howells 		    __field(unsigned int,	debug_id	)
1671d1f12947SDavid Howells 		    __field(rxrpc_serial_t,	serial		)
1672d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	first_soft_ack)
1673d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	call_ackr_first)
1674d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	prev_pkt)
1675d1f12947SDavid Howells 		    __field(rxrpc_seq_t,	call_ackr_prev)
1676d1f12947SDavid Howells 			     ),
1677d1f12947SDavid Howells 
1678d1f12947SDavid Howells 	    TP_fast_assign(
1679d1f12947SDavid Howells 		    __entry->debug_id		= debug_id;
1680d1f12947SDavid Howells 		    __entry->serial		= serial;
1681d1f12947SDavid Howells 		    __entry->first_soft_ack	= first_soft_ack;
1682d1f12947SDavid Howells 		    __entry->call_ackr_first	= call_ackr_first;
1683d1f12947SDavid Howells 		    __entry->prev_pkt		= prev_pkt;
1684d1f12947SDavid Howells 		    __entry->call_ackr_prev	= call_ackr_prev;
1685d1f12947SDavid Howells 			   ),
1686d1f12947SDavid Howells 
1687d1f12947SDavid Howells 	    TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1688d1f12947SDavid Howells 		      __entry->debug_id,
1689d1f12947SDavid Howells 		      __entry->serial,
1690d1f12947SDavid Howells 		      __entry->first_soft_ack,
1691d1f12947SDavid Howells 		      __entry->call_ackr_first,
1692d1f12947SDavid Howells 		      __entry->prev_pkt,
1693d1f12947SDavid Howells 		      __entry->call_ackr_prev)
1694d1f12947SDavid Howells 	    );
1695d1f12947SDavid Howells 
16964d843be5SDavid Howells TRACE_EVENT(rxrpc_req_ack,
16974d843be5SDavid Howells 	    TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
16984d843be5SDavid Howells 		     enum rxrpc_req_ack_trace why),
16994d843be5SDavid Howells 
17004d843be5SDavid Howells 	    TP_ARGS(call_debug_id, seq, why),
17014d843be5SDavid Howells 
17024d843be5SDavid Howells 	    TP_STRUCT__entry(
17034d843be5SDavid Howells 		    __field(unsigned int,		call_debug_id	)
17044d843be5SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
17054d843be5SDavid Howells 		    __field(enum rxrpc_req_ack_trace,	why		)
17064d843be5SDavid Howells 			     ),
17074d843be5SDavid Howells 
17084d843be5SDavid Howells 	    TP_fast_assign(
17094d843be5SDavid Howells 		    __entry->call_debug_id = call_debug_id;
17104d843be5SDavid Howells 		    __entry->seq = seq;
17114d843be5SDavid Howells 		    __entry->why = why;
17124d843be5SDavid Howells 			   ),
17134d843be5SDavid Howells 
17144d843be5SDavid Howells 	    TP_printk("c=%08x q=%08x REQ-%s",
17154d843be5SDavid Howells 		      __entry->call_debug_id,
17164d843be5SDavid Howells 		      __entry->seq,
17174d843be5SDavid Howells 		      __print_symbolic(__entry->why, rxrpc_req_ack_traces))
17184d843be5SDavid Howells 	    );
17194d843be5SDavid Howells 
172002a19356SDavid Howells TRACE_EVENT(rxrpc_txbuf,
172102a19356SDavid Howells 	    TP_PROTO(unsigned int debug_id,
172202a19356SDavid Howells 		     unsigned int call_debug_id, rxrpc_seq_t seq,
172302a19356SDavid Howells 		     int ref, enum rxrpc_txbuf_trace what),
172402a19356SDavid Howells 
172502a19356SDavid Howells 	    TP_ARGS(debug_id, call_debug_id, seq, ref, what),
172602a19356SDavid Howells 
172702a19356SDavid Howells 	    TP_STRUCT__entry(
172802a19356SDavid Howells 		    __field(unsigned int,		debug_id	)
172902a19356SDavid Howells 		    __field(unsigned int,		call_debug_id	)
173002a19356SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
173102a19356SDavid Howells 		    __field(int,			ref		)
173202a19356SDavid Howells 		    __field(enum rxrpc_txbuf_trace,	what		)
173302a19356SDavid Howells 			     ),
173402a19356SDavid Howells 
173502a19356SDavid Howells 	    TP_fast_assign(
173602a19356SDavid Howells 		    __entry->debug_id = debug_id;
173702a19356SDavid Howells 		    __entry->call_debug_id = call_debug_id;
173802a19356SDavid Howells 		    __entry->seq = seq;
173902a19356SDavid Howells 		    __entry->ref = ref;
174002a19356SDavid Howells 		    __entry->what = what;
174102a19356SDavid Howells 			   ),
174202a19356SDavid Howells 
174302a19356SDavid Howells 	    TP_printk("B=%08x c=%08x q=%08x %s r=%d",
174402a19356SDavid Howells 		      __entry->debug_id,
174502a19356SDavid Howells 		      __entry->call_debug_id,
174602a19356SDavid Howells 		      __entry->seq,
174702a19356SDavid Howells 		      __print_symbolic(__entry->what, rxrpc_txbuf_traces),
174802a19356SDavid Howells 		      __entry->ref)
174902a19356SDavid Howells 	    );
175002a19356SDavid Howells 
1751dc9fd093SDavid Howells #undef EM
1752dc9fd093SDavid Howells #undef E_
1753df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */
1754df844fd4SDavid Howells 
1755df844fd4SDavid Howells /* This part must be outside protection */
1756df844fd4SDavid Howells #include <trace/define_trace.h>
1757