1df844fd4SDavid Howells /* AF_RXRPC tracepoints 2df844fd4SDavid Howells * 3df844fd4SDavid Howells * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 4df844fd4SDavid Howells * Written by David Howells (dhowells@redhat.com) 5df844fd4SDavid Howells * 6df844fd4SDavid Howells * This program is free software; you can redistribute it and/or 7df844fd4SDavid Howells * modify it under the terms of the GNU General Public Licence 8df844fd4SDavid Howells * as published by the Free Software Foundation; either version 9df844fd4SDavid Howells * 2 of the Licence, or (at your option) any later version. 10df844fd4SDavid Howells */ 11df844fd4SDavid Howells #undef TRACE_SYSTEM 12df844fd4SDavid Howells #define TRACE_SYSTEM rxrpc 13df844fd4SDavid Howells 14df844fd4SDavid Howells #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) 15df844fd4SDavid Howells #define _TRACE_RXRPC_H 16df844fd4SDavid Howells 17df844fd4SDavid Howells #include <linux/tracepoint.h> 18df844fd4SDavid Howells 19b54a134aSDavid Howells /* 20b54a134aSDavid Howells * Define enums for tracing information. 21b54a134aSDavid Howells * 22b54a134aSDavid Howells * These should all be kept sorted, making it easier to match the string 23b54a134aSDavid Howells * mapping tables further on. 24b54a134aSDavid Howells */ 25b54a134aSDavid Howells #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY 26b54a134aSDavid Howells #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY 27b54a134aSDavid Howells 28b54a134aSDavid Howells enum rxrpc_skb_trace { 29b54a134aSDavid Howells rxrpc_skb_rx_cleaned, 30b54a134aSDavid Howells rxrpc_skb_rx_freed, 31b54a134aSDavid Howells rxrpc_skb_rx_got, 32b54a134aSDavid Howells rxrpc_skb_rx_lost, 33b54a134aSDavid Howells rxrpc_skb_rx_purged, 34b54a134aSDavid Howells rxrpc_skb_rx_received, 35b54a134aSDavid Howells rxrpc_skb_rx_rotated, 36b54a134aSDavid Howells rxrpc_skb_rx_seen, 37b54a134aSDavid Howells rxrpc_skb_tx_cleaned, 38b54a134aSDavid Howells rxrpc_skb_tx_freed, 39b54a134aSDavid Howells rxrpc_skb_tx_got, 40b54a134aSDavid Howells rxrpc_skb_tx_new, 41b54a134aSDavid Howells rxrpc_skb_tx_rotated, 42b54a134aSDavid Howells rxrpc_skb_tx_seen, 43b54a134aSDavid Howells }; 44b54a134aSDavid Howells 45b54a134aSDavid Howells enum rxrpc_conn_trace { 46b54a134aSDavid Howells rxrpc_conn_got, 47b54a134aSDavid Howells rxrpc_conn_new_client, 48b54a134aSDavid Howells rxrpc_conn_new_service, 49b54a134aSDavid Howells rxrpc_conn_put_client, 50b54a134aSDavid Howells rxrpc_conn_put_service, 51b54a134aSDavid Howells rxrpc_conn_queued, 52b54a134aSDavid Howells rxrpc_conn_seen, 53b54a134aSDavid Howells }; 54b54a134aSDavid Howells 55b54a134aSDavid Howells enum rxrpc_client_trace { 56b54a134aSDavid Howells rxrpc_client_activate_chans, 57b54a134aSDavid Howells rxrpc_client_alloc, 58b54a134aSDavid Howells rxrpc_client_chan_activate, 59b54a134aSDavid Howells rxrpc_client_chan_disconnect, 60b54a134aSDavid Howells rxrpc_client_chan_pass, 61b54a134aSDavid Howells rxrpc_client_chan_unstarted, 62b54a134aSDavid Howells rxrpc_client_cleanup, 63b54a134aSDavid Howells rxrpc_client_count, 64b54a134aSDavid Howells rxrpc_client_discard, 65b54a134aSDavid Howells rxrpc_client_duplicate, 66b54a134aSDavid Howells rxrpc_client_exposed, 67b54a134aSDavid Howells rxrpc_client_replace, 68b54a134aSDavid Howells rxrpc_client_to_active, 69b54a134aSDavid Howells rxrpc_client_to_culled, 70b54a134aSDavid Howells rxrpc_client_to_idle, 71b54a134aSDavid Howells rxrpc_client_to_inactive, 72b54a134aSDavid Howells rxrpc_client_to_upgrade, 73b54a134aSDavid Howells rxrpc_client_to_waiting, 74b54a134aSDavid Howells rxrpc_client_uncount, 75b54a134aSDavid Howells }; 76b54a134aSDavid Howells 77b54a134aSDavid Howells enum rxrpc_call_trace { 78b54a134aSDavid Howells rxrpc_call_connected, 79b54a134aSDavid Howells rxrpc_call_error, 80b54a134aSDavid Howells rxrpc_call_got, 81b54a134aSDavid Howells rxrpc_call_got_kernel, 82b54a134aSDavid Howells rxrpc_call_got_userid, 83b54a134aSDavid Howells rxrpc_call_new_client, 84b54a134aSDavid Howells rxrpc_call_new_service, 85b54a134aSDavid Howells rxrpc_call_put, 86b54a134aSDavid Howells rxrpc_call_put_kernel, 87b54a134aSDavid Howells rxrpc_call_put_noqueue, 88b54a134aSDavid Howells rxrpc_call_put_userid, 89b54a134aSDavid Howells rxrpc_call_queued, 90b54a134aSDavid Howells rxrpc_call_queued_ref, 91b54a134aSDavid Howells rxrpc_call_release, 92b54a134aSDavid Howells rxrpc_call_seen, 93b54a134aSDavid Howells }; 94b54a134aSDavid Howells 95b54a134aSDavid Howells enum rxrpc_transmit_trace { 96b54a134aSDavid Howells rxrpc_transmit_await_reply, 97b54a134aSDavid Howells rxrpc_transmit_end, 98b54a134aSDavid Howells rxrpc_transmit_queue, 99b54a134aSDavid Howells rxrpc_transmit_queue_last, 100b54a134aSDavid Howells rxrpc_transmit_rotate, 101b54a134aSDavid Howells rxrpc_transmit_rotate_last, 102b54a134aSDavid Howells rxrpc_transmit_wait, 103b54a134aSDavid Howells }; 104b54a134aSDavid Howells 105b54a134aSDavid Howells enum rxrpc_receive_trace { 106b54a134aSDavid Howells rxrpc_receive_end, 107b54a134aSDavid Howells rxrpc_receive_front, 108b54a134aSDavid Howells rxrpc_receive_incoming, 109b54a134aSDavid Howells rxrpc_receive_queue, 110b54a134aSDavid Howells rxrpc_receive_queue_last, 111b54a134aSDavid Howells rxrpc_receive_rotate, 112b54a134aSDavid Howells }; 113b54a134aSDavid Howells 114b54a134aSDavid Howells enum rxrpc_recvmsg_trace { 115b54a134aSDavid Howells rxrpc_recvmsg_cont, 116b54a134aSDavid Howells rxrpc_recvmsg_data_return, 117b54a134aSDavid Howells rxrpc_recvmsg_dequeue, 118b54a134aSDavid Howells rxrpc_recvmsg_enter, 119b54a134aSDavid Howells rxrpc_recvmsg_full, 120b54a134aSDavid Howells rxrpc_recvmsg_hole, 121b54a134aSDavid Howells rxrpc_recvmsg_next, 122540b1c48SDavid Howells rxrpc_recvmsg_requeue, 123b54a134aSDavid Howells rxrpc_recvmsg_return, 124b54a134aSDavid Howells rxrpc_recvmsg_terminal, 125b54a134aSDavid Howells rxrpc_recvmsg_to_be_accepted, 126b54a134aSDavid Howells rxrpc_recvmsg_wait, 127b54a134aSDavid Howells }; 128b54a134aSDavid Howells 129b54a134aSDavid Howells enum rxrpc_rtt_tx_trace { 130b54a134aSDavid Howells rxrpc_rtt_tx_data, 131b54a134aSDavid Howells rxrpc_rtt_tx_ping, 132b54a134aSDavid Howells }; 133b54a134aSDavid Howells 134b54a134aSDavid Howells enum rxrpc_rtt_rx_trace { 135b54a134aSDavid Howells rxrpc_rtt_rx_ping_response, 136b54a134aSDavid Howells rxrpc_rtt_rx_requested_ack, 137b54a134aSDavid Howells }; 138b54a134aSDavid Howells 139b54a134aSDavid Howells enum rxrpc_timer_trace { 140b54a134aSDavid Howells rxrpc_timer_begin, 141*a158bdd3SDavid Howells rxrpc_timer_exp_ack, 142*a158bdd3SDavid Howells rxrpc_timer_exp_hard, 143*a158bdd3SDavid Howells rxrpc_timer_exp_idle, 144*a158bdd3SDavid Howells rxrpc_timer_exp_normal, 145*a158bdd3SDavid Howells rxrpc_timer_exp_ping, 146*a158bdd3SDavid Howells rxrpc_timer_exp_resend, 147b54a134aSDavid Howells rxrpc_timer_expired, 148b54a134aSDavid Howells rxrpc_timer_init_for_reply, 149b54a134aSDavid Howells rxrpc_timer_init_for_send_reply, 150*a158bdd3SDavid Howells rxrpc_timer_restart, 151b54a134aSDavid Howells rxrpc_timer_set_for_ack, 152*a158bdd3SDavid Howells rxrpc_timer_set_for_hard, 153*a158bdd3SDavid Howells rxrpc_timer_set_for_idle, 154*a158bdd3SDavid Howells rxrpc_timer_set_for_normal, 155b54a134aSDavid Howells rxrpc_timer_set_for_ping, 156b54a134aSDavid Howells rxrpc_timer_set_for_resend, 157b54a134aSDavid Howells rxrpc_timer_set_for_send, 158b54a134aSDavid Howells }; 159b54a134aSDavid Howells 160b54a134aSDavid Howells enum rxrpc_propose_ack_trace { 161b54a134aSDavid Howells rxrpc_propose_ack_client_tx_end, 162b54a134aSDavid Howells rxrpc_propose_ack_input_data, 163b54a134aSDavid Howells rxrpc_propose_ack_ping_for_lost_ack, 164b54a134aSDavid Howells rxrpc_propose_ack_ping_for_lost_reply, 165b54a134aSDavid Howells rxrpc_propose_ack_ping_for_params, 166b54a134aSDavid Howells rxrpc_propose_ack_processing_op, 167b54a134aSDavid Howells rxrpc_propose_ack_respond_to_ack, 168b54a134aSDavid Howells rxrpc_propose_ack_respond_to_ping, 169b54a134aSDavid Howells rxrpc_propose_ack_retry_tx, 170b54a134aSDavid Howells rxrpc_propose_ack_rotate_rx, 171b54a134aSDavid Howells rxrpc_propose_ack_terminal_ack, 172b54a134aSDavid Howells }; 173b54a134aSDavid Howells 174b54a134aSDavid Howells enum rxrpc_propose_ack_outcome { 175b54a134aSDavid Howells rxrpc_propose_ack_subsume, 176b54a134aSDavid Howells rxrpc_propose_ack_update, 177b54a134aSDavid Howells rxrpc_propose_ack_use, 178b54a134aSDavid Howells }; 179b54a134aSDavid Howells 180b54a134aSDavid Howells enum rxrpc_congest_change { 181b54a134aSDavid Howells rxrpc_cong_begin_retransmission, 182b54a134aSDavid Howells rxrpc_cong_cleared_nacks, 183b54a134aSDavid Howells rxrpc_cong_new_low_nack, 184b54a134aSDavid Howells rxrpc_cong_no_change, 185b54a134aSDavid Howells rxrpc_cong_progress, 186b54a134aSDavid Howells rxrpc_cong_retransmit_again, 187b54a134aSDavid Howells rxrpc_cong_rtt_window_end, 188b54a134aSDavid Howells rxrpc_cong_saw_nack, 189b54a134aSDavid Howells }; 190b54a134aSDavid Howells 191b54a134aSDavid Howells #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 192b54a134aSDavid Howells 193b54a134aSDavid Howells /* 194b54a134aSDavid Howells * Declare tracing information enums and their string mappings for display. 195b54a134aSDavid Howells */ 196b54a134aSDavid Howells #define rxrpc_skb_traces \ 197b54a134aSDavid Howells EM(rxrpc_skb_rx_cleaned, "Rx CLN") \ 198b54a134aSDavid Howells EM(rxrpc_skb_rx_freed, "Rx FRE") \ 199b54a134aSDavid Howells EM(rxrpc_skb_rx_got, "Rx GOT") \ 200b54a134aSDavid Howells EM(rxrpc_skb_rx_lost, "Rx *L*") \ 201b54a134aSDavid Howells EM(rxrpc_skb_rx_purged, "Rx PUR") \ 202b54a134aSDavid Howells EM(rxrpc_skb_rx_received, "Rx RCV") \ 203b54a134aSDavid Howells EM(rxrpc_skb_rx_rotated, "Rx ROT") \ 204b54a134aSDavid Howells EM(rxrpc_skb_rx_seen, "Rx SEE") \ 205b54a134aSDavid Howells EM(rxrpc_skb_tx_cleaned, "Tx CLN") \ 206b54a134aSDavid Howells EM(rxrpc_skb_tx_freed, "Tx FRE") \ 207b54a134aSDavid Howells EM(rxrpc_skb_tx_got, "Tx GOT") \ 208b54a134aSDavid Howells EM(rxrpc_skb_tx_new, "Tx NEW") \ 209b54a134aSDavid Howells EM(rxrpc_skb_tx_rotated, "Tx ROT") \ 210b54a134aSDavid Howells E_(rxrpc_skb_tx_seen, "Tx SEE") 211b54a134aSDavid Howells 212b54a134aSDavid Howells #define rxrpc_conn_traces \ 213b54a134aSDavid Howells EM(rxrpc_conn_got, "GOT") \ 214b54a134aSDavid Howells EM(rxrpc_conn_new_client, "NWc") \ 215b54a134aSDavid Howells EM(rxrpc_conn_new_service, "NWs") \ 216b54a134aSDavid Howells EM(rxrpc_conn_put_client, "PTc") \ 217b54a134aSDavid Howells EM(rxrpc_conn_put_service, "PTs") \ 218b54a134aSDavid Howells EM(rxrpc_conn_queued, "QUE") \ 219b54a134aSDavid Howells E_(rxrpc_conn_seen, "SEE") 220b54a134aSDavid Howells 221b54a134aSDavid Howells #define rxrpc_client_traces \ 222b54a134aSDavid Howells EM(rxrpc_client_activate_chans, "Activa") \ 223b54a134aSDavid Howells EM(rxrpc_client_alloc, "Alloc ") \ 224b54a134aSDavid Howells EM(rxrpc_client_chan_activate, "ChActv") \ 225b54a134aSDavid Howells EM(rxrpc_client_chan_disconnect, "ChDisc") \ 226b54a134aSDavid Howells EM(rxrpc_client_chan_pass, "ChPass") \ 227b54a134aSDavid Howells EM(rxrpc_client_chan_unstarted, "ChUnst") \ 228b54a134aSDavid Howells EM(rxrpc_client_cleanup, "Clean ") \ 229b54a134aSDavid Howells EM(rxrpc_client_count, "Count ") \ 230b54a134aSDavid Howells EM(rxrpc_client_discard, "Discar") \ 231b54a134aSDavid Howells EM(rxrpc_client_duplicate, "Duplic") \ 232b54a134aSDavid Howells EM(rxrpc_client_exposed, "Expose") \ 233b54a134aSDavid Howells EM(rxrpc_client_replace, "Replac") \ 234b54a134aSDavid Howells EM(rxrpc_client_to_active, "->Actv") \ 235b54a134aSDavid Howells EM(rxrpc_client_to_culled, "->Cull") \ 236b54a134aSDavid Howells EM(rxrpc_client_to_idle, "->Idle") \ 237b54a134aSDavid Howells EM(rxrpc_client_to_inactive, "->Inac") \ 238b54a134aSDavid Howells EM(rxrpc_client_to_upgrade, "->Upgd") \ 239b54a134aSDavid Howells EM(rxrpc_client_to_waiting, "->Wait") \ 240b54a134aSDavid Howells E_(rxrpc_client_uncount, "Uncoun") 241b54a134aSDavid Howells 242b54a134aSDavid Howells #define rxrpc_conn_cache_states \ 243b54a134aSDavid Howells EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \ 244b54a134aSDavid Howells EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \ 245b54a134aSDavid Howells EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \ 2464e255721SDavid Howells EM(RXRPC_CONN_CLIENT_UPGRADE, "Upgd") \ 247b54a134aSDavid Howells EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \ 248b54a134aSDavid Howells E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \ 249b54a134aSDavid Howells 250b54a134aSDavid Howells #define rxrpc_call_traces \ 251b54a134aSDavid Howells EM(rxrpc_call_connected, "CON") \ 252b54a134aSDavid Howells EM(rxrpc_call_error, "*E*") \ 253b54a134aSDavid Howells EM(rxrpc_call_got, "GOT") \ 254b54a134aSDavid Howells EM(rxrpc_call_got_kernel, "Gke") \ 255b54a134aSDavid Howells EM(rxrpc_call_got_userid, "Gus") \ 256b54a134aSDavid Howells EM(rxrpc_call_new_client, "NWc") \ 257b54a134aSDavid Howells EM(rxrpc_call_new_service, "NWs") \ 258b54a134aSDavid Howells EM(rxrpc_call_put, "PUT") \ 259b54a134aSDavid Howells EM(rxrpc_call_put_kernel, "Pke") \ 260b54a134aSDavid Howells EM(rxrpc_call_put_noqueue, "PNQ") \ 261b54a134aSDavid Howells EM(rxrpc_call_put_userid, "Pus") \ 262b54a134aSDavid Howells EM(rxrpc_call_queued, "QUE") \ 263b54a134aSDavid Howells EM(rxrpc_call_queued_ref, "QUR") \ 264b54a134aSDavid Howells EM(rxrpc_call_release, "RLS") \ 265b54a134aSDavid Howells E_(rxrpc_call_seen, "SEE") 266b54a134aSDavid Howells 267b54a134aSDavid Howells #define rxrpc_transmit_traces \ 268b54a134aSDavid Howells EM(rxrpc_transmit_await_reply, "AWR") \ 269b54a134aSDavid Howells EM(rxrpc_transmit_end, "END") \ 270b54a134aSDavid Howells EM(rxrpc_transmit_queue, "QUE") \ 271b54a134aSDavid Howells EM(rxrpc_transmit_queue_last, "QLS") \ 272b54a134aSDavid Howells EM(rxrpc_transmit_rotate, "ROT") \ 273b54a134aSDavid Howells EM(rxrpc_transmit_rotate_last, "RLS") \ 274b54a134aSDavid Howells E_(rxrpc_transmit_wait, "WAI") 275b54a134aSDavid Howells 276b54a134aSDavid Howells #define rxrpc_receive_traces \ 277b54a134aSDavid Howells EM(rxrpc_receive_end, "END") \ 278b54a134aSDavid Howells EM(rxrpc_receive_front, "FRN") \ 279b54a134aSDavid Howells EM(rxrpc_receive_incoming, "INC") \ 280b54a134aSDavid Howells EM(rxrpc_receive_queue, "QUE") \ 281b54a134aSDavid Howells EM(rxrpc_receive_queue_last, "QLS") \ 282b54a134aSDavid Howells E_(rxrpc_receive_rotate, "ROT") 283b54a134aSDavid Howells 284b54a134aSDavid Howells #define rxrpc_recvmsg_traces \ 285b54a134aSDavid Howells EM(rxrpc_recvmsg_cont, "CONT") \ 286b54a134aSDavid Howells EM(rxrpc_recvmsg_data_return, "DATA") \ 287b54a134aSDavid Howells EM(rxrpc_recvmsg_dequeue, "DEQU") \ 288b54a134aSDavid Howells EM(rxrpc_recvmsg_enter, "ENTR") \ 289b54a134aSDavid Howells EM(rxrpc_recvmsg_full, "FULL") \ 290b54a134aSDavid Howells EM(rxrpc_recvmsg_hole, "HOLE") \ 291b54a134aSDavid Howells EM(rxrpc_recvmsg_next, "NEXT") \ 292540b1c48SDavid Howells EM(rxrpc_recvmsg_requeue, "REQU") \ 293b54a134aSDavid Howells EM(rxrpc_recvmsg_return, "RETN") \ 294b54a134aSDavid Howells EM(rxrpc_recvmsg_terminal, "TERM") \ 295b54a134aSDavid Howells EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ 296b54a134aSDavid Howells E_(rxrpc_recvmsg_wait, "WAIT") 297b54a134aSDavid Howells 298b54a134aSDavid Howells #define rxrpc_rtt_tx_traces \ 299b54a134aSDavid Howells EM(rxrpc_rtt_tx_data, "DATA") \ 300b54a134aSDavid Howells E_(rxrpc_rtt_tx_ping, "PING") 301b54a134aSDavid Howells 302b54a134aSDavid Howells #define rxrpc_rtt_rx_traces \ 303b54a134aSDavid Howells EM(rxrpc_rtt_rx_ping_response, "PONG") \ 304b54a134aSDavid Howells E_(rxrpc_rtt_rx_requested_ack, "RACK") 305b54a134aSDavid Howells 306b54a134aSDavid Howells #define rxrpc_timer_traces \ 307b54a134aSDavid Howells EM(rxrpc_timer_begin, "Begin ") \ 308b54a134aSDavid Howells EM(rxrpc_timer_expired, "*EXPR*") \ 309*a158bdd3SDavid Howells EM(rxrpc_timer_exp_ack, "ExpAck") \ 310*a158bdd3SDavid Howells EM(rxrpc_timer_exp_hard, "ExpHrd") \ 311*a158bdd3SDavid Howells EM(rxrpc_timer_exp_idle, "ExpIdl") \ 312*a158bdd3SDavid Howells EM(rxrpc_timer_exp_normal, "ExpNml") \ 313*a158bdd3SDavid Howells EM(rxrpc_timer_exp_ping, "ExpPng") \ 314*a158bdd3SDavid Howells EM(rxrpc_timer_exp_resend, "ExpRsn") \ 315b54a134aSDavid Howells EM(rxrpc_timer_init_for_reply, "IniRpl") \ 316b54a134aSDavid Howells EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ 317*a158bdd3SDavid Howells EM(rxrpc_timer_restart, "Restrt") \ 318b54a134aSDavid Howells EM(rxrpc_timer_set_for_ack, "SetAck") \ 319*a158bdd3SDavid Howells EM(rxrpc_timer_set_for_hard, "SetHrd") \ 320*a158bdd3SDavid Howells EM(rxrpc_timer_set_for_idle, "SetIdl") \ 321*a158bdd3SDavid Howells EM(rxrpc_timer_set_for_normal, "SetNml") \ 322b54a134aSDavid Howells EM(rxrpc_timer_set_for_ping, "SetPng") \ 323b54a134aSDavid Howells EM(rxrpc_timer_set_for_resend, "SetRTx") \ 324*a158bdd3SDavid Howells E_(rxrpc_timer_set_for_send, "SetSnd") 325b54a134aSDavid Howells 326b54a134aSDavid Howells #define rxrpc_propose_ack_traces \ 327b54a134aSDavid Howells EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 328b54a134aSDavid Howells EM(rxrpc_propose_ack_input_data, "DataIn ") \ 329b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 330b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 331b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 332b54a134aSDavid Howells EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ 333b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ 334b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ 335b54a134aSDavid Howells EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ 336b54a134aSDavid Howells EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ 337b54a134aSDavid Howells E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 338b54a134aSDavid Howells 339b54a134aSDavid Howells #define rxrpc_propose_ack_outcomes \ 340b54a134aSDavid Howells EM(rxrpc_propose_ack_subsume, " Subsume") \ 341b54a134aSDavid Howells EM(rxrpc_propose_ack_update, " Update") \ 342b54a134aSDavid Howells E_(rxrpc_propose_ack_use, "") 343b54a134aSDavid Howells 344b54a134aSDavid Howells #define rxrpc_congest_modes \ 345b54a134aSDavid Howells EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ 346b54a134aSDavid Howells EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ 347b54a134aSDavid Howells EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ 348b54a134aSDavid Howells E_(RXRPC_CALL_SLOW_START, "SlowStart") 349b54a134aSDavid Howells 350b54a134aSDavid Howells #define rxrpc_congest_changes \ 351b54a134aSDavid Howells EM(rxrpc_cong_begin_retransmission, " Retrans") \ 352b54a134aSDavid Howells EM(rxrpc_cong_cleared_nacks, " Cleared") \ 353b54a134aSDavid Howells EM(rxrpc_cong_new_low_nack, " NewLowN") \ 354b54a134aSDavid Howells EM(rxrpc_cong_no_change, "") \ 355b54a134aSDavid Howells EM(rxrpc_cong_progress, " Progres") \ 356b54a134aSDavid Howells EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 357b54a134aSDavid Howells EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 358b54a134aSDavid Howells E_(rxrpc_cong_saw_nack, " SawNack") 359b54a134aSDavid Howells 360b54a134aSDavid Howells #define rxrpc_pkts \ 361b54a134aSDavid Howells EM(0, "?00") \ 362b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 363b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 364b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 365b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 366b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 367b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 368b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 369b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 370b54a134aSDavid Howells EM(9, "?09") \ 371b54a134aSDavid Howells EM(10, "?10") \ 372b54a134aSDavid Howells EM(11, "?11") \ 373b54a134aSDavid Howells EM(12, "?12") \ 374b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 375b54a134aSDavid Howells EM(14, "?14") \ 376b54a134aSDavid Howells E_(15, "?15") 377b54a134aSDavid Howells 378b54a134aSDavid Howells #define rxrpc_ack_names \ 379b54a134aSDavid Howells EM(0, "-0-") \ 380b54a134aSDavid Howells EM(RXRPC_ACK_REQUESTED, "REQ") \ 381b54a134aSDavid Howells EM(RXRPC_ACK_DUPLICATE, "DUP") \ 382b54a134aSDavid Howells EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 383b54a134aSDavid Howells EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 384b54a134aSDavid Howells EM(RXRPC_ACK_NOSPACE, "MEM") \ 385b54a134aSDavid Howells EM(RXRPC_ACK_PING, "PNG") \ 386b54a134aSDavid Howells EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 387b54a134aSDavid Howells EM(RXRPC_ACK_DELAY, "DLY") \ 388b54a134aSDavid Howells EM(RXRPC_ACK_IDLE, "IDL") \ 389b54a134aSDavid Howells E_(RXRPC_ACK__INVALID, "-?-") 390b54a134aSDavid Howells 391b54a134aSDavid Howells /* 392b54a134aSDavid Howells * Export enum symbols via userspace. 393b54a134aSDavid Howells */ 394b54a134aSDavid Howells #undef EM 395b54a134aSDavid Howells #undef E_ 396b54a134aSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a); 397b54a134aSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a); 398b54a134aSDavid Howells 399b54a134aSDavid Howells rxrpc_skb_traces; 400b54a134aSDavid Howells rxrpc_conn_traces; 401b54a134aSDavid Howells rxrpc_client_traces; 402b54a134aSDavid Howells rxrpc_call_traces; 403b54a134aSDavid Howells rxrpc_transmit_traces; 404b54a134aSDavid Howells rxrpc_receive_traces; 405b54a134aSDavid Howells rxrpc_recvmsg_traces; 406b54a134aSDavid Howells rxrpc_rtt_tx_traces; 407b54a134aSDavid Howells rxrpc_rtt_rx_traces; 408b54a134aSDavid Howells rxrpc_timer_traces; 409b54a134aSDavid Howells rxrpc_propose_ack_traces; 410b54a134aSDavid Howells rxrpc_propose_ack_outcomes; 411b54a134aSDavid Howells rxrpc_congest_changes; 412b54a134aSDavid Howells 413b54a134aSDavid Howells /* 414b54a134aSDavid Howells * Now redefine the EM() and E_() macros to map the enums to the strings that 415b54a134aSDavid Howells * will be printed in the output. 416b54a134aSDavid Howells */ 417b54a134aSDavid Howells #undef EM 418b54a134aSDavid Howells #undef E_ 419b54a134aSDavid Howells #define EM(a, b) { a, b }, 420b54a134aSDavid Howells #define E_(a, b) { a, b } 421b54a134aSDavid Howells 422363deeabSDavid Howells TRACE_EVENT(rxrpc_conn, 423363deeabSDavid Howells TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, 424363deeabSDavid Howells int usage, const void *where), 425363deeabSDavid Howells 426363deeabSDavid Howells TP_ARGS(conn, op, usage, where), 427363deeabSDavid Howells 428363deeabSDavid Howells TP_STRUCT__entry( 429363deeabSDavid Howells __field(struct rxrpc_connection *, conn ) 430363deeabSDavid Howells __field(int, op ) 431363deeabSDavid Howells __field(int, usage ) 432363deeabSDavid Howells __field(const void *, where ) 433363deeabSDavid Howells ), 434363deeabSDavid Howells 435363deeabSDavid Howells TP_fast_assign( 436363deeabSDavid Howells __entry->conn = conn; 437363deeabSDavid Howells __entry->op = op; 438363deeabSDavid Howells __entry->usage = usage; 439363deeabSDavid Howells __entry->where = where; 440363deeabSDavid Howells ), 441363deeabSDavid Howells 442363deeabSDavid Howells TP_printk("C=%p %s u=%d sp=%pSR", 443363deeabSDavid Howells __entry->conn, 444b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_conn_traces), 445363deeabSDavid Howells __entry->usage, 446363deeabSDavid Howells __entry->where) 447363deeabSDavid Howells ); 448363deeabSDavid Howells 449363deeabSDavid Howells TRACE_EVENT(rxrpc_client, 450363deeabSDavid Howells TP_PROTO(struct rxrpc_connection *conn, int channel, 451363deeabSDavid Howells enum rxrpc_client_trace op), 452363deeabSDavid Howells 453363deeabSDavid Howells TP_ARGS(conn, channel, op), 454363deeabSDavid Howells 455363deeabSDavid Howells TP_STRUCT__entry( 456363deeabSDavid Howells __field(struct rxrpc_connection *, conn ) 457363deeabSDavid Howells __field(u32, cid ) 458363deeabSDavid Howells __field(int, channel ) 459363deeabSDavid Howells __field(int, usage ) 460363deeabSDavid Howells __field(enum rxrpc_client_trace, op ) 461363deeabSDavid Howells __field(enum rxrpc_conn_cache_state, cs ) 462363deeabSDavid Howells ), 463363deeabSDavid Howells 464363deeabSDavid Howells TP_fast_assign( 465363deeabSDavid Howells __entry->conn = conn; 466363deeabSDavid Howells __entry->channel = channel; 467363deeabSDavid Howells __entry->usage = atomic_read(&conn->usage); 468363deeabSDavid Howells __entry->op = op; 469363deeabSDavid Howells __entry->cid = conn->proto.cid; 470363deeabSDavid Howells __entry->cs = conn->cache_state; 471363deeabSDavid Howells ), 472363deeabSDavid Howells 473363deeabSDavid Howells TP_printk("C=%p h=%2d %s %s i=%08x u=%d", 474363deeabSDavid Howells __entry->conn, 475363deeabSDavid Howells __entry->channel, 476b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_client_traces), 477b54a134aSDavid Howells __print_symbolic(__entry->cs, rxrpc_conn_cache_states), 478363deeabSDavid Howells __entry->cid, 479363deeabSDavid Howells __entry->usage) 480363deeabSDavid Howells ); 481363deeabSDavid Howells 482e34d4234SDavid Howells TRACE_EVENT(rxrpc_call, 483fff72429SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op, 4842ab27215SDavid Howells int usage, const void *where, const void *aux), 485e34d4234SDavid Howells 4862ab27215SDavid Howells TP_ARGS(call, op, usage, where, aux), 487e34d4234SDavid Howells 488e34d4234SDavid Howells TP_STRUCT__entry( 489e34d4234SDavid Howells __field(struct rxrpc_call *, call ) 490e34d4234SDavid Howells __field(int, op ) 491e34d4234SDavid Howells __field(int, usage ) 492e34d4234SDavid Howells __field(const void *, where ) 493e34d4234SDavid Howells __field(const void *, aux ) 494e34d4234SDavid Howells ), 495e34d4234SDavid Howells 496e34d4234SDavid Howells TP_fast_assign( 497e34d4234SDavid Howells __entry->call = call; 498e34d4234SDavid Howells __entry->op = op; 499e34d4234SDavid Howells __entry->usage = usage; 500e34d4234SDavid Howells __entry->where = where; 501e34d4234SDavid Howells __entry->aux = aux; 502e34d4234SDavid Howells ), 503e34d4234SDavid Howells 5042ab27215SDavid Howells TP_printk("c=%p %s u=%d sp=%pSR a=%p", 505e34d4234SDavid Howells __entry->call, 506b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_call_traces), 507e34d4234SDavid Howells __entry->usage, 508e34d4234SDavid Howells __entry->where, 509e34d4234SDavid Howells __entry->aux) 510e34d4234SDavid Howells ); 511e34d4234SDavid Howells 512df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb, 51371f3ca40SDavid Howells TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, 51471f3ca40SDavid Howells int usage, int mod_count, const void *where), 515df844fd4SDavid Howells 516df844fd4SDavid Howells TP_ARGS(skb, op, usage, mod_count, where), 517df844fd4SDavid Howells 518df844fd4SDavid Howells TP_STRUCT__entry( 519df844fd4SDavid Howells __field(struct sk_buff *, skb ) 52071f3ca40SDavid Howells __field(enum rxrpc_skb_trace, op ) 521df844fd4SDavid Howells __field(int, usage ) 522df844fd4SDavid Howells __field(int, mod_count ) 523df844fd4SDavid Howells __field(const void *, where ) 524df844fd4SDavid Howells ), 525df844fd4SDavid Howells 526df844fd4SDavid Howells TP_fast_assign( 527df844fd4SDavid Howells __entry->skb = skb; 528df844fd4SDavid Howells __entry->op = op; 529df844fd4SDavid Howells __entry->usage = usage; 530df844fd4SDavid Howells __entry->mod_count = mod_count; 531df844fd4SDavid Howells __entry->where = where; 532df844fd4SDavid Howells ), 533df844fd4SDavid Howells 534df844fd4SDavid Howells TP_printk("s=%p %s u=%d m=%d p=%pSR", 535df844fd4SDavid Howells __entry->skb, 536b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_skb_traces), 537df844fd4SDavid Howells __entry->usage, 538df844fd4SDavid Howells __entry->mod_count, 539df844fd4SDavid Howells __entry->where) 540df844fd4SDavid Howells ); 541df844fd4SDavid Howells 54249e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet, 54349e19ec7SDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 54449e19ec7SDavid Howells 54549e19ec7SDavid Howells TP_ARGS(sp), 54649e19ec7SDavid Howells 54749e19ec7SDavid Howells TP_STRUCT__entry( 54849e19ec7SDavid Howells __field_struct(struct rxrpc_host_header, hdr ) 54949e19ec7SDavid Howells ), 55049e19ec7SDavid Howells 55149e19ec7SDavid Howells TP_fast_assign( 55249e19ec7SDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 55349e19ec7SDavid Howells ), 55449e19ec7SDavid Howells 555a3868bfcSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 55649e19ec7SDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 55749e19ec7SDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 55849e19ec7SDavid Howells __entry->hdr.serial, __entry->hdr.seq, 559a3868bfcSDavid Howells __entry->hdr.type, __entry->hdr.flags, 560b54a134aSDavid Howells __entry->hdr.type <= 15 ? 561b54a134aSDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 56249e19ec7SDavid Howells ); 56349e19ec7SDavid Howells 56449e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done, 56549e19ec7SDavid Howells TP_PROTO(int result, int abort_code), 56649e19ec7SDavid Howells 56749e19ec7SDavid Howells TP_ARGS(result, abort_code), 56849e19ec7SDavid Howells 56949e19ec7SDavid Howells TP_STRUCT__entry( 57049e19ec7SDavid Howells __field(int, result ) 57149e19ec7SDavid Howells __field(int, abort_code ) 57249e19ec7SDavid Howells ), 57349e19ec7SDavid Howells 57449e19ec7SDavid Howells TP_fast_assign( 57549e19ec7SDavid Howells __entry->result = result; 57649e19ec7SDavid Howells __entry->abort_code = abort_code; 57749e19ec7SDavid Howells ), 57849e19ec7SDavid Howells 57949e19ec7SDavid Howells TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 58049e19ec7SDavid Howells ); 58149e19ec7SDavid Howells 5825a42976dSDavid Howells TRACE_EVENT(rxrpc_abort, 5835a42976dSDavid Howells TP_PROTO(const char *why, u32 cid, u32 call_id, rxrpc_seq_t seq, 5845a42976dSDavid Howells int abort_code, int error), 5855a42976dSDavid Howells 5865a42976dSDavid Howells TP_ARGS(why, cid, call_id, seq, abort_code, error), 5875a42976dSDavid Howells 5885a42976dSDavid Howells TP_STRUCT__entry( 5895a42976dSDavid Howells __array(char, why, 4 ) 5905a42976dSDavid Howells __field(u32, cid ) 5915a42976dSDavid Howells __field(u32, call_id ) 5925a42976dSDavid Howells __field(rxrpc_seq_t, seq ) 5935a42976dSDavid Howells __field(int, abort_code ) 5945a42976dSDavid Howells __field(int, error ) 5955a42976dSDavid Howells ), 5965a42976dSDavid Howells 5975a42976dSDavid Howells TP_fast_assign( 5985a42976dSDavid Howells memcpy(__entry->why, why, 4); 5995a42976dSDavid Howells __entry->cid = cid; 6005a42976dSDavid Howells __entry->call_id = call_id; 6015a42976dSDavid Howells __entry->abort_code = abort_code; 6025a42976dSDavid Howells __entry->error = error; 6035a42976dSDavid Howells __entry->seq = seq; 6045a42976dSDavid Howells ), 6055a42976dSDavid Howells 6065a42976dSDavid Howells TP_printk("%08x:%08x s=%u a=%d e=%d %s", 6075a42976dSDavid Howells __entry->cid, __entry->call_id, __entry->seq, 6085a42976dSDavid Howells __entry->abort_code, __entry->error, __entry->why) 6095a42976dSDavid Howells ); 6105a42976dSDavid Howells 611a124fe3eSDavid Howells TRACE_EVENT(rxrpc_transmit, 612a124fe3eSDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), 613a124fe3eSDavid Howells 614a124fe3eSDavid Howells TP_ARGS(call, why), 615a124fe3eSDavid Howells 616a124fe3eSDavid Howells TP_STRUCT__entry( 617a124fe3eSDavid Howells __field(struct rxrpc_call *, call ) 618a124fe3eSDavid Howells __field(enum rxrpc_transmit_trace, why ) 619a124fe3eSDavid Howells __field(rxrpc_seq_t, tx_hard_ack ) 620a124fe3eSDavid Howells __field(rxrpc_seq_t, tx_top ) 621b1d9f7fdSDavid Howells __field(int, tx_winsize ) 622a124fe3eSDavid Howells ), 623a124fe3eSDavid Howells 624a124fe3eSDavid Howells TP_fast_assign( 625a124fe3eSDavid Howells __entry->call = call; 626a124fe3eSDavid Howells __entry->why = why; 627a124fe3eSDavid Howells __entry->tx_hard_ack = call->tx_hard_ack; 628a124fe3eSDavid Howells __entry->tx_top = call->tx_top; 629b1d9f7fdSDavid Howells __entry->tx_winsize = call->tx_winsize; 630a124fe3eSDavid Howells ), 631a124fe3eSDavid Howells 632b1d9f7fdSDavid Howells TP_printk("c=%p %s f=%08x n=%u/%u", 633a124fe3eSDavid Howells __entry->call, 634b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_transmit_traces), 635a124fe3eSDavid Howells __entry->tx_hard_ack + 1, 636b1d9f7fdSDavid Howells __entry->tx_top - __entry->tx_hard_ack, 637b1d9f7fdSDavid Howells __entry->tx_winsize) 638a124fe3eSDavid Howells ); 639a124fe3eSDavid Howells 640b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_data, 641b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 642b1d9f7fdSDavid Howells rxrpc_serial_t serial, u8 flags, u8 anno), 643ec71eb9aSDavid Howells 644b1d9f7fdSDavid Howells TP_ARGS(call, seq, serial, flags, anno), 645ec71eb9aSDavid Howells 646ec71eb9aSDavid Howells TP_STRUCT__entry( 647ec71eb9aSDavid Howells __field(struct rxrpc_call *, call ) 648b1d9f7fdSDavid Howells __field(rxrpc_seq_t, seq ) 649b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial ) 650b1d9f7fdSDavid Howells __field(u8, flags ) 651b1d9f7fdSDavid Howells __field(u8, anno ) 652b1d9f7fdSDavid Howells ), 653b1d9f7fdSDavid Howells 654b1d9f7fdSDavid Howells TP_fast_assign( 655b1d9f7fdSDavid Howells __entry->call = call; 656b1d9f7fdSDavid Howells __entry->seq = seq; 657b1d9f7fdSDavid Howells __entry->serial = serial; 658b1d9f7fdSDavid Howells __entry->flags = flags; 659b1d9f7fdSDavid Howells __entry->anno = anno; 660b1d9f7fdSDavid Howells ), 661b1d9f7fdSDavid Howells 662b1d9f7fdSDavid Howells TP_printk("c=%p DATA %08x q=%08x fl=%02x a=%02x", 663b1d9f7fdSDavid Howells __entry->call, 664b1d9f7fdSDavid Howells __entry->serial, 665b1d9f7fdSDavid Howells __entry->seq, 666b1d9f7fdSDavid Howells __entry->flags, 667b1d9f7fdSDavid Howells __entry->anno) 668b1d9f7fdSDavid Howells ); 669b1d9f7fdSDavid Howells 670b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_ack, 671b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call, 672b1d9f7fdSDavid Howells rxrpc_serial_t serial, rxrpc_serial_t ack_serial, 673b1d9f7fdSDavid Howells rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), 674b1d9f7fdSDavid Howells 675b1d9f7fdSDavid Howells TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), 676b1d9f7fdSDavid Howells 677b1d9f7fdSDavid Howells TP_STRUCT__entry( 678b1d9f7fdSDavid Howells __field(struct rxrpc_call *, call ) 679b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial ) 680b1d9f7fdSDavid Howells __field(rxrpc_serial_t, ack_serial ) 681ec71eb9aSDavid Howells __field(rxrpc_seq_t, first ) 682b1d9f7fdSDavid Howells __field(rxrpc_seq_t, prev ) 683ec71eb9aSDavid Howells __field(u8, reason ) 684ec71eb9aSDavid Howells __field(u8, n_acks ) 685ec71eb9aSDavid Howells ), 686ec71eb9aSDavid Howells 687ec71eb9aSDavid Howells TP_fast_assign( 688ec71eb9aSDavid Howells __entry->call = call; 689b1d9f7fdSDavid Howells __entry->serial = serial; 690b1d9f7fdSDavid Howells __entry->ack_serial = ack_serial; 691ec71eb9aSDavid Howells __entry->first = first; 692b1d9f7fdSDavid Howells __entry->prev = prev; 693ec71eb9aSDavid Howells __entry->reason = reason; 694ec71eb9aSDavid Howells __entry->n_acks = n_acks; 695ec71eb9aSDavid Howells ), 696ec71eb9aSDavid Howells 697b1d9f7fdSDavid Howells TP_printk("c=%p %08x %s r=%08x f=%08x p=%08x n=%u", 698ec71eb9aSDavid Howells __entry->call, 699b1d9f7fdSDavid Howells __entry->serial, 700b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 701b1d9f7fdSDavid Howells __entry->ack_serial, 702ec71eb9aSDavid Howells __entry->first, 703b1d9f7fdSDavid Howells __entry->prev, 704ec71eb9aSDavid Howells __entry->n_acks) 705ec71eb9aSDavid Howells ); 706ec71eb9aSDavid Howells 707005ede28SDavid Howells TRACE_EVENT(rxrpc_rx_abort, 708005ede28SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 709005ede28SDavid Howells u32 abort_code), 710005ede28SDavid Howells 711005ede28SDavid Howells TP_ARGS(call, serial, abort_code), 712005ede28SDavid Howells 713005ede28SDavid Howells TP_STRUCT__entry( 714005ede28SDavid Howells __field(struct rxrpc_call *, call ) 715005ede28SDavid Howells __field(rxrpc_serial_t, serial ) 716005ede28SDavid Howells __field(u32, abort_code ) 717005ede28SDavid Howells ), 718005ede28SDavid Howells 719005ede28SDavid Howells TP_fast_assign( 720005ede28SDavid Howells __entry->call = call; 721005ede28SDavid Howells __entry->serial = serial; 722005ede28SDavid Howells __entry->abort_code = abort_code; 723005ede28SDavid Howells ), 724005ede28SDavid Howells 725005ede28SDavid Howells TP_printk("c=%p ABORT %08x ac=%d", 726005ede28SDavid Howells __entry->call, 727005ede28SDavid Howells __entry->serial, 728005ede28SDavid Howells __entry->abort_code) 729005ede28SDavid Howells ); 730005ede28SDavid Howells 731740586d2SDavid Howells TRACE_EVENT(rxrpc_rx_rwind_change, 732740586d2SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 733740586d2SDavid Howells u32 rwind, bool wake), 734740586d2SDavid Howells 735740586d2SDavid Howells TP_ARGS(call, serial, rwind, wake), 736740586d2SDavid Howells 737740586d2SDavid Howells TP_STRUCT__entry( 738740586d2SDavid Howells __field(struct rxrpc_call *, call ) 739740586d2SDavid Howells __field(rxrpc_serial_t, serial ) 740740586d2SDavid Howells __field(u32, rwind ) 741740586d2SDavid Howells __field(bool, wake ) 742740586d2SDavid Howells ), 743740586d2SDavid Howells 744740586d2SDavid Howells TP_fast_assign( 745740586d2SDavid Howells __entry->call = call; 746740586d2SDavid Howells __entry->serial = serial; 747740586d2SDavid Howells __entry->rwind = rwind; 748740586d2SDavid Howells __entry->wake = wake; 749740586d2SDavid Howells ), 750740586d2SDavid Howells 751740586d2SDavid Howells TP_printk("c=%p %08x rw=%u%s", 752740586d2SDavid Howells __entry->call, 753740586d2SDavid Howells __entry->serial, 754740586d2SDavid Howells __entry->rwind, 755740586d2SDavid Howells __entry->wake ? " wake" : "") 756740586d2SDavid Howells ); 757740586d2SDavid Howells 758be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_data, 759be832aecSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 760a1767077SDavid Howells rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), 761f3639df2SDavid Howells 762a1767077SDavid Howells TP_ARGS(call, seq, serial, flags, retrans, lose), 763f3639df2SDavid Howells 764f3639df2SDavid Howells TP_STRUCT__entry( 765f3639df2SDavid Howells __field(struct rxrpc_call *, call ) 766be832aecSDavid Howells __field(rxrpc_seq_t, seq ) 767f3639df2SDavid Howells __field(rxrpc_serial_t, serial ) 768be832aecSDavid Howells __field(u8, flags ) 769a1767077SDavid Howells __field(bool, retrans ) 770be832aecSDavid Howells __field(bool, lose ) 771be832aecSDavid Howells ), 772be832aecSDavid Howells 773be832aecSDavid Howells TP_fast_assign( 774be832aecSDavid Howells __entry->call = call; 775be832aecSDavid Howells __entry->seq = seq; 776be832aecSDavid Howells __entry->serial = serial; 777be832aecSDavid Howells __entry->flags = flags; 778a1767077SDavid Howells __entry->retrans = retrans; 779be832aecSDavid Howells __entry->lose = lose; 780be832aecSDavid Howells ), 781be832aecSDavid Howells 782265a44bbSDavid Howells TP_printk("c=%p DATA %08x q=%08x fl=%02x%s%s", 783be832aecSDavid Howells __entry->call, 784be832aecSDavid Howells __entry->serial, 785be832aecSDavid Howells __entry->seq, 786be832aecSDavid Howells __entry->flags, 787265a44bbSDavid Howells __entry->retrans ? " *RETRANS*" : "", 788be832aecSDavid Howells __entry->lose ? " *LOSE*" : "") 789be832aecSDavid Howells ); 790be832aecSDavid Howells 791be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_ack, 792be832aecSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 793be832aecSDavid Howells rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 794be832aecSDavid Howells u8 reason, u8 n_acks), 795be832aecSDavid Howells 796be832aecSDavid Howells TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), 797be832aecSDavid Howells 798be832aecSDavid Howells TP_STRUCT__entry( 799be832aecSDavid Howells __field(struct rxrpc_call *, call ) 800be832aecSDavid Howells __field(rxrpc_serial_t, serial ) 801be832aecSDavid Howells __field(rxrpc_seq_t, ack_first ) 802be832aecSDavid Howells __field(rxrpc_serial_t, ack_serial ) 803f3639df2SDavid Howells __field(u8, reason ) 804f3639df2SDavid Howells __field(u8, n_acks ) 805f3639df2SDavid Howells ), 806f3639df2SDavid Howells 807f3639df2SDavid Howells TP_fast_assign( 808f3639df2SDavid Howells __entry->call = call; 809f3639df2SDavid Howells __entry->serial = serial; 810be832aecSDavid Howells __entry->ack_first = ack_first; 811be832aecSDavid Howells __entry->ack_serial = ack_serial; 812f3639df2SDavid Howells __entry->reason = reason; 813f3639df2SDavid Howells __entry->n_acks = n_acks; 814f3639df2SDavid Howells ), 815f3639df2SDavid Howells 816be832aecSDavid Howells TP_printk(" c=%p ACK %08x %s f=%08x r=%08x n=%u", 817f3639df2SDavid Howells __entry->call, 818f3639df2SDavid Howells __entry->serial, 819b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 820be832aecSDavid Howells __entry->ack_first, 821be832aecSDavid Howells __entry->ack_serial, 822f3639df2SDavid Howells __entry->n_acks) 823f3639df2SDavid Howells ); 824f3639df2SDavid Howells 82558dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive, 82658dc63c9SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 82758dc63c9SDavid Howells rxrpc_serial_t serial, rxrpc_seq_t seq), 82858dc63c9SDavid Howells 82958dc63c9SDavid Howells TP_ARGS(call, why, serial, seq), 83058dc63c9SDavid Howells 83158dc63c9SDavid Howells TP_STRUCT__entry( 83258dc63c9SDavid Howells __field(struct rxrpc_call *, call ) 83358dc63c9SDavid Howells __field(enum rxrpc_receive_trace, why ) 83458dc63c9SDavid Howells __field(rxrpc_serial_t, serial ) 83558dc63c9SDavid Howells __field(rxrpc_seq_t, seq ) 83658dc63c9SDavid Howells __field(rxrpc_seq_t, hard_ack ) 83758dc63c9SDavid Howells __field(rxrpc_seq_t, top ) 83858dc63c9SDavid Howells ), 83958dc63c9SDavid Howells 84058dc63c9SDavid Howells TP_fast_assign( 84158dc63c9SDavid Howells __entry->call = call; 84258dc63c9SDavid Howells __entry->why = why; 84358dc63c9SDavid Howells __entry->serial = serial; 84458dc63c9SDavid Howells __entry->seq = seq; 84558dc63c9SDavid Howells __entry->hard_ack = call->rx_hard_ack; 84658dc63c9SDavid Howells __entry->top = call->rx_top; 84758dc63c9SDavid Howells ), 84858dc63c9SDavid Howells 84958dc63c9SDavid Howells TP_printk("c=%p %s r=%08x q=%08x w=%08x-%08x", 85058dc63c9SDavid Howells __entry->call, 851b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_receive_traces), 85258dc63c9SDavid Howells __entry->serial, 85358dc63c9SDavid Howells __entry->seq, 85458dc63c9SDavid Howells __entry->hard_ack, 85558dc63c9SDavid Howells __entry->top) 85658dc63c9SDavid Howells ); 85758dc63c9SDavid Howells 85884997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg, 85984997905SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 86084997905SDavid Howells rxrpc_seq_t seq, unsigned int offset, unsigned int len, 86184997905SDavid Howells int ret), 86284997905SDavid Howells 86384997905SDavid Howells TP_ARGS(call, why, seq, offset, len, ret), 86484997905SDavid Howells 86584997905SDavid Howells TP_STRUCT__entry( 86684997905SDavid Howells __field(struct rxrpc_call *, call ) 86784997905SDavid Howells __field(enum rxrpc_recvmsg_trace, why ) 86884997905SDavid Howells __field(rxrpc_seq_t, seq ) 86984997905SDavid Howells __field(unsigned int, offset ) 87084997905SDavid Howells __field(unsigned int, len ) 87184997905SDavid Howells __field(int, ret ) 87284997905SDavid Howells ), 87384997905SDavid Howells 87484997905SDavid Howells TP_fast_assign( 87584997905SDavid Howells __entry->call = call; 87684997905SDavid Howells __entry->why = why; 87784997905SDavid Howells __entry->seq = seq; 87884997905SDavid Howells __entry->offset = offset; 87984997905SDavid Howells __entry->len = len; 88084997905SDavid Howells __entry->ret = ret; 88184997905SDavid Howells ), 88284997905SDavid Howells 88384997905SDavid Howells TP_printk("c=%p %s q=%08x o=%u l=%u ret=%d", 88484997905SDavid Howells __entry->call, 885b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 88684997905SDavid Howells __entry->seq, 88784997905SDavid Howells __entry->offset, 88884997905SDavid Howells __entry->len, 88984997905SDavid Howells __entry->ret) 89084997905SDavid Howells ); 89184997905SDavid Howells 892cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx, 893cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 894cf1a6474SDavid Howells rxrpc_serial_t send_serial), 895cf1a6474SDavid Howells 896cf1a6474SDavid Howells TP_ARGS(call, why, send_serial), 897cf1a6474SDavid Howells 898cf1a6474SDavid Howells TP_STRUCT__entry( 899cf1a6474SDavid Howells __field(struct rxrpc_call *, call ) 900cf1a6474SDavid Howells __field(enum rxrpc_rtt_tx_trace, why ) 901cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial ) 902cf1a6474SDavid Howells ), 903cf1a6474SDavid Howells 904cf1a6474SDavid Howells TP_fast_assign( 905cf1a6474SDavid Howells __entry->call = call; 906cf1a6474SDavid Howells __entry->why = why; 907cf1a6474SDavid Howells __entry->send_serial = send_serial; 908cf1a6474SDavid Howells ), 909cf1a6474SDavid Howells 910cf1a6474SDavid Howells TP_printk("c=%p %s sr=%08x", 911cf1a6474SDavid Howells __entry->call, 912b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 913cf1a6474SDavid Howells __entry->send_serial) 914cf1a6474SDavid Howells ); 915cf1a6474SDavid Howells 916cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx, 917cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 918cf1a6474SDavid Howells rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 919cf1a6474SDavid Howells s64 rtt, u8 nr, s64 avg), 920cf1a6474SDavid Howells 921cf1a6474SDavid Howells TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg), 922cf1a6474SDavid Howells 923cf1a6474SDavid Howells TP_STRUCT__entry( 924cf1a6474SDavid Howells __field(struct rxrpc_call *, call ) 925cf1a6474SDavid Howells __field(enum rxrpc_rtt_rx_trace, why ) 926cf1a6474SDavid Howells __field(u8, nr ) 927cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial ) 928cf1a6474SDavid Howells __field(rxrpc_serial_t, resp_serial ) 929cf1a6474SDavid Howells __field(s64, rtt ) 930cf1a6474SDavid Howells __field(u64, avg ) 931cf1a6474SDavid Howells ), 932cf1a6474SDavid Howells 933cf1a6474SDavid Howells TP_fast_assign( 934cf1a6474SDavid Howells __entry->call = call; 935cf1a6474SDavid Howells __entry->why = why; 936cf1a6474SDavid Howells __entry->send_serial = send_serial; 937cf1a6474SDavid Howells __entry->resp_serial = resp_serial; 938cf1a6474SDavid Howells __entry->rtt = rtt; 939cf1a6474SDavid Howells __entry->nr = nr; 940cf1a6474SDavid Howells __entry->avg = avg; 941cf1a6474SDavid Howells ), 942cf1a6474SDavid Howells 943cf1a6474SDavid Howells TP_printk("c=%p %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", 944cf1a6474SDavid Howells __entry->call, 945b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 946cf1a6474SDavid Howells __entry->send_serial, 947cf1a6474SDavid Howells __entry->resp_serial, 948cf1a6474SDavid Howells __entry->rtt, 949cf1a6474SDavid Howells __entry->nr, 950cf1a6474SDavid Howells __entry->avg) 951cf1a6474SDavid Howells ); 952cf1a6474SDavid Howells 953fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer, 954fc7ab6d2SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, 955*a158bdd3SDavid Howells unsigned long now), 956fc7ab6d2SDavid Howells 957*a158bdd3SDavid Howells TP_ARGS(call, why, now), 958fc7ab6d2SDavid Howells 959fc7ab6d2SDavid Howells TP_STRUCT__entry( 960fc7ab6d2SDavid Howells __field(struct rxrpc_call *, call ) 961fc7ab6d2SDavid Howells __field(enum rxrpc_timer_trace, why ) 962*a158bdd3SDavid Howells __field(long, now ) 963*a158bdd3SDavid Howells __field(long, ack_at ) 964*a158bdd3SDavid Howells __field(long, resend_at ) 965*a158bdd3SDavid Howells __field(long, ping_at ) 966*a158bdd3SDavid Howells __field(long, expect_rx_by ) 967*a158bdd3SDavid Howells __field(long, expect_req_by ) 968*a158bdd3SDavid Howells __field(long, expect_term_by ) 969*a158bdd3SDavid Howells __field(long, timer ) 970fc7ab6d2SDavid Howells ), 971fc7ab6d2SDavid Howells 972fc7ab6d2SDavid Howells TP_fast_assign( 973fc7ab6d2SDavid Howells __entry->call = call; 974fc7ab6d2SDavid Howells __entry->why = why; 975fc7ab6d2SDavid Howells __entry->now = now; 976fc7ab6d2SDavid Howells __entry->ack_at = call->ack_at; 977fc7ab6d2SDavid Howells __entry->resend_at = call->resend_at; 978*a158bdd3SDavid Howells __entry->expect_rx_by = call->expect_rx_by; 979*a158bdd3SDavid Howells __entry->expect_req_by = call->expect_req_by; 980*a158bdd3SDavid Howells __entry->expect_term_by = call->expect_term_by; 981fc7ab6d2SDavid Howells __entry->timer = call->timer.expires; 982fc7ab6d2SDavid Howells ), 983fc7ab6d2SDavid Howells 984*a158bdd3SDavid Howells TP_printk("c=%p %s a=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 985fc7ab6d2SDavid Howells __entry->call, 986b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_timer_traces), 987*a158bdd3SDavid Howells __entry->ack_at - __entry->now, 988*a158bdd3SDavid Howells __entry->resend_at - __entry->now, 989*a158bdd3SDavid Howells __entry->expect_rx_by - __entry->now, 990*a158bdd3SDavid Howells __entry->expect_req_by - __entry->now, 991*a158bdd3SDavid Howells __entry->expect_term_by - __entry->now, 992*a158bdd3SDavid Howells __entry->timer - __entry->now) 993fc7ab6d2SDavid Howells ); 994fc7ab6d2SDavid Howells 99589b475abSDavid Howells TRACE_EVENT(rxrpc_rx_lose, 99689b475abSDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 99789b475abSDavid Howells 99889b475abSDavid Howells TP_ARGS(sp), 99989b475abSDavid Howells 100089b475abSDavid Howells TP_STRUCT__entry( 100189b475abSDavid Howells __field_struct(struct rxrpc_host_header, hdr ) 100289b475abSDavid Howells ), 100389b475abSDavid Howells 100489b475abSDavid Howells TP_fast_assign( 100589b475abSDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 100689b475abSDavid Howells ), 100789b475abSDavid Howells 100889b475abSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 100989b475abSDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 101089b475abSDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 101189b475abSDavid Howells __entry->hdr.serial, __entry->hdr.seq, 101289b475abSDavid Howells __entry->hdr.type, __entry->hdr.flags, 1013b54a134aSDavid Howells __entry->hdr.type <= 15 ? 1014b54a134aSDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 101589b475abSDavid Howells ); 101689b475abSDavid Howells 10179c7ad434SDavid Howells TRACE_EVENT(rxrpc_propose_ack, 10189c7ad434SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 10199c7ad434SDavid Howells u8 ack_reason, rxrpc_serial_t serial, bool immediate, 10209c7ad434SDavid Howells bool background, enum rxrpc_propose_ack_outcome outcome), 10219c7ad434SDavid Howells 10229c7ad434SDavid Howells TP_ARGS(call, why, ack_reason, serial, immediate, background, 10239c7ad434SDavid Howells outcome), 10249c7ad434SDavid Howells 10259c7ad434SDavid Howells TP_STRUCT__entry( 10269c7ad434SDavid Howells __field(struct rxrpc_call *, call ) 10279c7ad434SDavid Howells __field(enum rxrpc_propose_ack_trace, why ) 10289c7ad434SDavid Howells __field(rxrpc_serial_t, serial ) 10299c7ad434SDavid Howells __field(u8, ack_reason ) 10309c7ad434SDavid Howells __field(bool, immediate ) 10319c7ad434SDavid Howells __field(bool, background ) 10329c7ad434SDavid Howells __field(enum rxrpc_propose_ack_outcome, outcome ) 10339c7ad434SDavid Howells ), 10349c7ad434SDavid Howells 10359c7ad434SDavid Howells TP_fast_assign( 10369c7ad434SDavid Howells __entry->call = call; 10379c7ad434SDavid Howells __entry->why = why; 10389c7ad434SDavid Howells __entry->serial = serial; 10399c7ad434SDavid Howells __entry->ack_reason = ack_reason; 10409c7ad434SDavid Howells __entry->immediate = immediate; 10419c7ad434SDavid Howells __entry->background = background; 10429c7ad434SDavid Howells __entry->outcome = outcome; 10439c7ad434SDavid Howells ), 10449c7ad434SDavid Howells 10459c7ad434SDavid Howells TP_printk("c=%p %s %s r=%08x i=%u b=%u%s", 10469c7ad434SDavid Howells __entry->call, 1047b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1048b54a134aSDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 10499c7ad434SDavid Howells __entry->serial, 10509c7ad434SDavid Howells __entry->immediate, 10519c7ad434SDavid Howells __entry->background, 1052b54a134aSDavid Howells __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) 10539c7ad434SDavid Howells ); 10549c7ad434SDavid Howells 1055c6672e3fSDavid Howells TRACE_EVENT(rxrpc_retransmit, 1056c6672e3fSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation, 1057c6672e3fSDavid Howells s64 expiry), 1058c6672e3fSDavid Howells 1059c6672e3fSDavid Howells TP_ARGS(call, seq, annotation, expiry), 1060c6672e3fSDavid Howells 1061c6672e3fSDavid Howells TP_STRUCT__entry( 1062c6672e3fSDavid Howells __field(struct rxrpc_call *, call ) 1063c6672e3fSDavid Howells __field(rxrpc_seq_t, seq ) 1064c6672e3fSDavid Howells __field(u8, annotation ) 1065c6672e3fSDavid Howells __field(s64, expiry ) 1066c6672e3fSDavid Howells ), 1067c6672e3fSDavid Howells 1068c6672e3fSDavid Howells TP_fast_assign( 1069c6672e3fSDavid Howells __entry->call = call; 1070c6672e3fSDavid Howells __entry->seq = seq; 1071c6672e3fSDavid Howells __entry->annotation = annotation; 1072c6672e3fSDavid Howells __entry->expiry = expiry; 1073c6672e3fSDavid Howells ), 1074c6672e3fSDavid Howells 1075c6672e3fSDavid Howells TP_printk("c=%p q=%x a=%02x xp=%lld", 1076c6672e3fSDavid Howells __entry->call, 1077c6672e3fSDavid Howells __entry->seq, 1078c6672e3fSDavid Howells __entry->annotation, 1079c6672e3fSDavid Howells __entry->expiry) 1080c6672e3fSDavid Howells ); 1081c6672e3fSDavid Howells 108257494343SDavid Howells TRACE_EVENT(rxrpc_congest, 108357494343SDavid Howells TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 108457494343SDavid Howells rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), 108557494343SDavid Howells 108657494343SDavid Howells TP_ARGS(call, summary, ack_serial, change), 108757494343SDavid Howells 108857494343SDavid Howells TP_STRUCT__entry( 108957494343SDavid Howells __field(struct rxrpc_call *, call ) 109057494343SDavid Howells __field(enum rxrpc_congest_change, change ) 109157494343SDavid Howells __field(rxrpc_seq_t, hard_ack ) 109257494343SDavid Howells __field(rxrpc_seq_t, top ) 109357494343SDavid Howells __field(rxrpc_seq_t, lowest_nak ) 109457494343SDavid Howells __field(rxrpc_serial_t, ack_serial ) 109557494343SDavid Howells __field_struct(struct rxrpc_ack_summary, sum ) 109657494343SDavid Howells ), 109757494343SDavid Howells 109857494343SDavid Howells TP_fast_assign( 109957494343SDavid Howells __entry->call = call; 110057494343SDavid Howells __entry->change = change; 110157494343SDavid Howells __entry->hard_ack = call->tx_hard_ack; 110257494343SDavid Howells __entry->top = call->tx_top; 110357494343SDavid Howells __entry->lowest_nak = call->acks_lowest_nak; 110457494343SDavid Howells __entry->ack_serial = ack_serial; 110557494343SDavid Howells memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 110657494343SDavid Howells ), 110757494343SDavid Howells 110857494343SDavid Howells TP_printk("c=%p %08x %s %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", 110957494343SDavid Howells __entry->call, 111057494343SDavid Howells __entry->ack_serial, 1111b54a134aSDavid Howells __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 111257494343SDavid Howells __entry->hard_ack, 1113b54a134aSDavid Howells __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), 111457494343SDavid Howells __entry->sum.cwnd, 111557494343SDavid Howells __entry->sum.ssthresh, 111657494343SDavid Howells __entry->sum.nr_acks, __entry->sum.nr_nacks, 111757494343SDavid Howells __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, 111857494343SDavid Howells __entry->sum.nr_rot_new_acks, 111957494343SDavid Howells __entry->top - __entry->hard_ack, 112057494343SDavid Howells __entry->sum.cumulative_acks, 112157494343SDavid Howells __entry->sum.dup_acks, 112257494343SDavid Howells __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", 1123b54a134aSDavid Howells __print_symbolic(__entry->change, rxrpc_congest_changes), 112457494343SDavid Howells __entry->sum.retrans_timeo ? " rTxTo" : "") 112557494343SDavid Howells ); 112657494343SDavid Howells 1127b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_disconnect_call, 1128b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1129b1d9f7fdSDavid Howells 1130b1d9f7fdSDavid Howells TP_ARGS(call), 1131b1d9f7fdSDavid Howells 1132b1d9f7fdSDavid Howells TP_STRUCT__entry( 1133b1d9f7fdSDavid Howells __field(struct rxrpc_call *, call ) 1134b1d9f7fdSDavid Howells __field(u32, abort_code ) 1135b1d9f7fdSDavid Howells ), 1136b1d9f7fdSDavid Howells 1137b1d9f7fdSDavid Howells TP_fast_assign( 1138b1d9f7fdSDavid Howells __entry->call = call; 1139b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1140b1d9f7fdSDavid Howells ), 1141b1d9f7fdSDavid Howells 1142b1d9f7fdSDavid Howells TP_printk("c=%p ab=%08x", 1143b1d9f7fdSDavid Howells __entry->call, 1144b1d9f7fdSDavid Howells __entry->abort_code) 1145b1d9f7fdSDavid Howells ); 1146b1d9f7fdSDavid Howells 1147b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_improper_term, 1148b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1149b1d9f7fdSDavid Howells 1150b1d9f7fdSDavid Howells TP_ARGS(call), 1151b1d9f7fdSDavid Howells 1152b1d9f7fdSDavid Howells TP_STRUCT__entry( 1153b1d9f7fdSDavid Howells __field(struct rxrpc_call *, call ) 1154b1d9f7fdSDavid Howells __field(u32, abort_code ) 1155b1d9f7fdSDavid Howells ), 1156b1d9f7fdSDavid Howells 1157b1d9f7fdSDavid Howells TP_fast_assign( 1158b1d9f7fdSDavid Howells __entry->call = call; 1159b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1160b1d9f7fdSDavid Howells ), 1161b1d9f7fdSDavid Howells 1162b1d9f7fdSDavid Howells TP_printk("c=%p ab=%08x", 1163b1d9f7fdSDavid Howells __entry->call, 1164b1d9f7fdSDavid Howells __entry->abort_code) 1165b1d9f7fdSDavid Howells ); 1166b1d9f7fdSDavid Howells 1167fb46f6eeSDavid Howells TRACE_EVENT(rxrpc_rx_eproto, 1168fb46f6eeSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1169fb46f6eeSDavid Howells const char *why), 1170fb46f6eeSDavid Howells 1171fb46f6eeSDavid Howells TP_ARGS(call, serial, why), 1172fb46f6eeSDavid Howells 1173fb46f6eeSDavid Howells TP_STRUCT__entry( 1174fb46f6eeSDavid Howells __field(struct rxrpc_call *, call ) 1175fb46f6eeSDavid Howells __field(rxrpc_serial_t, serial ) 1176fb46f6eeSDavid Howells __field(const char *, why ) 1177fb46f6eeSDavid Howells ), 1178fb46f6eeSDavid Howells 1179fb46f6eeSDavid Howells TP_fast_assign( 1180fb46f6eeSDavid Howells __entry->call = call; 1181fb46f6eeSDavid Howells __entry->serial = serial; 1182fb46f6eeSDavid Howells __entry->why = why; 1183fb46f6eeSDavid Howells ), 1184fb46f6eeSDavid Howells 1185fb46f6eeSDavid Howells TP_printk("c=%p EPROTO %08x %s", 1186fb46f6eeSDavid Howells __entry->call, 1187fb46f6eeSDavid Howells __entry->serial, 1188fb46f6eeSDavid Howells __entry->why) 1189fb46f6eeSDavid Howells ); 1190fb46f6eeSDavid Howells 119189ca6948SDavid Howells TRACE_EVENT(rxrpc_connect_call, 119289ca6948SDavid Howells TP_PROTO(struct rxrpc_call *call), 119389ca6948SDavid Howells 119489ca6948SDavid Howells TP_ARGS(call), 119589ca6948SDavid Howells 119689ca6948SDavid Howells TP_STRUCT__entry( 119789ca6948SDavid Howells __field(struct rxrpc_call *, call ) 119889ca6948SDavid Howells __field(unsigned long, user_call_ID ) 119989ca6948SDavid Howells __field(u32, cid ) 120089ca6948SDavid Howells __field(u32, call_id ) 120189ca6948SDavid Howells ), 120289ca6948SDavid Howells 120389ca6948SDavid Howells TP_fast_assign( 120489ca6948SDavid Howells __entry->call = call; 120589ca6948SDavid Howells __entry->user_call_ID = call->user_call_ID; 120689ca6948SDavid Howells __entry->cid = call->cid; 120789ca6948SDavid Howells __entry->call_id = call->call_id; 120889ca6948SDavid Howells ), 120989ca6948SDavid Howells 121089ca6948SDavid Howells TP_printk("c=%p u=%p %08x:%08x", 121189ca6948SDavid Howells __entry->call, 121289ca6948SDavid Howells (void *)__entry->user_call_ID, 121389ca6948SDavid Howells __entry->cid, 121489ca6948SDavid Howells __entry->call_id) 121589ca6948SDavid Howells ); 121689ca6948SDavid Howells 1217df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */ 1218df844fd4SDavid Howells 1219df844fd4SDavid Howells /* This part must be outside protection */ 1220df844fd4SDavid Howells #include <trace/define_trace.h> 1221