1b4d0d230SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 2df844fd4SDavid Howells /* AF_RXRPC tracepoints 3df844fd4SDavid Howells * 4df844fd4SDavid Howells * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 5df844fd4SDavid Howells * Written by David Howells (dhowells@redhat.com) 6df844fd4SDavid Howells */ 7df844fd4SDavid Howells #undef TRACE_SYSTEM 8df844fd4SDavid Howells #define TRACE_SYSTEM rxrpc 9df844fd4SDavid Howells 10df844fd4SDavid Howells #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) 11df844fd4SDavid Howells #define _TRACE_RXRPC_H 12df844fd4SDavid Howells 13df844fd4SDavid Howells #include <linux/tracepoint.h> 14494337c9SDavid Howells #include <linux/errqueue.h> 15df844fd4SDavid Howells 16b54a134aSDavid Howells /* 17b54a134aSDavid Howells * Declare tracing information enums and their string mappings for display. 18b54a134aSDavid Howells */ 19b54a134aSDavid Howells #define rxrpc_skb_traces \ 20987db9f7SDavid Howells EM(rxrpc_skb_cleaned, "CLN") \ 21987db9f7SDavid Howells EM(rxrpc_skb_freed, "FRE") \ 22987db9f7SDavid Howells EM(rxrpc_skb_got, "GOT") \ 23987db9f7SDavid Howells EM(rxrpc_skb_lost, "*L*") \ 24987db9f7SDavid Howells EM(rxrpc_skb_new, "NEW") \ 25987db9f7SDavid Howells EM(rxrpc_skb_purged, "PUR") \ 26987db9f7SDavid Howells EM(rxrpc_skb_received, "RCV") \ 27987db9f7SDavid Howells EM(rxrpc_skb_rotated, "ROT") \ 28d0d5c0cdSDavid Howells EM(rxrpc_skb_seen, "SEE") \ 29d0d5c0cdSDavid Howells EM(rxrpc_skb_unshared, "UNS") \ 30d0d5c0cdSDavid Howells E_(rxrpc_skb_unshared_nomem, "US0") 31b54a134aSDavid Howells 3209d2bf59SDavid Howells #define rxrpc_local_traces \ 3309d2bf59SDavid Howells EM(rxrpc_local_got, "GOT") \ 3409d2bf59SDavid Howells EM(rxrpc_local_new, "NEW") \ 3509d2bf59SDavid Howells EM(rxrpc_local_processing, "PRO") \ 3609d2bf59SDavid Howells EM(rxrpc_local_put, "PUT") \ 3709d2bf59SDavid Howells E_(rxrpc_local_queued, "QUE") 3809d2bf59SDavid Howells 391159d4b4SDavid Howells #define rxrpc_peer_traces \ 401159d4b4SDavid Howells EM(rxrpc_peer_got, "GOT") \ 411159d4b4SDavid Howells EM(rxrpc_peer_new, "NEW") \ 421159d4b4SDavid Howells EM(rxrpc_peer_processing, "PRO") \ 43f3344303SDavid Howells E_(rxrpc_peer_put, "PUT") 441159d4b4SDavid Howells 45b54a134aSDavid Howells #define rxrpc_conn_traces \ 46b54a134aSDavid Howells EM(rxrpc_conn_got, "GOT") \ 47b54a134aSDavid Howells EM(rxrpc_conn_new_client, "NWc") \ 48b54a134aSDavid Howells EM(rxrpc_conn_new_service, "NWs") \ 49b54a134aSDavid Howells EM(rxrpc_conn_put_client, "PTc") \ 50b54a134aSDavid Howells EM(rxrpc_conn_put_service, "PTs") \ 51b54a134aSDavid Howells EM(rxrpc_conn_queued, "QUE") \ 52f859ab61SDavid Howells EM(rxrpc_conn_reap_service, "RPs") \ 53b54a134aSDavid Howells E_(rxrpc_conn_seen, "SEE") 54b54a134aSDavid Howells 55b54a134aSDavid Howells #define rxrpc_client_traces \ 56b54a134aSDavid Howells EM(rxrpc_client_activate_chans, "Activa") \ 57b54a134aSDavid Howells EM(rxrpc_client_alloc, "Alloc ") \ 58b54a134aSDavid Howells EM(rxrpc_client_chan_activate, "ChActv") \ 59b54a134aSDavid Howells EM(rxrpc_client_chan_disconnect, "ChDisc") \ 60b54a134aSDavid Howells EM(rxrpc_client_chan_pass, "ChPass") \ 61930c9f91SDavid Howells EM(rxrpc_client_chan_wait_failed, "ChWtFl") \ 62b54a134aSDavid Howells EM(rxrpc_client_cleanup, "Clean ") \ 63b54a134aSDavid Howells EM(rxrpc_client_discard, "Discar") \ 64b54a134aSDavid Howells EM(rxrpc_client_duplicate, "Duplic") \ 65b54a134aSDavid Howells EM(rxrpc_client_exposed, "Expose") \ 66b54a134aSDavid Howells EM(rxrpc_client_replace, "Replac") \ 67b54a134aSDavid Howells EM(rxrpc_client_to_active, "->Actv") \ 68245500d8SDavid Howells E_(rxrpc_client_to_idle, "->Idle") 69b54a134aSDavid Howells 70b54a134aSDavid Howells #define rxrpc_call_traces \ 71b54a134aSDavid Howells EM(rxrpc_call_connected, "CON") \ 72b54a134aSDavid Howells EM(rxrpc_call_error, "*E*") \ 73b54a134aSDavid Howells EM(rxrpc_call_got, "GOT") \ 74b54a134aSDavid Howells EM(rxrpc_call_got_kernel, "Gke") \ 754a7f62f9SDavid Howells EM(rxrpc_call_got_timer, "GTM") \ 76b54a134aSDavid Howells EM(rxrpc_call_got_userid, "Gus") \ 77b54a134aSDavid Howells EM(rxrpc_call_new_client, "NWc") \ 78b54a134aSDavid Howells EM(rxrpc_call_new_service, "NWs") \ 79b54a134aSDavid Howells EM(rxrpc_call_put, "PUT") \ 80b54a134aSDavid Howells EM(rxrpc_call_put_kernel, "Pke") \ 814a7f62f9SDavid Howells EM(rxrpc_call_put_noqueue, "PnQ") \ 824a7f62f9SDavid Howells EM(rxrpc_call_put_notimer, "PnT") \ 834a7f62f9SDavid Howells EM(rxrpc_call_put_timer, "PTM") \ 84b54a134aSDavid Howells EM(rxrpc_call_put_userid, "Pus") \ 85b54a134aSDavid Howells EM(rxrpc_call_queued, "QUE") \ 86b54a134aSDavid Howells EM(rxrpc_call_queued_ref, "QUR") \ 87b54a134aSDavid Howells EM(rxrpc_call_release, "RLS") \ 88b54a134aSDavid Howells E_(rxrpc_call_seen, "SEE") 89b54a134aSDavid Howells 90b54a134aSDavid Howells #define rxrpc_transmit_traces \ 91b54a134aSDavid Howells EM(rxrpc_transmit_await_reply, "AWR") \ 92b54a134aSDavid Howells EM(rxrpc_transmit_end, "END") \ 93b54a134aSDavid Howells EM(rxrpc_transmit_queue, "QUE") \ 94b54a134aSDavid Howells EM(rxrpc_transmit_queue_last, "QLS") \ 95b54a134aSDavid Howells EM(rxrpc_transmit_rotate, "ROT") \ 96b54a134aSDavid Howells EM(rxrpc_transmit_rotate_last, "RLS") \ 97b54a134aSDavid Howells E_(rxrpc_transmit_wait, "WAI") 98b54a134aSDavid Howells 99b54a134aSDavid Howells #define rxrpc_receive_traces \ 100b54a134aSDavid Howells EM(rxrpc_receive_end, "END") \ 101b54a134aSDavid Howells EM(rxrpc_receive_front, "FRN") \ 102b54a134aSDavid Howells EM(rxrpc_receive_incoming, "INC") \ 103b54a134aSDavid Howells EM(rxrpc_receive_queue, "QUE") \ 104b54a134aSDavid Howells EM(rxrpc_receive_queue_last, "QLS") \ 105b54a134aSDavid Howells E_(rxrpc_receive_rotate, "ROT") 106b54a134aSDavid Howells 107b54a134aSDavid Howells #define rxrpc_recvmsg_traces \ 108b54a134aSDavid Howells EM(rxrpc_recvmsg_cont, "CONT") \ 109b54a134aSDavid Howells EM(rxrpc_recvmsg_data_return, "DATA") \ 110b54a134aSDavid Howells EM(rxrpc_recvmsg_dequeue, "DEQU") \ 111b54a134aSDavid Howells EM(rxrpc_recvmsg_enter, "ENTR") \ 112b54a134aSDavid Howells EM(rxrpc_recvmsg_full, "FULL") \ 113b54a134aSDavid Howells EM(rxrpc_recvmsg_hole, "HOLE") \ 114b54a134aSDavid Howells EM(rxrpc_recvmsg_next, "NEXT") \ 115540b1c48SDavid Howells EM(rxrpc_recvmsg_requeue, "REQU") \ 116b54a134aSDavid Howells EM(rxrpc_recvmsg_return, "RETN") \ 117b54a134aSDavid Howells EM(rxrpc_recvmsg_terminal, "TERM") \ 118b54a134aSDavid Howells EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ 119b54a134aSDavid Howells E_(rxrpc_recvmsg_wait, "WAIT") 120b54a134aSDavid Howells 121b54a134aSDavid Howells #define rxrpc_rtt_tx_traces \ 1224700c4d8SDavid Howells EM(rxrpc_rtt_tx_cancel, "CNCE") \ 123b54a134aSDavid Howells EM(rxrpc_rtt_tx_data, "DATA") \ 1244700c4d8SDavid Howells EM(rxrpc_rtt_tx_no_slot, "FULL") \ 125b54a134aSDavid Howells E_(rxrpc_rtt_tx_ping, "PING") 126b54a134aSDavid Howells 127b54a134aSDavid Howells #define rxrpc_rtt_rx_traces \ 1284700c4d8SDavid Howells EM(rxrpc_rtt_rx_cancel, "CNCL") \ 1294700c4d8SDavid Howells EM(rxrpc_rtt_rx_obsolete, "OBSL") \ 1304700c4d8SDavid Howells EM(rxrpc_rtt_rx_lost, "LOST") \ 131b54a134aSDavid Howells EM(rxrpc_rtt_rx_ping_response, "PONG") \ 132b54a134aSDavid Howells E_(rxrpc_rtt_rx_requested_ack, "RACK") 133b54a134aSDavid Howells 134b54a134aSDavid Howells #define rxrpc_timer_traces \ 135b54a134aSDavid Howells EM(rxrpc_timer_begin, "Begin ") \ 136b54a134aSDavid Howells EM(rxrpc_timer_expired, "*EXPR*") \ 137a158bdd3SDavid Howells EM(rxrpc_timer_exp_ack, "ExpAck") \ 138a158bdd3SDavid Howells EM(rxrpc_timer_exp_hard, "ExpHrd") \ 139a158bdd3SDavid Howells EM(rxrpc_timer_exp_idle, "ExpIdl") \ 140415f44e4SDavid Howells EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ 141bd1fdf8cSDavid Howells EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ 142a158bdd3SDavid Howells EM(rxrpc_timer_exp_normal, "ExpNml") \ 143a158bdd3SDavid Howells EM(rxrpc_timer_exp_ping, "ExpPng") \ 144a158bdd3SDavid Howells EM(rxrpc_timer_exp_resend, "ExpRsn") \ 145b54a134aSDavid Howells EM(rxrpc_timer_init_for_reply, "IniRpl") \ 146b54a134aSDavid Howells EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ 147a158bdd3SDavid Howells EM(rxrpc_timer_restart, "Restrt") \ 148b54a134aSDavid Howells EM(rxrpc_timer_set_for_ack, "SetAck") \ 149a158bdd3SDavid Howells EM(rxrpc_timer_set_for_hard, "SetHrd") \ 150a158bdd3SDavid Howells EM(rxrpc_timer_set_for_idle, "SetIdl") \ 151415f44e4SDavid Howells EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ 152bd1fdf8cSDavid Howells EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ 153a158bdd3SDavid Howells EM(rxrpc_timer_set_for_normal, "SetNml") \ 154b54a134aSDavid Howells EM(rxrpc_timer_set_for_ping, "SetPng") \ 155b54a134aSDavid Howells EM(rxrpc_timer_set_for_resend, "SetRTx") \ 156a158bdd3SDavid Howells E_(rxrpc_timer_set_for_send, "SetSnd") 157b54a134aSDavid Howells 158b54a134aSDavid Howells #define rxrpc_propose_ack_traces \ 159b54a134aSDavid Howells EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 160b54a134aSDavid Howells EM(rxrpc_propose_ack_input_data, "DataIn ") \ 1617150ceaaSDavid Howells EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \ 162415f44e4SDavid Howells EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ 163b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 164b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 165b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 166b54a134aSDavid Howells EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ 167b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ 168b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ 169b54a134aSDavid Howells EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ 170b54a134aSDavid Howells EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ 171b54a134aSDavid Howells E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 172b54a134aSDavid Howells 173b54a134aSDavid Howells #define rxrpc_propose_ack_outcomes \ 174b54a134aSDavid Howells EM(rxrpc_propose_ack_subsume, " Subsume") \ 175b54a134aSDavid Howells EM(rxrpc_propose_ack_update, " Update") \ 176197445afSDavid Howells E_(rxrpc_propose_ack_use, " New") 177b54a134aSDavid Howells 178b54a134aSDavid Howells #define rxrpc_congest_modes \ 179b54a134aSDavid Howells EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ 180b54a134aSDavid Howells EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ 181b54a134aSDavid Howells EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ 182b54a134aSDavid Howells E_(RXRPC_CALL_SLOW_START, "SlowStart") 183b54a134aSDavid Howells 184b54a134aSDavid Howells #define rxrpc_congest_changes \ 185b54a134aSDavid Howells EM(rxrpc_cong_begin_retransmission, " Retrans") \ 186b54a134aSDavid Howells EM(rxrpc_cong_cleared_nacks, " Cleared") \ 187b54a134aSDavid Howells EM(rxrpc_cong_new_low_nack, " NewLowN") \ 188aadf9dceSDavid Howells EM(rxrpc_cong_no_change, " -") \ 189b54a134aSDavid Howells EM(rxrpc_cong_progress, " Progres") \ 190b54a134aSDavid Howells EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 191b54a134aSDavid Howells EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 192b54a134aSDavid Howells E_(rxrpc_cong_saw_nack, " SawNack") 193b54a134aSDavid Howells 194b54a134aSDavid Howells #define rxrpc_pkts \ 195b54a134aSDavid Howells EM(0, "?00") \ 196b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 197b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 198b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 199b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 200b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 201b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 202b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 203b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 204b54a134aSDavid Howells EM(9, "?09") \ 205b54a134aSDavid Howells EM(10, "?10") \ 206b54a134aSDavid Howells EM(11, "?11") \ 207b54a134aSDavid Howells EM(12, "?12") \ 208b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 209b54a134aSDavid Howells EM(14, "?14") \ 210b54a134aSDavid Howells E_(15, "?15") 211b54a134aSDavid Howells 212b54a134aSDavid Howells #define rxrpc_ack_names \ 213b54a134aSDavid Howells EM(0, "-0-") \ 214b54a134aSDavid Howells EM(RXRPC_ACK_REQUESTED, "REQ") \ 215b54a134aSDavid Howells EM(RXRPC_ACK_DUPLICATE, "DUP") \ 216b54a134aSDavid Howells EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 217b54a134aSDavid Howells EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 218b54a134aSDavid Howells EM(RXRPC_ACK_NOSPACE, "MEM") \ 219b54a134aSDavid Howells EM(RXRPC_ACK_PING, "PNG") \ 220b54a134aSDavid Howells EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 221b54a134aSDavid Howells EM(RXRPC_ACK_DELAY, "DLY") \ 222b54a134aSDavid Howells EM(RXRPC_ACK_IDLE, "IDL") \ 223b54a134aSDavid Howells E_(RXRPC_ACK__INVALID, "-?-") 224b54a134aSDavid Howells 2251bae5d22SDavid Howells #define rxrpc_completions \ 2261bae5d22SDavid Howells EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ 2271bae5d22SDavid Howells EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ 2281bae5d22SDavid Howells EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ 2291bae5d22SDavid Howells EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ 2301bae5d22SDavid Howells E_(RXRPC_CALL_NETWORK_ERROR, "NetError") 2311bae5d22SDavid Howells 2324764c0daSDavid Howells #define rxrpc_tx_points \ 2334764c0daSDavid Howells EM(rxrpc_tx_point_call_abort, "CallAbort") \ 2344764c0daSDavid Howells EM(rxrpc_tx_point_call_ack, "CallAck") \ 2354764c0daSDavid Howells EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ 2364764c0daSDavid Howells EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ 2374764c0daSDavid Howells EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ 2384764c0daSDavid Howells EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ 2394764c0daSDavid Howells EM(rxrpc_tx_point_reject, "Reject") \ 2404764c0daSDavid Howells EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ 2414764c0daSDavid Howells EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \ 2424764c0daSDavid Howells EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ 2434764c0daSDavid Howells E_(rxrpc_tx_point_version_reply, "VerReply") 2446b47fe1dSDavid Howells 245b54a134aSDavid Howells /* 246*dc9fd093SDavid Howells * Generate enums for tracing information. 247*dc9fd093SDavid Howells */ 248*dc9fd093SDavid Howells #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 249*dc9fd093SDavid Howells #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 250*dc9fd093SDavid Howells 251*dc9fd093SDavid Howells #undef EM 252*dc9fd093SDavid Howells #undef E_ 253*dc9fd093SDavid Howells #define EM(a, b) a, 254*dc9fd093SDavid Howells #define E_(a, b) a 255*dc9fd093SDavid Howells 256*dc9fd093SDavid Howells enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte); 257*dc9fd093SDavid Howells enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte); 258*dc9fd093SDavid Howells enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte); 259*dc9fd093SDavid Howells enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte); 260*dc9fd093SDavid Howells enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte); 261*dc9fd093SDavid Howells enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte); 262*dc9fd093SDavid Howells enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte); 263*dc9fd093SDavid Howells enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte); 264*dc9fd093SDavid Howells enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte); 265*dc9fd093SDavid Howells enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte); 266*dc9fd093SDavid Howells enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte); 267*dc9fd093SDavid Howells enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte); 268*dc9fd093SDavid Howells enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte); 269*dc9fd093SDavid Howells enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte); 270*dc9fd093SDavid Howells enum rxrpc_transmit_trace { rxrpc_transmit_traces } __mode(byte); 271*dc9fd093SDavid Howells enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte); 272*dc9fd093SDavid Howells 273*dc9fd093SDavid Howells #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 274*dc9fd093SDavid Howells 275*dc9fd093SDavid Howells /* 276b54a134aSDavid Howells * Export enum symbols via userspace. 277b54a134aSDavid Howells */ 278b54a134aSDavid Howells #undef EM 279b54a134aSDavid Howells #undef E_ 280b54a134aSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a); 281b54a134aSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a); 282b54a134aSDavid Howells 283b54a134aSDavid Howells rxrpc_call_traces; 284*dc9fd093SDavid Howells rxrpc_client_traces; 285*dc9fd093SDavid Howells rxrpc_congest_changes; 286*dc9fd093SDavid Howells rxrpc_congest_modes; 287*dc9fd093SDavid Howells rxrpc_conn_traces; 288*dc9fd093SDavid Howells rxrpc_local_traces; 289*dc9fd093SDavid Howells rxrpc_propose_ack_outcomes; 290*dc9fd093SDavid Howells rxrpc_propose_ack_traces; 291b54a134aSDavid Howells rxrpc_receive_traces; 292b54a134aSDavid Howells rxrpc_recvmsg_traces; 293b54a134aSDavid Howells rxrpc_rtt_rx_traces; 294*dc9fd093SDavid Howells rxrpc_rtt_tx_traces; 295*dc9fd093SDavid Howells rxrpc_skb_traces; 296b54a134aSDavid Howells rxrpc_timer_traces; 297*dc9fd093SDavid Howells rxrpc_transmit_traces; 2984764c0daSDavid Howells rxrpc_tx_points; 299b54a134aSDavid Howells 300b54a134aSDavid Howells /* 301b54a134aSDavid Howells * Now redefine the EM() and E_() macros to map the enums to the strings that 302b54a134aSDavid Howells * will be printed in the output. 303b54a134aSDavid Howells */ 304b54a134aSDavid Howells #undef EM 305b54a134aSDavid Howells #undef E_ 306b54a134aSDavid Howells #define EM(a, b) { a, b }, 307b54a134aSDavid Howells #define E_(a, b) { a, b } 308b54a134aSDavid Howells 30909d2bf59SDavid Howells TRACE_EVENT(rxrpc_local, 31006d9532fSDavid Howells TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op, 31109d2bf59SDavid Howells int usage, const void *where), 31209d2bf59SDavid Howells 31306d9532fSDavid Howells TP_ARGS(local_debug_id, op, usage, where), 31409d2bf59SDavid Howells 31509d2bf59SDavid Howells TP_STRUCT__entry( 31609d2bf59SDavid Howells __field(unsigned int, local ) 31709d2bf59SDavid Howells __field(int, op ) 31809d2bf59SDavid Howells __field(int, usage ) 31909d2bf59SDavid Howells __field(const void *, where ) 32009d2bf59SDavid Howells ), 32109d2bf59SDavid Howells 32209d2bf59SDavid Howells TP_fast_assign( 32306d9532fSDavid Howells __entry->local = local_debug_id; 32409d2bf59SDavid Howells __entry->op = op; 32509d2bf59SDavid Howells __entry->usage = usage; 32609d2bf59SDavid Howells __entry->where = where; 32709d2bf59SDavid Howells ), 32809d2bf59SDavid Howells 32909d2bf59SDavid Howells TP_printk("L=%08x %s u=%d sp=%pSR", 33009d2bf59SDavid Howells __entry->local, 33109d2bf59SDavid Howells __print_symbolic(__entry->op, rxrpc_local_traces), 33209d2bf59SDavid Howells __entry->usage, 33309d2bf59SDavid Howells __entry->where) 33409d2bf59SDavid Howells ); 33509d2bf59SDavid Howells 3361159d4b4SDavid Howells TRACE_EVENT(rxrpc_peer, 33755f6c98eSDavid Howells TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op, 3381159d4b4SDavid Howells int usage, const void *where), 3391159d4b4SDavid Howells 34055f6c98eSDavid Howells TP_ARGS(peer_debug_id, op, usage, where), 3411159d4b4SDavid Howells 3421159d4b4SDavid Howells TP_STRUCT__entry( 3431159d4b4SDavid Howells __field(unsigned int, peer ) 3441159d4b4SDavid Howells __field(int, op ) 3451159d4b4SDavid Howells __field(int, usage ) 3461159d4b4SDavid Howells __field(const void *, where ) 3471159d4b4SDavid Howells ), 3481159d4b4SDavid Howells 3491159d4b4SDavid Howells TP_fast_assign( 35055f6c98eSDavid Howells __entry->peer = peer_debug_id; 3511159d4b4SDavid Howells __entry->op = op; 3521159d4b4SDavid Howells __entry->usage = usage; 3531159d4b4SDavid Howells __entry->where = where; 3541159d4b4SDavid Howells ), 3551159d4b4SDavid Howells 3561159d4b4SDavid Howells TP_printk("P=%08x %s u=%d sp=%pSR", 3571159d4b4SDavid Howells __entry->peer, 3581159d4b4SDavid Howells __print_symbolic(__entry->op, rxrpc_peer_traces), 3591159d4b4SDavid Howells __entry->usage, 3601159d4b4SDavid Howells __entry->where) 3611159d4b4SDavid Howells ); 3621159d4b4SDavid Howells 363363deeabSDavid Howells TRACE_EVENT(rxrpc_conn, 3644c1295dcSDavid Howells TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op, 365363deeabSDavid Howells int usage, const void *where), 366363deeabSDavid Howells 3674c1295dcSDavid Howells TP_ARGS(conn_debug_id, op, usage, where), 368363deeabSDavid Howells 369363deeabSDavid Howells TP_STRUCT__entry( 370a25e21f0SDavid Howells __field(unsigned int, conn ) 371363deeabSDavid Howells __field(int, op ) 372363deeabSDavid Howells __field(int, usage ) 373363deeabSDavid Howells __field(const void *, where ) 374363deeabSDavid Howells ), 375363deeabSDavid Howells 376363deeabSDavid Howells TP_fast_assign( 3774c1295dcSDavid Howells __entry->conn = conn_debug_id; 378363deeabSDavid Howells __entry->op = op; 379363deeabSDavid Howells __entry->usage = usage; 380363deeabSDavid Howells __entry->where = where; 381363deeabSDavid Howells ), 382363deeabSDavid Howells 383a25e21f0SDavid Howells TP_printk("C=%08x %s u=%d sp=%pSR", 384363deeabSDavid Howells __entry->conn, 385b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_conn_traces), 386363deeabSDavid Howells __entry->usage, 387363deeabSDavid Howells __entry->where) 388363deeabSDavid Howells ); 389363deeabSDavid Howells 390363deeabSDavid Howells TRACE_EVENT(rxrpc_client, 391363deeabSDavid Howells TP_PROTO(struct rxrpc_connection *conn, int channel, 392363deeabSDavid Howells enum rxrpc_client_trace op), 393363deeabSDavid Howells 394363deeabSDavid Howells TP_ARGS(conn, channel, op), 395363deeabSDavid Howells 396363deeabSDavid Howells TP_STRUCT__entry( 397a25e21f0SDavid Howells __field(unsigned int, conn ) 398363deeabSDavid Howells __field(u32, cid ) 399363deeabSDavid Howells __field(int, channel ) 400363deeabSDavid Howells __field(int, usage ) 401363deeabSDavid Howells __field(enum rxrpc_client_trace, op ) 402363deeabSDavid Howells ), 403363deeabSDavid Howells 404363deeabSDavid Howells TP_fast_assign( 405245500d8SDavid Howells __entry->conn = conn ? conn->debug_id : 0; 406363deeabSDavid Howells __entry->channel = channel; 407a0575429SDavid Howells __entry->usage = conn ? refcount_read(&conn->ref) : -2; 408363deeabSDavid Howells __entry->op = op; 40996a9c425SDavid Howells __entry->cid = conn ? conn->proto.cid : 0; 410363deeabSDavid Howells ), 411363deeabSDavid Howells 412245500d8SDavid Howells TP_printk("C=%08x h=%2d %s i=%08x u=%d", 413363deeabSDavid Howells __entry->conn, 414363deeabSDavid Howells __entry->channel, 415b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_client_traces), 416363deeabSDavid Howells __entry->cid, 417363deeabSDavid Howells __entry->usage) 418363deeabSDavid Howells ); 419363deeabSDavid Howells 420e34d4234SDavid Howells TRACE_EVENT(rxrpc_call, 42148c9e0ecSDavid Howells TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op, 4222ab27215SDavid Howells int usage, const void *where, const void *aux), 423e34d4234SDavid Howells 42448c9e0ecSDavid Howells TP_ARGS(call_debug_id, op, usage, where, aux), 425e34d4234SDavid Howells 426e34d4234SDavid Howells TP_STRUCT__entry( 427a25e21f0SDavid Howells __field(unsigned int, call ) 428e34d4234SDavid Howells __field(int, op ) 429e34d4234SDavid Howells __field(int, usage ) 430e34d4234SDavid Howells __field(const void *, where ) 431e34d4234SDavid Howells __field(const void *, aux ) 432e34d4234SDavid Howells ), 433e34d4234SDavid Howells 434e34d4234SDavid Howells TP_fast_assign( 43548c9e0ecSDavid Howells __entry->call = call_debug_id; 436e34d4234SDavid Howells __entry->op = op; 437e34d4234SDavid Howells __entry->usage = usage; 438e34d4234SDavid Howells __entry->where = where; 439e34d4234SDavid Howells __entry->aux = aux; 440e34d4234SDavid Howells ), 441e34d4234SDavid Howells 442a25e21f0SDavid Howells TP_printk("c=%08x %s u=%d sp=%pSR a=%p", 443e34d4234SDavid Howells __entry->call, 444b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_call_traces), 445e34d4234SDavid Howells __entry->usage, 446e34d4234SDavid Howells __entry->where, 447e34d4234SDavid Howells __entry->aux) 448e34d4234SDavid Howells ); 449e34d4234SDavid Howells 450df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb, 45171f3ca40SDavid Howells TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, 452d0d5c0cdSDavid Howells int usage, int mod_count, u8 flags, const void *where), 453df844fd4SDavid Howells 454d0d5c0cdSDavid Howells TP_ARGS(skb, op, usage, mod_count, flags, where), 455df844fd4SDavid Howells 456df844fd4SDavid Howells TP_STRUCT__entry( 457df844fd4SDavid Howells __field(struct sk_buff *, skb ) 45871f3ca40SDavid Howells __field(enum rxrpc_skb_trace, op ) 459987db9f7SDavid Howells __field(u8, flags ) 460df844fd4SDavid Howells __field(int, usage ) 461df844fd4SDavid Howells __field(int, mod_count ) 462df844fd4SDavid Howells __field(const void *, where ) 463df844fd4SDavid Howells ), 464df844fd4SDavid Howells 465df844fd4SDavid Howells TP_fast_assign( 466df844fd4SDavid Howells __entry->skb = skb; 467d0d5c0cdSDavid Howells __entry->flags = flags; 468df844fd4SDavid Howells __entry->op = op; 469df844fd4SDavid Howells __entry->usage = usage; 470df844fd4SDavid Howells __entry->mod_count = mod_count; 471df844fd4SDavid Howells __entry->where = where; 472df844fd4SDavid Howells ), 473df844fd4SDavid Howells 474987db9f7SDavid Howells TP_printk("s=%p %cx %s u=%d m=%d p=%pSR", 475df844fd4SDavid Howells __entry->skb, 476987db9f7SDavid Howells __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R', 477b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_skb_traces), 478df844fd4SDavid Howells __entry->usage, 479df844fd4SDavid Howells __entry->mod_count, 480df844fd4SDavid Howells __entry->where) 481df844fd4SDavid Howells ); 482df844fd4SDavid Howells 48349e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet, 48449e19ec7SDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 48549e19ec7SDavid Howells 48649e19ec7SDavid Howells TP_ARGS(sp), 48749e19ec7SDavid Howells 48849e19ec7SDavid Howells TP_STRUCT__entry( 48949e19ec7SDavid Howells __field_struct(struct rxrpc_host_header, hdr ) 49049e19ec7SDavid Howells ), 49149e19ec7SDavid Howells 49249e19ec7SDavid Howells TP_fast_assign( 49349e19ec7SDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 49449e19ec7SDavid Howells ), 49549e19ec7SDavid Howells 496a3868bfcSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 49749e19ec7SDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 49849e19ec7SDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 49949e19ec7SDavid Howells __entry->hdr.serial, __entry->hdr.seq, 500a3868bfcSDavid Howells __entry->hdr.type, __entry->hdr.flags, 501b54a134aSDavid Howells __entry->hdr.type <= 15 ? 502b54a134aSDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 50349e19ec7SDavid Howells ); 50449e19ec7SDavid Howells 50549e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done, 50649e19ec7SDavid Howells TP_PROTO(int result, int abort_code), 50749e19ec7SDavid Howells 50849e19ec7SDavid Howells TP_ARGS(result, abort_code), 50949e19ec7SDavid Howells 51049e19ec7SDavid Howells TP_STRUCT__entry( 51149e19ec7SDavid Howells __field(int, result ) 51249e19ec7SDavid Howells __field(int, abort_code ) 51349e19ec7SDavid Howells ), 51449e19ec7SDavid Howells 51549e19ec7SDavid Howells TP_fast_assign( 51649e19ec7SDavid Howells __entry->result = result; 51749e19ec7SDavid Howells __entry->abort_code = abort_code; 51849e19ec7SDavid Howells ), 51949e19ec7SDavid Howells 52049e19ec7SDavid Howells TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 52149e19ec7SDavid Howells ); 52249e19ec7SDavid Howells 5235a42976dSDavid Howells TRACE_EVENT(rxrpc_abort, 524a25e21f0SDavid Howells TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id, 525a25e21f0SDavid Howells rxrpc_seq_t seq, int abort_code, int error), 5265a42976dSDavid Howells 527a25e21f0SDavid Howells TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), 5285a42976dSDavid Howells 5295a42976dSDavid Howells TP_STRUCT__entry( 530a25e21f0SDavid Howells __field(unsigned int, call_nr ) 5315a42976dSDavid Howells __array(char, why, 4 ) 5325a42976dSDavid Howells __field(u32, cid ) 5335a42976dSDavid Howells __field(u32, call_id ) 5345a42976dSDavid Howells __field(rxrpc_seq_t, seq ) 5355a42976dSDavid Howells __field(int, abort_code ) 5365a42976dSDavid Howells __field(int, error ) 5375a42976dSDavid Howells ), 5385a42976dSDavid Howells 5395a42976dSDavid Howells TP_fast_assign( 5405a42976dSDavid Howells memcpy(__entry->why, why, 4); 541a25e21f0SDavid Howells __entry->call_nr = call_nr; 5425a42976dSDavid Howells __entry->cid = cid; 5435a42976dSDavid Howells __entry->call_id = call_id; 5445a42976dSDavid Howells __entry->abort_code = abort_code; 5455a42976dSDavid Howells __entry->error = error; 5465a42976dSDavid Howells __entry->seq = seq; 5475a42976dSDavid Howells ), 5485a42976dSDavid Howells 549a25e21f0SDavid Howells TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", 550a25e21f0SDavid Howells __entry->call_nr, 5515a42976dSDavid Howells __entry->cid, __entry->call_id, __entry->seq, 5525a42976dSDavid Howells __entry->abort_code, __entry->error, __entry->why) 5535a42976dSDavid Howells ); 5545a42976dSDavid Howells 5551bae5d22SDavid Howells TRACE_EVENT(rxrpc_call_complete, 5561bae5d22SDavid Howells TP_PROTO(struct rxrpc_call *call), 5571bae5d22SDavid Howells 5581bae5d22SDavid Howells TP_ARGS(call), 5591bae5d22SDavid Howells 5601bae5d22SDavid Howells TP_STRUCT__entry( 5611bae5d22SDavid Howells __field(unsigned int, call ) 5621bae5d22SDavid Howells __field(enum rxrpc_call_completion, compl ) 5631bae5d22SDavid Howells __field(int, error ) 5641bae5d22SDavid Howells __field(u32, abort_code ) 5651bae5d22SDavid Howells ), 5661bae5d22SDavid Howells 5671bae5d22SDavid Howells TP_fast_assign( 5681bae5d22SDavid Howells __entry->call = call->debug_id; 5691bae5d22SDavid Howells __entry->compl = call->completion; 5701bae5d22SDavid Howells __entry->error = call->error; 5711bae5d22SDavid Howells __entry->abort_code = call->abort_code; 5721bae5d22SDavid Howells ), 5731bae5d22SDavid Howells 5741bae5d22SDavid Howells TP_printk("c=%08x %s r=%d ac=%d", 5751bae5d22SDavid Howells __entry->call, 5761bae5d22SDavid Howells __print_symbolic(__entry->compl, rxrpc_completions), 5771bae5d22SDavid Howells __entry->error, 5781bae5d22SDavid Howells __entry->abort_code) 5791bae5d22SDavid Howells ); 5801bae5d22SDavid Howells 581a124fe3eSDavid Howells TRACE_EVENT(rxrpc_transmit, 582a124fe3eSDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), 583a124fe3eSDavid Howells 584a124fe3eSDavid Howells TP_ARGS(call, why), 585a124fe3eSDavid Howells 586a124fe3eSDavid Howells TP_STRUCT__entry( 587a25e21f0SDavid Howells __field(unsigned int, call ) 588a124fe3eSDavid Howells __field(enum rxrpc_transmit_trace, why ) 589a124fe3eSDavid Howells __field(rxrpc_seq_t, tx_hard_ack ) 590a124fe3eSDavid Howells __field(rxrpc_seq_t, tx_top ) 591b1d9f7fdSDavid Howells __field(int, tx_winsize ) 592a124fe3eSDavid Howells ), 593a124fe3eSDavid Howells 594a124fe3eSDavid Howells TP_fast_assign( 595a25e21f0SDavid Howells __entry->call = call->debug_id; 596a124fe3eSDavid Howells __entry->why = why; 597a124fe3eSDavid Howells __entry->tx_hard_ack = call->tx_hard_ack; 598a124fe3eSDavid Howells __entry->tx_top = call->tx_top; 599b1d9f7fdSDavid Howells __entry->tx_winsize = call->tx_winsize; 600a124fe3eSDavid Howells ), 601a124fe3eSDavid Howells 602a25e21f0SDavid Howells TP_printk("c=%08x %s f=%08x n=%u/%u", 603a124fe3eSDavid Howells __entry->call, 604b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_transmit_traces), 605a124fe3eSDavid Howells __entry->tx_hard_ack + 1, 606b1d9f7fdSDavid Howells __entry->tx_top - __entry->tx_hard_ack, 607b1d9f7fdSDavid Howells __entry->tx_winsize) 608a124fe3eSDavid Howells ); 609a124fe3eSDavid Howells 610b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_data, 6114764c0daSDavid Howells TP_PROTO(unsigned int call, rxrpc_seq_t seq, 612b1d9f7fdSDavid Howells rxrpc_serial_t serial, u8 flags, u8 anno), 613ec71eb9aSDavid Howells 614b1d9f7fdSDavid Howells TP_ARGS(call, seq, serial, flags, anno), 615ec71eb9aSDavid Howells 616ec71eb9aSDavid Howells TP_STRUCT__entry( 617a25e21f0SDavid Howells __field(unsigned int, call ) 618b1d9f7fdSDavid Howells __field(rxrpc_seq_t, seq ) 619b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial ) 620b1d9f7fdSDavid Howells __field(u8, flags ) 621b1d9f7fdSDavid Howells __field(u8, anno ) 622b1d9f7fdSDavid Howells ), 623b1d9f7fdSDavid Howells 624b1d9f7fdSDavid Howells TP_fast_assign( 6254764c0daSDavid Howells __entry->call = call; 626b1d9f7fdSDavid Howells __entry->seq = seq; 627b1d9f7fdSDavid Howells __entry->serial = serial; 628b1d9f7fdSDavid Howells __entry->flags = flags; 629b1d9f7fdSDavid Howells __entry->anno = anno; 630b1d9f7fdSDavid Howells ), 631b1d9f7fdSDavid Howells 632a25e21f0SDavid Howells TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x", 633b1d9f7fdSDavid Howells __entry->call, 634b1d9f7fdSDavid Howells __entry->serial, 635b1d9f7fdSDavid Howells __entry->seq, 636b1d9f7fdSDavid Howells __entry->flags, 637b1d9f7fdSDavid Howells __entry->anno) 638b1d9f7fdSDavid Howells ); 639b1d9f7fdSDavid Howells 640b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_ack, 641b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call, 642b1d9f7fdSDavid Howells rxrpc_serial_t serial, rxrpc_serial_t ack_serial, 643b1d9f7fdSDavid Howells rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), 644b1d9f7fdSDavid Howells 645b1d9f7fdSDavid Howells TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), 646b1d9f7fdSDavid Howells 647b1d9f7fdSDavid Howells TP_STRUCT__entry( 648a25e21f0SDavid Howells __field(unsigned int, call ) 649b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial ) 650b1d9f7fdSDavid Howells __field(rxrpc_serial_t, ack_serial ) 651ec71eb9aSDavid Howells __field(rxrpc_seq_t, first ) 652b1d9f7fdSDavid Howells __field(rxrpc_seq_t, prev ) 653ec71eb9aSDavid Howells __field(u8, reason ) 654ec71eb9aSDavid Howells __field(u8, n_acks ) 655ec71eb9aSDavid Howells ), 656ec71eb9aSDavid Howells 657ec71eb9aSDavid Howells TP_fast_assign( 658a25e21f0SDavid Howells __entry->call = call->debug_id; 659b1d9f7fdSDavid Howells __entry->serial = serial; 660b1d9f7fdSDavid Howells __entry->ack_serial = ack_serial; 661ec71eb9aSDavid Howells __entry->first = first; 662b1d9f7fdSDavid Howells __entry->prev = prev; 663ec71eb9aSDavid Howells __entry->reason = reason; 664ec71eb9aSDavid Howells __entry->n_acks = n_acks; 665ec71eb9aSDavid Howells ), 666ec71eb9aSDavid Howells 667a25e21f0SDavid Howells TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", 668ec71eb9aSDavid Howells __entry->call, 669b1d9f7fdSDavid Howells __entry->serial, 670b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 671b1d9f7fdSDavid Howells __entry->ack_serial, 672ec71eb9aSDavid Howells __entry->first, 673b1d9f7fdSDavid Howells __entry->prev, 674ec71eb9aSDavid Howells __entry->n_acks) 675ec71eb9aSDavid Howells ); 676ec71eb9aSDavid Howells 677005ede28SDavid Howells TRACE_EVENT(rxrpc_rx_abort, 678005ede28SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 679005ede28SDavid Howells u32 abort_code), 680005ede28SDavid Howells 681005ede28SDavid Howells TP_ARGS(call, serial, abort_code), 682005ede28SDavid Howells 683005ede28SDavid Howells TP_STRUCT__entry( 684a25e21f0SDavid Howells __field(unsigned int, call ) 685005ede28SDavid Howells __field(rxrpc_serial_t, serial ) 686005ede28SDavid Howells __field(u32, abort_code ) 687005ede28SDavid Howells ), 688005ede28SDavid Howells 689005ede28SDavid Howells TP_fast_assign( 690a25e21f0SDavid Howells __entry->call = call->debug_id; 691005ede28SDavid Howells __entry->serial = serial; 692005ede28SDavid Howells __entry->abort_code = abort_code; 693005ede28SDavid Howells ), 694005ede28SDavid Howells 695a25e21f0SDavid Howells TP_printk("c=%08x ABORT %08x ac=%d", 696005ede28SDavid Howells __entry->call, 697005ede28SDavid Howells __entry->serial, 698005ede28SDavid Howells __entry->abort_code) 699005ede28SDavid Howells ); 700005ede28SDavid Howells 701740586d2SDavid Howells TRACE_EVENT(rxrpc_rx_rwind_change, 702740586d2SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 703740586d2SDavid Howells u32 rwind, bool wake), 704740586d2SDavid Howells 705740586d2SDavid Howells TP_ARGS(call, serial, rwind, wake), 706740586d2SDavid Howells 707740586d2SDavid Howells TP_STRUCT__entry( 708a25e21f0SDavid Howells __field(unsigned int, call ) 709740586d2SDavid Howells __field(rxrpc_serial_t, serial ) 710740586d2SDavid Howells __field(u32, rwind ) 711740586d2SDavid Howells __field(bool, wake ) 712740586d2SDavid Howells ), 713740586d2SDavid Howells 714740586d2SDavid Howells TP_fast_assign( 715a25e21f0SDavid Howells __entry->call = call->debug_id; 716740586d2SDavid Howells __entry->serial = serial; 717740586d2SDavid Howells __entry->rwind = rwind; 718740586d2SDavid Howells __entry->wake = wake; 719740586d2SDavid Howells ), 720740586d2SDavid Howells 721a25e21f0SDavid Howells TP_printk("c=%08x %08x rw=%u%s", 722740586d2SDavid Howells __entry->call, 723740586d2SDavid Howells __entry->serial, 724740586d2SDavid Howells __entry->rwind, 725740586d2SDavid Howells __entry->wake ? " wake" : "") 726740586d2SDavid Howells ); 727740586d2SDavid Howells 7284764c0daSDavid Howells TRACE_EVENT(rxrpc_tx_packet, 7294764c0daSDavid Howells TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, 7304764c0daSDavid Howells enum rxrpc_tx_point where), 7314764c0daSDavid Howells 7324764c0daSDavid Howells TP_ARGS(call_id, whdr, where), 7334764c0daSDavid Howells 7344764c0daSDavid Howells TP_STRUCT__entry( 7354764c0daSDavid Howells __field(unsigned int, call ) 7364764c0daSDavid Howells __field(enum rxrpc_tx_point, where ) 7374764c0daSDavid Howells __field_struct(struct rxrpc_wire_header, whdr ) 7384764c0daSDavid Howells ), 7394764c0daSDavid Howells 7404764c0daSDavid Howells TP_fast_assign( 7414764c0daSDavid Howells __entry->call = call_id; 7424764c0daSDavid Howells memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); 7434e2abd3cSDavid Howells __entry->where = where; 7444764c0daSDavid Howells ), 7454764c0daSDavid Howells 7464764c0daSDavid Howells TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", 7474764c0daSDavid Howells __entry->call, 7484764c0daSDavid Howells ntohl(__entry->whdr.epoch), 7494764c0daSDavid Howells ntohl(__entry->whdr.cid), 7504764c0daSDavid Howells ntohl(__entry->whdr.callNumber), 7514764c0daSDavid Howells ntohs(__entry->whdr.serviceId), 7524764c0daSDavid Howells ntohl(__entry->whdr.serial), 7534764c0daSDavid Howells ntohl(__entry->whdr.seq), 7544764c0daSDavid Howells __entry->whdr.type, __entry->whdr.flags, 7554764c0daSDavid Howells __entry->whdr.type <= 15 ? 7564764c0daSDavid Howells __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", 7574764c0daSDavid Howells __print_symbolic(__entry->where, rxrpc_tx_points)) 7584764c0daSDavid Howells ); 7594764c0daSDavid Howells 760be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_data, 761be832aecSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 762a1767077SDavid Howells rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), 763f3639df2SDavid Howells 764a1767077SDavid Howells TP_ARGS(call, seq, serial, flags, retrans, lose), 765f3639df2SDavid Howells 766f3639df2SDavid Howells TP_STRUCT__entry( 767a25e21f0SDavid Howells __field(unsigned int, call ) 768be832aecSDavid Howells __field(rxrpc_seq_t, seq ) 769f3639df2SDavid Howells __field(rxrpc_serial_t, serial ) 7704764c0daSDavid Howells __field(u32, cid ) 7714764c0daSDavid Howells __field(u32, call_id ) 772be832aecSDavid Howells __field(u8, flags ) 773a1767077SDavid Howells __field(bool, retrans ) 774be832aecSDavid Howells __field(bool, lose ) 775be832aecSDavid Howells ), 776be832aecSDavid Howells 777be832aecSDavid Howells TP_fast_assign( 778a25e21f0SDavid Howells __entry->call = call->debug_id; 7794764c0daSDavid Howells __entry->cid = call->cid; 7804764c0daSDavid Howells __entry->call_id = call->call_id; 781be832aecSDavid Howells __entry->seq = seq; 782be832aecSDavid Howells __entry->serial = serial; 783be832aecSDavid Howells __entry->flags = flags; 784a1767077SDavid Howells __entry->retrans = retrans; 785be832aecSDavid Howells __entry->lose = lose; 786be832aecSDavid Howells ), 787be832aecSDavid Howells 7884764c0daSDavid Howells TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s", 789be832aecSDavid Howells __entry->call, 7904764c0daSDavid Howells __entry->cid, 7914764c0daSDavid Howells __entry->call_id, 792be832aecSDavid Howells __entry->serial, 793be832aecSDavid Howells __entry->seq, 794be832aecSDavid Howells __entry->flags, 795265a44bbSDavid Howells __entry->retrans ? " *RETRANS*" : "", 796be832aecSDavid Howells __entry->lose ? " *LOSE*" : "") 797be832aecSDavid Howells ); 798be832aecSDavid Howells 799be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_ack, 8004764c0daSDavid Howells TP_PROTO(unsigned int call, rxrpc_serial_t serial, 801be832aecSDavid Howells rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 802be832aecSDavid Howells u8 reason, u8 n_acks), 803be832aecSDavid Howells 804be832aecSDavid Howells TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), 805be832aecSDavid Howells 806be832aecSDavid Howells TP_STRUCT__entry( 807a25e21f0SDavid Howells __field(unsigned int, call ) 808be832aecSDavid Howells __field(rxrpc_serial_t, serial ) 809be832aecSDavid Howells __field(rxrpc_seq_t, ack_first ) 810be832aecSDavid Howells __field(rxrpc_serial_t, ack_serial ) 811f3639df2SDavid Howells __field(u8, reason ) 812f3639df2SDavid Howells __field(u8, n_acks ) 813f3639df2SDavid Howells ), 814f3639df2SDavid Howells 815f3639df2SDavid Howells TP_fast_assign( 8164764c0daSDavid Howells __entry->call = call; 817f3639df2SDavid Howells __entry->serial = serial; 818be832aecSDavid Howells __entry->ack_first = ack_first; 819be832aecSDavid Howells __entry->ack_serial = ack_serial; 820f3639df2SDavid Howells __entry->reason = reason; 821f3639df2SDavid Howells __entry->n_acks = n_acks; 822f3639df2SDavid Howells ), 823f3639df2SDavid Howells 824a25e21f0SDavid Howells TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u", 825f3639df2SDavid Howells __entry->call, 826f3639df2SDavid Howells __entry->serial, 827b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 828be832aecSDavid Howells __entry->ack_first, 829be832aecSDavid Howells __entry->ack_serial, 830f3639df2SDavid Howells __entry->n_acks) 831f3639df2SDavid Howells ); 832f3639df2SDavid Howells 83358dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive, 83458dc63c9SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 83558dc63c9SDavid Howells rxrpc_serial_t serial, rxrpc_seq_t seq), 83658dc63c9SDavid Howells 83758dc63c9SDavid Howells TP_ARGS(call, why, serial, seq), 83858dc63c9SDavid Howells 83958dc63c9SDavid Howells TP_STRUCT__entry( 840a25e21f0SDavid Howells __field(unsigned int, call ) 84158dc63c9SDavid Howells __field(enum rxrpc_receive_trace, why ) 84258dc63c9SDavid Howells __field(rxrpc_serial_t, serial ) 84358dc63c9SDavid Howells __field(rxrpc_seq_t, seq ) 84458dc63c9SDavid Howells __field(rxrpc_seq_t, hard_ack ) 84558dc63c9SDavid Howells __field(rxrpc_seq_t, top ) 84658dc63c9SDavid Howells ), 84758dc63c9SDavid Howells 84858dc63c9SDavid Howells TP_fast_assign( 849a25e21f0SDavid Howells __entry->call = call->debug_id; 85058dc63c9SDavid Howells __entry->why = why; 85158dc63c9SDavid Howells __entry->serial = serial; 85258dc63c9SDavid Howells __entry->seq = seq; 85358dc63c9SDavid Howells __entry->hard_ack = call->rx_hard_ack; 85458dc63c9SDavid Howells __entry->top = call->rx_top; 85558dc63c9SDavid Howells ), 85658dc63c9SDavid Howells 857a25e21f0SDavid Howells TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", 85858dc63c9SDavid Howells __entry->call, 859b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_receive_traces), 86058dc63c9SDavid Howells __entry->serial, 86158dc63c9SDavid Howells __entry->seq, 86258dc63c9SDavid Howells __entry->hard_ack, 86358dc63c9SDavid Howells __entry->top) 86458dc63c9SDavid Howells ); 86558dc63c9SDavid Howells 86684997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg, 86784997905SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 86884997905SDavid Howells rxrpc_seq_t seq, unsigned int offset, unsigned int len, 86984997905SDavid Howells int ret), 87084997905SDavid Howells 87184997905SDavid Howells TP_ARGS(call, why, seq, offset, len, ret), 87284997905SDavid Howells 87384997905SDavid Howells TP_STRUCT__entry( 874a25e21f0SDavid Howells __field(unsigned int, call ) 87584997905SDavid Howells __field(enum rxrpc_recvmsg_trace, why ) 87684997905SDavid Howells __field(rxrpc_seq_t, seq ) 87784997905SDavid Howells __field(unsigned int, offset ) 87884997905SDavid Howells __field(unsigned int, len ) 87984997905SDavid Howells __field(int, ret ) 88084997905SDavid Howells ), 88184997905SDavid Howells 88284997905SDavid Howells TP_fast_assign( 883db9b2e0aSDavid Howells __entry->call = call ? call->debug_id : 0; 88484997905SDavid Howells __entry->why = why; 88584997905SDavid Howells __entry->seq = seq; 88684997905SDavid Howells __entry->offset = offset; 88784997905SDavid Howells __entry->len = len; 88884997905SDavid Howells __entry->ret = ret; 88984997905SDavid Howells ), 89084997905SDavid Howells 891a25e21f0SDavid Howells TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", 89284997905SDavid Howells __entry->call, 893b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 89484997905SDavid Howells __entry->seq, 89584997905SDavid Howells __entry->offset, 89684997905SDavid Howells __entry->len, 89784997905SDavid Howells __entry->ret) 89884997905SDavid Howells ); 89984997905SDavid Howells 900cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx, 901cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 9024700c4d8SDavid Howells int slot, rxrpc_serial_t send_serial), 903cf1a6474SDavid Howells 9044700c4d8SDavid Howells TP_ARGS(call, why, slot, send_serial), 905cf1a6474SDavid Howells 906cf1a6474SDavid Howells TP_STRUCT__entry( 907a25e21f0SDavid Howells __field(unsigned int, call ) 908cf1a6474SDavid Howells __field(enum rxrpc_rtt_tx_trace, why ) 9094700c4d8SDavid Howells __field(int, slot ) 910cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial ) 911cf1a6474SDavid Howells ), 912cf1a6474SDavid Howells 913cf1a6474SDavid Howells TP_fast_assign( 914a25e21f0SDavid Howells __entry->call = call->debug_id; 915cf1a6474SDavid Howells __entry->why = why; 9164700c4d8SDavid Howells __entry->slot = slot; 917cf1a6474SDavid Howells __entry->send_serial = send_serial; 918cf1a6474SDavid Howells ), 919cf1a6474SDavid Howells 9204700c4d8SDavid Howells TP_printk("c=%08x [%d] %s sr=%08x", 921cf1a6474SDavid Howells __entry->call, 9224700c4d8SDavid Howells __entry->slot, 923b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 924cf1a6474SDavid Howells __entry->send_serial) 925cf1a6474SDavid Howells ); 926cf1a6474SDavid Howells 927cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx, 928cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 9294700c4d8SDavid Howells int slot, 930cf1a6474SDavid Howells rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 931c410bf01SDavid Howells u32 rtt, u32 rto), 932cf1a6474SDavid Howells 9334700c4d8SDavid Howells TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto), 934cf1a6474SDavid Howells 935cf1a6474SDavid Howells TP_STRUCT__entry( 936a25e21f0SDavid Howells __field(unsigned int, call ) 937cf1a6474SDavid Howells __field(enum rxrpc_rtt_rx_trace, why ) 9384700c4d8SDavid Howells __field(int, slot ) 939cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial ) 940cf1a6474SDavid Howells __field(rxrpc_serial_t, resp_serial ) 941c410bf01SDavid Howells __field(u32, rtt ) 942c410bf01SDavid Howells __field(u32, rto ) 943cf1a6474SDavid Howells ), 944cf1a6474SDavid Howells 945cf1a6474SDavid Howells TP_fast_assign( 946a25e21f0SDavid Howells __entry->call = call->debug_id; 947cf1a6474SDavid Howells __entry->why = why; 9484700c4d8SDavid Howells __entry->slot = slot; 949cf1a6474SDavid Howells __entry->send_serial = send_serial; 950cf1a6474SDavid Howells __entry->resp_serial = resp_serial; 951cf1a6474SDavid Howells __entry->rtt = rtt; 952c410bf01SDavid Howells __entry->rto = rto; 953cf1a6474SDavid Howells ), 954cf1a6474SDavid Howells 9554700c4d8SDavid Howells TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u", 956cf1a6474SDavid Howells __entry->call, 9574700c4d8SDavid Howells __entry->slot, 958b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 959cf1a6474SDavid Howells __entry->send_serial, 960cf1a6474SDavid Howells __entry->resp_serial, 961cf1a6474SDavid Howells __entry->rtt, 962c410bf01SDavid Howells __entry->rto) 963cf1a6474SDavid Howells ); 964cf1a6474SDavid Howells 965fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer, 966fc7ab6d2SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, 967a158bdd3SDavid Howells unsigned long now), 968fc7ab6d2SDavid Howells 969a158bdd3SDavid Howells TP_ARGS(call, why, now), 970fc7ab6d2SDavid Howells 971fc7ab6d2SDavid Howells TP_STRUCT__entry( 972a25e21f0SDavid Howells __field(unsigned int, call ) 973fc7ab6d2SDavid Howells __field(enum rxrpc_timer_trace, why ) 974a158bdd3SDavid Howells __field(long, now ) 975a158bdd3SDavid Howells __field(long, ack_at ) 976bd1fdf8cSDavid Howells __field(long, ack_lost_at ) 977a158bdd3SDavid Howells __field(long, resend_at ) 978a158bdd3SDavid Howells __field(long, ping_at ) 979a158bdd3SDavid Howells __field(long, expect_rx_by ) 980a158bdd3SDavid Howells __field(long, expect_req_by ) 981a158bdd3SDavid Howells __field(long, expect_term_by ) 982a158bdd3SDavid Howells __field(long, timer ) 983fc7ab6d2SDavid Howells ), 984fc7ab6d2SDavid Howells 985fc7ab6d2SDavid Howells TP_fast_assign( 986a25e21f0SDavid Howells __entry->call = call->debug_id; 987fc7ab6d2SDavid Howells __entry->why = why; 988fc7ab6d2SDavid Howells __entry->now = now; 989fc7ab6d2SDavid Howells __entry->ack_at = call->ack_at; 990bd1fdf8cSDavid Howells __entry->ack_lost_at = call->ack_lost_at; 991fc7ab6d2SDavid Howells __entry->resend_at = call->resend_at; 992a158bdd3SDavid Howells __entry->expect_rx_by = call->expect_rx_by; 993a158bdd3SDavid Howells __entry->expect_req_by = call->expect_req_by; 994a158bdd3SDavid Howells __entry->expect_term_by = call->expect_term_by; 995fc7ab6d2SDavid Howells __entry->timer = call->timer.expires; 996fc7ab6d2SDavid Howells ), 997fc7ab6d2SDavid Howells 998a25e21f0SDavid Howells TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 999fc7ab6d2SDavid Howells __entry->call, 1000b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_timer_traces), 1001a158bdd3SDavid Howells __entry->ack_at - __entry->now, 1002bd1fdf8cSDavid Howells __entry->ack_lost_at - __entry->now, 1003a158bdd3SDavid Howells __entry->resend_at - __entry->now, 1004a158bdd3SDavid Howells __entry->expect_rx_by - __entry->now, 1005a158bdd3SDavid Howells __entry->expect_req_by - __entry->now, 1006a158bdd3SDavid Howells __entry->expect_term_by - __entry->now, 1007a158bdd3SDavid Howells __entry->timer - __entry->now) 1008fc7ab6d2SDavid Howells ); 1009fc7ab6d2SDavid Howells 101089b475abSDavid Howells TRACE_EVENT(rxrpc_rx_lose, 101189b475abSDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 101289b475abSDavid Howells 101389b475abSDavid Howells TP_ARGS(sp), 101489b475abSDavid Howells 101589b475abSDavid Howells TP_STRUCT__entry( 101689b475abSDavid Howells __field_struct(struct rxrpc_host_header, hdr ) 101789b475abSDavid Howells ), 101889b475abSDavid Howells 101989b475abSDavid Howells TP_fast_assign( 102089b475abSDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 102189b475abSDavid Howells ), 102289b475abSDavid Howells 102389b475abSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 102489b475abSDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 102589b475abSDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 102689b475abSDavid Howells __entry->hdr.serial, __entry->hdr.seq, 102789b475abSDavid Howells __entry->hdr.type, __entry->hdr.flags, 1028b54a134aSDavid Howells __entry->hdr.type <= 15 ? 1029b54a134aSDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 103089b475abSDavid Howells ); 103189b475abSDavid Howells 10329c7ad434SDavid Howells TRACE_EVENT(rxrpc_propose_ack, 10339c7ad434SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 10349c7ad434SDavid Howells u8 ack_reason, rxrpc_serial_t serial, bool immediate, 10359c7ad434SDavid Howells bool background, enum rxrpc_propose_ack_outcome outcome), 10369c7ad434SDavid Howells 10379c7ad434SDavid Howells TP_ARGS(call, why, ack_reason, serial, immediate, background, 10389c7ad434SDavid Howells outcome), 10399c7ad434SDavid Howells 10409c7ad434SDavid Howells TP_STRUCT__entry( 1041a25e21f0SDavid Howells __field(unsigned int, call ) 10429c7ad434SDavid Howells __field(enum rxrpc_propose_ack_trace, why ) 10439c7ad434SDavid Howells __field(rxrpc_serial_t, serial ) 10449c7ad434SDavid Howells __field(u8, ack_reason ) 10459c7ad434SDavid Howells __field(bool, immediate ) 10469c7ad434SDavid Howells __field(bool, background ) 10479c7ad434SDavid Howells __field(enum rxrpc_propose_ack_outcome, outcome ) 10489c7ad434SDavid Howells ), 10499c7ad434SDavid Howells 10509c7ad434SDavid Howells TP_fast_assign( 1051a25e21f0SDavid Howells __entry->call = call->debug_id; 10529c7ad434SDavid Howells __entry->why = why; 10539c7ad434SDavid Howells __entry->serial = serial; 10549c7ad434SDavid Howells __entry->ack_reason = ack_reason; 10559c7ad434SDavid Howells __entry->immediate = immediate; 10569c7ad434SDavid Howells __entry->background = background; 10579c7ad434SDavid Howells __entry->outcome = outcome; 10589c7ad434SDavid Howells ), 10599c7ad434SDavid Howells 1060a25e21f0SDavid Howells TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s", 10619c7ad434SDavid Howells __entry->call, 1062b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1063b54a134aSDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 10649c7ad434SDavid Howells __entry->serial, 10659c7ad434SDavid Howells __entry->immediate, 10669c7ad434SDavid Howells __entry->background, 1067b54a134aSDavid Howells __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) 10689c7ad434SDavid Howells ); 10699c7ad434SDavid Howells 1070c6672e3fSDavid Howells TRACE_EVENT(rxrpc_retransmit, 1071c6672e3fSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation, 1072c6672e3fSDavid Howells s64 expiry), 1073c6672e3fSDavid Howells 1074c6672e3fSDavid Howells TP_ARGS(call, seq, annotation, expiry), 1075c6672e3fSDavid Howells 1076c6672e3fSDavid Howells TP_STRUCT__entry( 1077a25e21f0SDavid Howells __field(unsigned int, call ) 1078c6672e3fSDavid Howells __field(rxrpc_seq_t, seq ) 1079c6672e3fSDavid Howells __field(u8, annotation ) 1080c6672e3fSDavid Howells __field(s64, expiry ) 1081c6672e3fSDavid Howells ), 1082c6672e3fSDavid Howells 1083c6672e3fSDavid Howells TP_fast_assign( 1084a25e21f0SDavid Howells __entry->call = call->debug_id; 1085c6672e3fSDavid Howells __entry->seq = seq; 1086c6672e3fSDavid Howells __entry->annotation = annotation; 1087c6672e3fSDavid Howells __entry->expiry = expiry; 1088c6672e3fSDavid Howells ), 1089c6672e3fSDavid Howells 1090a25e21f0SDavid Howells TP_printk("c=%08x q=%x a=%02x xp=%lld", 1091c6672e3fSDavid Howells __entry->call, 1092c6672e3fSDavid Howells __entry->seq, 1093c6672e3fSDavid Howells __entry->annotation, 1094c6672e3fSDavid Howells __entry->expiry) 1095c6672e3fSDavid Howells ); 1096c6672e3fSDavid Howells 109757494343SDavid Howells TRACE_EVENT(rxrpc_congest, 109857494343SDavid Howells TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 109957494343SDavid Howells rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), 110057494343SDavid Howells 110157494343SDavid Howells TP_ARGS(call, summary, ack_serial, change), 110257494343SDavid Howells 110357494343SDavid Howells TP_STRUCT__entry( 1104a25e21f0SDavid Howells __field(unsigned int, call ) 110557494343SDavid Howells __field(enum rxrpc_congest_change, change ) 110657494343SDavid Howells __field(rxrpc_seq_t, hard_ack ) 110757494343SDavid Howells __field(rxrpc_seq_t, top ) 110857494343SDavid Howells __field(rxrpc_seq_t, lowest_nak ) 110957494343SDavid Howells __field(rxrpc_serial_t, ack_serial ) 111057494343SDavid Howells __field_struct(struct rxrpc_ack_summary, sum ) 111157494343SDavid Howells ), 111257494343SDavid Howells 111357494343SDavid Howells TP_fast_assign( 1114a25e21f0SDavid Howells __entry->call = call->debug_id; 111557494343SDavid Howells __entry->change = change; 111657494343SDavid Howells __entry->hard_ack = call->tx_hard_ack; 111757494343SDavid Howells __entry->top = call->tx_top; 111857494343SDavid Howells __entry->lowest_nak = call->acks_lowest_nak; 111957494343SDavid Howells __entry->ack_serial = ack_serial; 112057494343SDavid Howells memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 112157494343SDavid Howells ), 112257494343SDavid Howells 1123a25e21f0SDavid Howells TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s", 112457494343SDavid Howells __entry->call, 112557494343SDavid Howells __entry->ack_serial, 1126b54a134aSDavid Howells __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 112757494343SDavid Howells __entry->hard_ack, 1128b54a134aSDavid Howells __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), 112957494343SDavid Howells __entry->sum.cwnd, 113057494343SDavid Howells __entry->sum.ssthresh, 113157494343SDavid Howells __entry->sum.nr_acks, __entry->sum.nr_nacks, 113257494343SDavid Howells __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, 113357494343SDavid Howells __entry->sum.nr_rot_new_acks, 113457494343SDavid Howells __entry->top - __entry->hard_ack, 113557494343SDavid Howells __entry->sum.cumulative_acks, 113657494343SDavid Howells __entry->sum.dup_acks, 113757494343SDavid Howells __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", 1138b54a134aSDavid Howells __print_symbolic(__entry->change, rxrpc_congest_changes), 113957494343SDavid Howells __entry->sum.retrans_timeo ? " rTxTo" : "") 114057494343SDavid Howells ); 114157494343SDavid Howells 1142b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_disconnect_call, 1143b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1144b1d9f7fdSDavid Howells 1145b1d9f7fdSDavid Howells TP_ARGS(call), 1146b1d9f7fdSDavid Howells 1147b1d9f7fdSDavid Howells TP_STRUCT__entry( 1148a25e21f0SDavid Howells __field(unsigned int, call ) 1149b1d9f7fdSDavid Howells __field(u32, abort_code ) 1150b1d9f7fdSDavid Howells ), 1151b1d9f7fdSDavid Howells 1152b1d9f7fdSDavid Howells TP_fast_assign( 1153a25e21f0SDavid Howells __entry->call = call->debug_id; 1154b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1155b1d9f7fdSDavid Howells ), 1156b1d9f7fdSDavid Howells 1157a25e21f0SDavid Howells TP_printk("c=%08x ab=%08x", 1158b1d9f7fdSDavid Howells __entry->call, 1159b1d9f7fdSDavid Howells __entry->abort_code) 1160b1d9f7fdSDavid Howells ); 1161b1d9f7fdSDavid Howells 1162b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_improper_term, 1163b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1164b1d9f7fdSDavid Howells 1165b1d9f7fdSDavid Howells TP_ARGS(call), 1166b1d9f7fdSDavid Howells 1167b1d9f7fdSDavid Howells TP_STRUCT__entry( 1168a25e21f0SDavid Howells __field(unsigned int, call ) 1169b1d9f7fdSDavid Howells __field(u32, abort_code ) 1170b1d9f7fdSDavid Howells ), 1171b1d9f7fdSDavid Howells 1172b1d9f7fdSDavid Howells TP_fast_assign( 1173a25e21f0SDavid Howells __entry->call = call->debug_id; 1174b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1175b1d9f7fdSDavid Howells ), 1176b1d9f7fdSDavid Howells 1177a25e21f0SDavid Howells TP_printk("c=%08x ab=%08x", 1178b1d9f7fdSDavid Howells __entry->call, 1179b1d9f7fdSDavid Howells __entry->abort_code) 1180b1d9f7fdSDavid Howells ); 1181b1d9f7fdSDavid Howells 1182fb46f6eeSDavid Howells TRACE_EVENT(rxrpc_rx_eproto, 1183fb46f6eeSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1184fb46f6eeSDavid Howells const char *why), 1185fb46f6eeSDavid Howells 1186fb46f6eeSDavid Howells TP_ARGS(call, serial, why), 1187fb46f6eeSDavid Howells 1188fb46f6eeSDavid Howells TP_STRUCT__entry( 1189a25e21f0SDavid Howells __field(unsigned int, call ) 1190fb46f6eeSDavid Howells __field(rxrpc_serial_t, serial ) 1191fb46f6eeSDavid Howells __field(const char *, why ) 1192fb46f6eeSDavid Howells ), 1193fb46f6eeSDavid Howells 1194fb46f6eeSDavid Howells TP_fast_assign( 119599f0eae6SDavid Howells __entry->call = call ? call->debug_id : 0; 1196fb46f6eeSDavid Howells __entry->serial = serial; 1197fb46f6eeSDavid Howells __entry->why = why; 1198fb46f6eeSDavid Howells ), 1199fb46f6eeSDavid Howells 1200a25e21f0SDavid Howells TP_printk("c=%08x EPROTO %08x %s", 1201fb46f6eeSDavid Howells __entry->call, 1202fb46f6eeSDavid Howells __entry->serial, 1203fb46f6eeSDavid Howells __entry->why) 1204fb46f6eeSDavid Howells ); 1205fb46f6eeSDavid Howells 120689ca6948SDavid Howells TRACE_EVENT(rxrpc_connect_call, 120789ca6948SDavid Howells TP_PROTO(struct rxrpc_call *call), 120889ca6948SDavid Howells 120989ca6948SDavid Howells TP_ARGS(call), 121089ca6948SDavid Howells 121189ca6948SDavid Howells TP_STRUCT__entry( 1212a25e21f0SDavid Howells __field(unsigned int, call ) 121389ca6948SDavid Howells __field(unsigned long, user_call_ID ) 121489ca6948SDavid Howells __field(u32, cid ) 121589ca6948SDavid Howells __field(u32, call_id ) 121689ca6948SDavid Howells ), 121789ca6948SDavid Howells 121889ca6948SDavid Howells TP_fast_assign( 1219a25e21f0SDavid Howells __entry->call = call->debug_id; 122089ca6948SDavid Howells __entry->user_call_ID = call->user_call_ID; 122189ca6948SDavid Howells __entry->cid = call->cid; 122289ca6948SDavid Howells __entry->call_id = call->call_id; 122389ca6948SDavid Howells ), 122489ca6948SDavid Howells 1225a25e21f0SDavid Howells TP_printk("c=%08x u=%p %08x:%08x", 122689ca6948SDavid Howells __entry->call, 122789ca6948SDavid Howells (void *)__entry->user_call_ID, 122889ca6948SDavid Howells __entry->cid, 122989ca6948SDavid Howells __entry->call_id) 123089ca6948SDavid Howells ); 123189ca6948SDavid Howells 1232827efed6SDavid Howells TRACE_EVENT(rxrpc_resend, 1233827efed6SDavid Howells TP_PROTO(struct rxrpc_call *call, int ix), 1234827efed6SDavid Howells 1235827efed6SDavid Howells TP_ARGS(call, ix), 1236827efed6SDavid Howells 1237827efed6SDavid Howells TP_STRUCT__entry( 1238a25e21f0SDavid Howells __field(unsigned int, call ) 1239827efed6SDavid Howells __field(int, ix ) 1240827efed6SDavid Howells __array(u8, anno, 64 ) 1241827efed6SDavid Howells ), 1242827efed6SDavid Howells 1243827efed6SDavid Howells TP_fast_assign( 1244a25e21f0SDavid Howells __entry->call = call->debug_id; 1245827efed6SDavid Howells __entry->ix = ix; 1246827efed6SDavid Howells memcpy(__entry->anno, call->rxtx_annotations, 64); 1247827efed6SDavid Howells ), 1248827efed6SDavid Howells 1249a25e21f0SDavid Howells TP_printk("c=%08x ix=%u a=%64phN", 1250827efed6SDavid Howells __entry->call, 1251827efed6SDavid Howells __entry->ix, 1252827efed6SDavid Howells __entry->anno) 1253827efed6SDavid Howells ); 1254827efed6SDavid Howells 1255494337c9SDavid Howells TRACE_EVENT(rxrpc_rx_icmp, 1256494337c9SDavid Howells TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, 1257494337c9SDavid Howells struct sockaddr_rxrpc *srx), 1258494337c9SDavid Howells 1259494337c9SDavid Howells TP_ARGS(peer, ee, srx), 1260494337c9SDavid Howells 1261494337c9SDavid Howells TP_STRUCT__entry( 1262494337c9SDavid Howells __field(unsigned int, peer ) 1263494337c9SDavid Howells __field_struct(struct sock_extended_err, ee ) 1264494337c9SDavid Howells __field_struct(struct sockaddr_rxrpc, srx ) 1265494337c9SDavid Howells ), 1266494337c9SDavid Howells 1267494337c9SDavid Howells TP_fast_assign( 1268494337c9SDavid Howells __entry->peer = peer->debug_id; 1269494337c9SDavid Howells memcpy(&__entry->ee, ee, sizeof(__entry->ee)); 1270494337c9SDavid Howells memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 1271494337c9SDavid Howells ), 1272494337c9SDavid Howells 1273494337c9SDavid Howells TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", 1274494337c9SDavid Howells __entry->peer, 1275494337c9SDavid Howells __entry->ee.ee_origin, 1276494337c9SDavid Howells __entry->ee.ee_type, 1277494337c9SDavid Howells __entry->ee.ee_code, 1278494337c9SDavid Howells __entry->ee.ee_info, 1279494337c9SDavid Howells __entry->ee.ee_data, 1280494337c9SDavid Howells __entry->ee.ee_errno, 1281494337c9SDavid Howells &__entry->srx.transport) 1282494337c9SDavid Howells ); 1283494337c9SDavid Howells 12846b47fe1dSDavid Howells TRACE_EVENT(rxrpc_tx_fail, 12856b47fe1dSDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, 12864764c0daSDavid Howells enum rxrpc_tx_point where), 12876b47fe1dSDavid Howells 12884764c0daSDavid Howells TP_ARGS(debug_id, serial, ret, where), 12896b47fe1dSDavid Howells 12906b47fe1dSDavid Howells TP_STRUCT__entry( 12916b47fe1dSDavid Howells __field(unsigned int, debug_id ) 12926b47fe1dSDavid Howells __field(rxrpc_serial_t, serial ) 12936b47fe1dSDavid Howells __field(int, ret ) 12944764c0daSDavid Howells __field(enum rxrpc_tx_point, where ) 12956b47fe1dSDavid Howells ), 12966b47fe1dSDavid Howells 12976b47fe1dSDavid Howells TP_fast_assign( 12986b47fe1dSDavid Howells __entry->debug_id = debug_id; 12996b47fe1dSDavid Howells __entry->serial = serial; 13006b47fe1dSDavid Howells __entry->ret = ret; 13014764c0daSDavid Howells __entry->where = where; 13026b47fe1dSDavid Howells ), 13036b47fe1dSDavid Howells 13046b47fe1dSDavid Howells TP_printk("c=%08x r=%x ret=%d %s", 13056b47fe1dSDavid Howells __entry->debug_id, 13066b47fe1dSDavid Howells __entry->serial, 13076b47fe1dSDavid Howells __entry->ret, 13084764c0daSDavid Howells __print_symbolic(__entry->where, rxrpc_tx_points)) 13096b47fe1dSDavid Howells ); 13106b47fe1dSDavid Howells 13111a025028SDavid Howells TRACE_EVENT(rxrpc_call_reset, 13121a025028SDavid Howells TP_PROTO(struct rxrpc_call *call), 13131a025028SDavid Howells 13141a025028SDavid Howells TP_ARGS(call), 13151a025028SDavid Howells 13161a025028SDavid Howells TP_STRUCT__entry( 13171a025028SDavid Howells __field(unsigned int, debug_id ) 13181a025028SDavid Howells __field(u32, cid ) 13191a025028SDavid Howells __field(u32, call_id ) 13201a025028SDavid Howells __field(rxrpc_serial_t, call_serial ) 13211a025028SDavid Howells __field(rxrpc_serial_t, conn_serial ) 13221a025028SDavid Howells __field(rxrpc_seq_t, tx_seq ) 13231a025028SDavid Howells __field(rxrpc_seq_t, rx_seq ) 13241a025028SDavid Howells ), 13251a025028SDavid Howells 13261a025028SDavid Howells TP_fast_assign( 13271a025028SDavid Howells __entry->debug_id = call->debug_id; 13281a025028SDavid Howells __entry->cid = call->cid; 13291a025028SDavid Howells __entry->call_id = call->call_id; 13301a025028SDavid Howells __entry->call_serial = call->rx_serial; 13311a025028SDavid Howells __entry->conn_serial = call->conn->hi_serial; 13321a025028SDavid Howells __entry->tx_seq = call->tx_hard_ack; 13331a025028SDavid Howells __entry->rx_seq = call->ackr_seen; 13341a025028SDavid Howells ), 13351a025028SDavid Howells 13361a025028SDavid Howells TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", 13371a025028SDavid Howells __entry->debug_id, 13381a025028SDavid Howells __entry->cid, __entry->call_id, 13391a025028SDavid Howells __entry->call_serial, __entry->conn_serial, 13401a025028SDavid Howells __entry->tx_seq, __entry->rx_seq) 13411a025028SDavid Howells ); 13421a025028SDavid Howells 13434272d303SDavid Howells TRACE_EVENT(rxrpc_notify_socket, 13444272d303SDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), 13454272d303SDavid Howells 13464272d303SDavid Howells TP_ARGS(debug_id, serial), 13474272d303SDavid Howells 13484272d303SDavid Howells TP_STRUCT__entry( 13494272d303SDavid Howells __field(unsigned int, debug_id ) 13504272d303SDavid Howells __field(rxrpc_serial_t, serial ) 13514272d303SDavid Howells ), 13524272d303SDavid Howells 13534272d303SDavid Howells TP_fast_assign( 13544272d303SDavid Howells __entry->debug_id = debug_id; 13554272d303SDavid Howells __entry->serial = serial; 13564272d303SDavid Howells ), 13574272d303SDavid Howells 13584272d303SDavid Howells TP_printk("c=%08x r=%08x", 13594272d303SDavid Howells __entry->debug_id, 13604272d303SDavid Howells __entry->serial) 13614272d303SDavid Howells ); 13624272d303SDavid Howells 1363d1f12947SDavid Howells TRACE_EVENT(rxrpc_rx_discard_ack, 1364d1f12947SDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, 1365d1f12947SDavid Howells rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first, 1366d1f12947SDavid Howells rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev), 1367d1f12947SDavid Howells 1368d1f12947SDavid Howells TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first, 1369d1f12947SDavid Howells prev_pkt, call_ackr_prev), 1370d1f12947SDavid Howells 1371d1f12947SDavid Howells TP_STRUCT__entry( 1372d1f12947SDavid Howells __field(unsigned int, debug_id ) 1373d1f12947SDavid Howells __field(rxrpc_serial_t, serial ) 1374d1f12947SDavid Howells __field(rxrpc_seq_t, first_soft_ack) 1375d1f12947SDavid Howells __field(rxrpc_seq_t, call_ackr_first) 1376d1f12947SDavid Howells __field(rxrpc_seq_t, prev_pkt) 1377d1f12947SDavid Howells __field(rxrpc_seq_t, call_ackr_prev) 1378d1f12947SDavid Howells ), 1379d1f12947SDavid Howells 1380d1f12947SDavid Howells TP_fast_assign( 1381d1f12947SDavid Howells __entry->debug_id = debug_id; 1382d1f12947SDavid Howells __entry->serial = serial; 1383d1f12947SDavid Howells __entry->first_soft_ack = first_soft_ack; 1384d1f12947SDavid Howells __entry->call_ackr_first = call_ackr_first; 1385d1f12947SDavid Howells __entry->prev_pkt = prev_pkt; 1386d1f12947SDavid Howells __entry->call_ackr_prev = call_ackr_prev; 1387d1f12947SDavid Howells ), 1388d1f12947SDavid Howells 1389d1f12947SDavid Howells TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x", 1390d1f12947SDavid Howells __entry->debug_id, 1391d1f12947SDavid Howells __entry->serial, 1392d1f12947SDavid Howells __entry->first_soft_ack, 1393d1f12947SDavid Howells __entry->call_ackr_first, 1394d1f12947SDavid Howells __entry->prev_pkt, 1395d1f12947SDavid Howells __entry->call_ackr_prev) 1396d1f12947SDavid Howells ); 1397d1f12947SDavid Howells 1398*dc9fd093SDavid Howells #undef EM 1399*dc9fd093SDavid Howells #undef E_ 1400df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */ 1401df844fd4SDavid Howells 1402df844fd4SDavid Howells /* This part must be outside protection */ 1403df844fd4SDavid Howells #include <trace/define_trace.h> 1404