1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* AF_RXRPC tracepoints 3 * 4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 */ 7 #undef TRACE_SYSTEM 8 #define TRACE_SYSTEM rxrpc 9 10 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) 11 #define _TRACE_RXRPC_H 12 13 #include <linux/tracepoint.h> 14 #include <linux/errqueue.h> 15 16 /* 17 * Declare tracing information enums and their string mappings for display. 18 */ 19 #define rxrpc_skb_traces \ 20 EM(rxrpc_skb_ack, "ACK") \ 21 EM(rxrpc_skb_cleaned, "CLN") \ 22 EM(rxrpc_skb_cloned_jumbo, "CLJ") \ 23 EM(rxrpc_skb_freed, "FRE") \ 24 EM(rxrpc_skb_got, "GOT") \ 25 EM(rxrpc_skb_lost, "*L*") \ 26 EM(rxrpc_skb_new, "NEW") \ 27 EM(rxrpc_skb_purged, "PUR") \ 28 EM(rxrpc_skb_received, "RCV") \ 29 EM(rxrpc_skb_rotated, "ROT") \ 30 EM(rxrpc_skb_seen, "SEE") \ 31 EM(rxrpc_skb_unshared, "UNS") \ 32 E_(rxrpc_skb_unshared_nomem, "US0") 33 34 #define rxrpc_local_traces \ 35 EM(rxrpc_local_got, "GOT") \ 36 EM(rxrpc_local_new, "NEW") \ 37 EM(rxrpc_local_processing, "PRO") \ 38 EM(rxrpc_local_put, "PUT") \ 39 EM(rxrpc_local_queued, "QUE") \ 40 E_(rxrpc_local_tx_ack, "TAK") 41 42 #define rxrpc_peer_traces \ 43 EM(rxrpc_peer_got, "GOT") \ 44 EM(rxrpc_peer_new, "NEW") \ 45 EM(rxrpc_peer_processing, "PRO") \ 46 E_(rxrpc_peer_put, "PUT") 47 48 #define rxrpc_conn_traces \ 49 EM(rxrpc_conn_got, "GOT") \ 50 EM(rxrpc_conn_new_client, "NWc") \ 51 EM(rxrpc_conn_new_service, "NWs") \ 52 EM(rxrpc_conn_put_client, "PTc") \ 53 EM(rxrpc_conn_put_service, "PTs") \ 54 EM(rxrpc_conn_queued, "QUE") \ 55 EM(rxrpc_conn_reap_service, "RPs") \ 56 E_(rxrpc_conn_seen, "SEE") 57 58 #define rxrpc_client_traces \ 59 EM(rxrpc_client_activate_chans, "Activa") \ 60 EM(rxrpc_client_alloc, "Alloc ") \ 61 EM(rxrpc_client_chan_activate, "ChActv") \ 62 EM(rxrpc_client_chan_disconnect, "ChDisc") \ 63 EM(rxrpc_client_chan_pass, "ChPass") \ 64 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \ 65 EM(rxrpc_client_cleanup, "Clean ") \ 66 EM(rxrpc_client_discard, "Discar") \ 67 EM(rxrpc_client_duplicate, "Duplic") \ 68 EM(rxrpc_client_exposed, "Expose") \ 69 EM(rxrpc_client_replace, "Replac") \ 70 EM(rxrpc_client_to_active, "->Actv") \ 71 E_(rxrpc_client_to_idle, "->Idle") 72 73 #define rxrpc_call_traces \ 74 EM(rxrpc_call_connected, "CON") \ 75 EM(rxrpc_call_error, "*E*") \ 76 EM(rxrpc_call_got, "GOT") \ 77 EM(rxrpc_call_got_kernel, "Gke") \ 78 EM(rxrpc_call_got_timer, "GTM") \ 79 EM(rxrpc_call_got_tx, "Gtx") \ 80 EM(rxrpc_call_got_userid, "Gus") \ 81 EM(rxrpc_call_new_client, "NWc") \ 82 EM(rxrpc_call_new_service, "NWs") \ 83 EM(rxrpc_call_put, "PUT") \ 84 EM(rxrpc_call_put_kernel, "Pke") \ 85 EM(rxrpc_call_put_noqueue, "PnQ") \ 86 EM(rxrpc_call_put_notimer, "PnT") \ 87 EM(rxrpc_call_put_timer, "PTM") \ 88 EM(rxrpc_call_put_tx, "Ptx") \ 89 EM(rxrpc_call_put_userid, "Pus") \ 90 EM(rxrpc_call_queued, "QUE") \ 91 EM(rxrpc_call_queued_ref, "QUR") \ 92 EM(rxrpc_call_release, "RLS") \ 93 E_(rxrpc_call_seen, "SEE") 94 95 #define rxrpc_txqueue_traces \ 96 EM(rxrpc_txqueue_await_reply, "AWR") \ 97 EM(rxrpc_txqueue_dequeue, "DEQ") \ 98 EM(rxrpc_txqueue_end, "END") \ 99 EM(rxrpc_txqueue_queue, "QUE") \ 100 EM(rxrpc_txqueue_queue_last, "QLS") \ 101 EM(rxrpc_txqueue_rotate, "ROT") \ 102 EM(rxrpc_txqueue_rotate_last, "RLS") \ 103 E_(rxrpc_txqueue_wait, "WAI") 104 105 #define rxrpc_receive_traces \ 106 EM(rxrpc_receive_end, "END") \ 107 EM(rxrpc_receive_front, "FRN") \ 108 EM(rxrpc_receive_incoming, "INC") \ 109 EM(rxrpc_receive_queue, "QUE") \ 110 EM(rxrpc_receive_queue_last, "QLS") \ 111 EM(rxrpc_receive_queue_oos, "QUO") \ 112 EM(rxrpc_receive_queue_oos_last, "QOL") \ 113 EM(rxrpc_receive_oos, "OOS") \ 114 EM(rxrpc_receive_oos_last, "OSL") \ 115 EM(rxrpc_receive_rotate, "ROT") \ 116 E_(rxrpc_receive_rotate_last, "RLS") 117 118 #define rxrpc_recvmsg_traces \ 119 EM(rxrpc_recvmsg_cont, "CONT") \ 120 EM(rxrpc_recvmsg_data_return, "DATA") \ 121 EM(rxrpc_recvmsg_dequeue, "DEQU") \ 122 EM(rxrpc_recvmsg_enter, "ENTR") \ 123 EM(rxrpc_recvmsg_full, "FULL") \ 124 EM(rxrpc_recvmsg_hole, "HOLE") \ 125 EM(rxrpc_recvmsg_next, "NEXT") \ 126 EM(rxrpc_recvmsg_requeue, "REQU") \ 127 EM(rxrpc_recvmsg_return, "RETN") \ 128 EM(rxrpc_recvmsg_terminal, "TERM") \ 129 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ 130 E_(rxrpc_recvmsg_wait, "WAIT") 131 132 #define rxrpc_rtt_tx_traces \ 133 EM(rxrpc_rtt_tx_cancel, "CNCE") \ 134 EM(rxrpc_rtt_tx_data, "DATA") \ 135 EM(rxrpc_rtt_tx_no_slot, "FULL") \ 136 E_(rxrpc_rtt_tx_ping, "PING") 137 138 #define rxrpc_rtt_rx_traces \ 139 EM(rxrpc_rtt_rx_cancel, "CNCL") \ 140 EM(rxrpc_rtt_rx_obsolete, "OBSL") \ 141 EM(rxrpc_rtt_rx_lost, "LOST") \ 142 EM(rxrpc_rtt_rx_ping_response, "PONG") \ 143 E_(rxrpc_rtt_rx_requested_ack, "RACK") 144 145 #define rxrpc_timer_traces \ 146 EM(rxrpc_timer_begin, "Begin ") \ 147 EM(rxrpc_timer_exp_ack, "ExpAck") \ 148 EM(rxrpc_timer_exp_hard, "ExpHrd") \ 149 EM(rxrpc_timer_exp_idle, "ExpIdl") \ 150 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ 151 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ 152 EM(rxrpc_timer_exp_normal, "ExpNml") \ 153 EM(rxrpc_timer_exp_ping, "ExpPng") \ 154 EM(rxrpc_timer_exp_resend, "ExpRsn") \ 155 EM(rxrpc_timer_init_for_reply, "IniRpl") \ 156 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ 157 EM(rxrpc_timer_restart, "Restrt") \ 158 EM(rxrpc_timer_set_for_ack, "SetAck") \ 159 EM(rxrpc_timer_set_for_hard, "SetHrd") \ 160 EM(rxrpc_timer_set_for_idle, "SetIdl") \ 161 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ 162 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ 163 EM(rxrpc_timer_set_for_normal, "SetNml") \ 164 EM(rxrpc_timer_set_for_ping, "SetPng") \ 165 EM(rxrpc_timer_set_for_resend, "SetRTx") \ 166 E_(rxrpc_timer_set_for_send, "SetSnd") 167 168 #define rxrpc_propose_ack_traces \ 169 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 170 EM(rxrpc_propose_ack_input_data, "DataIn ") \ 171 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \ 172 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \ 173 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ 174 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 175 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 176 EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 177 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ 178 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ 179 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ 180 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ 181 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ 182 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 183 184 #define rxrpc_congest_modes \ 185 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ 186 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ 187 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ 188 E_(RXRPC_CALL_SLOW_START, "SlowStart") 189 190 #define rxrpc_congest_changes \ 191 EM(rxrpc_cong_begin_retransmission, " Retrans") \ 192 EM(rxrpc_cong_cleared_nacks, " Cleared") \ 193 EM(rxrpc_cong_new_low_nack, " NewLowN") \ 194 EM(rxrpc_cong_no_change, " -") \ 195 EM(rxrpc_cong_progress, " Progres") \ 196 EM(rxrpc_cong_idle_reset, " IdleRes") \ 197 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 198 EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 199 E_(rxrpc_cong_saw_nack, " SawNack") 200 201 #define rxrpc_pkts \ 202 EM(0, "?00") \ 203 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 204 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 205 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 206 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 207 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 208 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 209 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 210 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 211 EM(9, "?09") \ 212 EM(10, "?10") \ 213 EM(11, "?11") \ 214 EM(12, "?12") \ 215 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 216 EM(14, "?14") \ 217 E_(15, "?15") 218 219 #define rxrpc_ack_names \ 220 EM(0, "-0-") \ 221 EM(RXRPC_ACK_REQUESTED, "REQ") \ 222 EM(RXRPC_ACK_DUPLICATE, "DUP") \ 223 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 224 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 225 EM(RXRPC_ACK_NOSPACE, "MEM") \ 226 EM(RXRPC_ACK_PING, "PNG") \ 227 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 228 EM(RXRPC_ACK_DELAY, "DLY") \ 229 EM(RXRPC_ACK_IDLE, "IDL") \ 230 E_(RXRPC_ACK__INVALID, "-?-") 231 232 #define rxrpc_completions \ 233 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ 234 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ 235 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ 236 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ 237 E_(RXRPC_CALL_NETWORK_ERROR, "NetError") 238 239 #define rxrpc_tx_points \ 240 EM(rxrpc_tx_point_call_abort, "CallAbort") \ 241 EM(rxrpc_tx_point_call_ack, "CallAck") \ 242 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ 243 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ 244 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ 245 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ 246 EM(rxrpc_tx_point_reject, "Reject") \ 247 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ 248 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \ 249 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ 250 E_(rxrpc_tx_point_version_reply, "VerReply") 251 252 #define rxrpc_req_ack_traces \ 253 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \ 254 EM(rxrpc_reqack_already_on, "ALREADY-ON") \ 255 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \ 256 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \ 257 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \ 258 EM(rxrpc_reqack_retrans, "RETRANS ") \ 259 EM(rxrpc_reqack_slow_start, "SLOW-START") \ 260 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN") 261 /* ---- Must update size of stat_why_req_ack[] if more are added! */ 262 263 #define rxrpc_txbuf_traces \ 264 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \ 265 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \ 266 EM(rxrpc_txbuf_free, "FREE ") \ 267 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \ 268 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \ 269 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \ 270 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \ 271 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \ 272 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \ 273 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \ 274 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \ 275 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \ 276 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \ 277 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED") 278 279 /* 280 * Generate enums for tracing information. 281 */ 282 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 283 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 284 285 #undef EM 286 #undef E_ 287 #define EM(a, b) a, 288 #define E_(a, b) a 289 290 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte); 291 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte); 292 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte); 293 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte); 294 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte); 295 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte); 296 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte); 297 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte); 298 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte); 299 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte); 300 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte); 301 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte); 302 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte); 303 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte); 304 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte); 305 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte); 306 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte); 307 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte); 308 309 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 310 311 /* 312 * Export enum symbols via userspace. 313 */ 314 #undef EM 315 #undef E_ 316 #define EM(a, b) TRACE_DEFINE_ENUM(a); 317 #define E_(a, b) TRACE_DEFINE_ENUM(a); 318 319 rxrpc_call_traces; 320 rxrpc_client_traces; 321 rxrpc_congest_changes; 322 rxrpc_congest_modes; 323 rxrpc_conn_traces; 324 rxrpc_local_traces; 325 rxrpc_propose_ack_traces; 326 rxrpc_receive_traces; 327 rxrpc_recvmsg_traces; 328 rxrpc_req_ack_traces; 329 rxrpc_rtt_rx_traces; 330 rxrpc_rtt_tx_traces; 331 rxrpc_skb_traces; 332 rxrpc_timer_traces; 333 rxrpc_tx_points; 334 rxrpc_txbuf_traces; 335 rxrpc_txqueue_traces; 336 337 /* 338 * Now redefine the EM() and E_() macros to map the enums to the strings that 339 * will be printed in the output. 340 */ 341 #undef EM 342 #undef E_ 343 #define EM(a, b) { a, b }, 344 #define E_(a, b) { a, b } 345 346 TRACE_EVENT(rxrpc_local, 347 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op, 348 int usage, const void *where), 349 350 TP_ARGS(local_debug_id, op, usage, where), 351 352 TP_STRUCT__entry( 353 __field(unsigned int, local ) 354 __field(int, op ) 355 __field(int, usage ) 356 __field(const void *, where ) 357 ), 358 359 TP_fast_assign( 360 __entry->local = local_debug_id; 361 __entry->op = op; 362 __entry->usage = usage; 363 __entry->where = where; 364 ), 365 366 TP_printk("L=%08x %s u=%d sp=%pSR", 367 __entry->local, 368 __print_symbolic(__entry->op, rxrpc_local_traces), 369 __entry->usage, 370 __entry->where) 371 ); 372 373 TRACE_EVENT(rxrpc_peer, 374 TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op, 375 int usage, const void *where), 376 377 TP_ARGS(peer_debug_id, op, usage, where), 378 379 TP_STRUCT__entry( 380 __field(unsigned int, peer ) 381 __field(int, op ) 382 __field(int, usage ) 383 __field(const void *, where ) 384 ), 385 386 TP_fast_assign( 387 __entry->peer = peer_debug_id; 388 __entry->op = op; 389 __entry->usage = usage; 390 __entry->where = where; 391 ), 392 393 TP_printk("P=%08x %s u=%d sp=%pSR", 394 __entry->peer, 395 __print_symbolic(__entry->op, rxrpc_peer_traces), 396 __entry->usage, 397 __entry->where) 398 ); 399 400 TRACE_EVENT(rxrpc_conn, 401 TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op, 402 int usage, const void *where), 403 404 TP_ARGS(conn_debug_id, op, usage, where), 405 406 TP_STRUCT__entry( 407 __field(unsigned int, conn ) 408 __field(int, op ) 409 __field(int, usage ) 410 __field(const void *, where ) 411 ), 412 413 TP_fast_assign( 414 __entry->conn = conn_debug_id; 415 __entry->op = op; 416 __entry->usage = usage; 417 __entry->where = where; 418 ), 419 420 TP_printk("C=%08x %s u=%d sp=%pSR", 421 __entry->conn, 422 __print_symbolic(__entry->op, rxrpc_conn_traces), 423 __entry->usage, 424 __entry->where) 425 ); 426 427 TRACE_EVENT(rxrpc_client, 428 TP_PROTO(struct rxrpc_connection *conn, int channel, 429 enum rxrpc_client_trace op), 430 431 TP_ARGS(conn, channel, op), 432 433 TP_STRUCT__entry( 434 __field(unsigned int, conn ) 435 __field(u32, cid ) 436 __field(int, channel ) 437 __field(int, usage ) 438 __field(enum rxrpc_client_trace, op ) 439 ), 440 441 TP_fast_assign( 442 __entry->conn = conn ? conn->debug_id : 0; 443 __entry->channel = channel; 444 __entry->usage = conn ? refcount_read(&conn->ref) : -2; 445 __entry->op = op; 446 __entry->cid = conn ? conn->proto.cid : 0; 447 ), 448 449 TP_printk("C=%08x h=%2d %s i=%08x u=%d", 450 __entry->conn, 451 __entry->channel, 452 __print_symbolic(__entry->op, rxrpc_client_traces), 453 __entry->cid, 454 __entry->usage) 455 ); 456 457 TRACE_EVENT(rxrpc_call, 458 TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op, 459 int usage, const void *where, const void *aux), 460 461 TP_ARGS(call_debug_id, op, usage, where, aux), 462 463 TP_STRUCT__entry( 464 __field(unsigned int, call ) 465 __field(int, op ) 466 __field(int, usage ) 467 __field(const void *, where ) 468 __field(const void *, aux ) 469 ), 470 471 TP_fast_assign( 472 __entry->call = call_debug_id; 473 __entry->op = op; 474 __entry->usage = usage; 475 __entry->where = where; 476 __entry->aux = aux; 477 ), 478 479 TP_printk("c=%08x %s u=%d sp=%pSR a=%p", 480 __entry->call, 481 __print_symbolic(__entry->op, rxrpc_call_traces), 482 __entry->usage, 483 __entry->where, 484 __entry->aux) 485 ); 486 487 TRACE_EVENT(rxrpc_skb, 488 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, 489 int usage, int mod_count, const void *where), 490 491 TP_ARGS(skb, op, usage, mod_count, where), 492 493 TP_STRUCT__entry( 494 __field(struct sk_buff *, skb ) 495 __field(enum rxrpc_skb_trace, op ) 496 __field(int, usage ) 497 __field(int, mod_count ) 498 __field(const void *, where ) 499 ), 500 501 TP_fast_assign( 502 __entry->skb = skb; 503 __entry->op = op; 504 __entry->usage = usage; 505 __entry->mod_count = mod_count; 506 __entry->where = where; 507 ), 508 509 TP_printk("s=%p Rx %s u=%d m=%d p=%pSR", 510 __entry->skb, 511 __print_symbolic(__entry->op, rxrpc_skb_traces), 512 __entry->usage, 513 __entry->mod_count, 514 __entry->where) 515 ); 516 517 TRACE_EVENT(rxrpc_rx_packet, 518 TP_PROTO(struct rxrpc_skb_priv *sp), 519 520 TP_ARGS(sp), 521 522 TP_STRUCT__entry( 523 __field_struct(struct rxrpc_host_header, hdr ) 524 ), 525 526 TP_fast_assign( 527 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 528 ), 529 530 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 531 __entry->hdr.epoch, __entry->hdr.cid, 532 __entry->hdr.callNumber, __entry->hdr.serviceId, 533 __entry->hdr.serial, __entry->hdr.seq, 534 __entry->hdr.type, __entry->hdr.flags, 535 __entry->hdr.type <= 15 ? 536 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 537 ); 538 539 TRACE_EVENT(rxrpc_rx_done, 540 TP_PROTO(int result, int abort_code), 541 542 TP_ARGS(result, abort_code), 543 544 TP_STRUCT__entry( 545 __field(int, result ) 546 __field(int, abort_code ) 547 ), 548 549 TP_fast_assign( 550 __entry->result = result; 551 __entry->abort_code = abort_code; 552 ), 553 554 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 555 ); 556 557 TRACE_EVENT(rxrpc_abort, 558 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id, 559 rxrpc_seq_t seq, int abort_code, int error), 560 561 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), 562 563 TP_STRUCT__entry( 564 __field(unsigned int, call_nr ) 565 __array(char, why, 4 ) 566 __field(u32, cid ) 567 __field(u32, call_id ) 568 __field(rxrpc_seq_t, seq ) 569 __field(int, abort_code ) 570 __field(int, error ) 571 ), 572 573 TP_fast_assign( 574 memcpy(__entry->why, why, 4); 575 __entry->call_nr = call_nr; 576 __entry->cid = cid; 577 __entry->call_id = call_id; 578 __entry->abort_code = abort_code; 579 __entry->error = error; 580 __entry->seq = seq; 581 ), 582 583 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", 584 __entry->call_nr, 585 __entry->cid, __entry->call_id, __entry->seq, 586 __entry->abort_code, __entry->error, __entry->why) 587 ); 588 589 TRACE_EVENT(rxrpc_call_complete, 590 TP_PROTO(struct rxrpc_call *call), 591 592 TP_ARGS(call), 593 594 TP_STRUCT__entry( 595 __field(unsigned int, call ) 596 __field(enum rxrpc_call_completion, compl ) 597 __field(int, error ) 598 __field(u32, abort_code ) 599 ), 600 601 TP_fast_assign( 602 __entry->call = call->debug_id; 603 __entry->compl = call->completion; 604 __entry->error = call->error; 605 __entry->abort_code = call->abort_code; 606 ), 607 608 TP_printk("c=%08x %s r=%d ac=%d", 609 __entry->call, 610 __print_symbolic(__entry->compl, rxrpc_completions), 611 __entry->error, 612 __entry->abort_code) 613 ); 614 615 TRACE_EVENT(rxrpc_txqueue, 616 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why), 617 618 TP_ARGS(call, why), 619 620 TP_STRUCT__entry( 621 __field(unsigned int, call ) 622 __field(enum rxrpc_txqueue_trace, why ) 623 __field(rxrpc_seq_t, acks_hard_ack ) 624 __field(rxrpc_seq_t, tx_bottom ) 625 __field(rxrpc_seq_t, tx_top ) 626 __field(int, tx_winsize ) 627 ), 628 629 TP_fast_assign( 630 __entry->call = call->debug_id; 631 __entry->why = why; 632 __entry->acks_hard_ack = call->acks_hard_ack; 633 __entry->tx_bottom = call->tx_bottom; 634 __entry->tx_top = call->tx_top; 635 __entry->tx_winsize = call->tx_winsize; 636 ), 637 638 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u", 639 __entry->call, 640 __print_symbolic(__entry->why, rxrpc_txqueue_traces), 641 __entry->tx_bottom, 642 __entry->acks_hard_ack, 643 __entry->tx_top - __entry->tx_bottom, 644 __entry->tx_top - __entry->acks_hard_ack, 645 __entry->tx_winsize) 646 ); 647 648 TRACE_EVENT(rxrpc_rx_data, 649 TP_PROTO(unsigned int call, rxrpc_seq_t seq, 650 rxrpc_serial_t serial, u8 flags), 651 652 TP_ARGS(call, seq, serial, flags), 653 654 TP_STRUCT__entry( 655 __field(unsigned int, call ) 656 __field(rxrpc_seq_t, seq ) 657 __field(rxrpc_serial_t, serial ) 658 __field(u8, flags ) 659 ), 660 661 TP_fast_assign( 662 __entry->call = call; 663 __entry->seq = seq; 664 __entry->serial = serial; 665 __entry->flags = flags; 666 ), 667 668 TP_printk("c=%08x DATA %08x q=%08x fl=%02x", 669 __entry->call, 670 __entry->serial, 671 __entry->seq, 672 __entry->flags) 673 ); 674 675 TRACE_EVENT(rxrpc_rx_ack, 676 TP_PROTO(struct rxrpc_call *call, 677 rxrpc_serial_t serial, rxrpc_serial_t ack_serial, 678 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), 679 680 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), 681 682 TP_STRUCT__entry( 683 __field(unsigned int, call ) 684 __field(rxrpc_serial_t, serial ) 685 __field(rxrpc_serial_t, ack_serial ) 686 __field(rxrpc_seq_t, first ) 687 __field(rxrpc_seq_t, prev ) 688 __field(u8, reason ) 689 __field(u8, n_acks ) 690 ), 691 692 TP_fast_assign( 693 __entry->call = call->debug_id; 694 __entry->serial = serial; 695 __entry->ack_serial = ack_serial; 696 __entry->first = first; 697 __entry->prev = prev; 698 __entry->reason = reason; 699 __entry->n_acks = n_acks; 700 ), 701 702 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", 703 __entry->call, 704 __entry->serial, 705 __print_symbolic(__entry->reason, rxrpc_ack_names), 706 __entry->ack_serial, 707 __entry->first, 708 __entry->prev, 709 __entry->n_acks) 710 ); 711 712 TRACE_EVENT(rxrpc_rx_abort, 713 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 714 u32 abort_code), 715 716 TP_ARGS(call, serial, abort_code), 717 718 TP_STRUCT__entry( 719 __field(unsigned int, call ) 720 __field(rxrpc_serial_t, serial ) 721 __field(u32, abort_code ) 722 ), 723 724 TP_fast_assign( 725 __entry->call = call->debug_id; 726 __entry->serial = serial; 727 __entry->abort_code = abort_code; 728 ), 729 730 TP_printk("c=%08x ABORT %08x ac=%d", 731 __entry->call, 732 __entry->serial, 733 __entry->abort_code) 734 ); 735 736 TRACE_EVENT(rxrpc_rx_rwind_change, 737 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 738 u32 rwind, bool wake), 739 740 TP_ARGS(call, serial, rwind, wake), 741 742 TP_STRUCT__entry( 743 __field(unsigned int, call ) 744 __field(rxrpc_serial_t, serial ) 745 __field(u32, rwind ) 746 __field(bool, wake ) 747 ), 748 749 TP_fast_assign( 750 __entry->call = call->debug_id; 751 __entry->serial = serial; 752 __entry->rwind = rwind; 753 __entry->wake = wake; 754 ), 755 756 TP_printk("c=%08x %08x rw=%u%s", 757 __entry->call, 758 __entry->serial, 759 __entry->rwind, 760 __entry->wake ? " wake" : "") 761 ); 762 763 TRACE_EVENT(rxrpc_tx_packet, 764 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, 765 enum rxrpc_tx_point where), 766 767 TP_ARGS(call_id, whdr, where), 768 769 TP_STRUCT__entry( 770 __field(unsigned int, call ) 771 __field(enum rxrpc_tx_point, where ) 772 __field_struct(struct rxrpc_wire_header, whdr ) 773 ), 774 775 TP_fast_assign( 776 __entry->call = call_id; 777 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); 778 __entry->where = where; 779 ), 780 781 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", 782 __entry->call, 783 ntohl(__entry->whdr.epoch), 784 ntohl(__entry->whdr.cid), 785 ntohl(__entry->whdr.callNumber), 786 ntohs(__entry->whdr.serviceId), 787 ntohl(__entry->whdr.serial), 788 ntohl(__entry->whdr.seq), 789 __entry->whdr.type, __entry->whdr.flags, 790 __entry->whdr.type <= 15 ? 791 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", 792 __print_symbolic(__entry->where, rxrpc_tx_points)) 793 ); 794 795 TRACE_EVENT(rxrpc_tx_data, 796 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 797 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), 798 799 TP_ARGS(call, seq, serial, flags, retrans, lose), 800 801 TP_STRUCT__entry( 802 __field(unsigned int, call ) 803 __field(rxrpc_seq_t, seq ) 804 __field(rxrpc_serial_t, serial ) 805 __field(u32, cid ) 806 __field(u32, call_id ) 807 __field(u8, flags ) 808 __field(bool, retrans ) 809 __field(bool, lose ) 810 ), 811 812 TP_fast_assign( 813 __entry->call = call->debug_id; 814 __entry->cid = call->cid; 815 __entry->call_id = call->call_id; 816 __entry->seq = seq; 817 __entry->serial = serial; 818 __entry->flags = flags; 819 __entry->retrans = retrans; 820 __entry->lose = lose; 821 ), 822 823 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s", 824 __entry->call, 825 __entry->cid, 826 __entry->call_id, 827 __entry->serial, 828 __entry->seq, 829 __entry->flags, 830 __entry->retrans ? " *RETRANS*" : "", 831 __entry->lose ? " *LOSE*" : "") 832 ); 833 834 TRACE_EVENT(rxrpc_tx_ack, 835 TP_PROTO(unsigned int call, rxrpc_serial_t serial, 836 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 837 u8 reason, u8 n_acks), 838 839 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), 840 841 TP_STRUCT__entry( 842 __field(unsigned int, call ) 843 __field(rxrpc_serial_t, serial ) 844 __field(rxrpc_seq_t, ack_first ) 845 __field(rxrpc_serial_t, ack_serial ) 846 __field(u8, reason ) 847 __field(u8, n_acks ) 848 ), 849 850 TP_fast_assign( 851 __entry->call = call; 852 __entry->serial = serial; 853 __entry->ack_first = ack_first; 854 __entry->ack_serial = ack_serial; 855 __entry->reason = reason; 856 __entry->n_acks = n_acks; 857 ), 858 859 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u", 860 __entry->call, 861 __entry->serial, 862 __print_symbolic(__entry->reason, rxrpc_ack_names), 863 __entry->ack_first, 864 __entry->ack_serial, 865 __entry->n_acks) 866 ); 867 868 TRACE_EVENT(rxrpc_receive, 869 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 870 rxrpc_serial_t serial, rxrpc_seq_t seq), 871 872 TP_ARGS(call, why, serial, seq), 873 874 TP_STRUCT__entry( 875 __field(unsigned int, call ) 876 __field(enum rxrpc_receive_trace, why ) 877 __field(rxrpc_serial_t, serial ) 878 __field(rxrpc_seq_t, seq ) 879 __field(u64, window ) 880 ), 881 882 TP_fast_assign( 883 __entry->call = call->debug_id; 884 __entry->why = why; 885 __entry->serial = serial; 886 __entry->seq = seq; 887 __entry->window = atomic64_read(&call->ackr_window); 888 ), 889 890 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", 891 __entry->call, 892 __print_symbolic(__entry->why, rxrpc_receive_traces), 893 __entry->serial, 894 __entry->seq, 895 lower_32_bits(__entry->window), 896 upper_32_bits(__entry->window)) 897 ); 898 899 TRACE_EVENT(rxrpc_recvmsg, 900 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 901 int ret), 902 903 TP_ARGS(call, why, ret), 904 905 TP_STRUCT__entry( 906 __field(unsigned int, call ) 907 __field(enum rxrpc_recvmsg_trace, why ) 908 __field(int, ret ) 909 ), 910 911 TP_fast_assign( 912 __entry->call = call ? call->debug_id : 0; 913 __entry->why = why; 914 __entry->ret = ret; 915 ), 916 917 TP_printk("c=%08x %s ret=%d", 918 __entry->call, 919 __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 920 __entry->ret) 921 ); 922 923 TRACE_EVENT(rxrpc_recvdata, 924 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 925 rxrpc_seq_t seq, unsigned int offset, unsigned int len, 926 int ret), 927 928 TP_ARGS(call, why, seq, offset, len, ret), 929 930 TP_STRUCT__entry( 931 __field(unsigned int, call ) 932 __field(enum rxrpc_recvmsg_trace, why ) 933 __field(rxrpc_seq_t, seq ) 934 __field(unsigned int, offset ) 935 __field(unsigned int, len ) 936 __field(int, ret ) 937 ), 938 939 TP_fast_assign( 940 __entry->call = call ? call->debug_id : 0; 941 __entry->why = why; 942 __entry->seq = seq; 943 __entry->offset = offset; 944 __entry->len = len; 945 __entry->ret = ret; 946 ), 947 948 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", 949 __entry->call, 950 __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 951 __entry->seq, 952 __entry->offset, 953 __entry->len, 954 __entry->ret) 955 ); 956 957 TRACE_EVENT(rxrpc_rtt_tx, 958 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 959 int slot, rxrpc_serial_t send_serial), 960 961 TP_ARGS(call, why, slot, send_serial), 962 963 TP_STRUCT__entry( 964 __field(unsigned int, call ) 965 __field(enum rxrpc_rtt_tx_trace, why ) 966 __field(int, slot ) 967 __field(rxrpc_serial_t, send_serial ) 968 ), 969 970 TP_fast_assign( 971 __entry->call = call->debug_id; 972 __entry->why = why; 973 __entry->slot = slot; 974 __entry->send_serial = send_serial; 975 ), 976 977 TP_printk("c=%08x [%d] %s sr=%08x", 978 __entry->call, 979 __entry->slot, 980 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 981 __entry->send_serial) 982 ); 983 984 TRACE_EVENT(rxrpc_rtt_rx, 985 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 986 int slot, 987 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 988 u32 rtt, u32 rto), 989 990 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto), 991 992 TP_STRUCT__entry( 993 __field(unsigned int, call ) 994 __field(enum rxrpc_rtt_rx_trace, why ) 995 __field(int, slot ) 996 __field(rxrpc_serial_t, send_serial ) 997 __field(rxrpc_serial_t, resp_serial ) 998 __field(u32, rtt ) 999 __field(u32, rto ) 1000 ), 1001 1002 TP_fast_assign( 1003 __entry->call = call->debug_id; 1004 __entry->why = why; 1005 __entry->slot = slot; 1006 __entry->send_serial = send_serial; 1007 __entry->resp_serial = resp_serial; 1008 __entry->rtt = rtt; 1009 __entry->rto = rto; 1010 ), 1011 1012 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u", 1013 __entry->call, 1014 __entry->slot, 1015 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 1016 __entry->send_serial, 1017 __entry->resp_serial, 1018 __entry->rtt, 1019 __entry->rto) 1020 ); 1021 1022 TRACE_EVENT(rxrpc_timer, 1023 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, 1024 unsigned long now), 1025 1026 TP_ARGS(call, why, now), 1027 1028 TP_STRUCT__entry( 1029 __field(unsigned int, call ) 1030 __field(enum rxrpc_timer_trace, why ) 1031 __field(long, now ) 1032 __field(long, ack_at ) 1033 __field(long, ack_lost_at ) 1034 __field(long, resend_at ) 1035 __field(long, ping_at ) 1036 __field(long, expect_rx_by ) 1037 __field(long, expect_req_by ) 1038 __field(long, expect_term_by ) 1039 __field(long, timer ) 1040 ), 1041 1042 TP_fast_assign( 1043 __entry->call = call->debug_id; 1044 __entry->why = why; 1045 __entry->now = now; 1046 __entry->ack_at = call->delay_ack_at; 1047 __entry->ack_lost_at = call->ack_lost_at; 1048 __entry->resend_at = call->resend_at; 1049 __entry->expect_rx_by = call->expect_rx_by; 1050 __entry->expect_req_by = call->expect_req_by; 1051 __entry->expect_term_by = call->expect_term_by; 1052 __entry->timer = call->timer.expires; 1053 ), 1054 1055 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 1056 __entry->call, 1057 __print_symbolic(__entry->why, rxrpc_timer_traces), 1058 __entry->ack_at - __entry->now, 1059 __entry->ack_lost_at - __entry->now, 1060 __entry->resend_at - __entry->now, 1061 __entry->expect_rx_by - __entry->now, 1062 __entry->expect_req_by - __entry->now, 1063 __entry->expect_term_by - __entry->now, 1064 __entry->timer - __entry->now) 1065 ); 1066 1067 TRACE_EVENT(rxrpc_timer_expired, 1068 TP_PROTO(struct rxrpc_call *call, unsigned long now), 1069 1070 TP_ARGS(call, now), 1071 1072 TP_STRUCT__entry( 1073 __field(unsigned int, call ) 1074 __field(long, now ) 1075 __field(long, ack_at ) 1076 __field(long, ack_lost_at ) 1077 __field(long, resend_at ) 1078 __field(long, ping_at ) 1079 __field(long, expect_rx_by ) 1080 __field(long, expect_req_by ) 1081 __field(long, expect_term_by ) 1082 __field(long, timer ) 1083 ), 1084 1085 TP_fast_assign( 1086 __entry->call = call->debug_id; 1087 __entry->now = now; 1088 __entry->ack_at = call->delay_ack_at; 1089 __entry->ack_lost_at = call->ack_lost_at; 1090 __entry->resend_at = call->resend_at; 1091 __entry->expect_rx_by = call->expect_rx_by; 1092 __entry->expect_req_by = call->expect_req_by; 1093 __entry->expect_term_by = call->expect_term_by; 1094 __entry->timer = call->timer.expires; 1095 ), 1096 1097 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 1098 __entry->call, 1099 __entry->ack_at - __entry->now, 1100 __entry->ack_lost_at - __entry->now, 1101 __entry->resend_at - __entry->now, 1102 __entry->expect_rx_by - __entry->now, 1103 __entry->expect_req_by - __entry->now, 1104 __entry->expect_term_by - __entry->now, 1105 __entry->timer - __entry->now) 1106 ); 1107 1108 TRACE_EVENT(rxrpc_rx_lose, 1109 TP_PROTO(struct rxrpc_skb_priv *sp), 1110 1111 TP_ARGS(sp), 1112 1113 TP_STRUCT__entry( 1114 __field_struct(struct rxrpc_host_header, hdr ) 1115 ), 1116 1117 TP_fast_assign( 1118 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 1119 ), 1120 1121 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 1122 __entry->hdr.epoch, __entry->hdr.cid, 1123 __entry->hdr.callNumber, __entry->hdr.serviceId, 1124 __entry->hdr.serial, __entry->hdr.seq, 1125 __entry->hdr.type, __entry->hdr.flags, 1126 __entry->hdr.type <= 15 ? 1127 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 1128 ); 1129 1130 TRACE_EVENT(rxrpc_propose_ack, 1131 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1132 u8 ack_reason, rxrpc_serial_t serial), 1133 1134 TP_ARGS(call, why, ack_reason, serial), 1135 1136 TP_STRUCT__entry( 1137 __field(unsigned int, call ) 1138 __field(enum rxrpc_propose_ack_trace, why ) 1139 __field(rxrpc_serial_t, serial ) 1140 __field(u8, ack_reason ) 1141 ), 1142 1143 TP_fast_assign( 1144 __entry->call = call->debug_id; 1145 __entry->why = why; 1146 __entry->serial = serial; 1147 __entry->ack_reason = ack_reason; 1148 ), 1149 1150 TP_printk("c=%08x %s %s r=%08x", 1151 __entry->call, 1152 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1153 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1154 __entry->serial) 1155 ); 1156 1157 TRACE_EVENT(rxrpc_send_ack, 1158 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1159 u8 ack_reason, rxrpc_serial_t serial), 1160 1161 TP_ARGS(call, why, ack_reason, serial), 1162 1163 TP_STRUCT__entry( 1164 __field(unsigned int, call ) 1165 __field(enum rxrpc_propose_ack_trace, why ) 1166 __field(rxrpc_serial_t, serial ) 1167 __field(u8, ack_reason ) 1168 ), 1169 1170 TP_fast_assign( 1171 __entry->call = call->debug_id; 1172 __entry->why = why; 1173 __entry->serial = serial; 1174 __entry->ack_reason = ack_reason; 1175 ), 1176 1177 TP_printk("c=%08x %s %s r=%08x", 1178 __entry->call, 1179 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1180 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1181 __entry->serial) 1182 ); 1183 1184 TRACE_EVENT(rxrpc_drop_ack, 1185 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1186 u8 ack_reason, rxrpc_serial_t serial, bool nobuf), 1187 1188 TP_ARGS(call, why, ack_reason, serial, nobuf), 1189 1190 TP_STRUCT__entry( 1191 __field(unsigned int, call ) 1192 __field(enum rxrpc_propose_ack_trace, why ) 1193 __field(rxrpc_serial_t, serial ) 1194 __field(u8, ack_reason ) 1195 __field(bool, nobuf ) 1196 ), 1197 1198 TP_fast_assign( 1199 __entry->call = call->debug_id; 1200 __entry->why = why; 1201 __entry->serial = serial; 1202 __entry->ack_reason = ack_reason; 1203 __entry->nobuf = nobuf; 1204 ), 1205 1206 TP_printk("c=%08x %s %s r=%08x nbf=%u", 1207 __entry->call, 1208 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1209 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1210 __entry->serial, __entry->nobuf) 1211 ); 1212 1213 TRACE_EVENT(rxrpc_retransmit, 1214 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry), 1215 1216 TP_ARGS(call, seq, expiry), 1217 1218 TP_STRUCT__entry( 1219 __field(unsigned int, call ) 1220 __field(rxrpc_seq_t, seq ) 1221 __field(s64, expiry ) 1222 ), 1223 1224 TP_fast_assign( 1225 __entry->call = call->debug_id; 1226 __entry->seq = seq; 1227 __entry->expiry = expiry; 1228 ), 1229 1230 TP_printk("c=%08x q=%x xp=%lld", 1231 __entry->call, 1232 __entry->seq, 1233 __entry->expiry) 1234 ); 1235 1236 TRACE_EVENT(rxrpc_congest, 1237 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 1238 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), 1239 1240 TP_ARGS(call, summary, ack_serial, change), 1241 1242 TP_STRUCT__entry( 1243 __field(unsigned int, call ) 1244 __field(enum rxrpc_congest_change, change ) 1245 __field(rxrpc_seq_t, hard_ack ) 1246 __field(rxrpc_seq_t, top ) 1247 __field(rxrpc_seq_t, lowest_nak ) 1248 __field(rxrpc_serial_t, ack_serial ) 1249 __field_struct(struct rxrpc_ack_summary, sum ) 1250 ), 1251 1252 TP_fast_assign( 1253 __entry->call = call->debug_id; 1254 __entry->change = change; 1255 __entry->hard_ack = call->acks_hard_ack; 1256 __entry->top = call->tx_top; 1257 __entry->lowest_nak = call->acks_lowest_nak; 1258 __entry->ack_serial = ack_serial; 1259 memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 1260 ), 1261 1262 TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nA=%u,%u+%u r=%u b=%u u=%u d=%u l=%x%s%s%s", 1263 __entry->call, 1264 __entry->ack_serial, 1265 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 1266 __entry->hard_ack, 1267 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), 1268 __entry->sum.cwnd, 1269 __entry->sum.ssthresh, 1270 __entry->sum.nr_acks, __entry->sum.saw_nacks, 1271 __entry->sum.nr_new_acks, 1272 __entry->sum.nr_rot_new_acks, 1273 __entry->top - __entry->hard_ack, 1274 __entry->sum.cumulative_acks, 1275 __entry->sum.dup_acks, 1276 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", 1277 __print_symbolic(__entry->change, rxrpc_congest_changes), 1278 __entry->sum.retrans_timeo ? " rTxTo" : "") 1279 ); 1280 1281 TRACE_EVENT(rxrpc_disconnect_call, 1282 TP_PROTO(struct rxrpc_call *call), 1283 1284 TP_ARGS(call), 1285 1286 TP_STRUCT__entry( 1287 __field(unsigned int, call ) 1288 __field(u32, abort_code ) 1289 ), 1290 1291 TP_fast_assign( 1292 __entry->call = call->debug_id; 1293 __entry->abort_code = call->abort_code; 1294 ), 1295 1296 TP_printk("c=%08x ab=%08x", 1297 __entry->call, 1298 __entry->abort_code) 1299 ); 1300 1301 TRACE_EVENT(rxrpc_improper_term, 1302 TP_PROTO(struct rxrpc_call *call), 1303 1304 TP_ARGS(call), 1305 1306 TP_STRUCT__entry( 1307 __field(unsigned int, call ) 1308 __field(u32, abort_code ) 1309 ), 1310 1311 TP_fast_assign( 1312 __entry->call = call->debug_id; 1313 __entry->abort_code = call->abort_code; 1314 ), 1315 1316 TP_printk("c=%08x ab=%08x", 1317 __entry->call, 1318 __entry->abort_code) 1319 ); 1320 1321 TRACE_EVENT(rxrpc_rx_eproto, 1322 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1323 const char *why), 1324 1325 TP_ARGS(call, serial, why), 1326 1327 TP_STRUCT__entry( 1328 __field(unsigned int, call ) 1329 __field(rxrpc_serial_t, serial ) 1330 __field(const char *, why ) 1331 ), 1332 1333 TP_fast_assign( 1334 __entry->call = call ? call->debug_id : 0; 1335 __entry->serial = serial; 1336 __entry->why = why; 1337 ), 1338 1339 TP_printk("c=%08x EPROTO %08x %s", 1340 __entry->call, 1341 __entry->serial, 1342 __entry->why) 1343 ); 1344 1345 TRACE_EVENT(rxrpc_connect_call, 1346 TP_PROTO(struct rxrpc_call *call), 1347 1348 TP_ARGS(call), 1349 1350 TP_STRUCT__entry( 1351 __field(unsigned int, call ) 1352 __field(unsigned long, user_call_ID ) 1353 __field(u32, cid ) 1354 __field(u32, call_id ) 1355 ), 1356 1357 TP_fast_assign( 1358 __entry->call = call->debug_id; 1359 __entry->user_call_ID = call->user_call_ID; 1360 __entry->cid = call->cid; 1361 __entry->call_id = call->call_id; 1362 ), 1363 1364 TP_printk("c=%08x u=%p %08x:%08x", 1365 __entry->call, 1366 (void *)__entry->user_call_ID, 1367 __entry->cid, 1368 __entry->call_id) 1369 ); 1370 1371 TRACE_EVENT(rxrpc_resend, 1372 TP_PROTO(struct rxrpc_call *call), 1373 1374 TP_ARGS(call), 1375 1376 TP_STRUCT__entry( 1377 __field(unsigned int, call ) 1378 __field(rxrpc_seq_t, seq ) 1379 ), 1380 1381 TP_fast_assign( 1382 __entry->call = call->debug_id; 1383 __entry->seq = call->acks_hard_ack; 1384 ), 1385 1386 TP_printk("c=%08x q=%x", 1387 __entry->call, 1388 __entry->seq) 1389 ); 1390 1391 TRACE_EVENT(rxrpc_rx_icmp, 1392 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, 1393 struct sockaddr_rxrpc *srx), 1394 1395 TP_ARGS(peer, ee, srx), 1396 1397 TP_STRUCT__entry( 1398 __field(unsigned int, peer ) 1399 __field_struct(struct sock_extended_err, ee ) 1400 __field_struct(struct sockaddr_rxrpc, srx ) 1401 ), 1402 1403 TP_fast_assign( 1404 __entry->peer = peer->debug_id; 1405 memcpy(&__entry->ee, ee, sizeof(__entry->ee)); 1406 memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 1407 ), 1408 1409 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", 1410 __entry->peer, 1411 __entry->ee.ee_origin, 1412 __entry->ee.ee_type, 1413 __entry->ee.ee_code, 1414 __entry->ee.ee_info, 1415 __entry->ee.ee_data, 1416 __entry->ee.ee_errno, 1417 &__entry->srx.transport) 1418 ); 1419 1420 TRACE_EVENT(rxrpc_tx_fail, 1421 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, 1422 enum rxrpc_tx_point where), 1423 1424 TP_ARGS(debug_id, serial, ret, where), 1425 1426 TP_STRUCT__entry( 1427 __field(unsigned int, debug_id ) 1428 __field(rxrpc_serial_t, serial ) 1429 __field(int, ret ) 1430 __field(enum rxrpc_tx_point, where ) 1431 ), 1432 1433 TP_fast_assign( 1434 __entry->debug_id = debug_id; 1435 __entry->serial = serial; 1436 __entry->ret = ret; 1437 __entry->where = where; 1438 ), 1439 1440 TP_printk("c=%08x r=%x ret=%d %s", 1441 __entry->debug_id, 1442 __entry->serial, 1443 __entry->ret, 1444 __print_symbolic(__entry->where, rxrpc_tx_points)) 1445 ); 1446 1447 TRACE_EVENT(rxrpc_call_reset, 1448 TP_PROTO(struct rxrpc_call *call), 1449 1450 TP_ARGS(call), 1451 1452 TP_STRUCT__entry( 1453 __field(unsigned int, debug_id ) 1454 __field(u32, cid ) 1455 __field(u32, call_id ) 1456 __field(rxrpc_serial_t, call_serial ) 1457 __field(rxrpc_serial_t, conn_serial ) 1458 __field(rxrpc_seq_t, tx_seq ) 1459 __field(rxrpc_seq_t, rx_seq ) 1460 ), 1461 1462 TP_fast_assign( 1463 __entry->debug_id = call->debug_id; 1464 __entry->cid = call->cid; 1465 __entry->call_id = call->call_id; 1466 __entry->call_serial = call->rx_serial; 1467 __entry->conn_serial = call->conn->hi_serial; 1468 __entry->tx_seq = call->acks_hard_ack; 1469 __entry->rx_seq = call->rx_highest_seq; 1470 ), 1471 1472 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", 1473 __entry->debug_id, 1474 __entry->cid, __entry->call_id, 1475 __entry->call_serial, __entry->conn_serial, 1476 __entry->tx_seq, __entry->rx_seq) 1477 ); 1478 1479 TRACE_EVENT(rxrpc_notify_socket, 1480 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), 1481 1482 TP_ARGS(debug_id, serial), 1483 1484 TP_STRUCT__entry( 1485 __field(unsigned int, debug_id ) 1486 __field(rxrpc_serial_t, serial ) 1487 ), 1488 1489 TP_fast_assign( 1490 __entry->debug_id = debug_id; 1491 __entry->serial = serial; 1492 ), 1493 1494 TP_printk("c=%08x r=%08x", 1495 __entry->debug_id, 1496 __entry->serial) 1497 ); 1498 1499 TRACE_EVENT(rxrpc_rx_discard_ack, 1500 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, 1501 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first, 1502 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev), 1503 1504 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first, 1505 prev_pkt, call_ackr_prev), 1506 1507 TP_STRUCT__entry( 1508 __field(unsigned int, debug_id ) 1509 __field(rxrpc_serial_t, serial ) 1510 __field(rxrpc_seq_t, first_soft_ack) 1511 __field(rxrpc_seq_t, call_ackr_first) 1512 __field(rxrpc_seq_t, prev_pkt) 1513 __field(rxrpc_seq_t, call_ackr_prev) 1514 ), 1515 1516 TP_fast_assign( 1517 __entry->debug_id = debug_id; 1518 __entry->serial = serial; 1519 __entry->first_soft_ack = first_soft_ack; 1520 __entry->call_ackr_first = call_ackr_first; 1521 __entry->prev_pkt = prev_pkt; 1522 __entry->call_ackr_prev = call_ackr_prev; 1523 ), 1524 1525 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x", 1526 __entry->debug_id, 1527 __entry->serial, 1528 __entry->first_soft_ack, 1529 __entry->call_ackr_first, 1530 __entry->prev_pkt, 1531 __entry->call_ackr_prev) 1532 ); 1533 1534 TRACE_EVENT(rxrpc_req_ack, 1535 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq, 1536 enum rxrpc_req_ack_trace why), 1537 1538 TP_ARGS(call_debug_id, seq, why), 1539 1540 TP_STRUCT__entry( 1541 __field(unsigned int, call_debug_id ) 1542 __field(rxrpc_seq_t, seq ) 1543 __field(enum rxrpc_req_ack_trace, why ) 1544 ), 1545 1546 TP_fast_assign( 1547 __entry->call_debug_id = call_debug_id; 1548 __entry->seq = seq; 1549 __entry->why = why; 1550 ), 1551 1552 TP_printk("c=%08x q=%08x REQ-%s", 1553 __entry->call_debug_id, 1554 __entry->seq, 1555 __print_symbolic(__entry->why, rxrpc_req_ack_traces)) 1556 ); 1557 1558 TRACE_EVENT(rxrpc_txbuf, 1559 TP_PROTO(unsigned int debug_id, 1560 unsigned int call_debug_id, rxrpc_seq_t seq, 1561 int ref, enum rxrpc_txbuf_trace what), 1562 1563 TP_ARGS(debug_id, call_debug_id, seq, ref, what), 1564 1565 TP_STRUCT__entry( 1566 __field(unsigned int, debug_id ) 1567 __field(unsigned int, call_debug_id ) 1568 __field(rxrpc_seq_t, seq ) 1569 __field(int, ref ) 1570 __field(enum rxrpc_txbuf_trace, what ) 1571 ), 1572 1573 TP_fast_assign( 1574 __entry->debug_id = debug_id; 1575 __entry->call_debug_id = call_debug_id; 1576 __entry->seq = seq; 1577 __entry->ref = ref; 1578 __entry->what = what; 1579 ), 1580 1581 TP_printk("B=%08x c=%08x q=%08x %s r=%d", 1582 __entry->debug_id, 1583 __entry->call_debug_id, 1584 __entry->seq, 1585 __print_symbolic(__entry->what, rxrpc_txbuf_traces), 1586 __entry->ref) 1587 ); 1588 1589 #undef EM 1590 #undef E_ 1591 #endif /* _TRACE_RXRPC_H */ 1592 1593 /* This part must be outside protection */ 1594 #include <trace/define_trace.h> 1595