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") \ 21d4d02d8bSDavid Howells EM(rxrpc_skb_cloned_jumbo, "CLJ") \ 22987db9f7SDavid Howells EM(rxrpc_skb_freed, "FRE") \ 23987db9f7SDavid Howells EM(rxrpc_skb_got, "GOT") \ 24987db9f7SDavid Howells EM(rxrpc_skb_lost, "*L*") \ 25987db9f7SDavid Howells EM(rxrpc_skb_new, "NEW") \ 26987db9f7SDavid Howells EM(rxrpc_skb_purged, "PUR") \ 27987db9f7SDavid Howells EM(rxrpc_skb_received, "RCV") \ 28987db9f7SDavid Howells EM(rxrpc_skb_rotated, "ROT") \ 29d0d5c0cdSDavid Howells EM(rxrpc_skb_seen, "SEE") \ 30d0d5c0cdSDavid Howells EM(rxrpc_skb_unshared, "UNS") \ 31d0d5c0cdSDavid Howells E_(rxrpc_skb_unshared_nomem, "US0") 32b54a134aSDavid Howells 3309d2bf59SDavid Howells #define rxrpc_local_traces \ 3409d2bf59SDavid Howells EM(rxrpc_local_got, "GOT") \ 3509d2bf59SDavid Howells EM(rxrpc_local_new, "NEW") \ 3609d2bf59SDavid Howells EM(rxrpc_local_processing, "PRO") \ 3709d2bf59SDavid Howells EM(rxrpc_local_put, "PUT") \ 3872f0c6fbSDavid Howells EM(rxrpc_local_queued, "QUE") \ 3972f0c6fbSDavid Howells E_(rxrpc_local_tx_ack, "TAK") 4009d2bf59SDavid Howells 411159d4b4SDavid Howells #define rxrpc_peer_traces \ 421159d4b4SDavid Howells EM(rxrpc_peer_got, "GOT") \ 431159d4b4SDavid Howells EM(rxrpc_peer_new, "NEW") \ 441159d4b4SDavid Howells EM(rxrpc_peer_processing, "PRO") \ 45f3344303SDavid Howells E_(rxrpc_peer_put, "PUT") 461159d4b4SDavid Howells 47b54a134aSDavid Howells #define rxrpc_conn_traces \ 48b54a134aSDavid Howells EM(rxrpc_conn_got, "GOT") \ 49b54a134aSDavid Howells EM(rxrpc_conn_new_client, "NWc") \ 50b54a134aSDavid Howells EM(rxrpc_conn_new_service, "NWs") \ 51b54a134aSDavid Howells EM(rxrpc_conn_put_client, "PTc") \ 52b54a134aSDavid Howells EM(rxrpc_conn_put_service, "PTs") \ 53b54a134aSDavid Howells EM(rxrpc_conn_queued, "QUE") \ 54f859ab61SDavid Howells EM(rxrpc_conn_reap_service, "RPs") \ 55b54a134aSDavid Howells E_(rxrpc_conn_seen, "SEE") 56b54a134aSDavid Howells 57b54a134aSDavid Howells #define rxrpc_client_traces \ 58b54a134aSDavid Howells EM(rxrpc_client_activate_chans, "Activa") \ 59b54a134aSDavid Howells EM(rxrpc_client_alloc, "Alloc ") \ 60b54a134aSDavid Howells EM(rxrpc_client_chan_activate, "ChActv") \ 61b54a134aSDavid Howells EM(rxrpc_client_chan_disconnect, "ChDisc") \ 62b54a134aSDavid Howells EM(rxrpc_client_chan_pass, "ChPass") \ 63930c9f91SDavid Howells EM(rxrpc_client_chan_wait_failed, "ChWtFl") \ 64b54a134aSDavid Howells EM(rxrpc_client_cleanup, "Clean ") \ 65b54a134aSDavid Howells EM(rxrpc_client_discard, "Discar") \ 66b54a134aSDavid Howells EM(rxrpc_client_duplicate, "Duplic") \ 67b54a134aSDavid Howells EM(rxrpc_client_exposed, "Expose") \ 68b54a134aSDavid Howells EM(rxrpc_client_replace, "Replac") \ 69b54a134aSDavid Howells EM(rxrpc_client_to_active, "->Actv") \ 70245500d8SDavid Howells E_(rxrpc_client_to_idle, "->Idle") 71b54a134aSDavid Howells 72b54a134aSDavid Howells #define rxrpc_call_traces \ 73b54a134aSDavid Howells EM(rxrpc_call_connected, "CON") \ 74b54a134aSDavid Howells EM(rxrpc_call_error, "*E*") \ 75b54a134aSDavid Howells EM(rxrpc_call_got, "GOT") \ 76b54a134aSDavid Howells EM(rxrpc_call_got_kernel, "Gke") \ 774a7f62f9SDavid Howells EM(rxrpc_call_got_timer, "GTM") \ 78*a4ea4c47SDavid Howells EM(rxrpc_call_got_tx, "Gtx") \ 79b54a134aSDavid Howells EM(rxrpc_call_got_userid, "Gus") \ 80b54a134aSDavid Howells EM(rxrpc_call_new_client, "NWc") \ 81b54a134aSDavid Howells EM(rxrpc_call_new_service, "NWs") \ 82b54a134aSDavid Howells EM(rxrpc_call_put, "PUT") \ 83b54a134aSDavid Howells EM(rxrpc_call_put_kernel, "Pke") \ 844a7f62f9SDavid Howells EM(rxrpc_call_put_noqueue, "PnQ") \ 854a7f62f9SDavid Howells EM(rxrpc_call_put_notimer, "PnT") \ 864a7f62f9SDavid Howells EM(rxrpc_call_put_timer, "PTM") \ 87*a4ea4c47SDavid Howells EM(rxrpc_call_put_tx, "Ptx") \ 88b54a134aSDavid Howells EM(rxrpc_call_put_userid, "Pus") \ 89b54a134aSDavid Howells EM(rxrpc_call_queued, "QUE") \ 90b54a134aSDavid Howells EM(rxrpc_call_queued_ref, "QUR") \ 91b54a134aSDavid Howells EM(rxrpc_call_release, "RLS") \ 92b54a134aSDavid Howells E_(rxrpc_call_seen, "SEE") 93b54a134aSDavid Howells 94*a4ea4c47SDavid Howells #define rxrpc_txqueue_traces \ 95*a4ea4c47SDavid Howells EM(rxrpc_txqueue_await_reply, "AWR") \ 96*a4ea4c47SDavid Howells EM(rxrpc_txqueue_dequeue, "DEQ") \ 97*a4ea4c47SDavid Howells EM(rxrpc_txqueue_end, "END") \ 98*a4ea4c47SDavid Howells EM(rxrpc_txqueue_queue, "QUE") \ 99*a4ea4c47SDavid Howells EM(rxrpc_txqueue_queue_last, "QLS") \ 100*a4ea4c47SDavid Howells EM(rxrpc_txqueue_rotate, "ROT") \ 101*a4ea4c47SDavid Howells EM(rxrpc_txqueue_rotate_last, "RLS") \ 102*a4ea4c47SDavid Howells E_(rxrpc_txqueue_wait, "WAI") 103b54a134aSDavid Howells 104b54a134aSDavid Howells #define rxrpc_receive_traces \ 105b54a134aSDavid Howells EM(rxrpc_receive_end, "END") \ 106b54a134aSDavid Howells EM(rxrpc_receive_front, "FRN") \ 107b54a134aSDavid Howells EM(rxrpc_receive_incoming, "INC") \ 108b54a134aSDavid Howells EM(rxrpc_receive_queue, "QUE") \ 109b54a134aSDavid Howells EM(rxrpc_receive_queue_last, "QLS") \ 1105d7edbc9SDavid Howells EM(rxrpc_receive_queue_oos, "QUO") \ 1115d7edbc9SDavid Howells EM(rxrpc_receive_queue_oos_last, "QOL") \ 1125d7edbc9SDavid Howells EM(rxrpc_receive_oos, "OOS") \ 1135d7edbc9SDavid Howells EM(rxrpc_receive_oos_last, "OSL") \ 1145d7edbc9SDavid Howells EM(rxrpc_receive_rotate, "ROT") \ 1155d7edbc9SDavid Howells E_(rxrpc_receive_rotate_last, "RLS") 116b54a134aSDavid Howells 117b54a134aSDavid Howells #define rxrpc_recvmsg_traces \ 118b54a134aSDavid Howells EM(rxrpc_recvmsg_cont, "CONT") \ 119b54a134aSDavid Howells EM(rxrpc_recvmsg_data_return, "DATA") \ 120b54a134aSDavid Howells EM(rxrpc_recvmsg_dequeue, "DEQU") \ 121b54a134aSDavid Howells EM(rxrpc_recvmsg_enter, "ENTR") \ 122b54a134aSDavid Howells EM(rxrpc_recvmsg_full, "FULL") \ 123b54a134aSDavid Howells EM(rxrpc_recvmsg_hole, "HOLE") \ 124b54a134aSDavid Howells EM(rxrpc_recvmsg_next, "NEXT") \ 125540b1c48SDavid Howells EM(rxrpc_recvmsg_requeue, "REQU") \ 126b54a134aSDavid Howells EM(rxrpc_recvmsg_return, "RETN") \ 127b54a134aSDavid Howells EM(rxrpc_recvmsg_terminal, "TERM") \ 128b54a134aSDavid Howells EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ 129b54a134aSDavid Howells E_(rxrpc_recvmsg_wait, "WAIT") 130b54a134aSDavid Howells 131b54a134aSDavid Howells #define rxrpc_rtt_tx_traces \ 1324700c4d8SDavid Howells EM(rxrpc_rtt_tx_cancel, "CNCE") \ 133b54a134aSDavid Howells EM(rxrpc_rtt_tx_data, "DATA") \ 1344700c4d8SDavid Howells EM(rxrpc_rtt_tx_no_slot, "FULL") \ 135b54a134aSDavid Howells E_(rxrpc_rtt_tx_ping, "PING") 136b54a134aSDavid Howells 137b54a134aSDavid Howells #define rxrpc_rtt_rx_traces \ 1384700c4d8SDavid Howells EM(rxrpc_rtt_rx_cancel, "CNCL") \ 1394700c4d8SDavid Howells EM(rxrpc_rtt_rx_obsolete, "OBSL") \ 1404700c4d8SDavid Howells EM(rxrpc_rtt_rx_lost, "LOST") \ 141b54a134aSDavid Howells EM(rxrpc_rtt_rx_ping_response, "PONG") \ 142b54a134aSDavid Howells E_(rxrpc_rtt_rx_requested_ack, "RACK") 143b54a134aSDavid Howells 144b54a134aSDavid Howells #define rxrpc_timer_traces \ 145b54a134aSDavid Howells EM(rxrpc_timer_begin, "Begin ") \ 146a158bdd3SDavid Howells EM(rxrpc_timer_exp_ack, "ExpAck") \ 147a158bdd3SDavid Howells EM(rxrpc_timer_exp_hard, "ExpHrd") \ 148a158bdd3SDavid Howells EM(rxrpc_timer_exp_idle, "ExpIdl") \ 149415f44e4SDavid Howells EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ 150bd1fdf8cSDavid Howells EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ 151a158bdd3SDavid Howells EM(rxrpc_timer_exp_normal, "ExpNml") \ 152a158bdd3SDavid Howells EM(rxrpc_timer_exp_ping, "ExpPng") \ 153a158bdd3SDavid Howells EM(rxrpc_timer_exp_resend, "ExpRsn") \ 154b54a134aSDavid Howells EM(rxrpc_timer_init_for_reply, "IniRpl") \ 155b54a134aSDavid Howells EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ 156a158bdd3SDavid Howells EM(rxrpc_timer_restart, "Restrt") \ 157b54a134aSDavid Howells EM(rxrpc_timer_set_for_ack, "SetAck") \ 158a158bdd3SDavid Howells EM(rxrpc_timer_set_for_hard, "SetHrd") \ 159a158bdd3SDavid Howells EM(rxrpc_timer_set_for_idle, "SetIdl") \ 160415f44e4SDavid Howells EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ 161bd1fdf8cSDavid Howells EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ 162a158bdd3SDavid Howells EM(rxrpc_timer_set_for_normal, "SetNml") \ 163b54a134aSDavid Howells EM(rxrpc_timer_set_for_ping, "SetPng") \ 164b54a134aSDavid Howells EM(rxrpc_timer_set_for_resend, "SetRTx") \ 165a158bdd3SDavid Howells E_(rxrpc_timer_set_for_send, "SetSnd") 166b54a134aSDavid Howells 167b54a134aSDavid Howells #define rxrpc_propose_ack_traces \ 168b54a134aSDavid Howells EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 169b54a134aSDavid Howells EM(rxrpc_propose_ack_input_data, "DataIn ") \ 170530403d9SDavid Howells EM(rxrpc_propose_ack_input_data_hole, "DataInH") \ 1717150ceaaSDavid Howells EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \ 172415f44e4SDavid Howells EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ 173b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 174b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 175b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 176b54a134aSDavid Howells EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ 177b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ 178b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ 179b54a134aSDavid Howells EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ 180b54a134aSDavid Howells EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ 181b54a134aSDavid Howells E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 182b54a134aSDavid Howells 183b54a134aSDavid Howells #define rxrpc_congest_modes \ 184b54a134aSDavid Howells EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ 185b54a134aSDavid Howells EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ 186b54a134aSDavid Howells EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ 187b54a134aSDavid Howells E_(RXRPC_CALL_SLOW_START, "SlowStart") 188b54a134aSDavid Howells 189b54a134aSDavid Howells #define rxrpc_congest_changes \ 190b54a134aSDavid Howells EM(rxrpc_cong_begin_retransmission, " Retrans") \ 191b54a134aSDavid Howells EM(rxrpc_cong_cleared_nacks, " Cleared") \ 192b54a134aSDavid Howells EM(rxrpc_cong_new_low_nack, " NewLowN") \ 193aadf9dceSDavid Howells EM(rxrpc_cong_no_change, " -") \ 194b54a134aSDavid Howells EM(rxrpc_cong_progress, " Progres") \ 195b54a134aSDavid Howells EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 196b54a134aSDavid Howells EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 197b54a134aSDavid Howells E_(rxrpc_cong_saw_nack, " SawNack") 198b54a134aSDavid Howells 199b54a134aSDavid Howells #define rxrpc_pkts \ 200b54a134aSDavid Howells EM(0, "?00") \ 201b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 202b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 203b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 204b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 205b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 206b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 207b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 208b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 209b54a134aSDavid Howells EM(9, "?09") \ 210b54a134aSDavid Howells EM(10, "?10") \ 211b54a134aSDavid Howells EM(11, "?11") \ 212b54a134aSDavid Howells EM(12, "?12") \ 213b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 214b54a134aSDavid Howells EM(14, "?14") \ 215b54a134aSDavid Howells E_(15, "?15") 216b54a134aSDavid Howells 217b54a134aSDavid Howells #define rxrpc_ack_names \ 218b54a134aSDavid Howells EM(0, "-0-") \ 219b54a134aSDavid Howells EM(RXRPC_ACK_REQUESTED, "REQ") \ 220b54a134aSDavid Howells EM(RXRPC_ACK_DUPLICATE, "DUP") \ 221b54a134aSDavid Howells EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 222b54a134aSDavid Howells EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 223b54a134aSDavid Howells EM(RXRPC_ACK_NOSPACE, "MEM") \ 224b54a134aSDavid Howells EM(RXRPC_ACK_PING, "PNG") \ 225b54a134aSDavid Howells EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 226b54a134aSDavid Howells EM(RXRPC_ACK_DELAY, "DLY") \ 227b54a134aSDavid Howells EM(RXRPC_ACK_IDLE, "IDL") \ 228b54a134aSDavid Howells E_(RXRPC_ACK__INVALID, "-?-") 229b54a134aSDavid Howells 2301bae5d22SDavid Howells #define rxrpc_completions \ 2311bae5d22SDavid Howells EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ 2321bae5d22SDavid Howells EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ 2331bae5d22SDavid Howells EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ 2341bae5d22SDavid Howells EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ 2351bae5d22SDavid Howells E_(RXRPC_CALL_NETWORK_ERROR, "NetError") 2361bae5d22SDavid Howells 2374764c0daSDavid Howells #define rxrpc_tx_points \ 2384764c0daSDavid Howells EM(rxrpc_tx_point_call_abort, "CallAbort") \ 2394764c0daSDavid Howells EM(rxrpc_tx_point_call_ack, "CallAck") \ 2404764c0daSDavid Howells EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ 2414764c0daSDavid Howells EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ 2424764c0daSDavid Howells EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ 2434764c0daSDavid Howells EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ 2444764c0daSDavid Howells EM(rxrpc_tx_point_reject, "Reject") \ 2454764c0daSDavid Howells EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ 2464764c0daSDavid Howells EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \ 2474764c0daSDavid Howells EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ 2484764c0daSDavid Howells E_(rxrpc_tx_point_version_reply, "VerReply") 2496b47fe1dSDavid Howells 2504d843be5SDavid Howells #define rxrpc_req_ack_traces \ 2514d843be5SDavid Howells EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \ 2524d843be5SDavid Howells EM(rxrpc_reqack_already_on, "ALREADY-ON") \ 2534d843be5SDavid Howells EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \ 2544d843be5SDavid Howells EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \ 2554d843be5SDavid Howells EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \ 2564d843be5SDavid Howells EM(rxrpc_reqack_retrans, "RETRANS ") \ 2574d843be5SDavid Howells EM(rxrpc_reqack_slow_start, "SLOW-START") \ 2584d843be5SDavid Howells E_(rxrpc_reqack_small_txwin, "SMALL-TXWN") 259f7fa5242SDavid Howells /* ---- Must update size of stat_why_req_ack[] if more are added! */ 2604d843be5SDavid Howells 26102a19356SDavid Howells #define rxrpc_txbuf_traces \ 26202a19356SDavid Howells EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \ 26302a19356SDavid Howells EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \ 26402a19356SDavid Howells EM(rxrpc_txbuf_free, "FREE ") \ 265*a4ea4c47SDavid Howells EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \ 26602a19356SDavid Howells EM(rxrpc_txbuf_get_trans, "GET TRANS ") \ 26702a19356SDavid Howells EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \ 26872f0c6fbSDavid Howells EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \ 26902a19356SDavid Howells EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \ 27072f0c6fbSDavid Howells EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \ 27102a19356SDavid Howells EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \ 27202a19356SDavid Howells EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \ 273*a4ea4c47SDavid Howells EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \ 27402a19356SDavid Howells EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \ 27502a19356SDavid Howells E_(rxrpc_txbuf_see_unacked, "SEE UNACKED") 27602a19356SDavid Howells 277b54a134aSDavid Howells /* 278dc9fd093SDavid Howells * Generate enums for tracing information. 279dc9fd093SDavid Howells */ 280dc9fd093SDavid Howells #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 281dc9fd093SDavid Howells #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 282dc9fd093SDavid Howells 283dc9fd093SDavid Howells #undef EM 284dc9fd093SDavid Howells #undef E_ 285dc9fd093SDavid Howells #define EM(a, b) a, 286dc9fd093SDavid Howells #define E_(a, b) a 287dc9fd093SDavid Howells 288dc9fd093SDavid Howells enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte); 289dc9fd093SDavid Howells enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte); 290dc9fd093SDavid Howells enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte); 291dc9fd093SDavid Howells enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte); 292dc9fd093SDavid Howells enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte); 293dc9fd093SDavid Howells enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte); 294dc9fd093SDavid Howells enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte); 295dc9fd093SDavid Howells enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte); 296dc9fd093SDavid Howells enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte); 297dc9fd093SDavid Howells enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte); 2984d843be5SDavid Howells enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte); 299dc9fd093SDavid Howells enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte); 300dc9fd093SDavid Howells enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte); 301dc9fd093SDavid Howells enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte); 302dc9fd093SDavid Howells enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte); 303dc9fd093SDavid Howells enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte); 30402a19356SDavid Howells enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte); 305*a4ea4c47SDavid Howells enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte); 306dc9fd093SDavid Howells 307dc9fd093SDavid Howells #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 308dc9fd093SDavid Howells 309dc9fd093SDavid Howells /* 310b54a134aSDavid Howells * Export enum symbols via userspace. 311b54a134aSDavid Howells */ 312b54a134aSDavid Howells #undef EM 313b54a134aSDavid Howells #undef E_ 314b54a134aSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a); 315b54a134aSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a); 316b54a134aSDavid Howells 317b54a134aSDavid Howells rxrpc_call_traces; 318dc9fd093SDavid Howells rxrpc_client_traces; 319dc9fd093SDavid Howells rxrpc_congest_changes; 320dc9fd093SDavid Howells rxrpc_congest_modes; 321dc9fd093SDavid Howells rxrpc_conn_traces; 322dc9fd093SDavid Howells rxrpc_local_traces; 323dc9fd093SDavid Howells rxrpc_propose_ack_traces; 324b54a134aSDavid Howells rxrpc_receive_traces; 325b54a134aSDavid Howells rxrpc_recvmsg_traces; 3264d843be5SDavid Howells rxrpc_req_ack_traces; 327b54a134aSDavid Howells rxrpc_rtt_rx_traces; 328dc9fd093SDavid Howells rxrpc_rtt_tx_traces; 329dc9fd093SDavid Howells rxrpc_skb_traces; 330b54a134aSDavid Howells rxrpc_timer_traces; 3314764c0daSDavid Howells rxrpc_tx_points; 33202a19356SDavid Howells rxrpc_txbuf_traces; 333*a4ea4c47SDavid Howells rxrpc_txqueue_traces; 334b54a134aSDavid Howells 335b54a134aSDavid Howells /* 336b54a134aSDavid Howells * Now redefine the EM() and E_() macros to map the enums to the strings that 337b54a134aSDavid Howells * will be printed in the output. 338b54a134aSDavid Howells */ 339b54a134aSDavid Howells #undef EM 340b54a134aSDavid Howells #undef E_ 341b54a134aSDavid Howells #define EM(a, b) { a, b }, 342b54a134aSDavid Howells #define E_(a, b) { a, b } 343b54a134aSDavid Howells 34409d2bf59SDavid Howells TRACE_EVENT(rxrpc_local, 34506d9532fSDavid Howells TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op, 34609d2bf59SDavid Howells int usage, const void *where), 34709d2bf59SDavid Howells 34806d9532fSDavid Howells TP_ARGS(local_debug_id, op, usage, where), 34909d2bf59SDavid Howells 35009d2bf59SDavid Howells TP_STRUCT__entry( 35109d2bf59SDavid Howells __field(unsigned int, local ) 35209d2bf59SDavid Howells __field(int, op ) 35309d2bf59SDavid Howells __field(int, usage ) 35409d2bf59SDavid Howells __field(const void *, where ) 35509d2bf59SDavid Howells ), 35609d2bf59SDavid Howells 35709d2bf59SDavid Howells TP_fast_assign( 35806d9532fSDavid Howells __entry->local = local_debug_id; 35909d2bf59SDavid Howells __entry->op = op; 36009d2bf59SDavid Howells __entry->usage = usage; 36109d2bf59SDavid Howells __entry->where = where; 36209d2bf59SDavid Howells ), 36309d2bf59SDavid Howells 36409d2bf59SDavid Howells TP_printk("L=%08x %s u=%d sp=%pSR", 36509d2bf59SDavid Howells __entry->local, 36609d2bf59SDavid Howells __print_symbolic(__entry->op, rxrpc_local_traces), 36709d2bf59SDavid Howells __entry->usage, 36809d2bf59SDavid Howells __entry->where) 36909d2bf59SDavid Howells ); 37009d2bf59SDavid Howells 3711159d4b4SDavid Howells TRACE_EVENT(rxrpc_peer, 37255f6c98eSDavid Howells TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op, 3731159d4b4SDavid Howells int usage, const void *where), 3741159d4b4SDavid Howells 37555f6c98eSDavid Howells TP_ARGS(peer_debug_id, op, usage, where), 3761159d4b4SDavid Howells 3771159d4b4SDavid Howells TP_STRUCT__entry( 3781159d4b4SDavid Howells __field(unsigned int, peer ) 3791159d4b4SDavid Howells __field(int, op ) 3801159d4b4SDavid Howells __field(int, usage ) 3811159d4b4SDavid Howells __field(const void *, where ) 3821159d4b4SDavid Howells ), 3831159d4b4SDavid Howells 3841159d4b4SDavid Howells TP_fast_assign( 38555f6c98eSDavid Howells __entry->peer = peer_debug_id; 3861159d4b4SDavid Howells __entry->op = op; 3871159d4b4SDavid Howells __entry->usage = usage; 3881159d4b4SDavid Howells __entry->where = where; 3891159d4b4SDavid Howells ), 3901159d4b4SDavid Howells 3911159d4b4SDavid Howells TP_printk("P=%08x %s u=%d sp=%pSR", 3921159d4b4SDavid Howells __entry->peer, 3931159d4b4SDavid Howells __print_symbolic(__entry->op, rxrpc_peer_traces), 3941159d4b4SDavid Howells __entry->usage, 3951159d4b4SDavid Howells __entry->where) 3961159d4b4SDavid Howells ); 3971159d4b4SDavid Howells 398363deeabSDavid Howells TRACE_EVENT(rxrpc_conn, 3994c1295dcSDavid Howells TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op, 400363deeabSDavid Howells int usage, const void *where), 401363deeabSDavid Howells 4024c1295dcSDavid Howells TP_ARGS(conn_debug_id, op, usage, where), 403363deeabSDavid Howells 404363deeabSDavid Howells TP_STRUCT__entry( 405a25e21f0SDavid Howells __field(unsigned int, conn ) 406363deeabSDavid Howells __field(int, op ) 407363deeabSDavid Howells __field(int, usage ) 408363deeabSDavid Howells __field(const void *, where ) 409363deeabSDavid Howells ), 410363deeabSDavid Howells 411363deeabSDavid Howells TP_fast_assign( 4124c1295dcSDavid Howells __entry->conn = conn_debug_id; 413363deeabSDavid Howells __entry->op = op; 414363deeabSDavid Howells __entry->usage = usage; 415363deeabSDavid Howells __entry->where = where; 416363deeabSDavid Howells ), 417363deeabSDavid Howells 418a25e21f0SDavid Howells TP_printk("C=%08x %s u=%d sp=%pSR", 419363deeabSDavid Howells __entry->conn, 420b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_conn_traces), 421363deeabSDavid Howells __entry->usage, 422363deeabSDavid Howells __entry->where) 423363deeabSDavid Howells ); 424363deeabSDavid Howells 425363deeabSDavid Howells TRACE_EVENT(rxrpc_client, 426363deeabSDavid Howells TP_PROTO(struct rxrpc_connection *conn, int channel, 427363deeabSDavid Howells enum rxrpc_client_trace op), 428363deeabSDavid Howells 429363deeabSDavid Howells TP_ARGS(conn, channel, op), 430363deeabSDavid Howells 431363deeabSDavid Howells TP_STRUCT__entry( 432a25e21f0SDavid Howells __field(unsigned int, conn ) 433363deeabSDavid Howells __field(u32, cid ) 434363deeabSDavid Howells __field(int, channel ) 435363deeabSDavid Howells __field(int, usage ) 436363deeabSDavid Howells __field(enum rxrpc_client_trace, op ) 437363deeabSDavid Howells ), 438363deeabSDavid Howells 439363deeabSDavid Howells TP_fast_assign( 440245500d8SDavid Howells __entry->conn = conn ? conn->debug_id : 0; 441363deeabSDavid Howells __entry->channel = channel; 442a0575429SDavid Howells __entry->usage = conn ? refcount_read(&conn->ref) : -2; 443363deeabSDavid Howells __entry->op = op; 44496a9c425SDavid Howells __entry->cid = conn ? conn->proto.cid : 0; 445363deeabSDavid Howells ), 446363deeabSDavid Howells 447245500d8SDavid Howells TP_printk("C=%08x h=%2d %s i=%08x u=%d", 448363deeabSDavid Howells __entry->conn, 449363deeabSDavid Howells __entry->channel, 450b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_client_traces), 451363deeabSDavid Howells __entry->cid, 452363deeabSDavid Howells __entry->usage) 453363deeabSDavid Howells ); 454363deeabSDavid Howells 455e34d4234SDavid Howells TRACE_EVENT(rxrpc_call, 45648c9e0ecSDavid Howells TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op, 4572ab27215SDavid Howells int usage, const void *where, const void *aux), 458e34d4234SDavid Howells 45948c9e0ecSDavid Howells TP_ARGS(call_debug_id, op, usage, where, aux), 460e34d4234SDavid Howells 461e34d4234SDavid Howells TP_STRUCT__entry( 462a25e21f0SDavid Howells __field(unsigned int, call ) 463e34d4234SDavid Howells __field(int, op ) 464e34d4234SDavid Howells __field(int, usage ) 465e34d4234SDavid Howells __field(const void *, where ) 466e34d4234SDavid Howells __field(const void *, aux ) 467e34d4234SDavid Howells ), 468e34d4234SDavid Howells 469e34d4234SDavid Howells TP_fast_assign( 47048c9e0ecSDavid Howells __entry->call = call_debug_id; 471e34d4234SDavid Howells __entry->op = op; 472e34d4234SDavid Howells __entry->usage = usage; 473e34d4234SDavid Howells __entry->where = where; 474e34d4234SDavid Howells __entry->aux = aux; 475e34d4234SDavid Howells ), 476e34d4234SDavid Howells 477a25e21f0SDavid Howells TP_printk("c=%08x %s u=%d sp=%pSR a=%p", 478e34d4234SDavid Howells __entry->call, 479b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_call_traces), 480e34d4234SDavid Howells __entry->usage, 481e34d4234SDavid Howells __entry->where, 482e34d4234SDavid Howells __entry->aux) 483e34d4234SDavid Howells ); 484e34d4234SDavid Howells 485df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb, 48671f3ca40SDavid Howells TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, 48727f699ccSDavid Howells int usage, int mod_count, const void *where), 488df844fd4SDavid Howells 48927f699ccSDavid Howells TP_ARGS(skb, op, usage, mod_count, where), 490df844fd4SDavid Howells 491df844fd4SDavid Howells TP_STRUCT__entry( 492df844fd4SDavid Howells __field(struct sk_buff *, skb ) 49371f3ca40SDavid Howells __field(enum rxrpc_skb_trace, op ) 494df844fd4SDavid Howells __field(int, usage ) 495df844fd4SDavid Howells __field(int, mod_count ) 496df844fd4SDavid Howells __field(const void *, where ) 497df844fd4SDavid Howells ), 498df844fd4SDavid Howells 499df844fd4SDavid Howells TP_fast_assign( 500df844fd4SDavid Howells __entry->skb = skb; 501df844fd4SDavid Howells __entry->op = op; 502df844fd4SDavid Howells __entry->usage = usage; 503df844fd4SDavid Howells __entry->mod_count = mod_count; 504df844fd4SDavid Howells __entry->where = where; 505df844fd4SDavid Howells ), 506df844fd4SDavid Howells 50727f699ccSDavid Howells TP_printk("s=%p Rx %s u=%d m=%d p=%pSR", 508df844fd4SDavid Howells __entry->skb, 509b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_skb_traces), 510df844fd4SDavid Howells __entry->usage, 511df844fd4SDavid Howells __entry->mod_count, 512df844fd4SDavid Howells __entry->where) 513df844fd4SDavid Howells ); 514df844fd4SDavid Howells 51549e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet, 51649e19ec7SDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 51749e19ec7SDavid Howells 51849e19ec7SDavid Howells TP_ARGS(sp), 51949e19ec7SDavid Howells 52049e19ec7SDavid Howells TP_STRUCT__entry( 52149e19ec7SDavid Howells __field_struct(struct rxrpc_host_header, hdr ) 52249e19ec7SDavid Howells ), 52349e19ec7SDavid Howells 52449e19ec7SDavid Howells TP_fast_assign( 52549e19ec7SDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 52649e19ec7SDavid Howells ), 52749e19ec7SDavid Howells 528a3868bfcSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 52949e19ec7SDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 53049e19ec7SDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 53149e19ec7SDavid Howells __entry->hdr.serial, __entry->hdr.seq, 532a3868bfcSDavid Howells __entry->hdr.type, __entry->hdr.flags, 533b54a134aSDavid Howells __entry->hdr.type <= 15 ? 534b54a134aSDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 53549e19ec7SDavid Howells ); 53649e19ec7SDavid Howells 53749e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done, 53849e19ec7SDavid Howells TP_PROTO(int result, int abort_code), 53949e19ec7SDavid Howells 54049e19ec7SDavid Howells TP_ARGS(result, abort_code), 54149e19ec7SDavid Howells 54249e19ec7SDavid Howells TP_STRUCT__entry( 54349e19ec7SDavid Howells __field(int, result ) 54449e19ec7SDavid Howells __field(int, abort_code ) 54549e19ec7SDavid Howells ), 54649e19ec7SDavid Howells 54749e19ec7SDavid Howells TP_fast_assign( 54849e19ec7SDavid Howells __entry->result = result; 54949e19ec7SDavid Howells __entry->abort_code = abort_code; 55049e19ec7SDavid Howells ), 55149e19ec7SDavid Howells 55249e19ec7SDavid Howells TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 55349e19ec7SDavid Howells ); 55449e19ec7SDavid Howells 5555a42976dSDavid Howells TRACE_EVENT(rxrpc_abort, 556a25e21f0SDavid Howells TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id, 557a25e21f0SDavid Howells rxrpc_seq_t seq, int abort_code, int error), 5585a42976dSDavid Howells 559a25e21f0SDavid Howells TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), 5605a42976dSDavid Howells 5615a42976dSDavid Howells TP_STRUCT__entry( 562a25e21f0SDavid Howells __field(unsigned int, call_nr ) 5635a42976dSDavid Howells __array(char, why, 4 ) 5645a42976dSDavid Howells __field(u32, cid ) 5655a42976dSDavid Howells __field(u32, call_id ) 5665a42976dSDavid Howells __field(rxrpc_seq_t, seq ) 5675a42976dSDavid Howells __field(int, abort_code ) 5685a42976dSDavid Howells __field(int, error ) 5695a42976dSDavid Howells ), 5705a42976dSDavid Howells 5715a42976dSDavid Howells TP_fast_assign( 5725a42976dSDavid Howells memcpy(__entry->why, why, 4); 573a25e21f0SDavid Howells __entry->call_nr = call_nr; 5745a42976dSDavid Howells __entry->cid = cid; 5755a42976dSDavid Howells __entry->call_id = call_id; 5765a42976dSDavid Howells __entry->abort_code = abort_code; 5775a42976dSDavid Howells __entry->error = error; 5785a42976dSDavid Howells __entry->seq = seq; 5795a42976dSDavid Howells ), 5805a42976dSDavid Howells 581a25e21f0SDavid Howells TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", 582a25e21f0SDavid Howells __entry->call_nr, 5835a42976dSDavid Howells __entry->cid, __entry->call_id, __entry->seq, 5845a42976dSDavid Howells __entry->abort_code, __entry->error, __entry->why) 5855a42976dSDavid Howells ); 5865a42976dSDavid Howells 5871bae5d22SDavid Howells TRACE_EVENT(rxrpc_call_complete, 5881bae5d22SDavid Howells TP_PROTO(struct rxrpc_call *call), 5891bae5d22SDavid Howells 5901bae5d22SDavid Howells TP_ARGS(call), 5911bae5d22SDavid Howells 5921bae5d22SDavid Howells TP_STRUCT__entry( 5931bae5d22SDavid Howells __field(unsigned int, call ) 5941bae5d22SDavid Howells __field(enum rxrpc_call_completion, compl ) 5951bae5d22SDavid Howells __field(int, error ) 5961bae5d22SDavid Howells __field(u32, abort_code ) 5971bae5d22SDavid Howells ), 5981bae5d22SDavid Howells 5991bae5d22SDavid Howells TP_fast_assign( 6001bae5d22SDavid Howells __entry->call = call->debug_id; 6011bae5d22SDavid Howells __entry->compl = call->completion; 6021bae5d22SDavid Howells __entry->error = call->error; 6031bae5d22SDavid Howells __entry->abort_code = call->abort_code; 6041bae5d22SDavid Howells ), 6051bae5d22SDavid Howells 6061bae5d22SDavid Howells TP_printk("c=%08x %s r=%d ac=%d", 6071bae5d22SDavid Howells __entry->call, 6081bae5d22SDavid Howells __print_symbolic(__entry->compl, rxrpc_completions), 6091bae5d22SDavid Howells __entry->error, 6101bae5d22SDavid Howells __entry->abort_code) 6111bae5d22SDavid Howells ); 6121bae5d22SDavid Howells 613*a4ea4c47SDavid Howells TRACE_EVENT(rxrpc_txqueue, 614*a4ea4c47SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why), 615a124fe3eSDavid Howells 616a124fe3eSDavid Howells TP_ARGS(call, why), 617a124fe3eSDavid Howells 618a124fe3eSDavid Howells TP_STRUCT__entry( 619a25e21f0SDavid Howells __field(unsigned int, call ) 620*a4ea4c47SDavid Howells __field(enum rxrpc_txqueue_trace, why ) 621*a4ea4c47SDavid Howells __field(rxrpc_seq_t, acks_hard_ack ) 622*a4ea4c47SDavid Howells __field(rxrpc_seq_t, tx_bottom ) 623a124fe3eSDavid Howells __field(rxrpc_seq_t, tx_top ) 624b1d9f7fdSDavid Howells __field(int, tx_winsize ) 625a124fe3eSDavid Howells ), 626a124fe3eSDavid Howells 627a124fe3eSDavid Howells TP_fast_assign( 628a25e21f0SDavid Howells __entry->call = call->debug_id; 629a124fe3eSDavid Howells __entry->why = why; 630*a4ea4c47SDavid Howells __entry->acks_hard_ack = call->acks_hard_ack; 631*a4ea4c47SDavid Howells __entry->tx_bottom = call->tx_bottom; 632a124fe3eSDavid Howells __entry->tx_top = call->tx_top; 633b1d9f7fdSDavid Howells __entry->tx_winsize = call->tx_winsize; 634a124fe3eSDavid Howells ), 635a124fe3eSDavid Howells 636*a4ea4c47SDavid Howells TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u", 637a124fe3eSDavid Howells __entry->call, 638*a4ea4c47SDavid Howells __print_symbolic(__entry->why, rxrpc_txqueue_traces), 639*a4ea4c47SDavid Howells __entry->tx_bottom, 640*a4ea4c47SDavid Howells __entry->acks_hard_ack, 641*a4ea4c47SDavid Howells __entry->tx_top - __entry->tx_bottom, 642*a4ea4c47SDavid Howells __entry->tx_top - __entry->acks_hard_ack, 643b1d9f7fdSDavid Howells __entry->tx_winsize) 644a124fe3eSDavid Howells ); 645a124fe3eSDavid Howells 646b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_data, 6474764c0daSDavid Howells TP_PROTO(unsigned int call, rxrpc_seq_t seq, 648d4d02d8bSDavid Howells rxrpc_serial_t serial, u8 flags), 649ec71eb9aSDavid Howells 650d4d02d8bSDavid Howells TP_ARGS(call, seq, serial, flags), 651ec71eb9aSDavid Howells 652ec71eb9aSDavid Howells TP_STRUCT__entry( 653a25e21f0SDavid Howells __field(unsigned int, call ) 654b1d9f7fdSDavid Howells __field(rxrpc_seq_t, seq ) 655b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial ) 656b1d9f7fdSDavid Howells __field(u8, flags ) 657b1d9f7fdSDavid Howells ), 658b1d9f7fdSDavid Howells 659b1d9f7fdSDavid Howells TP_fast_assign( 6604764c0daSDavid Howells __entry->call = call; 661b1d9f7fdSDavid Howells __entry->seq = seq; 662b1d9f7fdSDavid Howells __entry->serial = serial; 663b1d9f7fdSDavid Howells __entry->flags = flags; 664b1d9f7fdSDavid Howells ), 665b1d9f7fdSDavid Howells 666d4d02d8bSDavid Howells TP_printk("c=%08x DATA %08x q=%08x fl=%02x", 667b1d9f7fdSDavid Howells __entry->call, 668b1d9f7fdSDavid Howells __entry->serial, 669b1d9f7fdSDavid Howells __entry->seq, 670d4d02d8bSDavid Howells __entry->flags) 671b1d9f7fdSDavid Howells ); 672b1d9f7fdSDavid Howells 673b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_ack, 674b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call, 675b1d9f7fdSDavid Howells rxrpc_serial_t serial, rxrpc_serial_t ack_serial, 676b1d9f7fdSDavid Howells rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), 677b1d9f7fdSDavid Howells 678b1d9f7fdSDavid Howells TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), 679b1d9f7fdSDavid Howells 680b1d9f7fdSDavid Howells TP_STRUCT__entry( 681a25e21f0SDavid Howells __field(unsigned int, call ) 682b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial ) 683b1d9f7fdSDavid Howells __field(rxrpc_serial_t, ack_serial ) 684ec71eb9aSDavid Howells __field(rxrpc_seq_t, first ) 685b1d9f7fdSDavid Howells __field(rxrpc_seq_t, prev ) 686ec71eb9aSDavid Howells __field(u8, reason ) 687ec71eb9aSDavid Howells __field(u8, n_acks ) 688ec71eb9aSDavid Howells ), 689ec71eb9aSDavid Howells 690ec71eb9aSDavid Howells TP_fast_assign( 691a25e21f0SDavid Howells __entry->call = call->debug_id; 692b1d9f7fdSDavid Howells __entry->serial = serial; 693b1d9f7fdSDavid Howells __entry->ack_serial = ack_serial; 694ec71eb9aSDavid Howells __entry->first = first; 695b1d9f7fdSDavid Howells __entry->prev = prev; 696ec71eb9aSDavid Howells __entry->reason = reason; 697ec71eb9aSDavid Howells __entry->n_acks = n_acks; 698ec71eb9aSDavid Howells ), 699ec71eb9aSDavid Howells 700a25e21f0SDavid Howells TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", 701ec71eb9aSDavid Howells __entry->call, 702b1d9f7fdSDavid Howells __entry->serial, 703b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 704b1d9f7fdSDavid Howells __entry->ack_serial, 705ec71eb9aSDavid Howells __entry->first, 706b1d9f7fdSDavid Howells __entry->prev, 707ec71eb9aSDavid Howells __entry->n_acks) 708ec71eb9aSDavid Howells ); 709ec71eb9aSDavid Howells 710005ede28SDavid Howells TRACE_EVENT(rxrpc_rx_abort, 711005ede28SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 712005ede28SDavid Howells u32 abort_code), 713005ede28SDavid Howells 714005ede28SDavid Howells TP_ARGS(call, serial, abort_code), 715005ede28SDavid Howells 716005ede28SDavid Howells TP_STRUCT__entry( 717a25e21f0SDavid Howells __field(unsigned int, call ) 718005ede28SDavid Howells __field(rxrpc_serial_t, serial ) 719005ede28SDavid Howells __field(u32, abort_code ) 720005ede28SDavid Howells ), 721005ede28SDavid Howells 722005ede28SDavid Howells TP_fast_assign( 723a25e21f0SDavid Howells __entry->call = call->debug_id; 724005ede28SDavid Howells __entry->serial = serial; 725005ede28SDavid Howells __entry->abort_code = abort_code; 726005ede28SDavid Howells ), 727005ede28SDavid Howells 728a25e21f0SDavid Howells TP_printk("c=%08x ABORT %08x ac=%d", 729005ede28SDavid Howells __entry->call, 730005ede28SDavid Howells __entry->serial, 731005ede28SDavid Howells __entry->abort_code) 732005ede28SDavid Howells ); 733005ede28SDavid Howells 734740586d2SDavid Howells TRACE_EVENT(rxrpc_rx_rwind_change, 735740586d2SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 736740586d2SDavid Howells u32 rwind, bool wake), 737740586d2SDavid Howells 738740586d2SDavid Howells TP_ARGS(call, serial, rwind, wake), 739740586d2SDavid Howells 740740586d2SDavid Howells TP_STRUCT__entry( 741a25e21f0SDavid Howells __field(unsigned int, call ) 742740586d2SDavid Howells __field(rxrpc_serial_t, serial ) 743740586d2SDavid Howells __field(u32, rwind ) 744740586d2SDavid Howells __field(bool, wake ) 745740586d2SDavid Howells ), 746740586d2SDavid Howells 747740586d2SDavid Howells TP_fast_assign( 748a25e21f0SDavid Howells __entry->call = call->debug_id; 749740586d2SDavid Howells __entry->serial = serial; 750740586d2SDavid Howells __entry->rwind = rwind; 751740586d2SDavid Howells __entry->wake = wake; 752740586d2SDavid Howells ), 753740586d2SDavid Howells 754a25e21f0SDavid Howells TP_printk("c=%08x %08x rw=%u%s", 755740586d2SDavid Howells __entry->call, 756740586d2SDavid Howells __entry->serial, 757740586d2SDavid Howells __entry->rwind, 758740586d2SDavid Howells __entry->wake ? " wake" : "") 759740586d2SDavid Howells ); 760740586d2SDavid Howells 7614764c0daSDavid Howells TRACE_EVENT(rxrpc_tx_packet, 7624764c0daSDavid Howells TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, 7634764c0daSDavid Howells enum rxrpc_tx_point where), 7644764c0daSDavid Howells 7654764c0daSDavid Howells TP_ARGS(call_id, whdr, where), 7664764c0daSDavid Howells 7674764c0daSDavid Howells TP_STRUCT__entry( 7684764c0daSDavid Howells __field(unsigned int, call ) 7694764c0daSDavid Howells __field(enum rxrpc_tx_point, where ) 7704764c0daSDavid Howells __field_struct(struct rxrpc_wire_header, whdr ) 7714764c0daSDavid Howells ), 7724764c0daSDavid Howells 7734764c0daSDavid Howells TP_fast_assign( 7744764c0daSDavid Howells __entry->call = call_id; 7754764c0daSDavid Howells memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); 7764e2abd3cSDavid Howells __entry->where = where; 7774764c0daSDavid Howells ), 7784764c0daSDavid Howells 7794764c0daSDavid Howells TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", 7804764c0daSDavid Howells __entry->call, 7814764c0daSDavid Howells ntohl(__entry->whdr.epoch), 7824764c0daSDavid Howells ntohl(__entry->whdr.cid), 7834764c0daSDavid Howells ntohl(__entry->whdr.callNumber), 7844764c0daSDavid Howells ntohs(__entry->whdr.serviceId), 7854764c0daSDavid Howells ntohl(__entry->whdr.serial), 7864764c0daSDavid Howells ntohl(__entry->whdr.seq), 7874764c0daSDavid Howells __entry->whdr.type, __entry->whdr.flags, 7884764c0daSDavid Howells __entry->whdr.type <= 15 ? 7894764c0daSDavid Howells __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", 7904764c0daSDavid Howells __print_symbolic(__entry->where, rxrpc_tx_points)) 7914764c0daSDavid Howells ); 7924764c0daSDavid Howells 793be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_data, 794be832aecSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 795a1767077SDavid Howells rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), 796f3639df2SDavid Howells 797a1767077SDavid Howells TP_ARGS(call, seq, serial, flags, retrans, lose), 798f3639df2SDavid Howells 799f3639df2SDavid Howells TP_STRUCT__entry( 800a25e21f0SDavid Howells __field(unsigned int, call ) 801be832aecSDavid Howells __field(rxrpc_seq_t, seq ) 802f3639df2SDavid Howells __field(rxrpc_serial_t, serial ) 8034764c0daSDavid Howells __field(u32, cid ) 8044764c0daSDavid Howells __field(u32, call_id ) 805be832aecSDavid Howells __field(u8, flags ) 806a1767077SDavid Howells __field(bool, retrans ) 807be832aecSDavid Howells __field(bool, lose ) 808be832aecSDavid Howells ), 809be832aecSDavid Howells 810be832aecSDavid Howells TP_fast_assign( 811a25e21f0SDavid Howells __entry->call = call->debug_id; 8124764c0daSDavid Howells __entry->cid = call->cid; 8134764c0daSDavid Howells __entry->call_id = call->call_id; 814be832aecSDavid Howells __entry->seq = seq; 815be832aecSDavid Howells __entry->serial = serial; 816be832aecSDavid Howells __entry->flags = flags; 817a1767077SDavid Howells __entry->retrans = retrans; 818be832aecSDavid Howells __entry->lose = lose; 819be832aecSDavid Howells ), 820be832aecSDavid Howells 8214764c0daSDavid Howells TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s", 822be832aecSDavid Howells __entry->call, 8234764c0daSDavid Howells __entry->cid, 8244764c0daSDavid Howells __entry->call_id, 825be832aecSDavid Howells __entry->serial, 826be832aecSDavid Howells __entry->seq, 827be832aecSDavid Howells __entry->flags, 828265a44bbSDavid Howells __entry->retrans ? " *RETRANS*" : "", 829be832aecSDavid Howells __entry->lose ? " *LOSE*" : "") 830be832aecSDavid Howells ); 831be832aecSDavid Howells 832be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_ack, 8334764c0daSDavid Howells TP_PROTO(unsigned int call, rxrpc_serial_t serial, 834be832aecSDavid Howells rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 835be832aecSDavid Howells u8 reason, u8 n_acks), 836be832aecSDavid Howells 837be832aecSDavid Howells TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), 838be832aecSDavid Howells 839be832aecSDavid Howells TP_STRUCT__entry( 840a25e21f0SDavid Howells __field(unsigned int, call ) 841be832aecSDavid Howells __field(rxrpc_serial_t, serial ) 842be832aecSDavid Howells __field(rxrpc_seq_t, ack_first ) 843be832aecSDavid Howells __field(rxrpc_serial_t, ack_serial ) 844f3639df2SDavid Howells __field(u8, reason ) 845f3639df2SDavid Howells __field(u8, n_acks ) 846f3639df2SDavid Howells ), 847f3639df2SDavid Howells 848f3639df2SDavid Howells TP_fast_assign( 8494764c0daSDavid Howells __entry->call = call; 850f3639df2SDavid Howells __entry->serial = serial; 851be832aecSDavid Howells __entry->ack_first = ack_first; 852be832aecSDavid Howells __entry->ack_serial = ack_serial; 853f3639df2SDavid Howells __entry->reason = reason; 854f3639df2SDavid Howells __entry->n_acks = n_acks; 855f3639df2SDavid Howells ), 856f3639df2SDavid Howells 857a25e21f0SDavid Howells TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u", 858f3639df2SDavid Howells __entry->call, 859f3639df2SDavid Howells __entry->serial, 860b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 861be832aecSDavid Howells __entry->ack_first, 862be832aecSDavid Howells __entry->ack_serial, 863f3639df2SDavid Howells __entry->n_acks) 864f3639df2SDavid Howells ); 865f3639df2SDavid Howells 86658dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive, 86758dc63c9SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 86858dc63c9SDavid Howells rxrpc_serial_t serial, rxrpc_seq_t seq), 86958dc63c9SDavid Howells 87058dc63c9SDavid Howells TP_ARGS(call, why, serial, seq), 87158dc63c9SDavid Howells 87258dc63c9SDavid Howells TP_STRUCT__entry( 873a25e21f0SDavid Howells __field(unsigned int, call ) 87458dc63c9SDavid Howells __field(enum rxrpc_receive_trace, why ) 87558dc63c9SDavid Howells __field(rxrpc_serial_t, serial ) 87658dc63c9SDavid Howells __field(rxrpc_seq_t, seq ) 8775d7edbc9SDavid Howells __field(u64, window ) 87858dc63c9SDavid Howells ), 87958dc63c9SDavid Howells 88058dc63c9SDavid Howells TP_fast_assign( 881a25e21f0SDavid Howells __entry->call = call->debug_id; 88258dc63c9SDavid Howells __entry->why = why; 88358dc63c9SDavid Howells __entry->serial = serial; 88458dc63c9SDavid Howells __entry->seq = seq; 8855d7edbc9SDavid Howells __entry->window = atomic64_read(&call->ackr_window); 88658dc63c9SDavid Howells ), 88758dc63c9SDavid Howells 888a25e21f0SDavid Howells TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", 88958dc63c9SDavid Howells __entry->call, 890b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_receive_traces), 89158dc63c9SDavid Howells __entry->serial, 89258dc63c9SDavid Howells __entry->seq, 8935d7edbc9SDavid Howells lower_32_bits(__entry->window), 8945d7edbc9SDavid Howells upper_32_bits(__entry->window)) 89558dc63c9SDavid Howells ); 89658dc63c9SDavid Howells 89784997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg, 89884997905SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 899faf92e8dSDavid Howells int ret), 900faf92e8dSDavid Howells 901faf92e8dSDavid Howells TP_ARGS(call, why, ret), 902faf92e8dSDavid Howells 903faf92e8dSDavid Howells TP_STRUCT__entry( 904faf92e8dSDavid Howells __field(unsigned int, call ) 905faf92e8dSDavid Howells __field(enum rxrpc_recvmsg_trace, why ) 906faf92e8dSDavid Howells __field(int, ret ) 907faf92e8dSDavid Howells ), 908faf92e8dSDavid Howells 909faf92e8dSDavid Howells TP_fast_assign( 910faf92e8dSDavid Howells __entry->call = call ? call->debug_id : 0; 911faf92e8dSDavid Howells __entry->why = why; 912faf92e8dSDavid Howells __entry->ret = ret; 913faf92e8dSDavid Howells ), 914faf92e8dSDavid Howells 915faf92e8dSDavid Howells TP_printk("c=%08x %s ret=%d", 916faf92e8dSDavid Howells __entry->call, 917faf92e8dSDavid Howells __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 918faf92e8dSDavid Howells __entry->ret) 919faf92e8dSDavid Howells ); 920faf92e8dSDavid Howells 921faf92e8dSDavid Howells TRACE_EVENT(rxrpc_recvdata, 922faf92e8dSDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 92384997905SDavid Howells rxrpc_seq_t seq, unsigned int offset, unsigned int len, 92484997905SDavid Howells int ret), 92584997905SDavid Howells 92684997905SDavid Howells TP_ARGS(call, why, seq, offset, len, ret), 92784997905SDavid Howells 92884997905SDavid Howells TP_STRUCT__entry( 929a25e21f0SDavid Howells __field(unsigned int, call ) 93084997905SDavid Howells __field(enum rxrpc_recvmsg_trace, why ) 93184997905SDavid Howells __field(rxrpc_seq_t, seq ) 93284997905SDavid Howells __field(unsigned int, offset ) 93384997905SDavid Howells __field(unsigned int, len ) 93484997905SDavid Howells __field(int, ret ) 93584997905SDavid Howells ), 93684997905SDavid Howells 93784997905SDavid Howells TP_fast_assign( 938db9b2e0aSDavid Howells __entry->call = call ? call->debug_id : 0; 93984997905SDavid Howells __entry->why = why; 94084997905SDavid Howells __entry->seq = seq; 94184997905SDavid Howells __entry->offset = offset; 94284997905SDavid Howells __entry->len = len; 94384997905SDavid Howells __entry->ret = ret; 94484997905SDavid Howells ), 94584997905SDavid Howells 946a25e21f0SDavid Howells TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", 94784997905SDavid Howells __entry->call, 948b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 94984997905SDavid Howells __entry->seq, 95084997905SDavid Howells __entry->offset, 95184997905SDavid Howells __entry->len, 95284997905SDavid Howells __entry->ret) 95384997905SDavid Howells ); 95484997905SDavid Howells 955cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx, 956cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 9574700c4d8SDavid Howells int slot, rxrpc_serial_t send_serial), 958cf1a6474SDavid Howells 9594700c4d8SDavid Howells TP_ARGS(call, why, slot, send_serial), 960cf1a6474SDavid Howells 961cf1a6474SDavid Howells TP_STRUCT__entry( 962a25e21f0SDavid Howells __field(unsigned int, call ) 963cf1a6474SDavid Howells __field(enum rxrpc_rtt_tx_trace, why ) 9644700c4d8SDavid Howells __field(int, slot ) 965cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial ) 966cf1a6474SDavid Howells ), 967cf1a6474SDavid Howells 968cf1a6474SDavid Howells TP_fast_assign( 969a25e21f0SDavid Howells __entry->call = call->debug_id; 970cf1a6474SDavid Howells __entry->why = why; 9714700c4d8SDavid Howells __entry->slot = slot; 972cf1a6474SDavid Howells __entry->send_serial = send_serial; 973cf1a6474SDavid Howells ), 974cf1a6474SDavid Howells 9754700c4d8SDavid Howells TP_printk("c=%08x [%d] %s sr=%08x", 976cf1a6474SDavid Howells __entry->call, 9774700c4d8SDavid Howells __entry->slot, 978b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 979cf1a6474SDavid Howells __entry->send_serial) 980cf1a6474SDavid Howells ); 981cf1a6474SDavid Howells 982cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx, 983cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 9844700c4d8SDavid Howells int slot, 985cf1a6474SDavid Howells rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 986c410bf01SDavid Howells u32 rtt, u32 rto), 987cf1a6474SDavid Howells 9884700c4d8SDavid Howells TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto), 989cf1a6474SDavid Howells 990cf1a6474SDavid Howells TP_STRUCT__entry( 991a25e21f0SDavid Howells __field(unsigned int, call ) 992cf1a6474SDavid Howells __field(enum rxrpc_rtt_rx_trace, why ) 9934700c4d8SDavid Howells __field(int, slot ) 994cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial ) 995cf1a6474SDavid Howells __field(rxrpc_serial_t, resp_serial ) 996c410bf01SDavid Howells __field(u32, rtt ) 997c410bf01SDavid Howells __field(u32, rto ) 998cf1a6474SDavid Howells ), 999cf1a6474SDavid Howells 1000cf1a6474SDavid Howells TP_fast_assign( 1001a25e21f0SDavid Howells __entry->call = call->debug_id; 1002cf1a6474SDavid Howells __entry->why = why; 10034700c4d8SDavid Howells __entry->slot = slot; 1004cf1a6474SDavid Howells __entry->send_serial = send_serial; 1005cf1a6474SDavid Howells __entry->resp_serial = resp_serial; 1006cf1a6474SDavid Howells __entry->rtt = rtt; 1007c410bf01SDavid Howells __entry->rto = rto; 1008cf1a6474SDavid Howells ), 1009cf1a6474SDavid Howells 10104700c4d8SDavid Howells TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u", 1011cf1a6474SDavid Howells __entry->call, 10124700c4d8SDavid Howells __entry->slot, 1013b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 1014cf1a6474SDavid Howells __entry->send_serial, 1015cf1a6474SDavid Howells __entry->resp_serial, 1016cf1a6474SDavid Howells __entry->rtt, 1017c410bf01SDavid Howells __entry->rto) 1018cf1a6474SDavid Howells ); 1019cf1a6474SDavid Howells 1020fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer, 1021fc7ab6d2SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, 1022a158bdd3SDavid Howells unsigned long now), 1023fc7ab6d2SDavid Howells 1024a158bdd3SDavid Howells TP_ARGS(call, why, now), 1025fc7ab6d2SDavid Howells 1026fc7ab6d2SDavid Howells TP_STRUCT__entry( 1027a25e21f0SDavid Howells __field(unsigned int, call ) 1028fc7ab6d2SDavid Howells __field(enum rxrpc_timer_trace, why ) 1029a158bdd3SDavid Howells __field(long, now ) 1030a158bdd3SDavid Howells __field(long, ack_at ) 1031bd1fdf8cSDavid Howells __field(long, ack_lost_at ) 1032a158bdd3SDavid Howells __field(long, resend_at ) 1033a158bdd3SDavid Howells __field(long, ping_at ) 1034a158bdd3SDavid Howells __field(long, expect_rx_by ) 1035a158bdd3SDavid Howells __field(long, expect_req_by ) 1036a158bdd3SDavid Howells __field(long, expect_term_by ) 1037a158bdd3SDavid Howells __field(long, timer ) 1038fc7ab6d2SDavid Howells ), 1039fc7ab6d2SDavid Howells 1040fc7ab6d2SDavid Howells TP_fast_assign( 1041a25e21f0SDavid Howells __entry->call = call->debug_id; 1042fc7ab6d2SDavid Howells __entry->why = why; 1043fc7ab6d2SDavid Howells __entry->now = now; 1044530403d9SDavid Howells __entry->ack_at = call->delay_ack_at; 1045bd1fdf8cSDavid Howells __entry->ack_lost_at = call->ack_lost_at; 1046fc7ab6d2SDavid Howells __entry->resend_at = call->resend_at; 1047a158bdd3SDavid Howells __entry->expect_rx_by = call->expect_rx_by; 1048a158bdd3SDavid Howells __entry->expect_req_by = call->expect_req_by; 1049a158bdd3SDavid Howells __entry->expect_term_by = call->expect_term_by; 1050fc7ab6d2SDavid Howells __entry->timer = call->timer.expires; 1051fc7ab6d2SDavid Howells ), 1052fc7ab6d2SDavid Howells 1053a25e21f0SDavid Howells TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 1054fc7ab6d2SDavid Howells __entry->call, 1055b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_timer_traces), 1056a158bdd3SDavid Howells __entry->ack_at - __entry->now, 1057bd1fdf8cSDavid Howells __entry->ack_lost_at - __entry->now, 1058a158bdd3SDavid Howells __entry->resend_at - __entry->now, 1059a158bdd3SDavid Howells __entry->expect_rx_by - __entry->now, 1060a158bdd3SDavid Howells __entry->expect_req_by - __entry->now, 1061a158bdd3SDavid Howells __entry->expect_term_by - __entry->now, 1062a158bdd3SDavid Howells __entry->timer - __entry->now) 1063fc7ab6d2SDavid Howells ); 1064fc7ab6d2SDavid Howells 1065334dfbfcSDavid Howells TRACE_EVENT(rxrpc_timer_expired, 1066334dfbfcSDavid Howells TP_PROTO(struct rxrpc_call *call, unsigned long now), 1067334dfbfcSDavid Howells 1068334dfbfcSDavid Howells TP_ARGS(call, now), 1069334dfbfcSDavid Howells 1070334dfbfcSDavid Howells TP_STRUCT__entry( 1071334dfbfcSDavid Howells __field(unsigned int, call ) 1072334dfbfcSDavid Howells __field(long, now ) 1073334dfbfcSDavid Howells __field(long, ack_at ) 1074334dfbfcSDavid Howells __field(long, ack_lost_at ) 1075334dfbfcSDavid Howells __field(long, resend_at ) 1076334dfbfcSDavid Howells __field(long, ping_at ) 1077334dfbfcSDavid Howells __field(long, expect_rx_by ) 1078334dfbfcSDavid Howells __field(long, expect_req_by ) 1079334dfbfcSDavid Howells __field(long, expect_term_by ) 1080334dfbfcSDavid Howells __field(long, timer ) 1081334dfbfcSDavid Howells ), 1082334dfbfcSDavid Howells 1083334dfbfcSDavid Howells TP_fast_assign( 1084334dfbfcSDavid Howells __entry->call = call->debug_id; 1085334dfbfcSDavid Howells __entry->now = now; 1086530403d9SDavid Howells __entry->ack_at = call->delay_ack_at; 1087334dfbfcSDavid Howells __entry->ack_lost_at = call->ack_lost_at; 1088334dfbfcSDavid Howells __entry->resend_at = call->resend_at; 1089334dfbfcSDavid Howells __entry->expect_rx_by = call->expect_rx_by; 1090334dfbfcSDavid Howells __entry->expect_req_by = call->expect_req_by; 1091334dfbfcSDavid Howells __entry->expect_term_by = call->expect_term_by; 1092334dfbfcSDavid Howells __entry->timer = call->timer.expires; 1093334dfbfcSDavid Howells ), 1094334dfbfcSDavid Howells 1095334dfbfcSDavid Howells TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 1096334dfbfcSDavid Howells __entry->call, 1097334dfbfcSDavid Howells __entry->ack_at - __entry->now, 1098334dfbfcSDavid Howells __entry->ack_lost_at - __entry->now, 1099334dfbfcSDavid Howells __entry->resend_at - __entry->now, 1100334dfbfcSDavid Howells __entry->expect_rx_by - __entry->now, 1101334dfbfcSDavid Howells __entry->expect_req_by - __entry->now, 1102334dfbfcSDavid Howells __entry->expect_term_by - __entry->now, 1103334dfbfcSDavid Howells __entry->timer - __entry->now) 1104334dfbfcSDavid Howells ); 1105334dfbfcSDavid Howells 110689b475abSDavid Howells TRACE_EVENT(rxrpc_rx_lose, 110789b475abSDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 110889b475abSDavid Howells 110989b475abSDavid Howells TP_ARGS(sp), 111089b475abSDavid Howells 111189b475abSDavid Howells TP_STRUCT__entry( 111289b475abSDavid Howells __field_struct(struct rxrpc_host_header, hdr ) 111389b475abSDavid Howells ), 111489b475abSDavid Howells 111589b475abSDavid Howells TP_fast_assign( 111689b475abSDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 111789b475abSDavid Howells ), 111889b475abSDavid Howells 111989b475abSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 112089b475abSDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 112189b475abSDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 112289b475abSDavid Howells __entry->hdr.serial, __entry->hdr.seq, 112389b475abSDavid Howells __entry->hdr.type, __entry->hdr.flags, 1124b54a134aSDavid Howells __entry->hdr.type <= 15 ? 1125b54a134aSDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 112689b475abSDavid Howells ); 112789b475abSDavid Howells 11289c7ad434SDavid Howells TRACE_EVENT(rxrpc_propose_ack, 11299c7ad434SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1130530403d9SDavid Howells u8 ack_reason, rxrpc_serial_t serial), 11319c7ad434SDavid Howells 1132530403d9SDavid Howells TP_ARGS(call, why, ack_reason, serial), 11339c7ad434SDavid Howells 11349c7ad434SDavid Howells TP_STRUCT__entry( 1135a25e21f0SDavid Howells __field(unsigned int, call ) 11369c7ad434SDavid Howells __field(enum rxrpc_propose_ack_trace, why ) 11379c7ad434SDavid Howells __field(rxrpc_serial_t, serial ) 11389c7ad434SDavid Howells __field(u8, ack_reason ) 11399c7ad434SDavid Howells ), 11409c7ad434SDavid Howells 11419c7ad434SDavid Howells TP_fast_assign( 1142a25e21f0SDavid Howells __entry->call = call->debug_id; 11439c7ad434SDavid Howells __entry->why = why; 11449c7ad434SDavid Howells __entry->serial = serial; 11459c7ad434SDavid Howells __entry->ack_reason = ack_reason; 11469c7ad434SDavid Howells ), 11479c7ad434SDavid Howells 1148530403d9SDavid Howells TP_printk("c=%08x %s %s r=%08x", 11499c7ad434SDavid Howells __entry->call, 1150b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1151b54a134aSDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1152530403d9SDavid Howells __entry->serial) 11539c7ad434SDavid Howells ); 11549c7ad434SDavid Howells 115572f0c6fbSDavid Howells TRACE_EVENT(rxrpc_send_ack, 115672f0c6fbSDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 115772f0c6fbSDavid Howells u8 ack_reason, rxrpc_serial_t serial), 115872f0c6fbSDavid Howells 115972f0c6fbSDavid Howells TP_ARGS(call, why, ack_reason, serial), 116072f0c6fbSDavid Howells 116172f0c6fbSDavid Howells TP_STRUCT__entry( 116272f0c6fbSDavid Howells __field(unsigned int, call ) 116372f0c6fbSDavid Howells __field(enum rxrpc_propose_ack_trace, why ) 116472f0c6fbSDavid Howells __field(rxrpc_serial_t, serial ) 116572f0c6fbSDavid Howells __field(u8, ack_reason ) 116672f0c6fbSDavid Howells ), 116772f0c6fbSDavid Howells 116872f0c6fbSDavid Howells TP_fast_assign( 116972f0c6fbSDavid Howells __entry->call = call->debug_id; 117072f0c6fbSDavid Howells __entry->why = why; 117172f0c6fbSDavid Howells __entry->serial = serial; 117272f0c6fbSDavid Howells __entry->ack_reason = ack_reason; 117372f0c6fbSDavid Howells ), 117472f0c6fbSDavid Howells 117572f0c6fbSDavid Howells TP_printk("c=%08x %s %s r=%08x", 117672f0c6fbSDavid Howells __entry->call, 117772f0c6fbSDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 117872f0c6fbSDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 117972f0c6fbSDavid Howells __entry->serial) 118072f0c6fbSDavid Howells ); 118172f0c6fbSDavid Howells 1182530403d9SDavid Howells TRACE_EVENT(rxrpc_drop_ack, 1183530403d9SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1184530403d9SDavid Howells u8 ack_reason, rxrpc_serial_t serial, bool nobuf), 1185530403d9SDavid Howells 1186530403d9SDavid Howells TP_ARGS(call, why, ack_reason, serial, nobuf), 1187530403d9SDavid Howells 1188530403d9SDavid Howells TP_STRUCT__entry( 1189530403d9SDavid Howells __field(unsigned int, call ) 1190530403d9SDavid Howells __field(enum rxrpc_propose_ack_trace, why ) 1191530403d9SDavid Howells __field(rxrpc_serial_t, serial ) 1192530403d9SDavid Howells __field(u8, ack_reason ) 1193530403d9SDavid Howells __field(bool, nobuf ) 1194530403d9SDavid Howells ), 1195530403d9SDavid Howells 1196530403d9SDavid Howells TP_fast_assign( 1197530403d9SDavid Howells __entry->call = call->debug_id; 1198530403d9SDavid Howells __entry->why = why; 1199530403d9SDavid Howells __entry->serial = serial; 1200530403d9SDavid Howells __entry->ack_reason = ack_reason; 1201530403d9SDavid Howells __entry->nobuf = nobuf; 1202530403d9SDavid Howells ), 1203530403d9SDavid Howells 1204530403d9SDavid Howells TP_printk("c=%08x %s %s r=%08x nbf=%u", 1205530403d9SDavid Howells __entry->call, 1206530403d9SDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1207530403d9SDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1208530403d9SDavid Howells __entry->serial, __entry->nobuf) 1209530403d9SDavid Howells ); 1210530403d9SDavid Howells 1211c6672e3fSDavid Howells TRACE_EVENT(rxrpc_retransmit, 1212*a4ea4c47SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry), 1213c6672e3fSDavid Howells 1214*a4ea4c47SDavid Howells TP_ARGS(call, seq, expiry), 1215c6672e3fSDavid Howells 1216c6672e3fSDavid Howells TP_STRUCT__entry( 1217a25e21f0SDavid Howells __field(unsigned int, call ) 1218c6672e3fSDavid Howells __field(rxrpc_seq_t, seq ) 1219c6672e3fSDavid Howells __field(s64, expiry ) 1220c6672e3fSDavid Howells ), 1221c6672e3fSDavid Howells 1222c6672e3fSDavid Howells TP_fast_assign( 1223a25e21f0SDavid Howells __entry->call = call->debug_id; 1224c6672e3fSDavid Howells __entry->seq = seq; 1225c6672e3fSDavid Howells __entry->expiry = expiry; 1226c6672e3fSDavid Howells ), 1227c6672e3fSDavid Howells 1228*a4ea4c47SDavid Howells TP_printk("c=%08x q=%x xp=%lld", 1229c6672e3fSDavid Howells __entry->call, 1230c6672e3fSDavid Howells __entry->seq, 1231c6672e3fSDavid Howells __entry->expiry) 1232c6672e3fSDavid Howells ); 1233c6672e3fSDavid Howells 123457494343SDavid Howells TRACE_EVENT(rxrpc_congest, 123557494343SDavid Howells TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 123657494343SDavid Howells rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), 123757494343SDavid Howells 123857494343SDavid Howells TP_ARGS(call, summary, ack_serial, change), 123957494343SDavid Howells 124057494343SDavid Howells TP_STRUCT__entry( 1241a25e21f0SDavid Howells __field(unsigned int, call ) 124257494343SDavid Howells __field(enum rxrpc_congest_change, change ) 124357494343SDavid Howells __field(rxrpc_seq_t, hard_ack ) 124457494343SDavid Howells __field(rxrpc_seq_t, top ) 124557494343SDavid Howells __field(rxrpc_seq_t, lowest_nak ) 124657494343SDavid Howells __field(rxrpc_serial_t, ack_serial ) 124757494343SDavid Howells __field_struct(struct rxrpc_ack_summary, sum ) 124857494343SDavid Howells ), 124957494343SDavid Howells 125057494343SDavid Howells TP_fast_assign( 1251a25e21f0SDavid Howells __entry->call = call->debug_id; 125257494343SDavid Howells __entry->change = change; 1253*a4ea4c47SDavid Howells __entry->hard_ack = call->acks_hard_ack; 125457494343SDavid Howells __entry->top = call->tx_top; 125557494343SDavid Howells __entry->lowest_nak = call->acks_lowest_nak; 125657494343SDavid Howells __entry->ack_serial = ack_serial; 125757494343SDavid Howells memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 125857494343SDavid Howells ), 125957494343SDavid Howells 1260*a4ea4c47SDavid Howells TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nA=%u,%u+%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s", 126157494343SDavid Howells __entry->call, 126257494343SDavid Howells __entry->ack_serial, 1263b54a134aSDavid Howells __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 126457494343SDavid Howells __entry->hard_ack, 1265b54a134aSDavid Howells __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), 126657494343SDavid Howells __entry->sum.cwnd, 126757494343SDavid Howells __entry->sum.ssthresh, 126857494343SDavid Howells __entry->sum.nr_acks, __entry->sum.nr_nacks, 126957494343SDavid Howells __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, 127057494343SDavid Howells __entry->sum.nr_rot_new_acks, 127157494343SDavid Howells __entry->top - __entry->hard_ack, 127257494343SDavid Howells __entry->sum.cumulative_acks, 127357494343SDavid Howells __entry->sum.dup_acks, 127457494343SDavid Howells __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", 1275b54a134aSDavid Howells __print_symbolic(__entry->change, rxrpc_congest_changes), 127657494343SDavid Howells __entry->sum.retrans_timeo ? " rTxTo" : "") 127757494343SDavid Howells ); 127857494343SDavid Howells 1279b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_disconnect_call, 1280b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1281b1d9f7fdSDavid Howells 1282b1d9f7fdSDavid Howells TP_ARGS(call), 1283b1d9f7fdSDavid Howells 1284b1d9f7fdSDavid Howells TP_STRUCT__entry( 1285a25e21f0SDavid Howells __field(unsigned int, call ) 1286b1d9f7fdSDavid Howells __field(u32, abort_code ) 1287b1d9f7fdSDavid Howells ), 1288b1d9f7fdSDavid Howells 1289b1d9f7fdSDavid Howells TP_fast_assign( 1290a25e21f0SDavid Howells __entry->call = call->debug_id; 1291b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1292b1d9f7fdSDavid Howells ), 1293b1d9f7fdSDavid Howells 1294a25e21f0SDavid Howells TP_printk("c=%08x ab=%08x", 1295b1d9f7fdSDavid Howells __entry->call, 1296b1d9f7fdSDavid Howells __entry->abort_code) 1297b1d9f7fdSDavid Howells ); 1298b1d9f7fdSDavid Howells 1299b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_improper_term, 1300b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1301b1d9f7fdSDavid Howells 1302b1d9f7fdSDavid Howells TP_ARGS(call), 1303b1d9f7fdSDavid Howells 1304b1d9f7fdSDavid Howells TP_STRUCT__entry( 1305a25e21f0SDavid Howells __field(unsigned int, call ) 1306b1d9f7fdSDavid Howells __field(u32, abort_code ) 1307b1d9f7fdSDavid Howells ), 1308b1d9f7fdSDavid Howells 1309b1d9f7fdSDavid Howells TP_fast_assign( 1310a25e21f0SDavid Howells __entry->call = call->debug_id; 1311b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1312b1d9f7fdSDavid Howells ), 1313b1d9f7fdSDavid Howells 1314a25e21f0SDavid Howells TP_printk("c=%08x ab=%08x", 1315b1d9f7fdSDavid Howells __entry->call, 1316b1d9f7fdSDavid Howells __entry->abort_code) 1317b1d9f7fdSDavid Howells ); 1318b1d9f7fdSDavid Howells 1319fb46f6eeSDavid Howells TRACE_EVENT(rxrpc_rx_eproto, 1320fb46f6eeSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1321fb46f6eeSDavid Howells const char *why), 1322fb46f6eeSDavid Howells 1323fb46f6eeSDavid Howells TP_ARGS(call, serial, why), 1324fb46f6eeSDavid Howells 1325fb46f6eeSDavid Howells TP_STRUCT__entry( 1326a25e21f0SDavid Howells __field(unsigned int, call ) 1327fb46f6eeSDavid Howells __field(rxrpc_serial_t, serial ) 1328fb46f6eeSDavid Howells __field(const char *, why ) 1329fb46f6eeSDavid Howells ), 1330fb46f6eeSDavid Howells 1331fb46f6eeSDavid Howells TP_fast_assign( 133299f0eae6SDavid Howells __entry->call = call ? call->debug_id : 0; 1333fb46f6eeSDavid Howells __entry->serial = serial; 1334fb46f6eeSDavid Howells __entry->why = why; 1335fb46f6eeSDavid Howells ), 1336fb46f6eeSDavid Howells 1337a25e21f0SDavid Howells TP_printk("c=%08x EPROTO %08x %s", 1338fb46f6eeSDavid Howells __entry->call, 1339fb46f6eeSDavid Howells __entry->serial, 1340fb46f6eeSDavid Howells __entry->why) 1341fb46f6eeSDavid Howells ); 1342fb46f6eeSDavid Howells 134389ca6948SDavid Howells TRACE_EVENT(rxrpc_connect_call, 134489ca6948SDavid Howells TP_PROTO(struct rxrpc_call *call), 134589ca6948SDavid Howells 134689ca6948SDavid Howells TP_ARGS(call), 134789ca6948SDavid Howells 134889ca6948SDavid Howells TP_STRUCT__entry( 1349a25e21f0SDavid Howells __field(unsigned int, call ) 135089ca6948SDavid Howells __field(unsigned long, user_call_ID ) 135189ca6948SDavid Howells __field(u32, cid ) 135289ca6948SDavid Howells __field(u32, call_id ) 135389ca6948SDavid Howells ), 135489ca6948SDavid Howells 135589ca6948SDavid Howells TP_fast_assign( 1356a25e21f0SDavid Howells __entry->call = call->debug_id; 135789ca6948SDavid Howells __entry->user_call_ID = call->user_call_ID; 135889ca6948SDavid Howells __entry->cid = call->cid; 135989ca6948SDavid Howells __entry->call_id = call->call_id; 136089ca6948SDavid Howells ), 136189ca6948SDavid Howells 1362a25e21f0SDavid Howells TP_printk("c=%08x u=%p %08x:%08x", 136389ca6948SDavid Howells __entry->call, 136489ca6948SDavid Howells (void *)__entry->user_call_ID, 136589ca6948SDavid Howells __entry->cid, 136689ca6948SDavid Howells __entry->call_id) 136789ca6948SDavid Howells ); 136889ca6948SDavid Howells 1369827efed6SDavid Howells TRACE_EVENT(rxrpc_resend, 1370*a4ea4c47SDavid Howells TP_PROTO(struct rxrpc_call *call), 1371827efed6SDavid Howells 1372*a4ea4c47SDavid Howells TP_ARGS(call), 1373827efed6SDavid Howells 1374827efed6SDavid Howells TP_STRUCT__entry( 1375a25e21f0SDavid Howells __field(unsigned int, call ) 1376*a4ea4c47SDavid Howells __field(rxrpc_seq_t, seq ) 1377827efed6SDavid Howells ), 1378827efed6SDavid Howells 1379827efed6SDavid Howells TP_fast_assign( 1380a25e21f0SDavid Howells __entry->call = call->debug_id; 1381*a4ea4c47SDavid Howells __entry->seq = call->acks_hard_ack; 1382827efed6SDavid Howells ), 1383827efed6SDavid Howells 1384*a4ea4c47SDavid Howells TP_printk("c=%08x q=%x", 1385827efed6SDavid Howells __entry->call, 1386*a4ea4c47SDavid Howells __entry->seq) 1387827efed6SDavid Howells ); 1388827efed6SDavid Howells 1389494337c9SDavid Howells TRACE_EVENT(rxrpc_rx_icmp, 1390494337c9SDavid Howells TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, 1391494337c9SDavid Howells struct sockaddr_rxrpc *srx), 1392494337c9SDavid Howells 1393494337c9SDavid Howells TP_ARGS(peer, ee, srx), 1394494337c9SDavid Howells 1395494337c9SDavid Howells TP_STRUCT__entry( 1396494337c9SDavid Howells __field(unsigned int, peer ) 1397494337c9SDavid Howells __field_struct(struct sock_extended_err, ee ) 1398494337c9SDavid Howells __field_struct(struct sockaddr_rxrpc, srx ) 1399494337c9SDavid Howells ), 1400494337c9SDavid Howells 1401494337c9SDavid Howells TP_fast_assign( 1402494337c9SDavid Howells __entry->peer = peer->debug_id; 1403494337c9SDavid Howells memcpy(&__entry->ee, ee, sizeof(__entry->ee)); 1404494337c9SDavid Howells memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 1405494337c9SDavid Howells ), 1406494337c9SDavid Howells 1407494337c9SDavid Howells TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", 1408494337c9SDavid Howells __entry->peer, 1409494337c9SDavid Howells __entry->ee.ee_origin, 1410494337c9SDavid Howells __entry->ee.ee_type, 1411494337c9SDavid Howells __entry->ee.ee_code, 1412494337c9SDavid Howells __entry->ee.ee_info, 1413494337c9SDavid Howells __entry->ee.ee_data, 1414494337c9SDavid Howells __entry->ee.ee_errno, 1415494337c9SDavid Howells &__entry->srx.transport) 1416494337c9SDavid Howells ); 1417494337c9SDavid Howells 14186b47fe1dSDavid Howells TRACE_EVENT(rxrpc_tx_fail, 14196b47fe1dSDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, 14204764c0daSDavid Howells enum rxrpc_tx_point where), 14216b47fe1dSDavid Howells 14224764c0daSDavid Howells TP_ARGS(debug_id, serial, ret, where), 14236b47fe1dSDavid Howells 14246b47fe1dSDavid Howells TP_STRUCT__entry( 14256b47fe1dSDavid Howells __field(unsigned int, debug_id ) 14266b47fe1dSDavid Howells __field(rxrpc_serial_t, serial ) 14276b47fe1dSDavid Howells __field(int, ret ) 14284764c0daSDavid Howells __field(enum rxrpc_tx_point, where ) 14296b47fe1dSDavid Howells ), 14306b47fe1dSDavid Howells 14316b47fe1dSDavid Howells TP_fast_assign( 14326b47fe1dSDavid Howells __entry->debug_id = debug_id; 14336b47fe1dSDavid Howells __entry->serial = serial; 14346b47fe1dSDavid Howells __entry->ret = ret; 14354764c0daSDavid Howells __entry->where = where; 14366b47fe1dSDavid Howells ), 14376b47fe1dSDavid Howells 14386b47fe1dSDavid Howells TP_printk("c=%08x r=%x ret=%d %s", 14396b47fe1dSDavid Howells __entry->debug_id, 14406b47fe1dSDavid Howells __entry->serial, 14416b47fe1dSDavid Howells __entry->ret, 14424764c0daSDavid Howells __print_symbolic(__entry->where, rxrpc_tx_points)) 14436b47fe1dSDavid Howells ); 14446b47fe1dSDavid Howells 14451a025028SDavid Howells TRACE_EVENT(rxrpc_call_reset, 14461a025028SDavid Howells TP_PROTO(struct rxrpc_call *call), 14471a025028SDavid Howells 14481a025028SDavid Howells TP_ARGS(call), 14491a025028SDavid Howells 14501a025028SDavid Howells TP_STRUCT__entry( 14511a025028SDavid Howells __field(unsigned int, debug_id ) 14521a025028SDavid Howells __field(u32, cid ) 14531a025028SDavid Howells __field(u32, call_id ) 14541a025028SDavid Howells __field(rxrpc_serial_t, call_serial ) 14551a025028SDavid Howells __field(rxrpc_serial_t, conn_serial ) 14561a025028SDavid Howells __field(rxrpc_seq_t, tx_seq ) 14571a025028SDavid Howells __field(rxrpc_seq_t, rx_seq ) 14581a025028SDavid Howells ), 14591a025028SDavid Howells 14601a025028SDavid Howells TP_fast_assign( 14611a025028SDavid Howells __entry->debug_id = call->debug_id; 14621a025028SDavid Howells __entry->cid = call->cid; 14631a025028SDavid Howells __entry->call_id = call->call_id; 14641a025028SDavid Howells __entry->call_serial = call->rx_serial; 14651a025028SDavid Howells __entry->conn_serial = call->conn->hi_serial; 1466*a4ea4c47SDavid Howells __entry->tx_seq = call->acks_hard_ack; 14675d7edbc9SDavid Howells __entry->rx_seq = call->rx_highest_seq; 14681a025028SDavid Howells ), 14691a025028SDavid Howells 14701a025028SDavid Howells TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", 14711a025028SDavid Howells __entry->debug_id, 14721a025028SDavid Howells __entry->cid, __entry->call_id, 14731a025028SDavid Howells __entry->call_serial, __entry->conn_serial, 14741a025028SDavid Howells __entry->tx_seq, __entry->rx_seq) 14751a025028SDavid Howells ); 14761a025028SDavid Howells 14774272d303SDavid Howells TRACE_EVENT(rxrpc_notify_socket, 14784272d303SDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), 14794272d303SDavid Howells 14804272d303SDavid Howells TP_ARGS(debug_id, serial), 14814272d303SDavid Howells 14824272d303SDavid Howells TP_STRUCT__entry( 14834272d303SDavid Howells __field(unsigned int, debug_id ) 14844272d303SDavid Howells __field(rxrpc_serial_t, serial ) 14854272d303SDavid Howells ), 14864272d303SDavid Howells 14874272d303SDavid Howells TP_fast_assign( 14884272d303SDavid Howells __entry->debug_id = debug_id; 14894272d303SDavid Howells __entry->serial = serial; 14904272d303SDavid Howells ), 14914272d303SDavid Howells 14924272d303SDavid Howells TP_printk("c=%08x r=%08x", 14934272d303SDavid Howells __entry->debug_id, 14944272d303SDavid Howells __entry->serial) 14954272d303SDavid Howells ); 14964272d303SDavid Howells 1497d1f12947SDavid Howells TRACE_EVENT(rxrpc_rx_discard_ack, 1498d1f12947SDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, 1499d1f12947SDavid Howells rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first, 1500d1f12947SDavid Howells rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev), 1501d1f12947SDavid Howells 1502d1f12947SDavid Howells TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first, 1503d1f12947SDavid Howells prev_pkt, call_ackr_prev), 1504d1f12947SDavid Howells 1505d1f12947SDavid Howells TP_STRUCT__entry( 1506d1f12947SDavid Howells __field(unsigned int, debug_id ) 1507d1f12947SDavid Howells __field(rxrpc_serial_t, serial ) 1508d1f12947SDavid Howells __field(rxrpc_seq_t, first_soft_ack) 1509d1f12947SDavid Howells __field(rxrpc_seq_t, call_ackr_first) 1510d1f12947SDavid Howells __field(rxrpc_seq_t, prev_pkt) 1511d1f12947SDavid Howells __field(rxrpc_seq_t, call_ackr_prev) 1512d1f12947SDavid Howells ), 1513d1f12947SDavid Howells 1514d1f12947SDavid Howells TP_fast_assign( 1515d1f12947SDavid Howells __entry->debug_id = debug_id; 1516d1f12947SDavid Howells __entry->serial = serial; 1517d1f12947SDavid Howells __entry->first_soft_ack = first_soft_ack; 1518d1f12947SDavid Howells __entry->call_ackr_first = call_ackr_first; 1519d1f12947SDavid Howells __entry->prev_pkt = prev_pkt; 1520d1f12947SDavid Howells __entry->call_ackr_prev = call_ackr_prev; 1521d1f12947SDavid Howells ), 1522d1f12947SDavid Howells 1523d1f12947SDavid Howells TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x", 1524d1f12947SDavid Howells __entry->debug_id, 1525d1f12947SDavid Howells __entry->serial, 1526d1f12947SDavid Howells __entry->first_soft_ack, 1527d1f12947SDavid Howells __entry->call_ackr_first, 1528d1f12947SDavid Howells __entry->prev_pkt, 1529d1f12947SDavid Howells __entry->call_ackr_prev) 1530d1f12947SDavid Howells ); 1531d1f12947SDavid Howells 15324d843be5SDavid Howells TRACE_EVENT(rxrpc_req_ack, 15334d843be5SDavid Howells TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq, 15344d843be5SDavid Howells enum rxrpc_req_ack_trace why), 15354d843be5SDavid Howells 15364d843be5SDavid Howells TP_ARGS(call_debug_id, seq, why), 15374d843be5SDavid Howells 15384d843be5SDavid Howells TP_STRUCT__entry( 15394d843be5SDavid Howells __field(unsigned int, call_debug_id ) 15404d843be5SDavid Howells __field(rxrpc_seq_t, seq ) 15414d843be5SDavid Howells __field(enum rxrpc_req_ack_trace, why ) 15424d843be5SDavid Howells ), 15434d843be5SDavid Howells 15444d843be5SDavid Howells TP_fast_assign( 15454d843be5SDavid Howells __entry->call_debug_id = call_debug_id; 15464d843be5SDavid Howells __entry->seq = seq; 15474d843be5SDavid Howells __entry->why = why; 15484d843be5SDavid Howells ), 15494d843be5SDavid Howells 15504d843be5SDavid Howells TP_printk("c=%08x q=%08x REQ-%s", 15514d843be5SDavid Howells __entry->call_debug_id, 15524d843be5SDavid Howells __entry->seq, 15534d843be5SDavid Howells __print_symbolic(__entry->why, rxrpc_req_ack_traces)) 15544d843be5SDavid Howells ); 15554d843be5SDavid Howells 155602a19356SDavid Howells TRACE_EVENT(rxrpc_txbuf, 155702a19356SDavid Howells TP_PROTO(unsigned int debug_id, 155802a19356SDavid Howells unsigned int call_debug_id, rxrpc_seq_t seq, 155902a19356SDavid Howells int ref, enum rxrpc_txbuf_trace what), 156002a19356SDavid Howells 156102a19356SDavid Howells TP_ARGS(debug_id, call_debug_id, seq, ref, what), 156202a19356SDavid Howells 156302a19356SDavid Howells TP_STRUCT__entry( 156402a19356SDavid Howells __field(unsigned int, debug_id ) 156502a19356SDavid Howells __field(unsigned int, call_debug_id ) 156602a19356SDavid Howells __field(rxrpc_seq_t, seq ) 156702a19356SDavid Howells __field(int, ref ) 156802a19356SDavid Howells __field(enum rxrpc_txbuf_trace, what ) 156902a19356SDavid Howells ), 157002a19356SDavid Howells 157102a19356SDavid Howells TP_fast_assign( 157202a19356SDavid Howells __entry->debug_id = debug_id; 157302a19356SDavid Howells __entry->call_debug_id = call_debug_id; 157402a19356SDavid Howells __entry->seq = seq; 157502a19356SDavid Howells __entry->ref = ref; 157602a19356SDavid Howells __entry->what = what; 157702a19356SDavid Howells ), 157802a19356SDavid Howells 157902a19356SDavid Howells TP_printk("B=%08x c=%08x q=%08x %s r=%d", 158002a19356SDavid Howells __entry->debug_id, 158102a19356SDavid Howells __entry->call_debug_id, 158202a19356SDavid Howells __entry->seq, 158302a19356SDavid Howells __print_symbolic(__entry->what, rxrpc_txbuf_traces), 158402a19356SDavid Howells __entry->ref) 158502a19356SDavid Howells ); 158602a19356SDavid Howells 1587dc9fd093SDavid Howells #undef EM 1588dc9fd093SDavid Howells #undef E_ 1589df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */ 1590df844fd4SDavid Howells 1591df844fd4SDavid Howells /* This part must be outside protection */ 1592df844fd4SDavid Howells #include <trace/define_trace.h> 1593