Linux Audio

Check our new training course

Real-Time Linux with PREEMPT_RT training

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