Linux Audio

Check our new training course

Loading...
v6.2
   1/* SPDX-License-Identifier: GPL-2.0-or-later */
   2/* AF_RXRPC tracepoints
   3 *
   4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
   5 * Written by David Howells (dhowells@redhat.com)
   6 */
   7#undef TRACE_SYSTEM
   8#define TRACE_SYSTEM rxrpc
   9
  10#if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
  11#define _TRACE_RXRPC_H
  12
  13#include <linux/tracepoint.h>
  14#include <linux/errqueue.h>
  15
  16/*
  17 * Declare tracing information enums and their string mappings for display.
 
 
 
  18 */
  19#define rxrpc_abort_reasons \
  20	/* AFS errors */						\
  21	EM(afs_abort_general_error,		"afs-error")		\
  22	EM(afs_abort_interrupted,		"afs-intr")		\
  23	EM(afs_abort_oom,			"afs-oom")		\
  24	EM(afs_abort_op_not_supported,		"afs-op-notsupp")	\
  25	EM(afs_abort_probeuuid_negative,	"afs-probeuuid-neg")	\
  26	EM(afs_abort_send_data_error,		"afs-send-data")	\
  27	EM(afs_abort_unmarshal_error,		"afs-unmarshal")	\
  28	/* rxperf errors */						\
  29	EM(rxperf_abort_general_error,		"rxperf-error")		\
  30	EM(rxperf_abort_oom,			"rxperf-oom")		\
  31	EM(rxperf_abort_op_not_supported,	"rxperf-op-notsupp")	\
  32	EM(rxperf_abort_unmarshal_error,	"rxperf-unmarshal")	\
  33	/* RxKAD security errors */					\
  34	EM(rxkad_abort_1_short_check,		"rxkad1-short-check")	\
  35	EM(rxkad_abort_1_short_data,		"rxkad1-short-data")	\
  36	EM(rxkad_abort_1_short_encdata,		"rxkad1-short-encdata")	\
  37	EM(rxkad_abort_1_short_header,		"rxkad1-short-hdr")	\
  38	EM(rxkad_abort_2_short_check,		"rxkad2-short-check")	\
  39	EM(rxkad_abort_2_short_data,		"rxkad2-short-data")	\
  40	EM(rxkad_abort_2_short_header,		"rxkad2-short-hdr")	\
  41	EM(rxkad_abort_2_short_len,		"rxkad2-short-len")	\
  42	EM(rxkad_abort_bad_checksum,		"rxkad2-bad-cksum")	\
  43	EM(rxkad_abort_chall_key_expired,	"rxkad-chall-key-exp")	\
  44	EM(rxkad_abort_chall_level,		"rxkad-chall-level")	\
  45	EM(rxkad_abort_chall_no_key,		"rxkad-chall-nokey")	\
  46	EM(rxkad_abort_chall_short,		"rxkad-chall-short")	\
  47	EM(rxkad_abort_chall_version,		"rxkad-chall-version")	\
  48	EM(rxkad_abort_resp_bad_callid,		"rxkad-resp-bad-callid") \
  49	EM(rxkad_abort_resp_bad_checksum,	"rxkad-resp-bad-cksum")	\
  50	EM(rxkad_abort_resp_bad_param,		"rxkad-resp-bad-param")	\
  51	EM(rxkad_abort_resp_call_ctr,		"rxkad-resp-call-ctr") \
  52	EM(rxkad_abort_resp_call_state,		"rxkad-resp-call-state") \
  53	EM(rxkad_abort_resp_key_expired,	"rxkad-resp-key-exp")	\
  54	EM(rxkad_abort_resp_key_rejected,	"rxkad-resp-key-rej")	\
  55	EM(rxkad_abort_resp_level,		"rxkad-resp-level")	\
  56	EM(rxkad_abort_resp_nokey,		"rxkad-resp-nokey")	\
  57	EM(rxkad_abort_resp_ooseq,		"rxkad-resp-ooseq")	\
  58	EM(rxkad_abort_resp_short,		"rxkad-resp-short")	\
  59	EM(rxkad_abort_resp_short_tkt,		"rxkad-resp-short-tkt")	\
  60	EM(rxkad_abort_resp_tkt_aname,		"rxkad-resp-tk-aname")	\
  61	EM(rxkad_abort_resp_tkt_expired,	"rxkad-resp-tk-exp")	\
  62	EM(rxkad_abort_resp_tkt_future,		"rxkad-resp-tk-future")	\
  63	EM(rxkad_abort_resp_tkt_inst,		"rxkad-resp-tk-inst")	\
  64	EM(rxkad_abort_resp_tkt_len,		"rxkad-resp-tk-len")	\
  65	EM(rxkad_abort_resp_tkt_realm,		"rxkad-resp-tk-realm")	\
  66	EM(rxkad_abort_resp_tkt_short,		"rxkad-resp-tk-short")	\
  67	EM(rxkad_abort_resp_tkt_sinst,		"rxkad-resp-tk-sinst")	\
  68	EM(rxkad_abort_resp_tkt_sname,		"rxkad-resp-tk-sname")	\
  69	EM(rxkad_abort_resp_unknown_tkt,	"rxkad-resp-unknown-tkt") \
  70	EM(rxkad_abort_resp_version,		"rxkad-resp-version")	\
  71	/* rxrpc errors */						\
  72	EM(rxrpc_abort_call_improper_term,	"call-improper-term")	\
  73	EM(rxrpc_abort_call_reset,		"call-reset")		\
  74	EM(rxrpc_abort_call_sendmsg,		"call-sendmsg")		\
  75	EM(rxrpc_abort_call_sock_release,	"call-sock-rel")	\
  76	EM(rxrpc_abort_call_sock_release_tba,	"call-sock-rel-tba")	\
  77	EM(rxrpc_abort_call_timeout,		"call-timeout")		\
  78	EM(rxrpc_abort_no_service_key,		"no-serv-key")		\
  79	EM(rxrpc_abort_nomem,			"nomem")		\
  80	EM(rxrpc_abort_service_not_offered,	"serv-not-offered")	\
  81	EM(rxrpc_abort_shut_down,		"shut-down")		\
  82	EM(rxrpc_abort_unsupported_security,	"unsup-sec")		\
  83	EM(rxrpc_badmsg_bad_abort,		"bad-abort")		\
  84	EM(rxrpc_badmsg_bad_jumbo,		"bad-jumbo")		\
  85	EM(rxrpc_badmsg_short_ack,		"short-ack")		\
  86	EM(rxrpc_badmsg_short_ack_info,		"short-ack-info")	\
  87	EM(rxrpc_badmsg_short_hdr,		"short-hdr")		\
  88	EM(rxrpc_badmsg_unsupported_packet,	"unsup-pkt")		\
  89	EM(rxrpc_badmsg_zero_call,		"zero-call")		\
  90	EM(rxrpc_badmsg_zero_seq,		"zero-seq")		\
  91	EM(rxrpc_badmsg_zero_service,		"zero-service")		\
  92	EM(rxrpc_eproto_ackr_outside_window,	"ackr-out-win")		\
  93	EM(rxrpc_eproto_ackr_sack_overflow,	"ackr-sack-over")	\
  94	EM(rxrpc_eproto_ackr_short_sack,	"ackr-short-sack")	\
  95	EM(rxrpc_eproto_ackr_zero,		"ackr-zero")		\
  96	EM(rxrpc_eproto_bad_upgrade,		"bad-upgrade")		\
  97	EM(rxrpc_eproto_data_after_last,	"data-after-last")	\
  98	EM(rxrpc_eproto_different_last,		"diff-last")		\
  99	EM(rxrpc_eproto_early_reply,		"early-reply")		\
 100	EM(rxrpc_eproto_improper_term,		"improper-term")	\
 101	EM(rxrpc_eproto_no_client_call,		"no-cl-call")		\
 102	EM(rxrpc_eproto_no_client_conn,		"no-cl-conn")		\
 103	EM(rxrpc_eproto_no_service_call,	"no-sv-call")		\
 104	EM(rxrpc_eproto_reupgrade,		"re-upgrade")		\
 105	EM(rxrpc_eproto_rxnull_challenge,	"rxnull-chall")		\
 106	EM(rxrpc_eproto_rxnull_response,	"rxnull-resp")		\
 107	EM(rxrpc_eproto_tx_rot_last,		"tx-rot-last")		\
 108	EM(rxrpc_eproto_unexpected_ack,		"unex-ack")		\
 109	EM(rxrpc_eproto_unexpected_ackall,	"unex-ackall")		\
 110	EM(rxrpc_eproto_unexpected_implicit_end, "unex-impl-end")	\
 111	EM(rxrpc_eproto_unexpected_reply,	"unex-reply")		\
 112	EM(rxrpc_eproto_wrong_security,		"wrong-sec")		\
 113	EM(rxrpc_recvmsg_excess_data,		"recvmsg-excess")	\
 114	EM(rxrpc_recvmsg_short_data,		"recvmsg-short")	\
 115	E_(rxrpc_sendmsg_late_send,		"sendmsg-late")
 116
 117#define rxrpc_call_poke_traces \
 118	EM(rxrpc_call_poke_abort,		"Abort")	\
 119	EM(rxrpc_call_poke_complete,		"Compl")	\
 120	EM(rxrpc_call_poke_error,		"Error")	\
 121	EM(rxrpc_call_poke_idle,		"Idle")		\
 122	EM(rxrpc_call_poke_start,		"Start")	\
 123	EM(rxrpc_call_poke_timer,		"Timer")	\
 124	E_(rxrpc_call_poke_timer_now,		"Timer-now")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 125
 
 
 
 
 
 126#define rxrpc_skb_traces \
 127	EM(rxrpc_skb_eaten_by_unshare,		"ETN unshare  ") \
 128	EM(rxrpc_skb_eaten_by_unshare_nomem,	"ETN unshar-nm") \
 129	EM(rxrpc_skb_get_conn_secured,		"GET conn-secd") \
 130	EM(rxrpc_skb_get_conn_work,		"GET conn-work") \
 131	EM(rxrpc_skb_get_local_work,		"GET locl-work") \
 132	EM(rxrpc_skb_get_reject_work,		"GET rej-work ") \
 133	EM(rxrpc_skb_get_to_recvmsg,		"GET to-recv  ") \
 134	EM(rxrpc_skb_get_to_recvmsg_oos,	"GET to-recv-o") \
 135	EM(rxrpc_skb_new_encap_rcv,		"NEW encap-rcv") \
 136	EM(rxrpc_skb_new_error_report,		"NEW error-rpt") \
 137	EM(rxrpc_skb_new_jumbo_subpacket,	"NEW jumbo-sub") \
 138	EM(rxrpc_skb_new_unshared,		"NEW unshared ") \
 139	EM(rxrpc_skb_put_conn_secured,		"PUT conn-secd") \
 140	EM(rxrpc_skb_put_conn_work,		"PUT conn-work") \
 141	EM(rxrpc_skb_put_error_report,		"PUT error-rep") \
 142	EM(rxrpc_skb_put_input,			"PUT input    ") \
 143	EM(rxrpc_skb_put_jumbo_subpacket,	"PUT jumbo-sub") \
 144	EM(rxrpc_skb_put_purge,			"PUT purge    ") \
 145	EM(rxrpc_skb_put_rotate,		"PUT rotate   ") \
 146	EM(rxrpc_skb_put_unknown,		"PUT unknown  ") \
 147	EM(rxrpc_skb_see_conn_work,		"SEE conn-work") \
 148	EM(rxrpc_skb_see_recvmsg,		"SEE recvmsg  ") \
 149	EM(rxrpc_skb_see_reject,		"SEE reject   ") \
 150	EM(rxrpc_skb_see_rotate,		"SEE rotate   ") \
 151	E_(rxrpc_skb_see_version,		"SEE version  ")
 152
 153#define rxrpc_local_traces \
 154	EM(rxrpc_local_free,			"FREE        ") \
 155	EM(rxrpc_local_get_call,		"GET call    ") \
 156	EM(rxrpc_local_get_client_conn,		"GET conn-cln") \
 157	EM(rxrpc_local_get_for_use,		"GET for-use ") \
 158	EM(rxrpc_local_get_peer,		"GET peer    ") \
 159	EM(rxrpc_local_get_prealloc_conn,	"GET conn-pre") \
 160	EM(rxrpc_local_new,			"NEW         ") \
 161	EM(rxrpc_local_put_bind,		"PUT bind    ") \
 162	EM(rxrpc_local_put_call,		"PUT call    ") \
 163	EM(rxrpc_local_put_for_use,		"PUT for-use ") \
 164	EM(rxrpc_local_put_kill_conn,		"PUT conn-kil") \
 165	EM(rxrpc_local_put_peer,		"PUT peer    ") \
 166	EM(rxrpc_local_put_prealloc_conn,	"PUT conn-pre") \
 167	EM(rxrpc_local_put_release_sock,	"PUT rel-sock") \
 168	EM(rxrpc_local_stop,			"STOP        ") \
 169	EM(rxrpc_local_stopped,			"STOPPED     ") \
 170	EM(rxrpc_local_unuse_bind,		"UNU bind    ") \
 171	EM(rxrpc_local_unuse_conn_work,		"UNU conn-wrk") \
 172	EM(rxrpc_local_unuse_peer_keepalive,	"UNU peer-kpa") \
 173	EM(rxrpc_local_unuse_release_sock,	"UNU rel-sock") \
 174	EM(rxrpc_local_use_conn_work,		"USE conn-wrk") \
 175	EM(rxrpc_local_use_lookup,		"USE lookup  ") \
 176	E_(rxrpc_local_use_peer_keepalive,	"USE peer-kpa")
 177
 178#define rxrpc_peer_traces \
 179	EM(rxrpc_peer_free,			"FREE        ") \
 180	EM(rxrpc_peer_get_accept,		"GET accept  ") \
 181	EM(rxrpc_peer_get_bundle,		"GET bundle  ") \
 182	EM(rxrpc_peer_get_client_conn,		"GET cln-conn") \
 183	EM(rxrpc_peer_get_input,		"GET input   ") \
 184	EM(rxrpc_peer_get_input_error,		"GET inpt-err") \
 185	EM(rxrpc_peer_get_keepalive,		"GET keepaliv") \
 186	EM(rxrpc_peer_get_lookup_client,	"GET look-cln") \
 187	EM(rxrpc_peer_get_service_conn,		"GET srv-conn") \
 188	EM(rxrpc_peer_new_client,		"NEW client  ") \
 189	EM(rxrpc_peer_new_prealloc,		"NEW prealloc") \
 190	EM(rxrpc_peer_put_bundle,		"PUT bundle  ") \
 191	EM(rxrpc_peer_put_call,			"PUT call    ") \
 192	EM(rxrpc_peer_put_conn,			"PUT conn    ") \
 193	EM(rxrpc_peer_put_input,		"PUT input   ") \
 194	EM(rxrpc_peer_put_input_error,		"PUT inpt-err") \
 195	E_(rxrpc_peer_put_keepalive,		"PUT keepaliv")
 196
 197#define rxrpc_bundle_traces \
 198	EM(rxrpc_bundle_free,			"FREE        ") \
 199	EM(rxrpc_bundle_get_client_call,	"GET clt-call") \
 200	EM(rxrpc_bundle_get_client_conn,	"GET clt-conn") \
 201	EM(rxrpc_bundle_get_service_conn,	"GET svc-conn") \
 202	EM(rxrpc_bundle_put_call,		"PUT call    ") \
 203	EM(rxrpc_bundle_put_conn,		"PUT conn    ") \
 204	EM(rxrpc_bundle_put_discard,		"PUT discard ") \
 205	E_(rxrpc_bundle_new,			"NEW         ")
 206
 207#define rxrpc_conn_traces \
 208	EM(rxrpc_conn_free,			"FREE        ") \
 209	EM(rxrpc_conn_get_activate_call,	"GET act-call") \
 210	EM(rxrpc_conn_get_call_input,		"GET inp-call") \
 211	EM(rxrpc_conn_get_conn_input,		"GET inp-conn") \
 212	EM(rxrpc_conn_get_idle,			"GET idle    ") \
 213	EM(rxrpc_conn_get_poke_abort,		"GET pk-abort") \
 214	EM(rxrpc_conn_get_poke_timer,		"GET poke    ") \
 215	EM(rxrpc_conn_get_service_conn,		"GET svc-conn") \
 216	EM(rxrpc_conn_new_client,		"NEW client  ") \
 217	EM(rxrpc_conn_new_service,		"NEW service ") \
 218	EM(rxrpc_conn_put_call,			"PUT call    ") \
 219	EM(rxrpc_conn_put_call_input,		"PUT inp-call") \
 220	EM(rxrpc_conn_put_conn_input,		"PUT inp-conn") \
 221	EM(rxrpc_conn_put_discard_idle,		"PUT disc-idl") \
 222	EM(rxrpc_conn_put_local_dead,		"PUT loc-dead") \
 223	EM(rxrpc_conn_put_noreuse,		"PUT noreuse ") \
 224	EM(rxrpc_conn_put_poke,			"PUT poke    ") \
 225	EM(rxrpc_conn_put_service_reaped,	"PUT svc-reap") \
 226	EM(rxrpc_conn_put_unbundle,		"PUT unbundle") \
 227	EM(rxrpc_conn_put_unidle,		"PUT unidle  ") \
 228	EM(rxrpc_conn_put_work,			"PUT work    ") \
 229	EM(rxrpc_conn_queue_challenge,		"QUE chall   ") \
 230	EM(rxrpc_conn_queue_retry_work,		"QUE retry-wk") \
 231	EM(rxrpc_conn_queue_rx_work,		"QUE rx-work ") \
 232	EM(rxrpc_conn_see_new_service_conn,	"SEE new-svc ") \
 233	EM(rxrpc_conn_see_reap_service,		"SEE reap-svc") \
 234	E_(rxrpc_conn_see_work,			"SEE work    ")
 235
 236#define rxrpc_client_traces \
 237	EM(rxrpc_client_activate_chans,		"Activa") \
 238	EM(rxrpc_client_alloc,			"Alloc ") \
 239	EM(rxrpc_client_chan_activate,		"ChActv") \
 240	EM(rxrpc_client_chan_disconnect,	"ChDisc") \
 241	EM(rxrpc_client_chan_pass,		"ChPass") \
 
 
 242	EM(rxrpc_client_cleanup,		"Clean ") \
 
 243	EM(rxrpc_client_discard,		"Discar") \
 
 244	EM(rxrpc_client_exposed,		"Expose") \
 245	EM(rxrpc_client_replace,		"Replac") \
 246	EM(rxrpc_client_queue_new_call,		"Q-Call") \
 247	EM(rxrpc_client_to_active,		"->Actv") \
 248	E_(rxrpc_client_to_idle,		"->Idle")
 
 
 
 
 
 
 
 
 
 
 
 
 
 249
 250#define rxrpc_call_traces \
 251	EM(rxrpc_call_get_io_thread,		"GET iothread") \
 252	EM(rxrpc_call_get_input,		"GET input   ") \
 253	EM(rxrpc_call_get_kernel_service,	"GET krnl-srv") \
 254	EM(rxrpc_call_get_notify_socket,	"GET notify  ") \
 255	EM(rxrpc_call_get_poke,			"GET poke    ") \
 256	EM(rxrpc_call_get_recvmsg,		"GET recvmsg ") \
 257	EM(rxrpc_call_get_release_sock,		"GET rel-sock") \
 258	EM(rxrpc_call_get_sendmsg,		"GET sendmsg ") \
 259	EM(rxrpc_call_get_userid,		"GET user-id ") \
 260	EM(rxrpc_call_new_client,		"NEW client  ") \
 261	EM(rxrpc_call_new_prealloc_service,	"NEW prealloc") \
 262	EM(rxrpc_call_put_discard_prealloc,	"PUT disc-pre") \
 263	EM(rxrpc_call_put_discard_error,	"PUT disc-err") \
 264	EM(rxrpc_call_put_io_thread,		"PUT iothread") \
 265	EM(rxrpc_call_put_input,		"PUT input   ") \
 266	EM(rxrpc_call_put_kernel,		"PUT kernel  ") \
 267	EM(rxrpc_call_put_poke,			"PUT poke    ") \
 268	EM(rxrpc_call_put_recvmsg,		"PUT recvmsg ") \
 269	EM(rxrpc_call_put_release_sock,		"PUT rls-sock") \
 270	EM(rxrpc_call_put_release_sock_tba,	"PUT rls-sk-a") \
 271	EM(rxrpc_call_put_sendmsg,		"PUT sendmsg ") \
 272	EM(rxrpc_call_put_unnotify,		"PUT unnotify") \
 273	EM(rxrpc_call_put_userid_exists,	"PUT u-exists") \
 274	EM(rxrpc_call_put_userid,		"PUT user-id ") \
 275	EM(rxrpc_call_see_accept,		"SEE accept  ") \
 276	EM(rxrpc_call_see_activate_client,	"SEE act-clnt") \
 277	EM(rxrpc_call_see_connect_failed,	"SEE con-fail") \
 278	EM(rxrpc_call_see_connected,		"SEE connect ") \
 279	EM(rxrpc_call_see_disconnected,		"SEE disconn ") \
 280	EM(rxrpc_call_see_distribute_error,	"SEE dist-err") \
 281	EM(rxrpc_call_see_input,		"SEE input   ") \
 282	EM(rxrpc_call_see_release,		"SEE release ") \
 283	EM(rxrpc_call_see_userid_exists,	"SEE u-exists") \
 284	E_(rxrpc_call_see_zap,			"SEE zap     ")
 285
 286#define rxrpc_txqueue_traces \
 287	EM(rxrpc_txqueue_await_reply,		"AWR") \
 288	EM(rxrpc_txqueue_dequeue,		"DEQ") \
 289	EM(rxrpc_txqueue_end,			"END") \
 290	EM(rxrpc_txqueue_queue,			"QUE") \
 291	EM(rxrpc_txqueue_queue_last,		"QLS") \
 292	EM(rxrpc_txqueue_rotate,		"ROT") \
 293	EM(rxrpc_txqueue_rotate_last,		"RLS") \
 294	E_(rxrpc_txqueue_wait,			"WAI")
 295
 296#define rxrpc_receive_traces \
 297	EM(rxrpc_receive_end,			"END") \
 298	EM(rxrpc_receive_front,			"FRN") \
 299	EM(rxrpc_receive_incoming,		"INC") \
 300	EM(rxrpc_receive_queue,			"QUE") \
 301	EM(rxrpc_receive_queue_last,		"QLS") \
 302	EM(rxrpc_receive_queue_oos,		"QUO") \
 303	EM(rxrpc_receive_queue_oos_last,	"QOL") \
 304	EM(rxrpc_receive_oos,			"OOS") \
 305	EM(rxrpc_receive_oos_last,		"OSL") \
 306	EM(rxrpc_receive_rotate,		"ROT") \
 307	E_(rxrpc_receive_rotate_last,		"RLS")
 308
 309#define rxrpc_recvmsg_traces \
 310	EM(rxrpc_recvmsg_cont,			"CONT") \
 311	EM(rxrpc_recvmsg_data_return,		"DATA") \
 312	EM(rxrpc_recvmsg_dequeue,		"DEQU") \
 313	EM(rxrpc_recvmsg_enter,			"ENTR") \
 314	EM(rxrpc_recvmsg_full,			"FULL") \
 315	EM(rxrpc_recvmsg_hole,			"HOLE") \
 316	EM(rxrpc_recvmsg_next,			"NEXT") \
 317	EM(rxrpc_recvmsg_requeue,		"REQU") \
 318	EM(rxrpc_recvmsg_return,		"RETN") \
 319	EM(rxrpc_recvmsg_terminal,		"TERM") \
 320	EM(rxrpc_recvmsg_to_be_accepted,	"TBAC") \
 321	E_(rxrpc_recvmsg_wait,			"WAIT")
 322
 323#define rxrpc_rtt_tx_traces \
 324	EM(rxrpc_rtt_tx_cancel,			"CNCE") \
 325	EM(rxrpc_rtt_tx_data,			"DATA") \
 326	EM(rxrpc_rtt_tx_no_slot,		"FULL") \
 327	E_(rxrpc_rtt_tx_ping,			"PING")
 328
 329#define rxrpc_rtt_rx_traces \
 330	EM(rxrpc_rtt_rx_cancel,			"CNCL") \
 331	EM(rxrpc_rtt_rx_obsolete,		"OBSL") \
 332	EM(rxrpc_rtt_rx_lost,			"LOST") \
 333	EM(rxrpc_rtt_rx_ping_response,		"PONG") \
 334	E_(rxrpc_rtt_rx_requested_ack,		"RACK")
 335
 336#define rxrpc_timer_traces \
 337	EM(rxrpc_timer_begin,			"Begin ") \
 
 338	EM(rxrpc_timer_exp_ack,			"ExpAck") \
 339	EM(rxrpc_timer_exp_hard,		"ExpHrd") \
 340	EM(rxrpc_timer_exp_idle,		"ExpIdl") \
 341	EM(rxrpc_timer_exp_keepalive,		"ExpKA ") \
 342	EM(rxrpc_timer_exp_lost_ack,		"ExpLoA") \
 343	EM(rxrpc_timer_exp_normal,		"ExpNml") \
 344	EM(rxrpc_timer_exp_ping,		"ExpPng") \
 345	EM(rxrpc_timer_exp_resend,		"ExpRsn") \
 346	EM(rxrpc_timer_init_for_reply,		"IniRpl") \
 347	EM(rxrpc_timer_init_for_send_reply,	"SndRpl") \
 348	EM(rxrpc_timer_restart,			"Restrt") \
 349	EM(rxrpc_timer_set_for_ack,		"SetAck") \
 350	EM(rxrpc_timer_set_for_hard,		"SetHrd") \
 351	EM(rxrpc_timer_set_for_idle,		"SetIdl") \
 352	EM(rxrpc_timer_set_for_keepalive,	"KeepAl") \
 353	EM(rxrpc_timer_set_for_lost_ack,	"SetLoA") \
 354	EM(rxrpc_timer_set_for_normal,		"SetNml") \
 355	EM(rxrpc_timer_set_for_ping,		"SetPng") \
 356	EM(rxrpc_timer_set_for_resend,		"SetRTx") \
 357	E_(rxrpc_timer_set_for_send,		"SetSnd")
 358
 359#define rxrpc_propose_ack_traces \
 360	EM(rxrpc_propose_ack_client_tx_end,	"ClTxEnd") \
 361	EM(rxrpc_propose_ack_input_data,	"DataIn ") \
 362	EM(rxrpc_propose_ack_input_data_hole,	"DataInH") \
 363	EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
 364	EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
 365	EM(rxrpc_propose_ack_ping_for_lost_ack,	"LostAck") \
 366	EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
 367	EM(rxrpc_propose_ack_ping_for_params,	"Params ") \
 368	EM(rxrpc_propose_ack_processing_op,	"ProcOp ") \
 369	EM(rxrpc_propose_ack_respond_to_ack,	"Rsp2Ack") \
 370	EM(rxrpc_propose_ack_respond_to_ping,	"Rsp2Png") \
 371	EM(rxrpc_propose_ack_retry_tx,		"RetryTx") \
 372	EM(rxrpc_propose_ack_rotate_rx,		"RxAck  ") \
 373	EM(rxrpc_propose_ack_rx_idle,		"RxIdle ") \
 374	E_(rxrpc_propose_ack_terminal_ack,	"ClTerm ")
 375
 
 
 
 
 
 376#define rxrpc_congest_modes \
 377	EM(RXRPC_CALL_CONGEST_AVOIDANCE,	"CongAvoid") \
 378	EM(RXRPC_CALL_FAST_RETRANSMIT,		"FastReTx ") \
 379	EM(RXRPC_CALL_PACKET_LOSS,		"PktLoss  ") \
 380	E_(RXRPC_CALL_SLOW_START,		"SlowStart")
 381
 382#define rxrpc_congest_changes \
 383	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
 384	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
 385	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
 386	EM(rxrpc_cong_no_change,		" -") \
 387	EM(rxrpc_cong_progress,			" Progres") \
 388	EM(rxrpc_cong_idle_reset,		" IdleRes") \
 389	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
 390	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \
 391	E_(rxrpc_cong_saw_nack,			" SawNack")
 392
 393#define rxrpc_pkts \
 394	EM(0,					"?00") \
 395	EM(RXRPC_PACKET_TYPE_DATA,		"DATA") \
 396	EM(RXRPC_PACKET_TYPE_ACK,		"ACK") \
 397	EM(RXRPC_PACKET_TYPE_BUSY,		"BUSY") \
 398	EM(RXRPC_PACKET_TYPE_ABORT,		"ABORT") \
 399	EM(RXRPC_PACKET_TYPE_ACKALL,		"ACKALL") \
 400	EM(RXRPC_PACKET_TYPE_CHALLENGE,		"CHALL") \
 401	EM(RXRPC_PACKET_TYPE_RESPONSE,		"RESP") \
 402	EM(RXRPC_PACKET_TYPE_DEBUG,		"DEBUG") \
 403	EM(9,					"?09") \
 404	EM(10,					"?10") \
 405	EM(11,					"?11") \
 406	EM(12,					"?12") \
 407	EM(RXRPC_PACKET_TYPE_VERSION,		"VERSION") \
 408	EM(14,					"?14") \
 409	E_(15,					"?15")
 410
 411#define rxrpc_ack_names \
 412	EM(0,					"-0-") \
 413	EM(RXRPC_ACK_REQUESTED,			"REQ") \
 414	EM(RXRPC_ACK_DUPLICATE,			"DUP") \
 415	EM(RXRPC_ACK_OUT_OF_SEQUENCE,		"OOS") \
 416	EM(RXRPC_ACK_EXCEEDS_WINDOW,		"WIN") \
 417	EM(RXRPC_ACK_NOSPACE,			"MEM") \
 418	EM(RXRPC_ACK_PING,			"PNG") \
 419	EM(RXRPC_ACK_PING_RESPONSE,		"PNR") \
 420	EM(RXRPC_ACK_DELAY,			"DLY") \
 421	EM(RXRPC_ACK_IDLE,			"IDL") \
 422	E_(RXRPC_ACK__INVALID,			"-?-")
 423
 424#define rxrpc_completions \
 425	EM(RXRPC_CALL_SUCCEEDED,		"Succeeded") \
 426	EM(RXRPC_CALL_REMOTELY_ABORTED,		"RemoteAbort") \
 427	EM(RXRPC_CALL_LOCALLY_ABORTED,		"LocalAbort") \
 428	EM(RXRPC_CALL_LOCAL_ERROR,		"LocalError") \
 429	E_(RXRPC_CALL_NETWORK_ERROR,		"NetError")
 430
 431#define rxrpc_tx_points \
 432	EM(rxrpc_tx_point_call_abort,		"CallAbort") \
 433	EM(rxrpc_tx_point_call_ack,		"CallAck") \
 434	EM(rxrpc_tx_point_call_data_frag,	"CallDataFrag") \
 435	EM(rxrpc_tx_point_call_data_nofrag,	"CallDataNofrag") \
 436	EM(rxrpc_tx_point_call_final_resend,	"CallFinalResend") \
 437	EM(rxrpc_tx_point_conn_abort,		"ConnAbort") \
 438	EM(rxrpc_tx_point_reject,		"Reject") \
 439	EM(rxrpc_tx_point_rxkad_challenge,	"RxkadChall") \
 440	EM(rxrpc_tx_point_rxkad_response,	"RxkadResp") \
 441	EM(rxrpc_tx_point_version_keepalive,	"VerKeepalive") \
 442	E_(rxrpc_tx_point_version_reply,	"VerReply")
 443
 444#define rxrpc_req_ack_traces \
 445	EM(rxrpc_reqack_ack_lost,		"ACK-LOST  ")	\
 446	EM(rxrpc_reqack_already_on,		"ALREADY-ON")	\
 447	EM(rxrpc_reqack_more_rtt,		"MORE-RTT  ")	\
 448	EM(rxrpc_reqack_no_srv_last,		"NO-SRVLAST")	\
 449	EM(rxrpc_reqack_old_rtt,		"OLD-RTT   ")	\
 450	EM(rxrpc_reqack_retrans,		"RETRANS   ")	\
 451	EM(rxrpc_reqack_slow_start,		"SLOW-START")	\
 452	E_(rxrpc_reqack_small_txwin,		"SMALL-TXWN")
 453/* ---- Must update size of stat_why_req_ack[] if more are added! */
 454
 455#define rxrpc_txbuf_traces \
 456	EM(rxrpc_txbuf_alloc_ack,		"ALLOC ACK  ")	\
 457	EM(rxrpc_txbuf_alloc_data,		"ALLOC DATA ")	\
 458	EM(rxrpc_txbuf_free,			"FREE       ")	\
 459	EM(rxrpc_txbuf_get_buffer,		"GET BUFFER ")	\
 460	EM(rxrpc_txbuf_get_trans,		"GET TRANS  ")	\
 461	EM(rxrpc_txbuf_get_retrans,		"GET RETRANS")	\
 462	EM(rxrpc_txbuf_put_ack_tx,		"PUT ACK TX ")	\
 463	EM(rxrpc_txbuf_put_cleaned,		"PUT CLEANED")	\
 464	EM(rxrpc_txbuf_put_nomem,		"PUT NOMEM  ")	\
 465	EM(rxrpc_txbuf_put_rotated,		"PUT ROTATED")	\
 466	EM(rxrpc_txbuf_put_send_aborted,	"PUT SEND-X ")	\
 467	EM(rxrpc_txbuf_put_trans,		"PUT TRANS  ")	\
 468	EM(rxrpc_txbuf_see_out_of_step,		"OUT-OF-STEP")	\
 469	EM(rxrpc_txbuf_see_send_more,		"SEE SEND+  ")	\
 470	E_(rxrpc_txbuf_see_unacked,		"SEE UNACKED")
 471
 472/*
 473 * Generate enums for tracing information.
 474 */
 475#ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
 476#define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
 477
 478#undef EM
 479#undef E_
 480#define EM(a, b) a,
 481#define E_(a, b) a
 482
 483enum rxrpc_abort_reason		{ rxrpc_abort_reasons } __mode(byte);
 484enum rxrpc_bundle_trace		{ rxrpc_bundle_traces } __mode(byte);
 485enum rxrpc_call_poke_trace	{ rxrpc_call_poke_traces } __mode(byte);
 486enum rxrpc_call_trace		{ rxrpc_call_traces } __mode(byte);
 487enum rxrpc_client_trace		{ rxrpc_client_traces } __mode(byte);
 488enum rxrpc_congest_change	{ rxrpc_congest_changes } __mode(byte);
 489enum rxrpc_conn_trace		{ rxrpc_conn_traces } __mode(byte);
 490enum rxrpc_local_trace		{ rxrpc_local_traces } __mode(byte);
 491enum rxrpc_peer_trace		{ rxrpc_peer_traces } __mode(byte);
 492enum rxrpc_propose_ack_outcome	{ rxrpc_propose_ack_outcomes } __mode(byte);
 493enum rxrpc_propose_ack_trace	{ rxrpc_propose_ack_traces } __mode(byte);
 494enum rxrpc_receive_trace	{ rxrpc_receive_traces } __mode(byte);
 495enum rxrpc_recvmsg_trace	{ rxrpc_recvmsg_traces } __mode(byte);
 496enum rxrpc_req_ack_trace	{ rxrpc_req_ack_traces } __mode(byte);
 497enum rxrpc_rtt_rx_trace		{ rxrpc_rtt_rx_traces } __mode(byte);
 498enum rxrpc_rtt_tx_trace		{ rxrpc_rtt_tx_traces } __mode(byte);
 499enum rxrpc_skb_trace		{ rxrpc_skb_traces } __mode(byte);
 500enum rxrpc_timer_trace		{ rxrpc_timer_traces } __mode(byte);
 501enum rxrpc_tx_point		{ rxrpc_tx_points } __mode(byte);
 502enum rxrpc_txbuf_trace		{ rxrpc_txbuf_traces } __mode(byte);
 503enum rxrpc_txqueue_trace	{ rxrpc_txqueue_traces } __mode(byte);
 504
 505#endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
 506
 507/*
 508 * Export enum symbols via userspace.
 509 */
 510#undef EM
 511#undef E_
 512
 513#ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS
 514
 515#define EM(a, b) TRACE_DEFINE_ENUM(a);
 516#define E_(a, b) TRACE_DEFINE_ENUM(a);
 517
 518rxrpc_abort_reasons;
 519rxrpc_bundle_traces;
 520rxrpc_call_poke_traces;
 521rxrpc_call_traces;
 522rxrpc_client_traces;
 523rxrpc_congest_changes;
 524rxrpc_congest_modes;
 525rxrpc_conn_traces;
 526rxrpc_local_traces;
 527rxrpc_propose_ack_traces;
 
 
 
 528rxrpc_receive_traces;
 529rxrpc_recvmsg_traces;
 530rxrpc_req_ack_traces;
 531rxrpc_rtt_rx_traces;
 532rxrpc_rtt_tx_traces;
 533rxrpc_skb_traces;
 534rxrpc_timer_traces;
 
 
 
 
 535rxrpc_tx_points;
 536rxrpc_txbuf_traces;
 537rxrpc_txqueue_traces;
 538
 539/*
 540 * Now redefine the EM() and E_() macros to map the enums to the strings that
 541 * will be printed in the output.
 542 */
 543#undef EM
 544#undef E_
 545#define EM(a, b)	{ a, b },
 546#define E_(a, b)	{ a, b }
 547
 548TRACE_EVENT(rxrpc_local,
 549	    TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
 550		     int ref, int usage),
 551
 552	    TP_ARGS(local_debug_id, op, ref, usage),
 553
 554	    TP_STRUCT__entry(
 555		    __field(unsigned int,	local		)
 556		    __field(int,		op		)
 557		    __field(int,		ref		)
 558		    __field(int,		usage		)
 
 559			     ),
 560
 561	    TP_fast_assign(
 562		    __entry->local = local_debug_id;
 563		    __entry->op = op;
 564		    __entry->ref = ref;
 565		    __entry->usage = usage;
 
 566			   ),
 567
 568	    TP_printk("L=%08x %s r=%d u=%d",
 569		      __entry->local,
 570		      __print_symbolic(__entry->op, rxrpc_local_traces),
 571		      __entry->ref,
 572		      __entry->usage)
 573	    );
 574
 575TRACE_EVENT(rxrpc_peer,
 576	    TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why),
 
 577
 578	    TP_ARGS(peer_debug_id, ref, why),
 579
 580	    TP_STRUCT__entry(
 581		    __field(unsigned int,	peer		)
 582		    __field(int,		ref		)
 583		    __field(enum rxrpc_peer_trace, why		)
 
 584			     ),
 585
 586	    TP_fast_assign(
 587		    __entry->peer = peer_debug_id;
 588		    __entry->ref = ref;
 589		    __entry->why = why;
 
 590			   ),
 591
 592	    TP_printk("P=%08x %s r=%d",
 593		      __entry->peer,
 594		      __print_symbolic(__entry->why, rxrpc_peer_traces),
 595		      __entry->ref)
 596	    );
 597
 598TRACE_EVENT(rxrpc_bundle,
 599	    TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why),
 600
 601	    TP_ARGS(bundle_debug_id, ref, why),
 602
 603	    TP_STRUCT__entry(
 604		    __field(unsigned int,	bundle		)
 605		    __field(int,		ref		)
 606		    __field(int,		why		)
 607			     ),
 608
 609	    TP_fast_assign(
 610		    __entry->bundle = bundle_debug_id;
 611		    __entry->ref = ref;
 612		    __entry->why = why;
 613			   ),
 614
 615	    TP_printk("CB=%08x %s r=%d",
 616		      __entry->bundle,
 617		      __print_symbolic(__entry->why, rxrpc_bundle_traces),
 618		      __entry->ref)
 619	    );
 620
 621TRACE_EVENT(rxrpc_conn,
 622	    TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why),
 
 623
 624	    TP_ARGS(conn_debug_id, ref, why),
 625
 626	    TP_STRUCT__entry(
 627		    __field(unsigned int,	conn		)
 628		    __field(int,		ref		)
 629		    __field(int,		why		)
 
 630			     ),
 631
 632	    TP_fast_assign(
 633		    __entry->conn = conn_debug_id;
 634		    __entry->ref = ref;
 635		    __entry->why = why;
 
 636			   ),
 637
 638	    TP_printk("C=%08x %s r=%d",
 639		      __entry->conn,
 640		      __print_symbolic(__entry->why, rxrpc_conn_traces),
 641		      __entry->ref)
 
 642	    );
 643
 644TRACE_EVENT(rxrpc_client,
 645	    TP_PROTO(struct rxrpc_connection *conn, int channel,
 646		     enum rxrpc_client_trace op),
 647
 648	    TP_ARGS(conn, channel, op),
 649
 650	    TP_STRUCT__entry(
 651		    __field(unsigned int,		conn		)
 652		    __field(u32,			cid		)
 653		    __field(int,			channel		)
 654		    __field(int,			usage		)
 655		    __field(enum rxrpc_client_trace,	op		)
 
 656			     ),
 657
 658	    TP_fast_assign(
 659		    __entry->conn = conn ? conn->debug_id : 0;
 660		    __entry->channel = channel;
 661		    __entry->usage = conn ? refcount_read(&conn->ref) : -2;
 662		    __entry->op = op;
 663		    __entry->cid = conn ? conn->proto.cid : 0;
 
 664			   ),
 665
 666	    TP_printk("C=%08x h=%2d %s i=%08x u=%d",
 667		      __entry->conn,
 668		      __entry->channel,
 669		      __print_symbolic(__entry->op, rxrpc_client_traces),
 
 670		      __entry->cid,
 671		      __entry->usage)
 672	    );
 673
 674TRACE_EVENT(rxrpc_call,
 675	    TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux,
 676		     enum rxrpc_call_trace why),
 677
 678	    TP_ARGS(call_debug_id, ref, aux, why),
 679
 680	    TP_STRUCT__entry(
 681		    __field(unsigned int,		call		)
 682		    __field(int,			ref		)
 683		    __field(int,			why		)
 684		    __field(unsigned long,		aux		)
 
 685			     ),
 686
 687	    TP_fast_assign(
 688		    __entry->call = call_debug_id;
 689		    __entry->ref = ref;
 690		    __entry->why = why;
 
 691		    __entry->aux = aux;
 692			   ),
 693
 694	    TP_printk("c=%08x %s r=%d a=%lx",
 695		      __entry->call,
 696		      __print_symbolic(__entry->why, rxrpc_call_traces),
 697		      __entry->ref,
 
 698		      __entry->aux)
 699	    );
 700
 701TRACE_EVENT(rxrpc_skb,
 702	    TP_PROTO(struct sk_buff *skb, int usage, int mod_count,
 703		     enum rxrpc_skb_trace why),
 704
 705	    TP_ARGS(skb, usage, mod_count, why),
 706
 707	    TP_STRUCT__entry(
 708		    __field(struct sk_buff *,		skb		)
 
 
 709		    __field(int,			usage		)
 710		    __field(int,			mod_count	)
 711		    __field(enum rxrpc_skb_trace,	why		)
 712			     ),
 713
 714	    TP_fast_assign(
 715		    __entry->skb = skb;
 
 
 716		    __entry->usage = usage;
 717		    __entry->mod_count = mod_count;
 718		    __entry->why = why;
 719			   ),
 720
 721	    TP_printk("s=%p Rx %s u=%d m=%d",
 722		      __entry->skb,
 723		      __print_symbolic(__entry->why, rxrpc_skb_traces),
 
 724		      __entry->usage,
 725		      __entry->mod_count)
 
 726	    );
 727
 728TRACE_EVENT(rxrpc_rx_packet,
 729	    TP_PROTO(struct rxrpc_skb_priv *sp),
 730
 731	    TP_ARGS(sp),
 732
 733	    TP_STRUCT__entry(
 734		    __field_struct(struct rxrpc_host_header,	hdr		)
 735			     ),
 736
 737	    TP_fast_assign(
 738		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
 739			   ),
 740
 741	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
 742		      __entry->hdr.epoch, __entry->hdr.cid,
 743		      __entry->hdr.callNumber, __entry->hdr.serviceId,
 744		      __entry->hdr.serial, __entry->hdr.seq,
 745		      __entry->hdr.type, __entry->hdr.flags,
 746		      __entry->hdr.type <= 15 ?
 747		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
 748	    );
 749
 750TRACE_EVENT(rxrpc_rx_done,
 751	    TP_PROTO(int result, int abort_code),
 752
 753	    TP_ARGS(result, abort_code),
 754
 755	    TP_STRUCT__entry(
 756		    __field(int,			result		)
 757		    __field(int,			abort_code	)
 758			     ),
 759
 760	    TP_fast_assign(
 761		    __entry->result = result;
 762		    __entry->abort_code = abort_code;
 763			   ),
 764
 765	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
 766	    );
 767
 768TRACE_EVENT(rxrpc_abort,
 769	    TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why,
 770		     u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error),
 771
 772	    TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
 773
 774	    TP_STRUCT__entry(
 775		    __field(unsigned int,		call_nr		)
 776		    __field(enum rxrpc_abort_reason,	why		)
 777		    __field(u32,			cid		)
 778		    __field(u32,			call_id		)
 779		    __field(rxrpc_seq_t,		seq		)
 780		    __field(int,			abort_code	)
 781		    __field(int,			error		)
 782			     ),
 783
 784	    TP_fast_assign(
 
 785		    __entry->call_nr = call_nr;
 786		    __entry->why = why;
 787		    __entry->cid = cid;
 788		    __entry->call_id = call_id;
 789		    __entry->abort_code = abort_code;
 790		    __entry->error = error;
 791		    __entry->seq = seq;
 792			   ),
 793
 794	    TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
 795		      __entry->call_nr,
 796		      __entry->cid, __entry->call_id, __entry->seq,
 797		      __entry->abort_code, __entry->error,
 798		      __print_symbolic(__entry->why, rxrpc_abort_reasons))
 799	    );
 800
 801TRACE_EVENT(rxrpc_call_complete,
 802	    TP_PROTO(struct rxrpc_call *call),
 803
 804	    TP_ARGS(call),
 805
 806	    TP_STRUCT__entry(
 807		    __field(unsigned int,		call		)
 808		    __field(enum rxrpc_call_completion,	compl		)
 809		    __field(int,			error		)
 810		    __field(u32,			abort_code	)
 811			     ),
 812
 813	    TP_fast_assign(
 814		    __entry->call = call->debug_id;
 815		    __entry->compl = call->completion;
 816		    __entry->error = call->error;
 817		    __entry->abort_code = call->abort_code;
 818			   ),
 819
 820	    TP_printk("c=%08x %s r=%d ac=%d",
 821		      __entry->call,
 822		      __print_symbolic(__entry->compl, rxrpc_completions),
 823		      __entry->error,
 824		      __entry->abort_code)
 825	    );
 826
 827TRACE_EVENT(rxrpc_txqueue,
 828	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
 829
 830	    TP_ARGS(call, why),
 831
 832	    TP_STRUCT__entry(
 833		    __field(unsigned int,		call		)
 834		    __field(enum rxrpc_txqueue_trace,	why		)
 835		    __field(rxrpc_seq_t,		acks_hard_ack	)
 836		    __field(rxrpc_seq_t,		tx_bottom	)
 837		    __field(rxrpc_seq_t,		tx_top		)
 838		    __field(rxrpc_seq_t,		tx_prepared	)
 839		    __field(int,			tx_winsize	)
 840			     ),
 841
 842	    TP_fast_assign(
 843		    __entry->call = call->debug_id;
 844		    __entry->why = why;
 845		    __entry->acks_hard_ack = call->acks_hard_ack;
 846		    __entry->tx_bottom = call->tx_bottom;
 847		    __entry->tx_top = call->tx_top;
 848		    __entry->tx_prepared = call->tx_prepared;
 849		    __entry->tx_winsize = call->tx_winsize;
 850			   ),
 851
 852	    TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u",
 853		      __entry->call,
 854		      __print_symbolic(__entry->why, rxrpc_txqueue_traces),
 855		      __entry->tx_bottom,
 856		      __entry->acks_hard_ack,
 857		      __entry->tx_top - __entry->tx_bottom,
 858		      __entry->tx_top - __entry->acks_hard_ack,
 859		      __entry->tx_prepared - __entry->tx_bottom,
 860		      __entry->tx_winsize)
 861	    );
 862
 863TRACE_EVENT(rxrpc_rx_data,
 864	    TP_PROTO(unsigned int call, rxrpc_seq_t seq,
 865		     rxrpc_serial_t serial, u8 flags),
 866
 867	    TP_ARGS(call, seq, serial, flags),
 868
 869	    TP_STRUCT__entry(
 870		    __field(unsigned int,		call		)
 871		    __field(rxrpc_seq_t,		seq		)
 872		    __field(rxrpc_serial_t,		serial		)
 873		    __field(u8,				flags		)
 
 874			     ),
 875
 876	    TP_fast_assign(
 877		    __entry->call = call;
 878		    __entry->seq = seq;
 879		    __entry->serial = serial;
 880		    __entry->flags = flags;
 
 881			   ),
 882
 883	    TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
 884		      __entry->call,
 885		      __entry->serial,
 886		      __entry->seq,
 887		      __entry->flags)
 
 888	    );
 889
 890TRACE_EVENT(rxrpc_rx_ack,
 891	    TP_PROTO(struct rxrpc_call *call,
 892		     rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
 893		     rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
 894
 895	    TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
 896
 897	    TP_STRUCT__entry(
 898		    __field(unsigned int,		call		)
 899		    __field(rxrpc_serial_t,		serial		)
 900		    __field(rxrpc_serial_t,		ack_serial	)
 901		    __field(rxrpc_seq_t,		first		)
 902		    __field(rxrpc_seq_t,		prev		)
 903		    __field(u8,				reason		)
 904		    __field(u8,				n_acks		)
 905			     ),
 906
 907	    TP_fast_assign(
 908		    __entry->call = call->debug_id;
 909		    __entry->serial = serial;
 910		    __entry->ack_serial = ack_serial;
 911		    __entry->first = first;
 912		    __entry->prev = prev;
 913		    __entry->reason = reason;
 914		    __entry->n_acks = n_acks;
 915			   ),
 916
 917	    TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
 918		      __entry->call,
 919		      __entry->serial,
 920		      __print_symbolic(__entry->reason, rxrpc_ack_names),
 921		      __entry->ack_serial,
 922		      __entry->first,
 923		      __entry->prev,
 924		      __entry->n_acks)
 925	    );
 926
 927TRACE_EVENT(rxrpc_rx_abort,
 928	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
 929		     u32 abort_code),
 930
 931	    TP_ARGS(call, serial, abort_code),
 932
 933	    TP_STRUCT__entry(
 934		    __field(unsigned int,		call		)
 935		    __field(rxrpc_serial_t,		serial		)
 936		    __field(u32,			abort_code	)
 937			     ),
 938
 939	    TP_fast_assign(
 940		    __entry->call = call->debug_id;
 941		    __entry->serial = serial;
 942		    __entry->abort_code = abort_code;
 943			   ),
 944
 945	    TP_printk("c=%08x ABORT %08x ac=%d",
 946		      __entry->call,
 947		      __entry->serial,
 948		      __entry->abort_code)
 949	    );
 950
 951TRACE_EVENT(rxrpc_rx_challenge,
 952	    TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
 953		     u32 version, u32 nonce, u32 min_level),
 954
 955	    TP_ARGS(conn, serial, version, nonce, min_level),
 956
 957	    TP_STRUCT__entry(
 958		    __field(unsigned int,		conn		)
 959		    __field(rxrpc_serial_t,		serial		)
 960		    __field(u32,			version		)
 961		    __field(u32,			nonce		)
 962		    __field(u32,			min_level	)
 963			     ),
 964
 965	    TP_fast_assign(
 966		    __entry->conn = conn->debug_id;
 967		    __entry->serial = serial;
 968		    __entry->version = version;
 969		    __entry->nonce = nonce;
 970		    __entry->min_level = min_level;
 971			   ),
 972
 973	    TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
 974		      __entry->conn,
 975		      __entry->serial,
 976		      __entry->version,
 977		      __entry->nonce,
 978		      __entry->min_level)
 979	    );
 980
 981TRACE_EVENT(rxrpc_rx_response,
 982	    TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
 983		     u32 version, u32 kvno, u32 ticket_len),
 984
 985	    TP_ARGS(conn, serial, version, kvno, ticket_len),
 986
 987	    TP_STRUCT__entry(
 988		    __field(unsigned int,		conn		)
 989		    __field(rxrpc_serial_t,		serial		)
 990		    __field(u32,			version		)
 991		    __field(u32,			kvno		)
 992		    __field(u32,			ticket_len	)
 993			     ),
 994
 995	    TP_fast_assign(
 996		    __entry->conn = conn->debug_id;
 997		    __entry->serial = serial;
 998		    __entry->version = version;
 999		    __entry->kvno = kvno;
1000		    __entry->ticket_len = ticket_len;
1001			   ),
1002
1003	    TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
1004		      __entry->conn,
1005		      __entry->serial,
1006		      __entry->version,
1007		      __entry->kvno,
1008		      __entry->ticket_len)
1009	    );
1010
1011TRACE_EVENT(rxrpc_rx_rwind_change,
1012	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1013		     u32 rwind, bool wake),
1014
1015	    TP_ARGS(call, serial, rwind, wake),
1016
1017	    TP_STRUCT__entry(
1018		    __field(unsigned int,		call		)
1019		    __field(rxrpc_serial_t,		serial		)
1020		    __field(u32,			rwind		)
1021		    __field(bool,			wake		)
1022			     ),
1023
1024	    TP_fast_assign(
1025		    __entry->call = call->debug_id;
1026		    __entry->serial = serial;
1027		    __entry->rwind = rwind;
1028		    __entry->wake = wake;
1029			   ),
1030
1031	    TP_printk("c=%08x %08x rw=%u%s",
1032		      __entry->call,
1033		      __entry->serial,
1034		      __entry->rwind,
1035		      __entry->wake ? " wake" : "")
1036	    );
1037
1038TRACE_EVENT(rxrpc_tx_packet,
1039	    TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
1040		     enum rxrpc_tx_point where),
1041
1042	    TP_ARGS(call_id, whdr, where),
1043
1044	    TP_STRUCT__entry(
1045		    __field(unsigned int,			call	)
1046		    __field(enum rxrpc_tx_point,		where	)
1047		    __field_struct(struct rxrpc_wire_header,	whdr	)
1048			     ),
1049
1050	    TP_fast_assign(
1051		    __entry->call = call_id;
1052		    memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
1053		    __entry->where = where;
1054			   ),
1055
1056	    TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
1057		      __entry->call,
1058		      ntohl(__entry->whdr.epoch),
1059		      ntohl(__entry->whdr.cid),
1060		      ntohl(__entry->whdr.callNumber),
1061		      ntohs(__entry->whdr.serviceId),
1062		      ntohl(__entry->whdr.serial),
1063		      ntohl(__entry->whdr.seq),
1064		      __entry->whdr.type, __entry->whdr.flags,
1065		      __entry->whdr.type <= 15 ?
1066		      __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
1067		      __print_symbolic(__entry->where, rxrpc_tx_points))
1068	    );
1069
1070TRACE_EVENT(rxrpc_tx_data,
1071	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
1072		     rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
1073
1074	    TP_ARGS(call, seq, serial, flags, retrans, lose),
1075
1076	    TP_STRUCT__entry(
1077		    __field(unsigned int,		call		)
1078		    __field(rxrpc_seq_t,		seq		)
1079		    __field(rxrpc_serial_t,		serial		)
1080		    __field(u32,			cid		)
1081		    __field(u32,			call_id		)
1082		    __field(u8,				flags		)
1083		    __field(bool,			retrans		)
1084		    __field(bool,			lose		)
1085			     ),
1086
1087	    TP_fast_assign(
1088		    __entry->call = call->debug_id;
1089		    __entry->cid = call->cid;
1090		    __entry->call_id = call->call_id;
1091		    __entry->seq = seq;
1092		    __entry->serial = serial;
1093		    __entry->flags = flags;
1094		    __entry->retrans = retrans;
1095		    __entry->lose = lose;
1096			   ),
1097
1098	    TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
1099		      __entry->call,
1100		      __entry->cid,
1101		      __entry->call_id,
1102		      __entry->serial,
1103		      __entry->seq,
1104		      __entry->flags,
1105		      __entry->retrans ? " *RETRANS*" : "",
1106		      __entry->lose ? " *LOSE*" : "")
1107	    );
1108
1109TRACE_EVENT(rxrpc_tx_ack,
1110	    TP_PROTO(unsigned int call, rxrpc_serial_t serial,
1111		     rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1112		     u8 reason, u8 n_acks),
1113
1114	    TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1115
1116	    TP_STRUCT__entry(
1117		    __field(unsigned int,		call		)
1118		    __field(rxrpc_serial_t,		serial		)
1119		    __field(rxrpc_seq_t,		ack_first	)
1120		    __field(rxrpc_serial_t,		ack_serial	)
1121		    __field(u8,				reason		)
1122		    __field(u8,				n_acks		)
1123			     ),
1124
1125	    TP_fast_assign(
1126		    __entry->call = call;
1127		    __entry->serial = serial;
1128		    __entry->ack_first = ack_first;
1129		    __entry->ack_serial = ack_serial;
1130		    __entry->reason = reason;
1131		    __entry->n_acks = n_acks;
1132			   ),
1133
1134	    TP_printk(" c=%08x ACK  %08x %s f=%08x r=%08x n=%u",
1135		      __entry->call,
1136		      __entry->serial,
1137		      __print_symbolic(__entry->reason, rxrpc_ack_names),
1138		      __entry->ack_first,
1139		      __entry->ack_serial,
1140		      __entry->n_acks)
1141	    );
1142
1143TRACE_EVENT(rxrpc_receive,
1144	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1145		     rxrpc_serial_t serial, rxrpc_seq_t seq),
1146
1147	    TP_ARGS(call, why, serial, seq),
1148
1149	    TP_STRUCT__entry(
1150		    __field(unsigned int,		call		)
1151		    __field(enum rxrpc_receive_trace,	why		)
1152		    __field(rxrpc_serial_t,		serial		)
1153		    __field(rxrpc_seq_t,		seq		)
1154		    __field(u64,			window		)
 
1155			     ),
1156
1157	    TP_fast_assign(
1158		    __entry->call = call->debug_id;
1159		    __entry->why = why;
1160		    __entry->serial = serial;
1161		    __entry->seq = seq;
1162		    __entry->window = atomic64_read(&call->ackr_window);
 
1163			   ),
1164
1165	    TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1166		      __entry->call,
1167		      __print_symbolic(__entry->why, rxrpc_receive_traces),
1168		      __entry->serial,
1169		      __entry->seq,
1170		      lower_32_bits(__entry->window),
1171		      upper_32_bits(__entry->window))
1172	    );
1173
1174TRACE_EVENT(rxrpc_recvmsg,
1175	    TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why,
1176		     int ret),
1177
1178	    TP_ARGS(call_debug_id, why, ret),
1179
1180	    TP_STRUCT__entry(
1181		    __field(unsigned int,		call		)
1182		    __field(enum rxrpc_recvmsg_trace,	why		)
1183		    __field(int,			ret		)
1184			     ),
1185
1186	    TP_fast_assign(
1187		    __entry->call = call_debug_id;
1188		    __entry->why = why;
1189		    __entry->ret = ret;
1190			   ),
1191
1192	    TP_printk("c=%08x %s ret=%d",
1193		      __entry->call,
1194		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1195		      __entry->ret)
1196	    );
1197
1198TRACE_EVENT(rxrpc_recvdata,
1199	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1200		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1201		     int ret),
1202
1203	    TP_ARGS(call, why, seq, offset, len, ret),
1204
1205	    TP_STRUCT__entry(
1206		    __field(unsigned int,		call		)
1207		    __field(enum rxrpc_recvmsg_trace,	why		)
1208		    __field(rxrpc_seq_t,		seq		)
1209		    __field(unsigned int,		offset		)
1210		    __field(unsigned int,		len		)
1211		    __field(int,			ret		)
1212			     ),
1213
1214	    TP_fast_assign(
1215		    __entry->call = call ? call->debug_id : 0;
1216		    __entry->why = why;
1217		    __entry->seq = seq;
1218		    __entry->offset = offset;
1219		    __entry->len = len;
1220		    __entry->ret = ret;
1221			   ),
1222
1223	    TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1224		      __entry->call,
1225		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1226		      __entry->seq,
1227		      __entry->offset,
1228		      __entry->len,
1229		      __entry->ret)
1230	    );
1231
1232TRACE_EVENT(rxrpc_rtt_tx,
1233	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1234		     int slot, rxrpc_serial_t send_serial),
1235
1236	    TP_ARGS(call, why, slot, send_serial),
1237
1238	    TP_STRUCT__entry(
1239		    __field(unsigned int,		call		)
1240		    __field(enum rxrpc_rtt_tx_trace,	why		)
1241		    __field(int,			slot		)
1242		    __field(rxrpc_serial_t,		send_serial	)
1243			     ),
1244
1245	    TP_fast_assign(
1246		    __entry->call = call->debug_id;
1247		    __entry->why = why;
1248		    __entry->slot = slot;
1249		    __entry->send_serial = send_serial;
1250			   ),
1251
1252	    TP_printk("c=%08x [%d] %s sr=%08x",
1253		      __entry->call,
1254		      __entry->slot,
1255		      __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1256		      __entry->send_serial)
1257	    );
1258
1259TRACE_EVENT(rxrpc_rtt_rx,
1260	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1261		     int slot,
1262		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1263		     u32 rtt, u32 rto),
1264
1265	    TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1266
1267	    TP_STRUCT__entry(
1268		    __field(unsigned int,		call		)
1269		    __field(enum rxrpc_rtt_rx_trace,	why		)
1270		    __field(int,			slot		)
1271		    __field(rxrpc_serial_t,		send_serial	)
1272		    __field(rxrpc_serial_t,		resp_serial	)
1273		    __field(u32,			rtt		)
1274		    __field(u32,			rto		)
1275			     ),
1276
1277	    TP_fast_assign(
1278		    __entry->call = call->debug_id;
1279		    __entry->why = why;
1280		    __entry->slot = slot;
1281		    __entry->send_serial = send_serial;
1282		    __entry->resp_serial = resp_serial;
1283		    __entry->rtt = rtt;
1284		    __entry->rto = rto;
1285			   ),
1286
1287	    TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1288		      __entry->call,
1289		      __entry->slot,
1290		      __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1291		      __entry->send_serial,
1292		      __entry->resp_serial,
1293		      __entry->rtt,
1294		      __entry->rto)
1295	    );
1296
1297TRACE_EVENT(rxrpc_timer,
1298	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1299		     unsigned long now),
1300
1301	    TP_ARGS(call, why, now),
1302
1303	    TP_STRUCT__entry(
1304		    __field(unsigned int,			call		)
1305		    __field(enum rxrpc_timer_trace,		why		)
1306		    __field(long,				now		)
1307		    __field(long,				ack_at		)
1308		    __field(long,				ack_lost_at	)
1309		    __field(long,				resend_at	)
1310		    __field(long,				ping_at		)
1311		    __field(long,				expect_rx_by	)
1312		    __field(long,				expect_req_by	)
1313		    __field(long,				expect_term_by	)
1314		    __field(long,				timer		)
1315			     ),
1316
1317	    TP_fast_assign(
1318		    __entry->call		= call->debug_id;
1319		    __entry->why		= why;
1320		    __entry->now		= now;
1321		    __entry->ack_at		= call->delay_ack_at;
1322		    __entry->ack_lost_at	= call->ack_lost_at;
1323		    __entry->resend_at		= call->resend_at;
1324		    __entry->expect_rx_by	= call->expect_rx_by;
1325		    __entry->expect_req_by	= call->expect_req_by;
1326		    __entry->expect_term_by	= call->expect_term_by;
1327		    __entry->timer		= call->timer.expires;
1328			   ),
1329
1330	    TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1331		      __entry->call,
1332		      __print_symbolic(__entry->why, rxrpc_timer_traces),
1333		      __entry->ack_at - __entry->now,
1334		      __entry->ack_lost_at - __entry->now,
1335		      __entry->resend_at - __entry->now,
1336		      __entry->expect_rx_by - __entry->now,
1337		      __entry->expect_req_by - __entry->now,
1338		      __entry->expect_term_by - __entry->now,
1339		      __entry->timer - __entry->now)
1340	    );
1341
1342TRACE_EVENT(rxrpc_timer_expired,
1343	    TP_PROTO(struct rxrpc_call *call, unsigned long now),
1344
1345	    TP_ARGS(call, now),
1346
1347	    TP_STRUCT__entry(
1348		    __field(unsigned int,			call		)
1349		    __field(long,				now		)
1350		    __field(long,				ack_at		)
1351		    __field(long,				ack_lost_at	)
1352		    __field(long,				resend_at	)
1353		    __field(long,				ping_at		)
1354		    __field(long,				expect_rx_by	)
1355		    __field(long,				expect_req_by	)
1356		    __field(long,				expect_term_by	)
1357		    __field(long,				timer		)
1358			     ),
1359
1360	    TP_fast_assign(
1361		    __entry->call		= call->debug_id;
1362		    __entry->now		= now;
1363		    __entry->ack_at		= call->delay_ack_at;
1364		    __entry->ack_lost_at	= call->ack_lost_at;
1365		    __entry->resend_at		= call->resend_at;
1366		    __entry->expect_rx_by	= call->expect_rx_by;
1367		    __entry->expect_req_by	= call->expect_req_by;
1368		    __entry->expect_term_by	= call->expect_term_by;
1369		    __entry->timer		= call->timer.expires;
1370			   ),
1371
1372	    TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1373		      __entry->call,
1374		      __entry->ack_at - __entry->now,
1375		      __entry->ack_lost_at - __entry->now,
1376		      __entry->resend_at - __entry->now,
1377		      __entry->expect_rx_by - __entry->now,
1378		      __entry->expect_req_by - __entry->now,
1379		      __entry->expect_term_by - __entry->now,
1380		      __entry->timer - __entry->now)
1381	    );
1382
1383TRACE_EVENT(rxrpc_rx_lose,
1384	    TP_PROTO(struct rxrpc_skb_priv *sp),
1385
1386	    TP_ARGS(sp),
1387
1388	    TP_STRUCT__entry(
1389		    __field_struct(struct rxrpc_host_header,	hdr		)
1390			     ),
1391
1392	    TP_fast_assign(
1393		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1394			   ),
1395
1396	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1397		      __entry->hdr.epoch, __entry->hdr.cid,
1398		      __entry->hdr.callNumber, __entry->hdr.serviceId,
1399		      __entry->hdr.serial, __entry->hdr.seq,
1400		      __entry->hdr.type, __entry->hdr.flags,
1401		      __entry->hdr.type <= 15 ?
1402		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1403	    );
1404
1405TRACE_EVENT(rxrpc_propose_ack,
1406	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1407		     u8 ack_reason, rxrpc_serial_t serial),
1408
1409	    TP_ARGS(call, why, ack_reason, serial),
1410
1411	    TP_STRUCT__entry(
1412		    __field(unsigned int,			call		)
1413		    __field(enum rxrpc_propose_ack_trace,	why		)
1414		    __field(rxrpc_serial_t,			serial		)
1415		    __field(u8,					ack_reason	)
1416			     ),
1417
1418	    TP_fast_assign(
1419		    __entry->call	= call->debug_id;
1420		    __entry->why	= why;
1421		    __entry->serial	= serial;
1422		    __entry->ack_reason	= ack_reason;
1423			   ),
1424
1425	    TP_printk("c=%08x %s %s r=%08x",
1426		      __entry->call,
1427		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1428		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1429		      __entry->serial)
1430	    );
1431
1432TRACE_EVENT(rxrpc_send_ack,
1433	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1434		     u8 ack_reason, rxrpc_serial_t serial),
1435
1436	    TP_ARGS(call, why, ack_reason, serial),
 
1437
1438	    TP_STRUCT__entry(
1439		    __field(unsigned int,			call		)
1440		    __field(enum rxrpc_propose_ack_trace,	why		)
1441		    __field(rxrpc_serial_t,			serial		)
1442		    __field(u8,					ack_reason	)
 
 
 
1443			     ),
1444
1445	    TP_fast_assign(
1446		    __entry->call	= call->debug_id;
1447		    __entry->why	= why;
1448		    __entry->serial	= serial;
1449		    __entry->ack_reason	= ack_reason;
 
 
 
1450			   ),
1451
1452	    TP_printk("c=%08x %s %s r=%08x",
1453		      __entry->call,
1454		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1455		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1456		      __entry->serial)
1457	    );
1458
1459TRACE_EVENT(rxrpc_drop_ack,
1460	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1461		     u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1462
1463	    TP_ARGS(call, why, ack_reason, serial, nobuf),
1464
1465	    TP_STRUCT__entry(
1466		    __field(unsigned int,			call		)
1467		    __field(enum rxrpc_propose_ack_trace,	why		)
1468		    __field(rxrpc_serial_t,			serial		)
1469		    __field(u8,					ack_reason	)
1470		    __field(bool,				nobuf		)
1471			     ),
1472
1473	    TP_fast_assign(
1474		    __entry->call	= call->debug_id;
1475		    __entry->why	= why;
1476		    __entry->serial	= serial;
1477		    __entry->ack_reason	= ack_reason;
1478		    __entry->nobuf	= nobuf;
1479			   ),
1480
1481	    TP_printk("c=%08x %s %s r=%08x nbf=%u",
1482		      __entry->call,
1483		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1484		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1485		      __entry->serial, __entry->nobuf)
1486	    );
1487
1488TRACE_EVENT(rxrpc_retransmit,
1489	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
 
1490
1491	    TP_ARGS(call, seq, expiry),
1492
1493	    TP_STRUCT__entry(
1494		    __field(unsigned int,		call		)
1495		    __field(rxrpc_seq_t,		seq		)
 
1496		    __field(s64,			expiry		)
1497			     ),
1498
1499	    TP_fast_assign(
1500		    __entry->call = call->debug_id;
1501		    __entry->seq = seq;
 
1502		    __entry->expiry = expiry;
1503			   ),
1504
1505	    TP_printk("c=%08x q=%x xp=%lld",
1506		      __entry->call,
1507		      __entry->seq,
 
1508		      __entry->expiry)
1509	    );
1510
1511TRACE_EVENT(rxrpc_congest,
1512	    TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1513		     rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1514
1515	    TP_ARGS(call, summary, ack_serial, change),
1516
1517	    TP_STRUCT__entry(
1518		    __field(unsigned int,			call		)
1519		    __field(enum rxrpc_congest_change,		change		)
1520		    __field(rxrpc_seq_t,			hard_ack	)
1521		    __field(rxrpc_seq_t,			top		)
1522		    __field(rxrpc_seq_t,			lowest_nak	)
1523		    __field(rxrpc_serial_t,			ack_serial	)
1524		    __field_struct(struct rxrpc_ack_summary,	sum		)
1525			     ),
1526
1527	    TP_fast_assign(
1528		    __entry->call	= call->debug_id;
1529		    __entry->change	= change;
1530		    __entry->hard_ack	= call->acks_hard_ack;
1531		    __entry->top	= call->tx_top;
1532		    __entry->lowest_nak	= call->acks_lowest_nak;
1533		    __entry->ack_serial	= ack_serial;
1534		    memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1535			   ),
1536
1537	    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",
1538		      __entry->call,
1539		      __entry->ack_serial,
1540		      __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1541		      __entry->hard_ack,
1542		      __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1543		      __entry->sum.cwnd,
1544		      __entry->sum.ssthresh,
1545		      __entry->sum.nr_acks, __entry->sum.saw_nacks,
1546		      __entry->sum.nr_new_acks,
1547		      __entry->sum.nr_rot_new_acks,
1548		      __entry->top - __entry->hard_ack,
1549		      __entry->sum.cumulative_acks,
1550		      __entry->sum.dup_acks,
1551		      __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1552		      __print_symbolic(__entry->change, rxrpc_congest_changes),
1553		      __entry->sum.retrans_timeo ? " rTxTo" : "")
1554	    );
1555
1556TRACE_EVENT(rxrpc_reset_cwnd,
1557	    TP_PROTO(struct rxrpc_call *call, ktime_t now),
1558
1559	    TP_ARGS(call, now),
1560
1561	    TP_STRUCT__entry(
1562		    __field(unsigned int,			call		)
1563		    __field(enum rxrpc_congest_mode,		mode		)
1564		    __field(unsigned short,			cwnd		)
1565		    __field(unsigned short,			extra		)
1566		    __field(rxrpc_seq_t,			hard_ack	)
1567		    __field(rxrpc_seq_t,			prepared	)
1568		    __field(ktime_t,				since_last_tx	)
1569		    __field(bool,				has_data	)
1570			     ),
1571
1572	    TP_fast_assign(
1573		    __entry->call	= call->debug_id;
1574		    __entry->mode	= call->cong_mode;
1575		    __entry->cwnd	= call->cong_cwnd;
1576		    __entry->extra	= call->cong_extra;
1577		    __entry->hard_ack	= call->acks_hard_ack;
1578		    __entry->prepared	= call->tx_prepared - call->tx_bottom;
1579		    __entry->since_last_tx = ktime_sub(now, call->tx_last_sent);
1580		    __entry->has_data	= !list_empty(&call->tx_sendmsg);
1581			   ),
1582
1583	    TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u",
1584		      __entry->call,
1585		      __entry->hard_ack,
1586		      __print_symbolic(__entry->mode, rxrpc_congest_modes),
1587		      __entry->cwnd,
1588		      __entry->extra,
1589		      __entry->prepared,
1590		      ktime_to_ns(__entry->since_last_tx),
1591		      __entry->has_data)
1592	    );
1593
1594TRACE_EVENT(rxrpc_disconnect_call,
1595	    TP_PROTO(struct rxrpc_call *call),
1596
1597	    TP_ARGS(call),
1598
1599	    TP_STRUCT__entry(
1600		    __field(unsigned int,		call		)
1601		    __field(u32,			abort_code	)
1602			     ),
1603
1604	    TP_fast_assign(
1605		    __entry->call = call->debug_id;
1606		    __entry->abort_code = call->abort_code;
1607			   ),
1608
1609	    TP_printk("c=%08x ab=%08x",
1610		      __entry->call,
1611		      __entry->abort_code)
1612	    );
1613
1614TRACE_EVENT(rxrpc_improper_term,
1615	    TP_PROTO(struct rxrpc_call *call),
 
1616
1617	    TP_ARGS(call),
1618
1619	    TP_STRUCT__entry(
1620		    __field(unsigned int,		call		)
1621		    __field(u32,			abort_code	)
 
1622			     ),
1623
1624	    TP_fast_assign(
1625		    __entry->call = call->debug_id;
1626		    __entry->abort_code = call->abort_code;
 
1627			   ),
1628
1629	    TP_printk("c=%08x ab=%08x",
1630		      __entry->call,
1631		      __entry->abort_code)
 
1632	    );
1633
1634TRACE_EVENT(rxrpc_connect_call,
1635	    TP_PROTO(struct rxrpc_call *call),
1636
1637	    TP_ARGS(call),
1638
1639	    TP_STRUCT__entry(
1640		    __field(unsigned int,		call		)
1641		    __field(unsigned long,		user_call_ID	)
1642		    __field(u32,			cid		)
1643		    __field(u32,			call_id		)
1644		    __field_struct(struct sockaddr_rxrpc, srx		)
1645			     ),
1646
1647	    TP_fast_assign(
1648		    __entry->call = call->debug_id;
1649		    __entry->user_call_ID = call->user_call_ID;
1650		    __entry->cid = call->cid;
1651		    __entry->call_id = call->call_id;
1652		    __entry->srx = call->dest_srx;
1653			   ),
1654
1655	    TP_printk("c=%08x u=%p %08x:%08x dst=%pISp",
1656		      __entry->call,
1657		      (void *)__entry->user_call_ID,
1658		      __entry->cid,
1659		      __entry->call_id,
1660		      &__entry->srx.transport)
1661	    );
1662
1663TRACE_EVENT(rxrpc_resend,
1664	    TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack),
1665
1666	    TP_ARGS(call, ack),
1667
1668	    TP_STRUCT__entry(
1669		    __field(unsigned int,		call		)
1670		    __field(rxrpc_seq_t,		seq		)
1671		    __field(rxrpc_seq_t,		transmitted	)
1672		    __field(rxrpc_serial_t,		ack_serial	)
1673			     ),
1674
1675	    TP_fast_assign(
1676		    struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL;
1677		    __entry->call = call->debug_id;
1678		    __entry->seq = call->acks_hard_ack;
1679		    __entry->transmitted = call->tx_transmitted;
1680		    __entry->ack_serial = sp ? sp->hdr.serial : 0;
1681			   ),
1682
1683	    TP_printk("c=%08x r=%x q=%x tq=%x",
1684		      __entry->call,
1685		      __entry->ack_serial,
1686		      __entry->seq,
1687		      __entry->transmitted)
1688	    );
1689
1690TRACE_EVENT(rxrpc_rx_icmp,
1691	    TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1692		     struct sockaddr_rxrpc *srx),
1693
1694	    TP_ARGS(peer, ee, srx),
1695
1696	    TP_STRUCT__entry(
1697		    __field(unsigned int,			peer	)
1698		    __field_struct(struct sock_extended_err,	ee	)
1699		    __field_struct(struct sockaddr_rxrpc,	srx	)
1700			     ),
1701
1702	    TP_fast_assign(
1703		    __entry->peer = peer->debug_id;
1704		    memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1705		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1706			   ),
1707
1708	    TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1709		      __entry->peer,
1710		      __entry->ee.ee_origin,
1711		      __entry->ee.ee_type,
1712		      __entry->ee.ee_code,
1713		      __entry->ee.ee_info,
1714		      __entry->ee.ee_data,
1715		      __entry->ee.ee_errno,
1716		      &__entry->srx.transport)
1717	    );
1718
1719TRACE_EVENT(rxrpc_tx_fail,
1720	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1721		     enum rxrpc_tx_point where),
1722
1723	    TP_ARGS(debug_id, serial, ret, where),
1724
1725	    TP_STRUCT__entry(
1726		    __field(unsigned int,		debug_id	)
1727		    __field(rxrpc_serial_t,		serial		)
1728		    __field(int,			ret		)
1729		    __field(enum rxrpc_tx_point,	where		)
1730			     ),
1731
1732	    TP_fast_assign(
1733		    __entry->debug_id = debug_id;
1734		    __entry->serial = serial;
1735		    __entry->ret = ret;
1736		    __entry->where = where;
1737			   ),
1738
1739	    TP_printk("c=%08x r=%x ret=%d %s",
1740		      __entry->debug_id,
1741		      __entry->serial,
1742		      __entry->ret,
1743		      __print_symbolic(__entry->where, rxrpc_tx_points))
1744	    );
1745
1746TRACE_EVENT(rxrpc_call_reset,
1747	    TP_PROTO(struct rxrpc_call *call),
1748
1749	    TP_ARGS(call),
1750
1751	    TP_STRUCT__entry(
1752		    __field(unsigned int,		debug_id	)
1753		    __field(u32,			cid		)
1754		    __field(u32,			call_id		)
1755		    __field(rxrpc_serial_t,		call_serial	)
1756		    __field(rxrpc_serial_t,		conn_serial	)
1757		    __field(rxrpc_seq_t,		tx_seq		)
1758		    __field(rxrpc_seq_t,		rx_seq		)
1759			     ),
1760
1761	    TP_fast_assign(
1762		    __entry->debug_id = call->debug_id;
1763		    __entry->cid = call->cid;
1764		    __entry->call_id = call->call_id;
1765		    __entry->call_serial = call->rx_serial;
1766		    __entry->conn_serial = call->conn->hi_serial;
1767		    __entry->tx_seq = call->acks_hard_ack;
1768		    __entry->rx_seq = call->rx_highest_seq;
1769			   ),
1770
1771	    TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1772		      __entry->debug_id,
1773		      __entry->cid, __entry->call_id,
1774		      __entry->call_serial, __entry->conn_serial,
1775		      __entry->tx_seq, __entry->rx_seq)
1776	    );
1777
1778TRACE_EVENT(rxrpc_notify_socket,
1779	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1780
1781	    TP_ARGS(debug_id, serial),
1782
1783	    TP_STRUCT__entry(
1784		    __field(unsigned int,		debug_id	)
1785		    __field(rxrpc_serial_t,		serial		)
1786			     ),
1787
1788	    TP_fast_assign(
1789		    __entry->debug_id = debug_id;
1790		    __entry->serial = serial;
1791			   ),
1792
1793	    TP_printk("c=%08x r=%08x",
1794		      __entry->debug_id,
1795		      __entry->serial)
1796	    );
1797
1798TRACE_EVENT(rxrpc_rx_discard_ack,
1799	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1800		     rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1801		     rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1802
1803	    TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1804		    prev_pkt, call_ackr_prev),
1805
1806	    TP_STRUCT__entry(
1807		    __field(unsigned int,	debug_id	)
1808		    __field(rxrpc_serial_t,	serial		)
1809		    __field(rxrpc_seq_t,	first_soft_ack)
1810		    __field(rxrpc_seq_t,	call_ackr_first)
1811		    __field(rxrpc_seq_t,	prev_pkt)
1812		    __field(rxrpc_seq_t,	call_ackr_prev)
1813			     ),
1814
1815	    TP_fast_assign(
1816		    __entry->debug_id		= debug_id;
1817		    __entry->serial		= serial;
1818		    __entry->first_soft_ack	= first_soft_ack;
1819		    __entry->call_ackr_first	= call_ackr_first;
1820		    __entry->prev_pkt		= prev_pkt;
1821		    __entry->call_ackr_prev	= call_ackr_prev;
1822			   ),
1823
1824	    TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1825		      __entry->debug_id,
1826		      __entry->serial,
1827		      __entry->first_soft_ack,
1828		      __entry->call_ackr_first,
1829		      __entry->prev_pkt,
1830		      __entry->call_ackr_prev)
1831	    );
1832
1833TRACE_EVENT(rxrpc_req_ack,
1834	    TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1835		     enum rxrpc_req_ack_trace why),
1836
1837	    TP_ARGS(call_debug_id, seq, why),
1838
1839	    TP_STRUCT__entry(
1840		    __field(unsigned int,		call_debug_id	)
1841		    __field(rxrpc_seq_t,		seq		)
1842		    __field(enum rxrpc_req_ack_trace,	why		)
1843			     ),
1844
1845	    TP_fast_assign(
1846		    __entry->call_debug_id = call_debug_id;
1847		    __entry->seq = seq;
1848		    __entry->why = why;
1849			   ),
1850
1851	    TP_printk("c=%08x q=%08x REQ-%s",
1852		      __entry->call_debug_id,
1853		      __entry->seq,
1854		      __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1855	    );
1856
1857TRACE_EVENT(rxrpc_txbuf,
1858	    TP_PROTO(unsigned int debug_id,
1859		     unsigned int call_debug_id, rxrpc_seq_t seq,
1860		     int ref, enum rxrpc_txbuf_trace what),
1861
1862	    TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1863
1864	    TP_STRUCT__entry(
1865		    __field(unsigned int,		debug_id	)
1866		    __field(unsigned int,		call_debug_id	)
1867		    __field(rxrpc_seq_t,		seq		)
1868		    __field(int,			ref		)
1869		    __field(enum rxrpc_txbuf_trace,	what		)
1870			     ),
1871
1872	    TP_fast_assign(
1873		    __entry->debug_id = debug_id;
1874		    __entry->call_debug_id = call_debug_id;
1875		    __entry->seq = seq;
1876		    __entry->ref = ref;
1877		    __entry->what = what;
1878			   ),
1879
1880	    TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1881		      __entry->debug_id,
1882		      __entry->call_debug_id,
1883		      __entry->seq,
1884		      __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1885		      __entry->ref)
1886	    );
1887
1888TRACE_EVENT(rxrpc_poke_call,
1889	    TP_PROTO(struct rxrpc_call *call, bool busy,
1890		     enum rxrpc_call_poke_trace what),
1891
1892	    TP_ARGS(call, busy, what),
1893
1894	    TP_STRUCT__entry(
1895		    __field(unsigned int,		call_debug_id	)
1896		    __field(bool,			busy		)
1897		    __field(enum rxrpc_call_poke_trace,	what		)
1898			     ),
1899
1900	    TP_fast_assign(
1901		    __entry->call_debug_id = call->debug_id;
1902		    __entry->busy = busy;
1903		    __entry->what = what;
1904			   ),
1905
1906	    TP_printk("c=%08x %s%s",
1907		      __entry->call_debug_id,
1908		      __print_symbolic(__entry->what, rxrpc_call_poke_traces),
1909		      __entry->busy ? "!" : "")
1910	    );
1911
1912TRACE_EVENT(rxrpc_call_poked,
1913	    TP_PROTO(struct rxrpc_call *call),
1914
1915	    TP_ARGS(call),
1916
1917	    TP_STRUCT__entry(
1918		    __field(unsigned int,		call_debug_id	)
1919			     ),
1920
1921	    TP_fast_assign(
1922		    __entry->call_debug_id = call->debug_id;
1923			   ),
1924
1925	    TP_printk("c=%08x",
1926		      __entry->call_debug_id)
1927	    );
1928
1929#undef EM
1930#undef E_
1931
1932#endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */
1933#endif /* _TRACE_RXRPC_H */
1934
1935/* This part must be outside protection */
1936#include <trace/define_trace.h>
v5.9
   1/* SPDX-License-Identifier: GPL-2.0-or-later */
   2/* AF_RXRPC tracepoints
   3 *
   4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
   5 * Written by David Howells (dhowells@redhat.com)
   6 */
   7#undef TRACE_SYSTEM
   8#define TRACE_SYSTEM rxrpc
   9
  10#if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
  11#define _TRACE_RXRPC_H
  12
  13#include <linux/tracepoint.h>
  14#include <linux/errqueue.h>
  15
  16/*
  17 * Define enums for tracing information.
  18 *
  19 * These should all be kept sorted, making it easier to match the string
  20 * mapping tables further on.
  21 */
  22#ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
  23#define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
  24
  25enum rxrpc_skb_trace {
  26	rxrpc_skb_cleaned,
  27	rxrpc_skb_freed,
  28	rxrpc_skb_got,
  29	rxrpc_skb_lost,
  30	rxrpc_skb_new,
  31	rxrpc_skb_purged,
  32	rxrpc_skb_received,
  33	rxrpc_skb_rotated,
  34	rxrpc_skb_seen,
  35	rxrpc_skb_unshared,
  36	rxrpc_skb_unshared_nomem,
  37};
  38
  39enum rxrpc_local_trace {
  40	rxrpc_local_got,
  41	rxrpc_local_new,
  42	rxrpc_local_processing,
  43	rxrpc_local_put,
  44	rxrpc_local_queued,
  45};
  46
  47enum rxrpc_peer_trace {
  48	rxrpc_peer_got,
  49	rxrpc_peer_new,
  50	rxrpc_peer_processing,
  51	rxrpc_peer_put,
  52};
  53
  54enum rxrpc_conn_trace {
  55	rxrpc_conn_got,
  56	rxrpc_conn_new_client,
  57	rxrpc_conn_new_service,
  58	rxrpc_conn_put_client,
  59	rxrpc_conn_put_service,
  60	rxrpc_conn_queued,
  61	rxrpc_conn_reap_service,
  62	rxrpc_conn_seen,
  63};
  64
  65enum rxrpc_client_trace {
  66	rxrpc_client_activate_chans,
  67	rxrpc_client_alloc,
  68	rxrpc_client_chan_activate,
  69	rxrpc_client_chan_disconnect,
  70	rxrpc_client_chan_pass,
  71	rxrpc_client_chan_unstarted,
  72	rxrpc_client_chan_wait_failed,
  73	rxrpc_client_cleanup,
  74	rxrpc_client_count,
  75	rxrpc_client_discard,
  76	rxrpc_client_duplicate,
  77	rxrpc_client_exposed,
  78	rxrpc_client_replace,
  79	rxrpc_client_to_active,
  80	rxrpc_client_to_culled,
  81	rxrpc_client_to_idle,
  82	rxrpc_client_to_inactive,
  83	rxrpc_client_to_upgrade,
  84	rxrpc_client_to_waiting,
  85	rxrpc_client_uncount,
  86};
  87
  88enum rxrpc_call_trace {
  89	rxrpc_call_connected,
  90	rxrpc_call_error,
  91	rxrpc_call_got,
  92	rxrpc_call_got_kernel,
  93	rxrpc_call_got_userid,
  94	rxrpc_call_new_client,
  95	rxrpc_call_new_service,
  96	rxrpc_call_put,
  97	rxrpc_call_put_kernel,
  98	rxrpc_call_put_noqueue,
  99	rxrpc_call_put_userid,
 100	rxrpc_call_queued,
 101	rxrpc_call_queued_ref,
 102	rxrpc_call_release,
 103	rxrpc_call_seen,
 104};
 105
 106enum rxrpc_transmit_trace {
 107	rxrpc_transmit_await_reply,
 108	rxrpc_transmit_end,
 109	rxrpc_transmit_queue,
 110	rxrpc_transmit_queue_last,
 111	rxrpc_transmit_rotate,
 112	rxrpc_transmit_rotate_last,
 113	rxrpc_transmit_wait,
 114};
 115
 116enum rxrpc_receive_trace {
 117	rxrpc_receive_end,
 118	rxrpc_receive_front,
 119	rxrpc_receive_incoming,
 120	rxrpc_receive_queue,
 121	rxrpc_receive_queue_last,
 122	rxrpc_receive_rotate,
 123};
 124
 125enum rxrpc_recvmsg_trace {
 126	rxrpc_recvmsg_cont,
 127	rxrpc_recvmsg_data_return,
 128	rxrpc_recvmsg_dequeue,
 129	rxrpc_recvmsg_enter,
 130	rxrpc_recvmsg_full,
 131	rxrpc_recvmsg_hole,
 132	rxrpc_recvmsg_next,
 133	rxrpc_recvmsg_requeue,
 134	rxrpc_recvmsg_return,
 135	rxrpc_recvmsg_terminal,
 136	rxrpc_recvmsg_to_be_accepted,
 137	rxrpc_recvmsg_wait,
 138};
 139
 140enum rxrpc_rtt_tx_trace {
 141	rxrpc_rtt_tx_cancel,
 142	rxrpc_rtt_tx_data,
 143	rxrpc_rtt_tx_no_slot,
 144	rxrpc_rtt_tx_ping,
 145};
 146
 147enum rxrpc_rtt_rx_trace {
 148	rxrpc_rtt_rx_cancel,
 149	rxrpc_rtt_rx_lost,
 150	rxrpc_rtt_rx_obsolete,
 151	rxrpc_rtt_rx_ping_response,
 152	rxrpc_rtt_rx_requested_ack,
 153};
 154
 155enum rxrpc_timer_trace {
 156	rxrpc_timer_begin,
 157	rxrpc_timer_exp_ack,
 158	rxrpc_timer_exp_hard,
 159	rxrpc_timer_exp_idle,
 160	rxrpc_timer_exp_keepalive,
 161	rxrpc_timer_exp_lost_ack,
 162	rxrpc_timer_exp_normal,
 163	rxrpc_timer_exp_ping,
 164	rxrpc_timer_exp_resend,
 165	rxrpc_timer_expired,
 166	rxrpc_timer_init_for_reply,
 167	rxrpc_timer_init_for_send_reply,
 168	rxrpc_timer_restart,
 169	rxrpc_timer_set_for_ack,
 170	rxrpc_timer_set_for_hard,
 171	rxrpc_timer_set_for_idle,
 172	rxrpc_timer_set_for_keepalive,
 173	rxrpc_timer_set_for_lost_ack,
 174	rxrpc_timer_set_for_normal,
 175	rxrpc_timer_set_for_ping,
 176	rxrpc_timer_set_for_resend,
 177	rxrpc_timer_set_for_send,
 178};
 179
 180enum rxrpc_propose_ack_trace {
 181	rxrpc_propose_ack_client_tx_end,
 182	rxrpc_propose_ack_input_data,
 183	rxrpc_propose_ack_ping_for_check_life,
 184	rxrpc_propose_ack_ping_for_keepalive,
 185	rxrpc_propose_ack_ping_for_lost_ack,
 186	rxrpc_propose_ack_ping_for_lost_reply,
 187	rxrpc_propose_ack_ping_for_params,
 188	rxrpc_propose_ack_processing_op,
 189	rxrpc_propose_ack_respond_to_ack,
 190	rxrpc_propose_ack_respond_to_ping,
 191	rxrpc_propose_ack_retry_tx,
 192	rxrpc_propose_ack_rotate_rx,
 193	rxrpc_propose_ack_terminal_ack,
 194};
 195
 196enum rxrpc_propose_ack_outcome {
 197	rxrpc_propose_ack_subsume,
 198	rxrpc_propose_ack_update,
 199	rxrpc_propose_ack_use,
 200};
 201
 202enum rxrpc_congest_change {
 203	rxrpc_cong_begin_retransmission,
 204	rxrpc_cong_cleared_nacks,
 205	rxrpc_cong_new_low_nack,
 206	rxrpc_cong_no_change,
 207	rxrpc_cong_progress,
 208	rxrpc_cong_retransmit_again,
 209	rxrpc_cong_rtt_window_end,
 210	rxrpc_cong_saw_nack,
 211};
 212
 213enum rxrpc_tx_point {
 214	rxrpc_tx_point_call_abort,
 215	rxrpc_tx_point_call_ack,
 216	rxrpc_tx_point_call_data_frag,
 217	rxrpc_tx_point_call_data_nofrag,
 218	rxrpc_tx_point_call_final_resend,
 219	rxrpc_tx_point_conn_abort,
 220	rxrpc_tx_point_rxkad_challenge,
 221	rxrpc_tx_point_rxkad_response,
 222	rxrpc_tx_point_reject,
 223	rxrpc_tx_point_version_keepalive,
 224	rxrpc_tx_point_version_reply,
 225};
 226
 227#endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
 228
 229/*
 230 * Declare tracing information enums and their string mappings for display.
 231 */
 232#define rxrpc_skb_traces \
 233	EM(rxrpc_skb_cleaned,			"CLN") \
 234	EM(rxrpc_skb_freed,			"FRE") \
 235	EM(rxrpc_skb_got,			"GOT") \
 236	EM(rxrpc_skb_lost,			"*L*") \
 237	EM(rxrpc_skb_new,			"NEW") \
 238	EM(rxrpc_skb_purged,			"PUR") \
 239	EM(rxrpc_skb_received,			"RCV") \
 240	EM(rxrpc_skb_rotated,			"ROT") \
 241	EM(rxrpc_skb_seen,			"SEE") \
 242	EM(rxrpc_skb_unshared,			"UNS") \
 243	E_(rxrpc_skb_unshared_nomem,		"US0")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 244
 245#define rxrpc_local_traces \
 246	EM(rxrpc_local_got,			"GOT") \
 247	EM(rxrpc_local_new,			"NEW") \
 248	EM(rxrpc_local_processing,		"PRO") \
 249	EM(rxrpc_local_put,			"PUT") \
 250	E_(rxrpc_local_queued,			"QUE")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 251
 252#define rxrpc_peer_traces \
 253	EM(rxrpc_peer_got,			"GOT") \
 254	EM(rxrpc_peer_new,			"NEW") \
 255	EM(rxrpc_peer_processing,		"PRO") \
 256	E_(rxrpc_peer_put,			"PUT")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 257
 258#define rxrpc_conn_traces \
 259	EM(rxrpc_conn_got,			"GOT") \
 260	EM(rxrpc_conn_new_client,		"NWc") \
 261	EM(rxrpc_conn_new_service,		"NWs") \
 262	EM(rxrpc_conn_put_client,		"PTc") \
 263	EM(rxrpc_conn_put_service,		"PTs") \
 264	EM(rxrpc_conn_queued,			"QUE") \
 265	EM(rxrpc_conn_reap_service,		"RPs") \
 266	E_(rxrpc_conn_seen,			"SEE")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 267
 268#define rxrpc_client_traces \
 269	EM(rxrpc_client_activate_chans,		"Activa") \
 270	EM(rxrpc_client_alloc,			"Alloc ") \
 271	EM(rxrpc_client_chan_activate,		"ChActv") \
 272	EM(rxrpc_client_chan_disconnect,	"ChDisc") \
 273	EM(rxrpc_client_chan_pass,		"ChPass") \
 274	EM(rxrpc_client_chan_unstarted,		"ChUnst") \
 275	EM(rxrpc_client_chan_wait_failed,	"ChWtFl") \
 276	EM(rxrpc_client_cleanup,		"Clean ") \
 277	EM(rxrpc_client_count,			"Count ") \
 278	EM(rxrpc_client_discard,		"Discar") \
 279	EM(rxrpc_client_duplicate,		"Duplic") \
 280	EM(rxrpc_client_exposed,		"Expose") \
 281	EM(rxrpc_client_replace,		"Replac") \
 
 282	EM(rxrpc_client_to_active,		"->Actv") \
 283	EM(rxrpc_client_to_culled,		"->Cull") \
 284	EM(rxrpc_client_to_idle,		"->Idle") \
 285	EM(rxrpc_client_to_inactive,		"->Inac") \
 286	EM(rxrpc_client_to_upgrade,		"->Upgd") \
 287	EM(rxrpc_client_to_waiting,		"->Wait") \
 288	E_(rxrpc_client_uncount,		"Uncoun")
 289
 290#define rxrpc_conn_cache_states \
 291	EM(RXRPC_CONN_CLIENT_INACTIVE,		"Inac") \
 292	EM(RXRPC_CONN_CLIENT_WAITING,		"Wait") \
 293	EM(RXRPC_CONN_CLIENT_ACTIVE,		"Actv") \
 294	EM(RXRPC_CONN_CLIENT_UPGRADE,		"Upgd") \
 295	EM(RXRPC_CONN_CLIENT_CULLED,		"Cull") \
 296	E_(RXRPC_CONN_CLIENT_IDLE,		"Idle") \
 297
 298#define rxrpc_call_traces \
 299	EM(rxrpc_call_connected,		"CON") \
 300	EM(rxrpc_call_error,			"*E*") \
 301	EM(rxrpc_call_got,			"GOT") \
 302	EM(rxrpc_call_got_kernel,		"Gke") \
 303	EM(rxrpc_call_got_userid,		"Gus") \
 304	EM(rxrpc_call_new_client,		"NWc") \
 305	EM(rxrpc_call_new_service,		"NWs") \
 306	EM(rxrpc_call_put,			"PUT") \
 307	EM(rxrpc_call_put_kernel,		"Pke") \
 308	EM(rxrpc_call_put_noqueue,		"PNQ") \
 309	EM(rxrpc_call_put_userid,		"Pus") \
 310	EM(rxrpc_call_queued,			"QUE") \
 311	EM(rxrpc_call_queued_ref,		"QUR") \
 312	EM(rxrpc_call_release,			"RLS") \
 313	E_(rxrpc_call_seen,			"SEE")
 314
 315#define rxrpc_transmit_traces \
 316	EM(rxrpc_transmit_await_reply,		"AWR") \
 317	EM(rxrpc_transmit_end,			"END") \
 318	EM(rxrpc_transmit_queue,		"QUE") \
 319	EM(rxrpc_transmit_queue_last,		"QLS") \
 320	EM(rxrpc_transmit_rotate,		"ROT") \
 321	EM(rxrpc_transmit_rotate_last,		"RLS") \
 322	E_(rxrpc_transmit_wait,			"WAI")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 323
 324#define rxrpc_receive_traces \
 325	EM(rxrpc_receive_end,			"END") \
 326	EM(rxrpc_receive_front,			"FRN") \
 327	EM(rxrpc_receive_incoming,		"INC") \
 328	EM(rxrpc_receive_queue,			"QUE") \
 329	EM(rxrpc_receive_queue_last,		"QLS") \
 330	E_(rxrpc_receive_rotate,		"ROT")
 
 
 
 
 
 331
 332#define rxrpc_recvmsg_traces \
 333	EM(rxrpc_recvmsg_cont,			"CONT") \
 334	EM(rxrpc_recvmsg_data_return,		"DATA") \
 335	EM(rxrpc_recvmsg_dequeue,		"DEQU") \
 336	EM(rxrpc_recvmsg_enter,			"ENTR") \
 337	EM(rxrpc_recvmsg_full,			"FULL") \
 338	EM(rxrpc_recvmsg_hole,			"HOLE") \
 339	EM(rxrpc_recvmsg_next,			"NEXT") \
 340	EM(rxrpc_recvmsg_requeue,		"REQU") \
 341	EM(rxrpc_recvmsg_return,		"RETN") \
 342	EM(rxrpc_recvmsg_terminal,		"TERM") \
 343	EM(rxrpc_recvmsg_to_be_accepted,	"TBAC") \
 344	E_(rxrpc_recvmsg_wait,			"WAIT")
 345
 346#define rxrpc_rtt_tx_traces \
 347	EM(rxrpc_rtt_tx_cancel,			"CNCE") \
 348	EM(rxrpc_rtt_tx_data,			"DATA") \
 349	EM(rxrpc_rtt_tx_no_slot,		"FULL") \
 350	E_(rxrpc_rtt_tx_ping,			"PING")
 351
 352#define rxrpc_rtt_rx_traces \
 353	EM(rxrpc_rtt_rx_cancel,			"CNCL") \
 354	EM(rxrpc_rtt_rx_obsolete,		"OBSL") \
 355	EM(rxrpc_rtt_rx_lost,			"LOST") \
 356	EM(rxrpc_rtt_rx_ping_response,		"PONG") \
 357	E_(rxrpc_rtt_rx_requested_ack,		"RACK")
 358
 359#define rxrpc_timer_traces \
 360	EM(rxrpc_timer_begin,			"Begin ") \
 361	EM(rxrpc_timer_expired,			"*EXPR*") \
 362	EM(rxrpc_timer_exp_ack,			"ExpAck") \
 363	EM(rxrpc_timer_exp_hard,		"ExpHrd") \
 364	EM(rxrpc_timer_exp_idle,		"ExpIdl") \
 365	EM(rxrpc_timer_exp_keepalive,		"ExpKA ") \
 366	EM(rxrpc_timer_exp_lost_ack,		"ExpLoA") \
 367	EM(rxrpc_timer_exp_normal,		"ExpNml") \
 368	EM(rxrpc_timer_exp_ping,		"ExpPng") \
 369	EM(rxrpc_timer_exp_resend,		"ExpRsn") \
 370	EM(rxrpc_timer_init_for_reply,		"IniRpl") \
 371	EM(rxrpc_timer_init_for_send_reply,	"SndRpl") \
 372	EM(rxrpc_timer_restart,			"Restrt") \
 373	EM(rxrpc_timer_set_for_ack,		"SetAck") \
 374	EM(rxrpc_timer_set_for_hard,		"SetHrd") \
 375	EM(rxrpc_timer_set_for_idle,		"SetIdl") \
 376	EM(rxrpc_timer_set_for_keepalive,	"KeepAl") \
 377	EM(rxrpc_timer_set_for_lost_ack,	"SetLoA") \
 378	EM(rxrpc_timer_set_for_normal,		"SetNml") \
 379	EM(rxrpc_timer_set_for_ping,		"SetPng") \
 380	EM(rxrpc_timer_set_for_resend,		"SetRTx") \
 381	E_(rxrpc_timer_set_for_send,		"SetSnd")
 382
 383#define rxrpc_propose_ack_traces \
 384	EM(rxrpc_propose_ack_client_tx_end,	"ClTxEnd") \
 385	EM(rxrpc_propose_ack_input_data,	"DataIn ") \
 
 386	EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
 387	EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
 388	EM(rxrpc_propose_ack_ping_for_lost_ack,	"LostAck") \
 389	EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
 390	EM(rxrpc_propose_ack_ping_for_params,	"Params ") \
 391	EM(rxrpc_propose_ack_processing_op,	"ProcOp ") \
 392	EM(rxrpc_propose_ack_respond_to_ack,	"Rsp2Ack") \
 393	EM(rxrpc_propose_ack_respond_to_ping,	"Rsp2Png") \
 394	EM(rxrpc_propose_ack_retry_tx,		"RetryTx") \
 395	EM(rxrpc_propose_ack_rotate_rx,		"RxAck  ") \
 
 396	E_(rxrpc_propose_ack_terminal_ack,	"ClTerm ")
 397
 398#define rxrpc_propose_ack_outcomes \
 399	EM(rxrpc_propose_ack_subsume,		" Subsume") \
 400	EM(rxrpc_propose_ack_update,		" Update") \
 401	E_(rxrpc_propose_ack_use,		" New")
 402
 403#define rxrpc_congest_modes \
 404	EM(RXRPC_CALL_CONGEST_AVOIDANCE,	"CongAvoid") \
 405	EM(RXRPC_CALL_FAST_RETRANSMIT,		"FastReTx ") \
 406	EM(RXRPC_CALL_PACKET_LOSS,		"PktLoss  ") \
 407	E_(RXRPC_CALL_SLOW_START,		"SlowStart")
 408
 409#define rxrpc_congest_changes \
 410	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
 411	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
 412	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
 413	EM(rxrpc_cong_no_change,		" -") \
 414	EM(rxrpc_cong_progress,			" Progres") \
 
 415	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
 416	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \
 417	E_(rxrpc_cong_saw_nack,			" SawNack")
 418
 419#define rxrpc_pkts \
 420	EM(0,					"?00") \
 421	EM(RXRPC_PACKET_TYPE_DATA,		"DATA") \
 422	EM(RXRPC_PACKET_TYPE_ACK,		"ACK") \
 423	EM(RXRPC_PACKET_TYPE_BUSY,		"BUSY") \
 424	EM(RXRPC_PACKET_TYPE_ABORT,		"ABORT") \
 425	EM(RXRPC_PACKET_TYPE_ACKALL,		"ACKALL") \
 426	EM(RXRPC_PACKET_TYPE_CHALLENGE,		"CHALL") \
 427	EM(RXRPC_PACKET_TYPE_RESPONSE,		"RESP") \
 428	EM(RXRPC_PACKET_TYPE_DEBUG,		"DEBUG") \
 429	EM(9,					"?09") \
 430	EM(10,					"?10") \
 431	EM(11,					"?11") \
 432	EM(12,					"?12") \
 433	EM(RXRPC_PACKET_TYPE_VERSION,		"VERSION") \
 434	EM(14,					"?14") \
 435	E_(15,					"?15")
 436
 437#define rxrpc_ack_names \
 438	EM(0,					"-0-") \
 439	EM(RXRPC_ACK_REQUESTED,			"REQ") \
 440	EM(RXRPC_ACK_DUPLICATE,			"DUP") \
 441	EM(RXRPC_ACK_OUT_OF_SEQUENCE,		"OOS") \
 442	EM(RXRPC_ACK_EXCEEDS_WINDOW,		"WIN") \
 443	EM(RXRPC_ACK_NOSPACE,			"MEM") \
 444	EM(RXRPC_ACK_PING,			"PNG") \
 445	EM(RXRPC_ACK_PING_RESPONSE,		"PNR") \
 446	EM(RXRPC_ACK_DELAY,			"DLY") \
 447	EM(RXRPC_ACK_IDLE,			"IDL") \
 448	E_(RXRPC_ACK__INVALID,			"-?-")
 449
 450#define rxrpc_completions \
 451	EM(RXRPC_CALL_SUCCEEDED,		"Succeeded") \
 452	EM(RXRPC_CALL_REMOTELY_ABORTED,		"RemoteAbort") \
 453	EM(RXRPC_CALL_LOCALLY_ABORTED,		"LocalAbort") \
 454	EM(RXRPC_CALL_LOCAL_ERROR,		"LocalError") \
 455	E_(RXRPC_CALL_NETWORK_ERROR,		"NetError")
 456
 457#define rxrpc_tx_points \
 458	EM(rxrpc_tx_point_call_abort,		"CallAbort") \
 459	EM(rxrpc_tx_point_call_ack,		"CallAck") \
 460	EM(rxrpc_tx_point_call_data_frag,	"CallDataFrag") \
 461	EM(rxrpc_tx_point_call_data_nofrag,	"CallDataNofrag") \
 462	EM(rxrpc_tx_point_call_final_resend,	"CallFinalResend") \
 463	EM(rxrpc_tx_point_conn_abort,		"ConnAbort") \
 464	EM(rxrpc_tx_point_reject,		"Reject") \
 465	EM(rxrpc_tx_point_rxkad_challenge,	"RxkadChall") \
 466	EM(rxrpc_tx_point_rxkad_response,	"RxkadResp") \
 467	EM(rxrpc_tx_point_version_keepalive,	"VerKeepalive") \
 468	E_(rxrpc_tx_point_version_reply,	"VerReply")
 469
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 470/*
 471 * Export enum symbols via userspace.
 472 */
 473#undef EM
 474#undef E_
 
 
 
 475#define EM(a, b) TRACE_DEFINE_ENUM(a);
 476#define E_(a, b) TRACE_DEFINE_ENUM(a);
 477
 478rxrpc_skb_traces;
 
 
 
 
 
 
 
 479rxrpc_local_traces;
 480rxrpc_conn_traces;
 481rxrpc_client_traces;
 482rxrpc_call_traces;
 483rxrpc_transmit_traces;
 484rxrpc_receive_traces;
 485rxrpc_recvmsg_traces;
 
 
 486rxrpc_rtt_tx_traces;
 487rxrpc_rtt_rx_traces;
 488rxrpc_timer_traces;
 489rxrpc_propose_ack_traces;
 490rxrpc_propose_ack_outcomes;
 491rxrpc_congest_modes;
 492rxrpc_congest_changes;
 493rxrpc_tx_points;
 
 
 494
 495/*
 496 * Now redefine the EM() and E_() macros to map the enums to the strings that
 497 * will be printed in the output.
 498 */
 499#undef EM
 500#undef E_
 501#define EM(a, b)	{ a, b },
 502#define E_(a, b)	{ a, b }
 503
 504TRACE_EVENT(rxrpc_local,
 505	    TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
 506		     int usage, const void *where),
 507
 508	    TP_ARGS(local_debug_id, op, usage, where),
 509
 510	    TP_STRUCT__entry(
 511		    __field(unsigned int,	local		)
 512		    __field(int,		op		)
 
 513		    __field(int,		usage		)
 514		    __field(const void *,	where		)
 515			     ),
 516
 517	    TP_fast_assign(
 518		    __entry->local = local_debug_id;
 519		    __entry->op = op;
 
 520		    __entry->usage = usage;
 521		    __entry->where = where;
 522			   ),
 523
 524	    TP_printk("L=%08x %s u=%d sp=%pSR",
 525		      __entry->local,
 526		      __print_symbolic(__entry->op, rxrpc_local_traces),
 527		      __entry->usage,
 528		      __entry->where)
 529	    );
 530
 531TRACE_EVENT(rxrpc_peer,
 532	    TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op,
 533		     int usage, const void *where),
 534
 535	    TP_ARGS(peer_debug_id, op, usage, where),
 536
 537	    TP_STRUCT__entry(
 538		    __field(unsigned int,	peer		)
 539		    __field(int,		op		)
 540		    __field(int,		usage		)
 541		    __field(const void *,	where		)
 542			     ),
 543
 544	    TP_fast_assign(
 545		    __entry->peer = peer_debug_id;
 546		    __entry->op = op;
 547		    __entry->usage = usage;
 548		    __entry->where = where;
 549			   ),
 550
 551	    TP_printk("P=%08x %s u=%d sp=%pSR",
 552		      __entry->peer,
 553		      __print_symbolic(__entry->op, rxrpc_peer_traces),
 554		      __entry->usage,
 555		      __entry->where)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 556	    );
 557
 558TRACE_EVENT(rxrpc_conn,
 559	    TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op,
 560		     int usage, const void *where),
 561
 562	    TP_ARGS(conn_debug_id, op, usage, where),
 563
 564	    TP_STRUCT__entry(
 565		    __field(unsigned int,	conn		)
 566		    __field(int,		op		)
 567		    __field(int,		usage		)
 568		    __field(const void *,	where		)
 569			     ),
 570
 571	    TP_fast_assign(
 572		    __entry->conn = conn_debug_id;
 573		    __entry->op = op;
 574		    __entry->usage = usage;
 575		    __entry->where = where;
 576			   ),
 577
 578	    TP_printk("C=%08x %s u=%d sp=%pSR",
 579		      __entry->conn,
 580		      __print_symbolic(__entry->op, rxrpc_conn_traces),
 581		      __entry->usage,
 582		      __entry->where)
 583	    );
 584
 585TRACE_EVENT(rxrpc_client,
 586	    TP_PROTO(struct rxrpc_connection *conn, int channel,
 587		     enum rxrpc_client_trace op),
 588
 589	    TP_ARGS(conn, channel, op),
 590
 591	    TP_STRUCT__entry(
 592		    __field(unsigned int,		conn		)
 593		    __field(u32,			cid		)
 594		    __field(int,			channel		)
 595		    __field(int,			usage		)
 596		    __field(enum rxrpc_client_trace,	op		)
 597		    __field(enum rxrpc_conn_cache_state, cs		)
 598			     ),
 599
 600	    TP_fast_assign(
 601		    __entry->conn = conn->debug_id;
 602		    __entry->channel = channel;
 603		    __entry->usage = atomic_read(&conn->usage);
 604		    __entry->op = op;
 605		    __entry->cid = conn->proto.cid;
 606		    __entry->cs = conn->cache_state;
 607			   ),
 608
 609	    TP_printk("C=%08x h=%2d %s %s i=%08x u=%d",
 610		      __entry->conn,
 611		      __entry->channel,
 612		      __print_symbolic(__entry->op, rxrpc_client_traces),
 613		      __print_symbolic(__entry->cs, rxrpc_conn_cache_states),
 614		      __entry->cid,
 615		      __entry->usage)
 616	    );
 617
 618TRACE_EVENT(rxrpc_call,
 619	    TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
 620		     int usage, const void *where, const void *aux),
 621
 622	    TP_ARGS(call_debug_id, op, usage, where, aux),
 623
 624	    TP_STRUCT__entry(
 625		    __field(unsigned int,		call		)
 626		    __field(int,			op		)
 627		    __field(int,			usage		)
 628		    __field(const void *,		where		)
 629		    __field(const void *,		aux		)
 630			     ),
 631
 632	    TP_fast_assign(
 633		    __entry->call = call_debug_id;
 634		    __entry->op = op;
 635		    __entry->usage = usage;
 636		    __entry->where = where;
 637		    __entry->aux = aux;
 638			   ),
 639
 640	    TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
 641		      __entry->call,
 642		      __print_symbolic(__entry->op, rxrpc_call_traces),
 643		      __entry->usage,
 644		      __entry->where,
 645		      __entry->aux)
 646	    );
 647
 648TRACE_EVENT(rxrpc_skb,
 649	    TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
 650		     int usage, int mod_count, u8 flags,    const void *where),
 651
 652	    TP_ARGS(skb, op, usage, mod_count, flags, where),
 653
 654	    TP_STRUCT__entry(
 655		    __field(struct sk_buff *,		skb		)
 656		    __field(enum rxrpc_skb_trace,	op		)
 657		    __field(u8,				flags		)
 658		    __field(int,			usage		)
 659		    __field(int,			mod_count	)
 660		    __field(const void *,		where		)
 661			     ),
 662
 663	    TP_fast_assign(
 664		    __entry->skb = skb;
 665		    __entry->flags = flags;
 666		    __entry->op = op;
 667		    __entry->usage = usage;
 668		    __entry->mod_count = mod_count;
 669		    __entry->where = where;
 670			   ),
 671
 672	    TP_printk("s=%p %cx %s u=%d m=%d p=%pSR",
 673		      __entry->skb,
 674		      __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R',
 675		      __print_symbolic(__entry->op, rxrpc_skb_traces),
 676		      __entry->usage,
 677		      __entry->mod_count,
 678		      __entry->where)
 679	    );
 680
 681TRACE_EVENT(rxrpc_rx_packet,
 682	    TP_PROTO(struct rxrpc_skb_priv *sp),
 683
 684	    TP_ARGS(sp),
 685
 686	    TP_STRUCT__entry(
 687		    __field_struct(struct rxrpc_host_header,	hdr		)
 688			     ),
 689
 690	    TP_fast_assign(
 691		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
 692			   ),
 693
 694	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
 695		      __entry->hdr.epoch, __entry->hdr.cid,
 696		      __entry->hdr.callNumber, __entry->hdr.serviceId,
 697		      __entry->hdr.serial, __entry->hdr.seq,
 698		      __entry->hdr.type, __entry->hdr.flags,
 699		      __entry->hdr.type <= 15 ?
 700		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
 701	    );
 702
 703TRACE_EVENT(rxrpc_rx_done,
 704	    TP_PROTO(int result, int abort_code),
 705
 706	    TP_ARGS(result, abort_code),
 707
 708	    TP_STRUCT__entry(
 709		    __field(int,			result		)
 710		    __field(int,			abort_code	)
 711			     ),
 712
 713	    TP_fast_assign(
 714		    __entry->result = result;
 715		    __entry->abort_code = abort_code;
 716			   ),
 717
 718	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
 719	    );
 720
 721TRACE_EVENT(rxrpc_abort,
 722	    TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
 723		     rxrpc_seq_t seq, int abort_code, int error),
 724
 725	    TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
 726
 727	    TP_STRUCT__entry(
 728		    __field(unsigned int,		call_nr		)
 729		    __array(char,			why, 4		)
 730		    __field(u32,			cid		)
 731		    __field(u32,			call_id		)
 732		    __field(rxrpc_seq_t,		seq		)
 733		    __field(int,			abort_code	)
 734		    __field(int,			error		)
 735			     ),
 736
 737	    TP_fast_assign(
 738		    memcpy(__entry->why, why, 4);
 739		    __entry->call_nr = call_nr;
 
 740		    __entry->cid = cid;
 741		    __entry->call_id = call_id;
 742		    __entry->abort_code = abort_code;
 743		    __entry->error = error;
 744		    __entry->seq = seq;
 745			   ),
 746
 747	    TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
 748		      __entry->call_nr,
 749		      __entry->cid, __entry->call_id, __entry->seq,
 750		      __entry->abort_code, __entry->error, __entry->why)
 
 751	    );
 752
 753TRACE_EVENT(rxrpc_call_complete,
 754	    TP_PROTO(struct rxrpc_call *call),
 755
 756	    TP_ARGS(call),
 757
 758	    TP_STRUCT__entry(
 759		    __field(unsigned int,		call		)
 760		    __field(enum rxrpc_call_completion,	compl		)
 761		    __field(int,			error		)
 762		    __field(u32,			abort_code	)
 763			     ),
 764
 765	    TP_fast_assign(
 766		    __entry->call = call->debug_id;
 767		    __entry->compl = call->completion;
 768		    __entry->error = call->error;
 769		    __entry->abort_code = call->abort_code;
 770			   ),
 771
 772	    TP_printk("c=%08x %s r=%d ac=%d",
 773		      __entry->call,
 774		      __print_symbolic(__entry->compl, rxrpc_completions),
 775		      __entry->error,
 776		      __entry->abort_code)
 777	    );
 778
 779TRACE_EVENT(rxrpc_transmit,
 780	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
 781
 782	    TP_ARGS(call, why),
 783
 784	    TP_STRUCT__entry(
 785		    __field(unsigned int,		call		)
 786		    __field(enum rxrpc_transmit_trace,	why		)
 787		    __field(rxrpc_seq_t,		tx_hard_ack	)
 
 788		    __field(rxrpc_seq_t,		tx_top		)
 
 789		    __field(int,			tx_winsize	)
 790			     ),
 791
 792	    TP_fast_assign(
 793		    __entry->call = call->debug_id;
 794		    __entry->why = why;
 795		    __entry->tx_hard_ack = call->tx_hard_ack;
 
 796		    __entry->tx_top = call->tx_top;
 
 797		    __entry->tx_winsize = call->tx_winsize;
 798			   ),
 799
 800	    TP_printk("c=%08x %s f=%08x n=%u/%u",
 801		      __entry->call,
 802		      __print_symbolic(__entry->why, rxrpc_transmit_traces),
 803		      __entry->tx_hard_ack + 1,
 804		      __entry->tx_top - __entry->tx_hard_ack,
 
 
 
 805		      __entry->tx_winsize)
 806	    );
 807
 808TRACE_EVENT(rxrpc_rx_data,
 809	    TP_PROTO(unsigned int call, rxrpc_seq_t seq,
 810		     rxrpc_serial_t serial, u8 flags, u8 anno),
 811
 812	    TP_ARGS(call, seq, serial, flags, anno),
 813
 814	    TP_STRUCT__entry(
 815		    __field(unsigned int,		call		)
 816		    __field(rxrpc_seq_t,		seq		)
 817		    __field(rxrpc_serial_t,		serial		)
 818		    __field(u8,				flags		)
 819		    __field(u8,				anno		)
 820			     ),
 821
 822	    TP_fast_assign(
 823		    __entry->call = call;
 824		    __entry->seq = seq;
 825		    __entry->serial = serial;
 826		    __entry->flags = flags;
 827		    __entry->anno = anno;
 828			   ),
 829
 830	    TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x",
 831		      __entry->call,
 832		      __entry->serial,
 833		      __entry->seq,
 834		      __entry->flags,
 835		      __entry->anno)
 836	    );
 837
 838TRACE_EVENT(rxrpc_rx_ack,
 839	    TP_PROTO(struct rxrpc_call *call,
 840		     rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
 841		     rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
 842
 843	    TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
 844
 845	    TP_STRUCT__entry(
 846		    __field(unsigned int,		call		)
 847		    __field(rxrpc_serial_t,		serial		)
 848		    __field(rxrpc_serial_t,		ack_serial	)
 849		    __field(rxrpc_seq_t,		first		)
 850		    __field(rxrpc_seq_t,		prev		)
 851		    __field(u8,				reason		)
 852		    __field(u8,				n_acks		)
 853			     ),
 854
 855	    TP_fast_assign(
 856		    __entry->call = call->debug_id;
 857		    __entry->serial = serial;
 858		    __entry->ack_serial = ack_serial;
 859		    __entry->first = first;
 860		    __entry->prev = prev;
 861		    __entry->reason = reason;
 862		    __entry->n_acks = n_acks;
 863			   ),
 864
 865	    TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
 866		      __entry->call,
 867		      __entry->serial,
 868		      __print_symbolic(__entry->reason, rxrpc_ack_names),
 869		      __entry->ack_serial,
 870		      __entry->first,
 871		      __entry->prev,
 872		      __entry->n_acks)
 873	    );
 874
 875TRACE_EVENT(rxrpc_rx_abort,
 876	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
 877		     u32 abort_code),
 878
 879	    TP_ARGS(call, serial, abort_code),
 880
 881	    TP_STRUCT__entry(
 882		    __field(unsigned int,		call		)
 883		    __field(rxrpc_serial_t,		serial		)
 884		    __field(u32,			abort_code	)
 885			     ),
 886
 887	    TP_fast_assign(
 888		    __entry->call = call->debug_id;
 889		    __entry->serial = serial;
 890		    __entry->abort_code = abort_code;
 891			   ),
 892
 893	    TP_printk("c=%08x ABORT %08x ac=%d",
 894		      __entry->call,
 895		      __entry->serial,
 896		      __entry->abort_code)
 897	    );
 898
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 899TRACE_EVENT(rxrpc_rx_rwind_change,
 900	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
 901		     u32 rwind, bool wake),
 902
 903	    TP_ARGS(call, serial, rwind, wake),
 904
 905	    TP_STRUCT__entry(
 906		    __field(unsigned int,		call		)
 907		    __field(rxrpc_serial_t,		serial		)
 908		    __field(u32,			rwind		)
 909		    __field(bool,			wake		)
 910			     ),
 911
 912	    TP_fast_assign(
 913		    __entry->call = call->debug_id;
 914		    __entry->serial = serial;
 915		    __entry->rwind = rwind;
 916		    __entry->wake = wake;
 917			   ),
 918
 919	    TP_printk("c=%08x %08x rw=%u%s",
 920		      __entry->call,
 921		      __entry->serial,
 922		      __entry->rwind,
 923		      __entry->wake ? " wake" : "")
 924	    );
 925
 926TRACE_EVENT(rxrpc_tx_packet,
 927	    TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
 928		     enum rxrpc_tx_point where),
 929
 930	    TP_ARGS(call_id, whdr, where),
 931
 932	    TP_STRUCT__entry(
 933		    __field(unsigned int,			call	)
 934		    __field(enum rxrpc_tx_point,		where	)
 935		    __field_struct(struct rxrpc_wire_header,	whdr	)
 936			     ),
 937
 938	    TP_fast_assign(
 939		    __entry->call = call_id;
 940		    memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
 941		    __entry->where = where;
 942			   ),
 943
 944	    TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
 945		      __entry->call,
 946		      ntohl(__entry->whdr.epoch),
 947		      ntohl(__entry->whdr.cid),
 948		      ntohl(__entry->whdr.callNumber),
 949		      ntohs(__entry->whdr.serviceId),
 950		      ntohl(__entry->whdr.serial),
 951		      ntohl(__entry->whdr.seq),
 952		      __entry->whdr.type, __entry->whdr.flags,
 953		      __entry->whdr.type <= 15 ?
 954		      __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
 955		      __print_symbolic(__entry->where, rxrpc_tx_points))
 956	    );
 957
 958TRACE_EVENT(rxrpc_tx_data,
 959	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
 960		     rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
 961
 962	    TP_ARGS(call, seq, serial, flags, retrans, lose),
 963
 964	    TP_STRUCT__entry(
 965		    __field(unsigned int,		call		)
 966		    __field(rxrpc_seq_t,		seq		)
 967		    __field(rxrpc_serial_t,		serial		)
 968		    __field(u32,			cid		)
 969		    __field(u32,			call_id		)
 970		    __field(u8,				flags		)
 971		    __field(bool,			retrans		)
 972		    __field(bool,			lose		)
 973			     ),
 974
 975	    TP_fast_assign(
 976		    __entry->call = call->debug_id;
 977		    __entry->cid = call->cid;
 978		    __entry->call_id = call->call_id;
 979		    __entry->seq = seq;
 980		    __entry->serial = serial;
 981		    __entry->flags = flags;
 982		    __entry->retrans = retrans;
 983		    __entry->lose = lose;
 984			   ),
 985
 986	    TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
 987		      __entry->call,
 988		      __entry->cid,
 989		      __entry->call_id,
 990		      __entry->serial,
 991		      __entry->seq,
 992		      __entry->flags,
 993		      __entry->retrans ? " *RETRANS*" : "",
 994		      __entry->lose ? " *LOSE*" : "")
 995	    );
 996
 997TRACE_EVENT(rxrpc_tx_ack,
 998	    TP_PROTO(unsigned int call, rxrpc_serial_t serial,
 999		     rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
1000		     u8 reason, u8 n_acks),
1001
1002	    TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
1003
1004	    TP_STRUCT__entry(
1005		    __field(unsigned int,		call		)
1006		    __field(rxrpc_serial_t,		serial		)
1007		    __field(rxrpc_seq_t,		ack_first	)
1008		    __field(rxrpc_serial_t,		ack_serial	)
1009		    __field(u8,				reason		)
1010		    __field(u8,				n_acks		)
1011			     ),
1012
1013	    TP_fast_assign(
1014		    __entry->call = call;
1015		    __entry->serial = serial;
1016		    __entry->ack_first = ack_first;
1017		    __entry->ack_serial = ack_serial;
1018		    __entry->reason = reason;
1019		    __entry->n_acks = n_acks;
1020			   ),
1021
1022	    TP_printk(" c=%08x ACK  %08x %s f=%08x r=%08x n=%u",
1023		      __entry->call,
1024		      __entry->serial,
1025		      __print_symbolic(__entry->reason, rxrpc_ack_names),
1026		      __entry->ack_first,
1027		      __entry->ack_serial,
1028		      __entry->n_acks)
1029	    );
1030
1031TRACE_EVENT(rxrpc_receive,
1032	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
1033		     rxrpc_serial_t serial, rxrpc_seq_t seq),
1034
1035	    TP_ARGS(call, why, serial, seq),
1036
1037	    TP_STRUCT__entry(
1038		    __field(unsigned int,		call		)
1039		    __field(enum rxrpc_receive_trace,	why		)
1040		    __field(rxrpc_serial_t,		serial		)
1041		    __field(rxrpc_seq_t,		seq		)
1042		    __field(rxrpc_seq_t,		hard_ack	)
1043		    __field(rxrpc_seq_t,		top		)
1044			     ),
1045
1046	    TP_fast_assign(
1047		    __entry->call = call->debug_id;
1048		    __entry->why = why;
1049		    __entry->serial = serial;
1050		    __entry->seq = seq;
1051		    __entry->hard_ack = call->rx_hard_ack;
1052		    __entry->top = call->rx_top;
1053			   ),
1054
1055	    TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
1056		      __entry->call,
1057		      __print_symbolic(__entry->why, rxrpc_receive_traces),
1058		      __entry->serial,
1059		      __entry->seq,
1060		      __entry->hard_ack,
1061		      __entry->top)
1062	    );
1063
1064TRACE_EVENT(rxrpc_recvmsg,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1065	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1066		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1067		     int ret),
1068
1069	    TP_ARGS(call, why, seq, offset, len, ret),
1070
1071	    TP_STRUCT__entry(
1072		    __field(unsigned int,		call		)
1073		    __field(enum rxrpc_recvmsg_trace,	why		)
1074		    __field(rxrpc_seq_t,		seq		)
1075		    __field(unsigned int,		offset		)
1076		    __field(unsigned int,		len		)
1077		    __field(int,			ret		)
1078			     ),
1079
1080	    TP_fast_assign(
1081		    __entry->call = call ? call->debug_id : 0;
1082		    __entry->why = why;
1083		    __entry->seq = seq;
1084		    __entry->offset = offset;
1085		    __entry->len = len;
1086		    __entry->ret = ret;
1087			   ),
1088
1089	    TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1090		      __entry->call,
1091		      __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1092		      __entry->seq,
1093		      __entry->offset,
1094		      __entry->len,
1095		      __entry->ret)
1096	    );
1097
1098TRACE_EVENT(rxrpc_rtt_tx,
1099	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1100		     int slot, rxrpc_serial_t send_serial),
1101
1102	    TP_ARGS(call, why, slot, send_serial),
1103
1104	    TP_STRUCT__entry(
1105		    __field(unsigned int,		call		)
1106		    __field(enum rxrpc_rtt_tx_trace,	why		)
1107		    __field(int,			slot		)
1108		    __field(rxrpc_serial_t,		send_serial	)
1109			     ),
1110
1111	    TP_fast_assign(
1112		    __entry->call = call->debug_id;
1113		    __entry->why = why;
1114		    __entry->slot = slot;
1115		    __entry->send_serial = send_serial;
1116			   ),
1117
1118	    TP_printk("c=%08x [%d] %s sr=%08x",
1119		      __entry->call,
1120		      __entry->slot,
1121		      __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1122		      __entry->send_serial)
1123	    );
1124
1125TRACE_EVENT(rxrpc_rtt_rx,
1126	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1127		     int slot,
1128		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1129		     u32 rtt, u32 rto),
1130
1131	    TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1132
1133	    TP_STRUCT__entry(
1134		    __field(unsigned int,		call		)
1135		    __field(enum rxrpc_rtt_rx_trace,	why		)
1136		    __field(int,			slot		)
1137		    __field(rxrpc_serial_t,		send_serial	)
1138		    __field(rxrpc_serial_t,		resp_serial	)
1139		    __field(u32,			rtt		)
1140		    __field(u32,			rto		)
1141			     ),
1142
1143	    TP_fast_assign(
1144		    __entry->call = call->debug_id;
1145		    __entry->why = why;
1146		    __entry->slot = slot;
1147		    __entry->send_serial = send_serial;
1148		    __entry->resp_serial = resp_serial;
1149		    __entry->rtt = rtt;
1150		    __entry->rto = rto;
1151			   ),
1152
1153	    TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1154		      __entry->call,
1155		      __entry->slot,
1156		      __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1157		      __entry->send_serial,
1158		      __entry->resp_serial,
1159		      __entry->rtt,
1160		      __entry->rto)
1161	    );
1162
1163TRACE_EVENT(rxrpc_timer,
1164	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1165		     unsigned long now),
1166
1167	    TP_ARGS(call, why, now),
1168
1169	    TP_STRUCT__entry(
1170		    __field(unsigned int,			call		)
1171		    __field(enum rxrpc_timer_trace,		why		)
1172		    __field(long,				now		)
1173		    __field(long,				ack_at		)
1174		    __field(long,				ack_lost_at	)
1175		    __field(long,				resend_at	)
1176		    __field(long,				ping_at		)
1177		    __field(long,				expect_rx_by	)
1178		    __field(long,				expect_req_by	)
1179		    __field(long,				expect_term_by	)
1180		    __field(long,				timer		)
1181			     ),
1182
1183	    TP_fast_assign(
1184		    __entry->call		= call->debug_id;
1185		    __entry->why		= why;
1186		    __entry->now		= now;
1187		    __entry->ack_at		= call->ack_at;
1188		    __entry->ack_lost_at	= call->ack_lost_at;
1189		    __entry->resend_at		= call->resend_at;
1190		    __entry->expect_rx_by	= call->expect_rx_by;
1191		    __entry->expect_req_by	= call->expect_req_by;
1192		    __entry->expect_term_by	= call->expect_term_by;
1193		    __entry->timer		= call->timer.expires;
1194			   ),
1195
1196	    TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1197		      __entry->call,
1198		      __print_symbolic(__entry->why, rxrpc_timer_traces),
1199		      __entry->ack_at - __entry->now,
1200		      __entry->ack_lost_at - __entry->now,
1201		      __entry->resend_at - __entry->now,
1202		      __entry->expect_rx_by - __entry->now,
1203		      __entry->expect_req_by - __entry->now,
1204		      __entry->expect_term_by - __entry->now,
1205		      __entry->timer - __entry->now)
1206	    );
1207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1208TRACE_EVENT(rxrpc_rx_lose,
1209	    TP_PROTO(struct rxrpc_skb_priv *sp),
1210
1211	    TP_ARGS(sp),
1212
1213	    TP_STRUCT__entry(
1214		    __field_struct(struct rxrpc_host_header,	hdr		)
1215			     ),
1216
1217	    TP_fast_assign(
1218		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1219			   ),
1220
1221	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1222		      __entry->hdr.epoch, __entry->hdr.cid,
1223		      __entry->hdr.callNumber, __entry->hdr.serviceId,
1224		      __entry->hdr.serial, __entry->hdr.seq,
1225		      __entry->hdr.type, __entry->hdr.flags,
1226		      __entry->hdr.type <= 15 ?
1227		      __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1228	    );
1229
1230TRACE_EVENT(rxrpc_propose_ack,
1231	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1232		     u8 ack_reason, rxrpc_serial_t serial, bool immediate,
1233		     bool background, enum rxrpc_propose_ack_outcome outcome),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1234
1235	    TP_ARGS(call, why, ack_reason, serial, immediate, background,
1236		    outcome),
1237
1238	    TP_STRUCT__entry(
1239		    __field(unsigned int,			call		)
1240		    __field(enum rxrpc_propose_ack_trace,	why		)
1241		    __field(rxrpc_serial_t,			serial		)
1242		    __field(u8,					ack_reason	)
1243		    __field(bool,				immediate	)
1244		    __field(bool,				background	)
1245		    __field(enum rxrpc_propose_ack_outcome,	outcome		)
1246			     ),
1247
1248	    TP_fast_assign(
1249		    __entry->call	= call->debug_id;
1250		    __entry->why	= why;
1251		    __entry->serial	= serial;
1252		    __entry->ack_reason	= ack_reason;
1253		    __entry->immediate	= immediate;
1254		    __entry->background	= background;
1255		    __entry->outcome	= outcome;
1256			   ),
1257
1258	    TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s",
1259		      __entry->call,
1260		      __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1261		      __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1262		      __entry->serial,
1263		      __entry->immediate,
1264		      __entry->background,
1265		      __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1266	    );
1267
1268TRACE_EVENT(rxrpc_retransmit,
1269	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation,
1270		     s64 expiry),
1271
1272	    TP_ARGS(call, seq, annotation, expiry),
1273
1274	    TP_STRUCT__entry(
1275		    __field(unsigned int,		call		)
1276		    __field(rxrpc_seq_t,		seq		)
1277		    __field(u8,				annotation	)
1278		    __field(s64,			expiry		)
1279			     ),
1280
1281	    TP_fast_assign(
1282		    __entry->call = call->debug_id;
1283		    __entry->seq = seq;
1284		    __entry->annotation = annotation;
1285		    __entry->expiry = expiry;
1286			   ),
1287
1288	    TP_printk("c=%08x q=%x a=%02x xp=%lld",
1289		      __entry->call,
1290		      __entry->seq,
1291		      __entry->annotation,
1292		      __entry->expiry)
1293	    );
1294
1295TRACE_EVENT(rxrpc_congest,
1296	    TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1297		     rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1298
1299	    TP_ARGS(call, summary, ack_serial, change),
1300
1301	    TP_STRUCT__entry(
1302		    __field(unsigned int,			call		)
1303		    __field(enum rxrpc_congest_change,		change		)
1304		    __field(rxrpc_seq_t,			hard_ack	)
1305		    __field(rxrpc_seq_t,			top		)
1306		    __field(rxrpc_seq_t,			lowest_nak	)
1307		    __field(rxrpc_serial_t,			ack_serial	)
1308		    __field_struct(struct rxrpc_ack_summary,	sum		)
1309			     ),
1310
1311	    TP_fast_assign(
1312		    __entry->call	= call->debug_id;
1313		    __entry->change	= change;
1314		    __entry->hard_ack	= call->tx_hard_ack;
1315		    __entry->top	= call->tx_top;
1316		    __entry->lowest_nak	= call->acks_lowest_nak;
1317		    __entry->ack_serial	= ack_serial;
1318		    memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1319			   ),
1320
1321	    TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s",
1322		      __entry->call,
1323		      __entry->ack_serial,
1324		      __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1325		      __entry->hard_ack,
1326		      __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1327		      __entry->sum.cwnd,
1328		      __entry->sum.ssthresh,
1329		      __entry->sum.nr_acks, __entry->sum.nr_nacks,
1330		      __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks,
1331		      __entry->sum.nr_rot_new_acks,
1332		      __entry->top - __entry->hard_ack,
1333		      __entry->sum.cumulative_acks,
1334		      __entry->sum.dup_acks,
1335		      __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1336		      __print_symbolic(__entry->change, rxrpc_congest_changes),
1337		      __entry->sum.retrans_timeo ? " rTxTo" : "")
1338	    );
1339
1340TRACE_EVENT(rxrpc_disconnect_call,
1341	    TP_PROTO(struct rxrpc_call *call),
1342
1343	    TP_ARGS(call),
1344
1345	    TP_STRUCT__entry(
1346		    __field(unsigned int,		call		)
1347		    __field(u32,			abort_code	)
 
 
 
 
 
 
1348			     ),
1349
1350	    TP_fast_assign(
1351		    __entry->call = call->debug_id;
1352		    __entry->abort_code = call->abort_code;
 
 
 
 
 
 
1353			   ),
1354
1355	    TP_printk("c=%08x ab=%08x",
1356		      __entry->call,
1357		      __entry->abort_code)
 
 
 
 
 
 
1358	    );
1359
1360TRACE_EVENT(rxrpc_improper_term,
1361	    TP_PROTO(struct rxrpc_call *call),
1362
1363	    TP_ARGS(call),
1364
1365	    TP_STRUCT__entry(
1366		    __field(unsigned int,		call		)
1367		    __field(u32,			abort_code	)
1368			     ),
1369
1370	    TP_fast_assign(
1371		    __entry->call = call->debug_id;
1372		    __entry->abort_code = call->abort_code;
1373			   ),
1374
1375	    TP_printk("c=%08x ab=%08x",
1376		      __entry->call,
1377		      __entry->abort_code)
1378	    );
1379
1380TRACE_EVENT(rxrpc_rx_eproto,
1381	    TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1382		     const char *why),
1383
1384	    TP_ARGS(call, serial, why),
1385
1386	    TP_STRUCT__entry(
1387		    __field(unsigned int,		call		)
1388		    __field(rxrpc_serial_t,		serial		)
1389		    __field(const char *,		why		)
1390			     ),
1391
1392	    TP_fast_assign(
1393		    __entry->call = call ? call->debug_id : 0;
1394		    __entry->serial = serial;
1395		    __entry->why = why;
1396			   ),
1397
1398	    TP_printk("c=%08x EPROTO %08x %s",
1399		      __entry->call,
1400		      __entry->serial,
1401		      __entry->why)
1402	    );
1403
1404TRACE_EVENT(rxrpc_connect_call,
1405	    TP_PROTO(struct rxrpc_call *call),
1406
1407	    TP_ARGS(call),
1408
1409	    TP_STRUCT__entry(
1410		    __field(unsigned int,		call		)
1411		    __field(unsigned long,		user_call_ID	)
1412		    __field(u32,			cid		)
1413		    __field(u32,			call_id		)
 
1414			     ),
1415
1416	    TP_fast_assign(
1417		    __entry->call = call->debug_id;
1418		    __entry->user_call_ID = call->user_call_ID;
1419		    __entry->cid = call->cid;
1420		    __entry->call_id = call->call_id;
 
1421			   ),
1422
1423	    TP_printk("c=%08x u=%p %08x:%08x",
1424		      __entry->call,
1425		      (void *)__entry->user_call_ID,
1426		      __entry->cid,
1427		      __entry->call_id)
 
1428	    );
1429
1430TRACE_EVENT(rxrpc_resend,
1431	    TP_PROTO(struct rxrpc_call *call, int ix),
1432
1433	    TP_ARGS(call, ix),
1434
1435	    TP_STRUCT__entry(
1436		    __field(unsigned int,		call		)
1437		    __field(int,			ix		)
1438		    __array(u8,				anno, 64	)
 
1439			     ),
1440
1441	    TP_fast_assign(
 
1442		    __entry->call = call->debug_id;
1443		    __entry->ix = ix;
1444		    memcpy(__entry->anno, call->rxtx_annotations, 64);
 
1445			   ),
1446
1447	    TP_printk("c=%08x ix=%u a=%64phN",
1448		      __entry->call,
1449		      __entry->ix,
1450		      __entry->anno)
 
1451	    );
1452
1453TRACE_EVENT(rxrpc_rx_icmp,
1454	    TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1455		     struct sockaddr_rxrpc *srx),
1456
1457	    TP_ARGS(peer, ee, srx),
1458
1459	    TP_STRUCT__entry(
1460		    __field(unsigned int,			peer	)
1461		    __field_struct(struct sock_extended_err,	ee	)
1462		    __field_struct(struct sockaddr_rxrpc,	srx	)
1463			     ),
1464
1465	    TP_fast_assign(
1466		    __entry->peer = peer->debug_id;
1467		    memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1468		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1469			   ),
1470
1471	    TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1472		      __entry->peer,
1473		      __entry->ee.ee_origin,
1474		      __entry->ee.ee_type,
1475		      __entry->ee.ee_code,
1476		      __entry->ee.ee_info,
1477		      __entry->ee.ee_data,
1478		      __entry->ee.ee_errno,
1479		      &__entry->srx.transport)
1480	    );
1481
1482TRACE_EVENT(rxrpc_tx_fail,
1483	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1484		     enum rxrpc_tx_point where),
1485
1486	    TP_ARGS(debug_id, serial, ret, where),
1487
1488	    TP_STRUCT__entry(
1489		    __field(unsigned int,		debug_id	)
1490		    __field(rxrpc_serial_t,		serial		)
1491		    __field(int,			ret		)
1492		    __field(enum rxrpc_tx_point,	where		)
1493			     ),
1494
1495	    TP_fast_assign(
1496		    __entry->debug_id = debug_id;
1497		    __entry->serial = serial;
1498		    __entry->ret = ret;
1499		    __entry->where = where;
1500			   ),
1501
1502	    TP_printk("c=%08x r=%x ret=%d %s",
1503		      __entry->debug_id,
1504		      __entry->serial,
1505		      __entry->ret,
1506		      __print_symbolic(__entry->where, rxrpc_tx_points))
1507	    );
1508
1509TRACE_EVENT(rxrpc_call_reset,
1510	    TP_PROTO(struct rxrpc_call *call),
1511
1512	    TP_ARGS(call),
1513
1514	    TP_STRUCT__entry(
1515		    __field(unsigned int,		debug_id	)
1516		    __field(u32,			cid		)
1517		    __field(u32,			call_id		)
1518		    __field(rxrpc_serial_t,		call_serial	)
1519		    __field(rxrpc_serial_t,		conn_serial	)
1520		    __field(rxrpc_seq_t,		tx_seq		)
1521		    __field(rxrpc_seq_t,		rx_seq		)
1522			     ),
1523
1524	    TP_fast_assign(
1525		    __entry->debug_id = call->debug_id;
1526		    __entry->cid = call->cid;
1527		    __entry->call_id = call->call_id;
1528		    __entry->call_serial = call->rx_serial;
1529		    __entry->conn_serial = call->conn->hi_serial;
1530		    __entry->tx_seq = call->tx_hard_ack;
1531		    __entry->rx_seq = call->ackr_seen;
1532			   ),
1533
1534	    TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1535		      __entry->debug_id,
1536		      __entry->cid, __entry->call_id,
1537		      __entry->call_serial, __entry->conn_serial,
1538		      __entry->tx_seq, __entry->rx_seq)
1539	    );
1540
1541TRACE_EVENT(rxrpc_notify_socket,
1542	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1543
1544	    TP_ARGS(debug_id, serial),
1545
1546	    TP_STRUCT__entry(
1547		    __field(unsigned int,		debug_id	)
1548		    __field(rxrpc_serial_t,		serial		)
1549			     ),
1550
1551	    TP_fast_assign(
1552		    __entry->debug_id = debug_id;
1553		    __entry->serial = serial;
1554			   ),
1555
1556	    TP_printk("c=%08x r=%08x",
1557		      __entry->debug_id,
1558		      __entry->serial)
1559	    );
1560
1561TRACE_EVENT(rxrpc_rx_discard_ack,
1562	    TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1563		     rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1564		     rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1565
1566	    TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1567		    prev_pkt, call_ackr_prev),
1568
1569	    TP_STRUCT__entry(
1570		    __field(unsigned int,	debug_id	)
1571		    __field(rxrpc_serial_t,	serial		)
1572		    __field(rxrpc_seq_t,	first_soft_ack)
1573		    __field(rxrpc_seq_t,	call_ackr_first)
1574		    __field(rxrpc_seq_t,	prev_pkt)
1575		    __field(rxrpc_seq_t,	call_ackr_prev)
1576			     ),
1577
1578	    TP_fast_assign(
1579		    __entry->debug_id		= debug_id;
1580		    __entry->serial		= serial;
1581		    __entry->first_soft_ack	= first_soft_ack;
1582		    __entry->call_ackr_first	= call_ackr_first;
1583		    __entry->prev_pkt		= prev_pkt;
1584		    __entry->call_ackr_prev	= call_ackr_prev;
1585			   ),
1586
1587	    TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1588		      __entry->debug_id,
1589		      __entry->serial,
1590		      __entry->first_soft_ack,
1591		      __entry->call_ackr_first,
1592		      __entry->prev_pkt,
1593		      __entry->call_ackr_prev)
1594	    );
1595
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1596#endif /* _TRACE_RXRPC_H */
1597
1598/* This part must be outside protection */
1599#include <trace/define_trace.h>