1 /* AF_RXRPC tracepoints 2 * 3 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public Licence 8 * as published by the Free Software Foundation; either version 9 * 2 of the Licence, or (at your option) any later version. 10 */ 11 #undef TRACE_SYSTEM 12 #define TRACE_SYSTEM rxrpc 13 14 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) 15 #define _TRACE_RXRPC_H 16 17 #include <linux/tracepoint.h> 18 #include <linux/errqueue.h> 19 20 /* 21 * Define enums for tracing information. 22 * 23 * These should all be kept sorted, making it easier to match the string 24 * mapping tables further on. 25 */ 26 #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY 27 #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY 28 29 enum rxrpc_skb_trace { 30 rxrpc_skb_rx_cleaned, 31 rxrpc_skb_rx_freed, 32 rxrpc_skb_rx_got, 33 rxrpc_skb_rx_lost, 34 rxrpc_skb_rx_purged, 35 rxrpc_skb_rx_received, 36 rxrpc_skb_rx_rotated, 37 rxrpc_skb_rx_seen, 38 rxrpc_skb_tx_cleaned, 39 rxrpc_skb_tx_freed, 40 rxrpc_skb_tx_got, 41 rxrpc_skb_tx_new, 42 rxrpc_skb_tx_rotated, 43 rxrpc_skb_tx_seen, 44 }; 45 46 enum rxrpc_local_trace { 47 rxrpc_local_got, 48 rxrpc_local_new, 49 rxrpc_local_processing, 50 rxrpc_local_put, 51 rxrpc_local_queued, 52 }; 53 54 enum rxrpc_peer_trace { 55 rxrpc_peer_got, 56 rxrpc_peer_new, 57 rxrpc_peer_processing, 58 rxrpc_peer_put, 59 rxrpc_peer_queued_error, 60 }; 61 62 enum rxrpc_conn_trace { 63 rxrpc_conn_got, 64 rxrpc_conn_new_client, 65 rxrpc_conn_new_service, 66 rxrpc_conn_put_client, 67 rxrpc_conn_put_service, 68 rxrpc_conn_queued, 69 rxrpc_conn_reap_service, 70 rxrpc_conn_seen, 71 }; 72 73 enum rxrpc_client_trace { 74 rxrpc_client_activate_chans, 75 rxrpc_client_alloc, 76 rxrpc_client_chan_activate, 77 rxrpc_client_chan_disconnect, 78 rxrpc_client_chan_pass, 79 rxrpc_client_chan_unstarted, 80 rxrpc_client_cleanup, 81 rxrpc_client_count, 82 rxrpc_client_discard, 83 rxrpc_client_duplicate, 84 rxrpc_client_exposed, 85 rxrpc_client_replace, 86 rxrpc_client_to_active, 87 rxrpc_client_to_culled, 88 rxrpc_client_to_idle, 89 rxrpc_client_to_inactive, 90 rxrpc_client_to_upgrade, 91 rxrpc_client_to_waiting, 92 rxrpc_client_uncount, 93 }; 94 95 enum rxrpc_call_trace { 96 rxrpc_call_connected, 97 rxrpc_call_error, 98 rxrpc_call_got, 99 rxrpc_call_got_kernel, 100 rxrpc_call_got_userid, 101 rxrpc_call_new_client, 102 rxrpc_call_new_service, 103 rxrpc_call_put, 104 rxrpc_call_put_kernel, 105 rxrpc_call_put_noqueue, 106 rxrpc_call_put_userid, 107 rxrpc_call_queued, 108 rxrpc_call_queued_ref, 109 rxrpc_call_release, 110 rxrpc_call_seen, 111 }; 112 113 enum rxrpc_transmit_trace { 114 rxrpc_transmit_await_reply, 115 rxrpc_transmit_end, 116 rxrpc_transmit_queue, 117 rxrpc_transmit_queue_last, 118 rxrpc_transmit_rotate, 119 rxrpc_transmit_rotate_last, 120 rxrpc_transmit_wait, 121 }; 122 123 enum rxrpc_receive_trace { 124 rxrpc_receive_end, 125 rxrpc_receive_front, 126 rxrpc_receive_incoming, 127 rxrpc_receive_queue, 128 rxrpc_receive_queue_last, 129 rxrpc_receive_rotate, 130 }; 131 132 enum rxrpc_recvmsg_trace { 133 rxrpc_recvmsg_cont, 134 rxrpc_recvmsg_data_return, 135 rxrpc_recvmsg_dequeue, 136 rxrpc_recvmsg_enter, 137 rxrpc_recvmsg_full, 138 rxrpc_recvmsg_hole, 139 rxrpc_recvmsg_next, 140 rxrpc_recvmsg_requeue, 141 rxrpc_recvmsg_return, 142 rxrpc_recvmsg_terminal, 143 rxrpc_recvmsg_to_be_accepted, 144 rxrpc_recvmsg_wait, 145 }; 146 147 enum rxrpc_rtt_tx_trace { 148 rxrpc_rtt_tx_data, 149 rxrpc_rtt_tx_ping, 150 }; 151 152 enum rxrpc_rtt_rx_trace { 153 rxrpc_rtt_rx_ping_response, 154 rxrpc_rtt_rx_requested_ack, 155 }; 156 157 enum rxrpc_timer_trace { 158 rxrpc_timer_begin, 159 rxrpc_timer_exp_ack, 160 rxrpc_timer_exp_hard, 161 rxrpc_timer_exp_idle, 162 rxrpc_timer_exp_keepalive, 163 rxrpc_timer_exp_lost_ack, 164 rxrpc_timer_exp_normal, 165 rxrpc_timer_exp_ping, 166 rxrpc_timer_exp_resend, 167 rxrpc_timer_expired, 168 rxrpc_timer_init_for_reply, 169 rxrpc_timer_init_for_send_reply, 170 rxrpc_timer_restart, 171 rxrpc_timer_set_for_ack, 172 rxrpc_timer_set_for_hard, 173 rxrpc_timer_set_for_idle, 174 rxrpc_timer_set_for_keepalive, 175 rxrpc_timer_set_for_lost_ack, 176 rxrpc_timer_set_for_normal, 177 rxrpc_timer_set_for_ping, 178 rxrpc_timer_set_for_resend, 179 rxrpc_timer_set_for_send, 180 }; 181 182 enum rxrpc_propose_ack_trace { 183 rxrpc_propose_ack_client_tx_end, 184 rxrpc_propose_ack_input_data, 185 rxrpc_propose_ack_ping_for_keepalive, 186 rxrpc_propose_ack_ping_for_lost_ack, 187 rxrpc_propose_ack_ping_for_lost_reply, 188 rxrpc_propose_ack_ping_for_params, 189 rxrpc_propose_ack_processing_op, 190 rxrpc_propose_ack_respond_to_ack, 191 rxrpc_propose_ack_respond_to_ping, 192 rxrpc_propose_ack_retry_tx, 193 rxrpc_propose_ack_rotate_rx, 194 rxrpc_propose_ack_terminal_ack, 195 }; 196 197 enum rxrpc_propose_ack_outcome { 198 rxrpc_propose_ack_subsume, 199 rxrpc_propose_ack_update, 200 rxrpc_propose_ack_use, 201 }; 202 203 enum rxrpc_congest_change { 204 rxrpc_cong_begin_retransmission, 205 rxrpc_cong_cleared_nacks, 206 rxrpc_cong_new_low_nack, 207 rxrpc_cong_no_change, 208 rxrpc_cong_progress, 209 rxrpc_cong_retransmit_again, 210 rxrpc_cong_rtt_window_end, 211 rxrpc_cong_saw_nack, 212 }; 213 214 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 215 216 /* 217 * Declare tracing information enums and their string mappings for display. 218 */ 219 #define rxrpc_skb_traces \ 220 EM(rxrpc_skb_rx_cleaned, "Rx CLN") \ 221 EM(rxrpc_skb_rx_freed, "Rx FRE") \ 222 EM(rxrpc_skb_rx_got, "Rx GOT") \ 223 EM(rxrpc_skb_rx_lost, "Rx *L*") \ 224 EM(rxrpc_skb_rx_purged, "Rx PUR") \ 225 EM(rxrpc_skb_rx_received, "Rx RCV") \ 226 EM(rxrpc_skb_rx_rotated, "Rx ROT") \ 227 EM(rxrpc_skb_rx_seen, "Rx SEE") \ 228 EM(rxrpc_skb_tx_cleaned, "Tx CLN") \ 229 EM(rxrpc_skb_tx_freed, "Tx FRE") \ 230 EM(rxrpc_skb_tx_got, "Tx GOT") \ 231 EM(rxrpc_skb_tx_new, "Tx NEW") \ 232 EM(rxrpc_skb_tx_rotated, "Tx ROT") \ 233 E_(rxrpc_skb_tx_seen, "Tx SEE") 234 235 #define rxrpc_local_traces \ 236 EM(rxrpc_local_got, "GOT") \ 237 EM(rxrpc_local_new, "NEW") \ 238 EM(rxrpc_local_processing, "PRO") \ 239 EM(rxrpc_local_put, "PUT") \ 240 E_(rxrpc_local_queued, "QUE") 241 242 #define rxrpc_peer_traces \ 243 EM(rxrpc_peer_got, "GOT") \ 244 EM(rxrpc_peer_new, "NEW") \ 245 EM(rxrpc_peer_processing, "PRO") \ 246 EM(rxrpc_peer_put, "PUT") \ 247 E_(rxrpc_peer_queued_error, "QER") 248 249 #define rxrpc_conn_traces \ 250 EM(rxrpc_conn_got, "GOT") \ 251 EM(rxrpc_conn_new_client, "NWc") \ 252 EM(rxrpc_conn_new_service, "NWs") \ 253 EM(rxrpc_conn_put_client, "PTc") \ 254 EM(rxrpc_conn_put_service, "PTs") \ 255 EM(rxrpc_conn_queued, "QUE") \ 256 EM(rxrpc_conn_reap_service, "RPs") \ 257 E_(rxrpc_conn_seen, "SEE") 258 259 #define rxrpc_client_traces \ 260 EM(rxrpc_client_activate_chans, "Activa") \ 261 EM(rxrpc_client_alloc, "Alloc ") \ 262 EM(rxrpc_client_chan_activate, "ChActv") \ 263 EM(rxrpc_client_chan_disconnect, "ChDisc") \ 264 EM(rxrpc_client_chan_pass, "ChPass") \ 265 EM(rxrpc_client_chan_unstarted, "ChUnst") \ 266 EM(rxrpc_client_cleanup, "Clean ") \ 267 EM(rxrpc_client_count, "Count ") \ 268 EM(rxrpc_client_discard, "Discar") \ 269 EM(rxrpc_client_duplicate, "Duplic") \ 270 EM(rxrpc_client_exposed, "Expose") \ 271 EM(rxrpc_client_replace, "Replac") \ 272 EM(rxrpc_client_to_active, "->Actv") \ 273 EM(rxrpc_client_to_culled, "->Cull") \ 274 EM(rxrpc_client_to_idle, "->Idle") \ 275 EM(rxrpc_client_to_inactive, "->Inac") \ 276 EM(rxrpc_client_to_upgrade, "->Upgd") \ 277 EM(rxrpc_client_to_waiting, "->Wait") \ 278 E_(rxrpc_client_uncount, "Uncoun") 279 280 #define rxrpc_conn_cache_states \ 281 EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \ 282 EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \ 283 EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \ 284 EM(RXRPC_CONN_CLIENT_UPGRADE, "Upgd") \ 285 EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \ 286 E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \ 287 288 #define rxrpc_call_traces \ 289 EM(rxrpc_call_connected, "CON") \ 290 EM(rxrpc_call_error, "*E*") \ 291 EM(rxrpc_call_got, "GOT") \ 292 EM(rxrpc_call_got_kernel, "Gke") \ 293 EM(rxrpc_call_got_userid, "Gus") \ 294 EM(rxrpc_call_new_client, "NWc") \ 295 EM(rxrpc_call_new_service, "NWs") \ 296 EM(rxrpc_call_put, "PUT") \ 297 EM(rxrpc_call_put_kernel, "Pke") \ 298 EM(rxrpc_call_put_noqueue, "PNQ") \ 299 EM(rxrpc_call_put_userid, "Pus") \ 300 EM(rxrpc_call_queued, "QUE") \ 301 EM(rxrpc_call_queued_ref, "QUR") \ 302 EM(rxrpc_call_release, "RLS") \ 303 E_(rxrpc_call_seen, "SEE") 304 305 #define rxrpc_transmit_traces \ 306 EM(rxrpc_transmit_await_reply, "AWR") \ 307 EM(rxrpc_transmit_end, "END") \ 308 EM(rxrpc_transmit_queue, "QUE") \ 309 EM(rxrpc_transmit_queue_last, "QLS") \ 310 EM(rxrpc_transmit_rotate, "ROT") \ 311 EM(rxrpc_transmit_rotate_last, "RLS") \ 312 E_(rxrpc_transmit_wait, "WAI") 313 314 #define rxrpc_receive_traces \ 315 EM(rxrpc_receive_end, "END") \ 316 EM(rxrpc_receive_front, "FRN") \ 317 EM(rxrpc_receive_incoming, "INC") \ 318 EM(rxrpc_receive_queue, "QUE") \ 319 EM(rxrpc_receive_queue_last, "QLS") \ 320 E_(rxrpc_receive_rotate, "ROT") 321 322 #define rxrpc_recvmsg_traces \ 323 EM(rxrpc_recvmsg_cont, "CONT") \ 324 EM(rxrpc_recvmsg_data_return, "DATA") \ 325 EM(rxrpc_recvmsg_dequeue, "DEQU") \ 326 EM(rxrpc_recvmsg_enter, "ENTR") \ 327 EM(rxrpc_recvmsg_full, "FULL") \ 328 EM(rxrpc_recvmsg_hole, "HOLE") \ 329 EM(rxrpc_recvmsg_next, "NEXT") \ 330 EM(rxrpc_recvmsg_requeue, "REQU") \ 331 EM(rxrpc_recvmsg_return, "RETN") \ 332 EM(rxrpc_recvmsg_terminal, "TERM") \ 333 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ 334 E_(rxrpc_recvmsg_wait, "WAIT") 335 336 #define rxrpc_rtt_tx_traces \ 337 EM(rxrpc_rtt_tx_data, "DATA") \ 338 E_(rxrpc_rtt_tx_ping, "PING") 339 340 #define rxrpc_rtt_rx_traces \ 341 EM(rxrpc_rtt_rx_ping_response, "PONG") \ 342 E_(rxrpc_rtt_rx_requested_ack, "RACK") 343 344 #define rxrpc_timer_traces \ 345 EM(rxrpc_timer_begin, "Begin ") \ 346 EM(rxrpc_timer_expired, "*EXPR*") \ 347 EM(rxrpc_timer_exp_ack, "ExpAck") \ 348 EM(rxrpc_timer_exp_hard, "ExpHrd") \ 349 EM(rxrpc_timer_exp_idle, "ExpIdl") \ 350 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ 351 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ 352 EM(rxrpc_timer_exp_normal, "ExpNml") \ 353 EM(rxrpc_timer_exp_ping, "ExpPng") \ 354 EM(rxrpc_timer_exp_resend, "ExpRsn") \ 355 EM(rxrpc_timer_init_for_reply, "IniRpl") \ 356 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ 357 EM(rxrpc_timer_restart, "Restrt") \ 358 EM(rxrpc_timer_set_for_ack, "SetAck") \ 359 EM(rxrpc_timer_set_for_hard, "SetHrd") \ 360 EM(rxrpc_timer_set_for_idle, "SetIdl") \ 361 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ 362 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ 363 EM(rxrpc_timer_set_for_normal, "SetNml") \ 364 EM(rxrpc_timer_set_for_ping, "SetPng") \ 365 EM(rxrpc_timer_set_for_resend, "SetRTx") \ 366 E_(rxrpc_timer_set_for_send, "SetSnd") 367 368 #define rxrpc_propose_ack_traces \ 369 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 370 EM(rxrpc_propose_ack_input_data, "DataIn ") \ 371 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ 372 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 373 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 374 EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 375 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ 376 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ 377 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ 378 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ 379 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ 380 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 381 382 #define rxrpc_propose_ack_outcomes \ 383 EM(rxrpc_propose_ack_subsume, " Subsume") \ 384 EM(rxrpc_propose_ack_update, " Update") \ 385 E_(rxrpc_propose_ack_use, "") 386 387 #define rxrpc_congest_modes \ 388 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ 389 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ 390 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ 391 E_(RXRPC_CALL_SLOW_START, "SlowStart") 392 393 #define rxrpc_congest_changes \ 394 EM(rxrpc_cong_begin_retransmission, " Retrans") \ 395 EM(rxrpc_cong_cleared_nacks, " Cleared") \ 396 EM(rxrpc_cong_new_low_nack, " NewLowN") \ 397 EM(rxrpc_cong_no_change, "") \ 398 EM(rxrpc_cong_progress, " Progres") \ 399 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 400 EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 401 E_(rxrpc_cong_saw_nack, " SawNack") 402 403 #define rxrpc_pkts \ 404 EM(0, "?00") \ 405 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 406 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 407 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 408 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 409 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 410 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 411 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 412 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 413 EM(9, "?09") \ 414 EM(10, "?10") \ 415 EM(11, "?11") \ 416 EM(12, "?12") \ 417 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 418 EM(14, "?14") \ 419 E_(15, "?15") 420 421 #define rxrpc_ack_names \ 422 EM(0, "-0-") \ 423 EM(RXRPC_ACK_REQUESTED, "REQ") \ 424 EM(RXRPC_ACK_DUPLICATE, "DUP") \ 425 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 426 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 427 EM(RXRPC_ACK_NOSPACE, "MEM") \ 428 EM(RXRPC_ACK_PING, "PNG") \ 429 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 430 EM(RXRPC_ACK_DELAY, "DLY") \ 431 EM(RXRPC_ACK_IDLE, "IDL") \ 432 E_(RXRPC_ACK__INVALID, "-?-") 433 434 #define rxrpc_completions \ 435 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ 436 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ 437 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ 438 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ 439 E_(RXRPC_CALL_NETWORK_ERROR, "NetError") 440 441 /* 442 * Export enum symbols via userspace. 443 */ 444 #undef EM 445 #undef E_ 446 #define EM(a, b) TRACE_DEFINE_ENUM(a); 447 #define E_(a, b) TRACE_DEFINE_ENUM(a); 448 449 rxrpc_skb_traces; 450 rxrpc_local_traces; 451 rxrpc_conn_traces; 452 rxrpc_client_traces; 453 rxrpc_call_traces; 454 rxrpc_transmit_traces; 455 rxrpc_receive_traces; 456 rxrpc_recvmsg_traces; 457 rxrpc_rtt_tx_traces; 458 rxrpc_rtt_rx_traces; 459 rxrpc_timer_traces; 460 rxrpc_propose_ack_traces; 461 rxrpc_propose_ack_outcomes; 462 rxrpc_congest_modes; 463 rxrpc_congest_changes; 464 465 /* 466 * Now redefine the EM() and E_() macros to map the enums to the strings that 467 * will be printed in the output. 468 */ 469 #undef EM 470 #undef E_ 471 #define EM(a, b) { a, b }, 472 #define E_(a, b) { a, b } 473 474 TRACE_EVENT(rxrpc_local, 475 TP_PROTO(struct rxrpc_local *local, enum rxrpc_local_trace op, 476 int usage, const void *where), 477 478 TP_ARGS(local, op, usage, where), 479 480 TP_STRUCT__entry( 481 __field(unsigned int, local ) 482 __field(int, op ) 483 __field(int, usage ) 484 __field(const void *, where ) 485 ), 486 487 TP_fast_assign( 488 __entry->local = local->debug_id; 489 __entry->op = op; 490 __entry->usage = usage; 491 __entry->where = where; 492 ), 493 494 TP_printk("L=%08x %s u=%d sp=%pSR", 495 __entry->local, 496 __print_symbolic(__entry->op, rxrpc_local_traces), 497 __entry->usage, 498 __entry->where) 499 ); 500 501 TRACE_EVENT(rxrpc_peer, 502 TP_PROTO(struct rxrpc_peer *peer, enum rxrpc_peer_trace op, 503 int usage, const void *where), 504 505 TP_ARGS(peer, op, usage, where), 506 507 TP_STRUCT__entry( 508 __field(unsigned int, peer ) 509 __field(int, op ) 510 __field(int, usage ) 511 __field(const void *, where ) 512 ), 513 514 TP_fast_assign( 515 __entry->peer = peer->debug_id; 516 __entry->op = op; 517 __entry->usage = usage; 518 __entry->where = where; 519 ), 520 521 TP_printk("P=%08x %s u=%d sp=%pSR", 522 __entry->peer, 523 __print_symbolic(__entry->op, rxrpc_peer_traces), 524 __entry->usage, 525 __entry->where) 526 ); 527 528 TRACE_EVENT(rxrpc_conn, 529 TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, 530 int usage, const void *where), 531 532 TP_ARGS(conn, op, usage, where), 533 534 TP_STRUCT__entry( 535 __field(unsigned int, conn ) 536 __field(int, op ) 537 __field(int, usage ) 538 __field(const void *, where ) 539 ), 540 541 TP_fast_assign( 542 __entry->conn = conn->debug_id; 543 __entry->op = op; 544 __entry->usage = usage; 545 __entry->where = where; 546 ), 547 548 TP_printk("C=%08x %s u=%d sp=%pSR", 549 __entry->conn, 550 __print_symbolic(__entry->op, rxrpc_conn_traces), 551 __entry->usage, 552 __entry->where) 553 ); 554 555 TRACE_EVENT(rxrpc_client, 556 TP_PROTO(struct rxrpc_connection *conn, int channel, 557 enum rxrpc_client_trace op), 558 559 TP_ARGS(conn, channel, op), 560 561 TP_STRUCT__entry( 562 __field(unsigned int, conn ) 563 __field(u32, cid ) 564 __field(int, channel ) 565 __field(int, usage ) 566 __field(enum rxrpc_client_trace, op ) 567 __field(enum rxrpc_conn_cache_state, cs ) 568 ), 569 570 TP_fast_assign( 571 __entry->conn = conn->debug_id; 572 __entry->channel = channel; 573 __entry->usage = atomic_read(&conn->usage); 574 __entry->op = op; 575 __entry->cid = conn->proto.cid; 576 __entry->cs = conn->cache_state; 577 ), 578 579 TP_printk("C=%08x h=%2d %s %s i=%08x u=%d", 580 __entry->conn, 581 __entry->channel, 582 __print_symbolic(__entry->op, rxrpc_client_traces), 583 __print_symbolic(__entry->cs, rxrpc_conn_cache_states), 584 __entry->cid, 585 __entry->usage) 586 ); 587 588 TRACE_EVENT(rxrpc_call, 589 TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op, 590 int usage, const void *where, const void *aux), 591 592 TP_ARGS(call, op, usage, where, aux), 593 594 TP_STRUCT__entry( 595 __field(unsigned int, call ) 596 __field(int, op ) 597 __field(int, usage ) 598 __field(const void *, where ) 599 __field(const void *, aux ) 600 ), 601 602 TP_fast_assign( 603 __entry->call = call->debug_id; 604 __entry->op = op; 605 __entry->usage = usage; 606 __entry->where = where; 607 __entry->aux = aux; 608 ), 609 610 TP_printk("c=%08x %s u=%d sp=%pSR a=%p", 611 __entry->call, 612 __print_symbolic(__entry->op, rxrpc_call_traces), 613 __entry->usage, 614 __entry->where, 615 __entry->aux) 616 ); 617 618 TRACE_EVENT(rxrpc_skb, 619 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, 620 int usage, int mod_count, const void *where), 621 622 TP_ARGS(skb, op, usage, mod_count, where), 623 624 TP_STRUCT__entry( 625 __field(struct sk_buff *, skb ) 626 __field(enum rxrpc_skb_trace, op ) 627 __field(int, usage ) 628 __field(int, mod_count ) 629 __field(const void *, where ) 630 ), 631 632 TP_fast_assign( 633 __entry->skb = skb; 634 __entry->op = op; 635 __entry->usage = usage; 636 __entry->mod_count = mod_count; 637 __entry->where = where; 638 ), 639 640 TP_printk("s=%p %s u=%d m=%d p=%pSR", 641 __entry->skb, 642 __print_symbolic(__entry->op, rxrpc_skb_traces), 643 __entry->usage, 644 __entry->mod_count, 645 __entry->where) 646 ); 647 648 TRACE_EVENT(rxrpc_rx_packet, 649 TP_PROTO(struct rxrpc_skb_priv *sp), 650 651 TP_ARGS(sp), 652 653 TP_STRUCT__entry( 654 __field_struct(struct rxrpc_host_header, hdr ) 655 ), 656 657 TP_fast_assign( 658 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 659 ), 660 661 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 662 __entry->hdr.epoch, __entry->hdr.cid, 663 __entry->hdr.callNumber, __entry->hdr.serviceId, 664 __entry->hdr.serial, __entry->hdr.seq, 665 __entry->hdr.type, __entry->hdr.flags, 666 __entry->hdr.type <= 15 ? 667 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 668 ); 669 670 TRACE_EVENT(rxrpc_rx_done, 671 TP_PROTO(int result, int abort_code), 672 673 TP_ARGS(result, abort_code), 674 675 TP_STRUCT__entry( 676 __field(int, result ) 677 __field(int, abort_code ) 678 ), 679 680 TP_fast_assign( 681 __entry->result = result; 682 __entry->abort_code = abort_code; 683 ), 684 685 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 686 ); 687 688 TRACE_EVENT(rxrpc_abort, 689 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id, 690 rxrpc_seq_t seq, int abort_code, int error), 691 692 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), 693 694 TP_STRUCT__entry( 695 __field(unsigned int, call_nr ) 696 __array(char, why, 4 ) 697 __field(u32, cid ) 698 __field(u32, call_id ) 699 __field(rxrpc_seq_t, seq ) 700 __field(int, abort_code ) 701 __field(int, error ) 702 ), 703 704 TP_fast_assign( 705 memcpy(__entry->why, why, 4); 706 __entry->call_nr = call_nr; 707 __entry->cid = cid; 708 __entry->call_id = call_id; 709 __entry->abort_code = abort_code; 710 __entry->error = error; 711 __entry->seq = seq; 712 ), 713 714 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", 715 __entry->call_nr, 716 __entry->cid, __entry->call_id, __entry->seq, 717 __entry->abort_code, __entry->error, __entry->why) 718 ); 719 720 TRACE_EVENT(rxrpc_call_complete, 721 TP_PROTO(struct rxrpc_call *call), 722 723 TP_ARGS(call), 724 725 TP_STRUCT__entry( 726 __field(unsigned int, call ) 727 __field(enum rxrpc_call_completion, compl ) 728 __field(int, error ) 729 __field(u32, abort_code ) 730 ), 731 732 TP_fast_assign( 733 __entry->call = call->debug_id; 734 __entry->compl = call->completion; 735 __entry->error = call->error; 736 __entry->abort_code = call->abort_code; 737 ), 738 739 TP_printk("c=%08x %s r=%d ac=%d", 740 __entry->call, 741 __print_symbolic(__entry->compl, rxrpc_completions), 742 __entry->error, 743 __entry->abort_code) 744 ); 745 746 TRACE_EVENT(rxrpc_transmit, 747 TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), 748 749 TP_ARGS(call, why), 750 751 TP_STRUCT__entry( 752 __field(unsigned int, call ) 753 __field(enum rxrpc_transmit_trace, why ) 754 __field(rxrpc_seq_t, tx_hard_ack ) 755 __field(rxrpc_seq_t, tx_top ) 756 __field(int, tx_winsize ) 757 ), 758 759 TP_fast_assign( 760 __entry->call = call->debug_id; 761 __entry->why = why; 762 __entry->tx_hard_ack = call->tx_hard_ack; 763 __entry->tx_top = call->tx_top; 764 __entry->tx_winsize = call->tx_winsize; 765 ), 766 767 TP_printk("c=%08x %s f=%08x n=%u/%u", 768 __entry->call, 769 __print_symbolic(__entry->why, rxrpc_transmit_traces), 770 __entry->tx_hard_ack + 1, 771 __entry->tx_top - __entry->tx_hard_ack, 772 __entry->tx_winsize) 773 ); 774 775 TRACE_EVENT(rxrpc_rx_data, 776 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 777 rxrpc_serial_t serial, u8 flags, u8 anno), 778 779 TP_ARGS(call, seq, serial, flags, anno), 780 781 TP_STRUCT__entry( 782 __field(unsigned int, call ) 783 __field(rxrpc_seq_t, seq ) 784 __field(rxrpc_serial_t, serial ) 785 __field(u8, flags ) 786 __field(u8, anno ) 787 ), 788 789 TP_fast_assign( 790 __entry->call = call->debug_id; 791 __entry->seq = seq; 792 __entry->serial = serial; 793 __entry->flags = flags; 794 __entry->anno = anno; 795 ), 796 797 TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x", 798 __entry->call, 799 __entry->serial, 800 __entry->seq, 801 __entry->flags, 802 __entry->anno) 803 ); 804 805 TRACE_EVENT(rxrpc_rx_ack, 806 TP_PROTO(struct rxrpc_call *call, 807 rxrpc_serial_t serial, rxrpc_serial_t ack_serial, 808 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), 809 810 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), 811 812 TP_STRUCT__entry( 813 __field(unsigned int, call ) 814 __field(rxrpc_serial_t, serial ) 815 __field(rxrpc_serial_t, ack_serial ) 816 __field(rxrpc_seq_t, first ) 817 __field(rxrpc_seq_t, prev ) 818 __field(u8, reason ) 819 __field(u8, n_acks ) 820 ), 821 822 TP_fast_assign( 823 __entry->call = call->debug_id; 824 __entry->serial = serial; 825 __entry->ack_serial = ack_serial; 826 __entry->first = first; 827 __entry->prev = prev; 828 __entry->reason = reason; 829 __entry->n_acks = n_acks; 830 ), 831 832 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", 833 __entry->call, 834 __entry->serial, 835 __print_symbolic(__entry->reason, rxrpc_ack_names), 836 __entry->ack_serial, 837 __entry->first, 838 __entry->prev, 839 __entry->n_acks) 840 ); 841 842 TRACE_EVENT(rxrpc_rx_abort, 843 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 844 u32 abort_code), 845 846 TP_ARGS(call, serial, abort_code), 847 848 TP_STRUCT__entry( 849 __field(unsigned int, call ) 850 __field(rxrpc_serial_t, serial ) 851 __field(u32, abort_code ) 852 ), 853 854 TP_fast_assign( 855 __entry->call = call->debug_id; 856 __entry->serial = serial; 857 __entry->abort_code = abort_code; 858 ), 859 860 TP_printk("c=%08x ABORT %08x ac=%d", 861 __entry->call, 862 __entry->serial, 863 __entry->abort_code) 864 ); 865 866 TRACE_EVENT(rxrpc_rx_rwind_change, 867 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 868 u32 rwind, bool wake), 869 870 TP_ARGS(call, serial, rwind, wake), 871 872 TP_STRUCT__entry( 873 __field(unsigned int, call ) 874 __field(rxrpc_serial_t, serial ) 875 __field(u32, rwind ) 876 __field(bool, wake ) 877 ), 878 879 TP_fast_assign( 880 __entry->call = call->debug_id; 881 __entry->serial = serial; 882 __entry->rwind = rwind; 883 __entry->wake = wake; 884 ), 885 886 TP_printk("c=%08x %08x rw=%u%s", 887 __entry->call, 888 __entry->serial, 889 __entry->rwind, 890 __entry->wake ? " wake" : "") 891 ); 892 893 TRACE_EVENT(rxrpc_tx_data, 894 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 895 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), 896 897 TP_ARGS(call, seq, serial, flags, retrans, lose), 898 899 TP_STRUCT__entry( 900 __field(unsigned int, call ) 901 __field(rxrpc_seq_t, seq ) 902 __field(rxrpc_serial_t, serial ) 903 __field(u8, flags ) 904 __field(bool, retrans ) 905 __field(bool, lose ) 906 ), 907 908 TP_fast_assign( 909 __entry->call = call->debug_id; 910 __entry->seq = seq; 911 __entry->serial = serial; 912 __entry->flags = flags; 913 __entry->retrans = retrans; 914 __entry->lose = lose; 915 ), 916 917 TP_printk("c=%08x DATA %08x q=%08x fl=%02x%s%s", 918 __entry->call, 919 __entry->serial, 920 __entry->seq, 921 __entry->flags, 922 __entry->retrans ? " *RETRANS*" : "", 923 __entry->lose ? " *LOSE*" : "") 924 ); 925 926 TRACE_EVENT(rxrpc_tx_ack, 927 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 928 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 929 u8 reason, u8 n_acks), 930 931 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), 932 933 TP_STRUCT__entry( 934 __field(unsigned int, call ) 935 __field(rxrpc_serial_t, serial ) 936 __field(rxrpc_seq_t, ack_first ) 937 __field(rxrpc_serial_t, ack_serial ) 938 __field(u8, reason ) 939 __field(u8, n_acks ) 940 ), 941 942 TP_fast_assign( 943 __entry->call = call ? call->debug_id : 0; 944 __entry->serial = serial; 945 __entry->ack_first = ack_first; 946 __entry->ack_serial = ack_serial; 947 __entry->reason = reason; 948 __entry->n_acks = n_acks; 949 ), 950 951 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u", 952 __entry->call, 953 __entry->serial, 954 __print_symbolic(__entry->reason, rxrpc_ack_names), 955 __entry->ack_first, 956 __entry->ack_serial, 957 __entry->n_acks) 958 ); 959 960 TRACE_EVENT(rxrpc_receive, 961 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 962 rxrpc_serial_t serial, rxrpc_seq_t seq), 963 964 TP_ARGS(call, why, serial, seq), 965 966 TP_STRUCT__entry( 967 __field(unsigned int, call ) 968 __field(enum rxrpc_receive_trace, why ) 969 __field(rxrpc_serial_t, serial ) 970 __field(rxrpc_seq_t, seq ) 971 __field(rxrpc_seq_t, hard_ack ) 972 __field(rxrpc_seq_t, top ) 973 ), 974 975 TP_fast_assign( 976 __entry->call = call->debug_id; 977 __entry->why = why; 978 __entry->serial = serial; 979 __entry->seq = seq; 980 __entry->hard_ack = call->rx_hard_ack; 981 __entry->top = call->rx_top; 982 ), 983 984 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", 985 __entry->call, 986 __print_symbolic(__entry->why, rxrpc_receive_traces), 987 __entry->serial, 988 __entry->seq, 989 __entry->hard_ack, 990 __entry->top) 991 ); 992 993 TRACE_EVENT(rxrpc_recvmsg, 994 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 995 rxrpc_seq_t seq, unsigned int offset, unsigned int len, 996 int ret), 997 998 TP_ARGS(call, why, seq, offset, len, ret), 999 1000 TP_STRUCT__entry( 1001 __field(unsigned int, call ) 1002 __field(enum rxrpc_recvmsg_trace, why ) 1003 __field(rxrpc_seq_t, seq ) 1004 __field(unsigned int, offset ) 1005 __field(unsigned int, len ) 1006 __field(int, ret ) 1007 ), 1008 1009 TP_fast_assign( 1010 __entry->call = call->debug_id; 1011 __entry->why = why; 1012 __entry->seq = seq; 1013 __entry->offset = offset; 1014 __entry->len = len; 1015 __entry->ret = ret; 1016 ), 1017 1018 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", 1019 __entry->call, 1020 __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 1021 __entry->seq, 1022 __entry->offset, 1023 __entry->len, 1024 __entry->ret) 1025 ); 1026 1027 TRACE_EVENT(rxrpc_rtt_tx, 1028 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 1029 rxrpc_serial_t send_serial), 1030 1031 TP_ARGS(call, why, send_serial), 1032 1033 TP_STRUCT__entry( 1034 __field(unsigned int, call ) 1035 __field(enum rxrpc_rtt_tx_trace, why ) 1036 __field(rxrpc_serial_t, send_serial ) 1037 ), 1038 1039 TP_fast_assign( 1040 __entry->call = call->debug_id; 1041 __entry->why = why; 1042 __entry->send_serial = send_serial; 1043 ), 1044 1045 TP_printk("c=%08x %s sr=%08x", 1046 __entry->call, 1047 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 1048 __entry->send_serial) 1049 ); 1050 1051 TRACE_EVENT(rxrpc_rtt_rx, 1052 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 1053 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 1054 s64 rtt, u8 nr, s64 avg), 1055 1056 TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg), 1057 1058 TP_STRUCT__entry( 1059 __field(unsigned int, call ) 1060 __field(enum rxrpc_rtt_rx_trace, why ) 1061 __field(u8, nr ) 1062 __field(rxrpc_serial_t, send_serial ) 1063 __field(rxrpc_serial_t, resp_serial ) 1064 __field(s64, rtt ) 1065 __field(u64, avg ) 1066 ), 1067 1068 TP_fast_assign( 1069 __entry->call = call->debug_id; 1070 __entry->why = why; 1071 __entry->send_serial = send_serial; 1072 __entry->resp_serial = resp_serial; 1073 __entry->rtt = rtt; 1074 __entry->nr = nr; 1075 __entry->avg = avg; 1076 ), 1077 1078 TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", 1079 __entry->call, 1080 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 1081 __entry->send_serial, 1082 __entry->resp_serial, 1083 __entry->rtt, 1084 __entry->nr, 1085 __entry->avg) 1086 ); 1087 1088 TRACE_EVENT(rxrpc_timer, 1089 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, 1090 unsigned long now), 1091 1092 TP_ARGS(call, why, now), 1093 1094 TP_STRUCT__entry( 1095 __field(unsigned int, call ) 1096 __field(enum rxrpc_timer_trace, why ) 1097 __field(long, now ) 1098 __field(long, ack_at ) 1099 __field(long, ack_lost_at ) 1100 __field(long, resend_at ) 1101 __field(long, ping_at ) 1102 __field(long, expect_rx_by ) 1103 __field(long, expect_req_by ) 1104 __field(long, expect_term_by ) 1105 __field(long, timer ) 1106 ), 1107 1108 TP_fast_assign( 1109 __entry->call = call->debug_id; 1110 __entry->why = why; 1111 __entry->now = now; 1112 __entry->ack_at = call->ack_at; 1113 __entry->ack_lost_at = call->ack_lost_at; 1114 __entry->resend_at = call->resend_at; 1115 __entry->expect_rx_by = call->expect_rx_by; 1116 __entry->expect_req_by = call->expect_req_by; 1117 __entry->expect_term_by = call->expect_term_by; 1118 __entry->timer = call->timer.expires; 1119 ), 1120 1121 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 1122 __entry->call, 1123 __print_symbolic(__entry->why, rxrpc_timer_traces), 1124 __entry->ack_at - __entry->now, 1125 __entry->ack_lost_at - __entry->now, 1126 __entry->resend_at - __entry->now, 1127 __entry->expect_rx_by - __entry->now, 1128 __entry->expect_req_by - __entry->now, 1129 __entry->expect_term_by - __entry->now, 1130 __entry->timer - __entry->now) 1131 ); 1132 1133 TRACE_EVENT(rxrpc_rx_lose, 1134 TP_PROTO(struct rxrpc_skb_priv *sp), 1135 1136 TP_ARGS(sp), 1137 1138 TP_STRUCT__entry( 1139 __field_struct(struct rxrpc_host_header, hdr ) 1140 ), 1141 1142 TP_fast_assign( 1143 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 1144 ), 1145 1146 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 1147 __entry->hdr.epoch, __entry->hdr.cid, 1148 __entry->hdr.callNumber, __entry->hdr.serviceId, 1149 __entry->hdr.serial, __entry->hdr.seq, 1150 __entry->hdr.type, __entry->hdr.flags, 1151 __entry->hdr.type <= 15 ? 1152 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 1153 ); 1154 1155 TRACE_EVENT(rxrpc_propose_ack, 1156 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1157 u8 ack_reason, rxrpc_serial_t serial, bool immediate, 1158 bool background, enum rxrpc_propose_ack_outcome outcome), 1159 1160 TP_ARGS(call, why, ack_reason, serial, immediate, background, 1161 outcome), 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 __field(bool, immediate ) 1169 __field(bool, background ) 1170 __field(enum rxrpc_propose_ack_outcome, outcome ) 1171 ), 1172 1173 TP_fast_assign( 1174 __entry->call = call->debug_id; 1175 __entry->why = why; 1176 __entry->serial = serial; 1177 __entry->ack_reason = ack_reason; 1178 __entry->immediate = immediate; 1179 __entry->background = background; 1180 __entry->outcome = outcome; 1181 ), 1182 1183 TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s", 1184 __entry->call, 1185 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1186 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1187 __entry->serial, 1188 __entry->immediate, 1189 __entry->background, 1190 __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) 1191 ); 1192 1193 TRACE_EVENT(rxrpc_retransmit, 1194 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation, 1195 s64 expiry), 1196 1197 TP_ARGS(call, seq, annotation, expiry), 1198 1199 TP_STRUCT__entry( 1200 __field(unsigned int, call ) 1201 __field(rxrpc_seq_t, seq ) 1202 __field(u8, annotation ) 1203 __field(s64, expiry ) 1204 ), 1205 1206 TP_fast_assign( 1207 __entry->call = call->debug_id; 1208 __entry->seq = seq; 1209 __entry->annotation = annotation; 1210 __entry->expiry = expiry; 1211 ), 1212 1213 TP_printk("c=%08x q=%x a=%02x xp=%lld", 1214 __entry->call, 1215 __entry->seq, 1216 __entry->annotation, 1217 __entry->expiry) 1218 ); 1219 1220 TRACE_EVENT(rxrpc_congest, 1221 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 1222 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), 1223 1224 TP_ARGS(call, summary, ack_serial, change), 1225 1226 TP_STRUCT__entry( 1227 __field(unsigned int, call ) 1228 __field(enum rxrpc_congest_change, change ) 1229 __field(rxrpc_seq_t, hard_ack ) 1230 __field(rxrpc_seq_t, top ) 1231 __field(rxrpc_seq_t, lowest_nak ) 1232 __field(rxrpc_serial_t, ack_serial ) 1233 __field_struct(struct rxrpc_ack_summary, sum ) 1234 ), 1235 1236 TP_fast_assign( 1237 __entry->call = call->debug_id; 1238 __entry->change = change; 1239 __entry->hard_ack = call->tx_hard_ack; 1240 __entry->top = call->tx_top; 1241 __entry->lowest_nak = call->acks_lowest_nak; 1242 __entry->ack_serial = ack_serial; 1243 memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 1244 ), 1245 1246 TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s", 1247 __entry->call, 1248 __entry->ack_serial, 1249 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 1250 __entry->hard_ack, 1251 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), 1252 __entry->sum.cwnd, 1253 __entry->sum.ssthresh, 1254 __entry->sum.nr_acks, __entry->sum.nr_nacks, 1255 __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, 1256 __entry->sum.nr_rot_new_acks, 1257 __entry->top - __entry->hard_ack, 1258 __entry->sum.cumulative_acks, 1259 __entry->sum.dup_acks, 1260 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", 1261 __print_symbolic(__entry->change, rxrpc_congest_changes), 1262 __entry->sum.retrans_timeo ? " rTxTo" : "") 1263 ); 1264 1265 TRACE_EVENT(rxrpc_disconnect_call, 1266 TP_PROTO(struct rxrpc_call *call), 1267 1268 TP_ARGS(call), 1269 1270 TP_STRUCT__entry( 1271 __field(unsigned int, call ) 1272 __field(u32, abort_code ) 1273 ), 1274 1275 TP_fast_assign( 1276 __entry->call = call->debug_id; 1277 __entry->abort_code = call->abort_code; 1278 ), 1279 1280 TP_printk("c=%08x ab=%08x", 1281 __entry->call, 1282 __entry->abort_code) 1283 ); 1284 1285 TRACE_EVENT(rxrpc_improper_term, 1286 TP_PROTO(struct rxrpc_call *call), 1287 1288 TP_ARGS(call), 1289 1290 TP_STRUCT__entry( 1291 __field(unsigned int, call ) 1292 __field(u32, abort_code ) 1293 ), 1294 1295 TP_fast_assign( 1296 __entry->call = call->debug_id; 1297 __entry->abort_code = call->abort_code; 1298 ), 1299 1300 TP_printk("c=%08x ab=%08x", 1301 __entry->call, 1302 __entry->abort_code) 1303 ); 1304 1305 TRACE_EVENT(rxrpc_rx_eproto, 1306 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1307 const char *why), 1308 1309 TP_ARGS(call, serial, why), 1310 1311 TP_STRUCT__entry( 1312 __field(unsigned int, call ) 1313 __field(rxrpc_serial_t, serial ) 1314 __field(const char *, why ) 1315 ), 1316 1317 TP_fast_assign( 1318 __entry->call = call->debug_id; 1319 __entry->serial = serial; 1320 __entry->why = why; 1321 ), 1322 1323 TP_printk("c=%08x EPROTO %08x %s", 1324 __entry->call, 1325 __entry->serial, 1326 __entry->why) 1327 ); 1328 1329 TRACE_EVENT(rxrpc_connect_call, 1330 TP_PROTO(struct rxrpc_call *call), 1331 1332 TP_ARGS(call), 1333 1334 TP_STRUCT__entry( 1335 __field(unsigned int, call ) 1336 __field(unsigned long, user_call_ID ) 1337 __field(u32, cid ) 1338 __field(u32, call_id ) 1339 ), 1340 1341 TP_fast_assign( 1342 __entry->call = call->debug_id; 1343 __entry->user_call_ID = call->user_call_ID; 1344 __entry->cid = call->cid; 1345 __entry->call_id = call->call_id; 1346 ), 1347 1348 TP_printk("c=%08x u=%p %08x:%08x", 1349 __entry->call, 1350 (void *)__entry->user_call_ID, 1351 __entry->cid, 1352 __entry->call_id) 1353 ); 1354 1355 TRACE_EVENT(rxrpc_resend, 1356 TP_PROTO(struct rxrpc_call *call, int ix), 1357 1358 TP_ARGS(call, ix), 1359 1360 TP_STRUCT__entry( 1361 __field(unsigned int, call ) 1362 __field(int, ix ) 1363 __array(u8, anno, 64 ) 1364 ), 1365 1366 TP_fast_assign( 1367 __entry->call = call->debug_id; 1368 __entry->ix = ix; 1369 memcpy(__entry->anno, call->rxtx_annotations, 64); 1370 ), 1371 1372 TP_printk("c=%08x ix=%u a=%64phN", 1373 __entry->call, 1374 __entry->ix, 1375 __entry->anno) 1376 ); 1377 1378 TRACE_EVENT(rxrpc_rx_icmp, 1379 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, 1380 struct sockaddr_rxrpc *srx), 1381 1382 TP_ARGS(peer, ee, srx), 1383 1384 TP_STRUCT__entry( 1385 __field(unsigned int, peer ) 1386 __field_struct(struct sock_extended_err, ee ) 1387 __field_struct(struct sockaddr_rxrpc, srx ) 1388 ), 1389 1390 TP_fast_assign( 1391 __entry->peer = peer->debug_id; 1392 memcpy(&__entry->ee, ee, sizeof(__entry->ee)); 1393 memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 1394 ), 1395 1396 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", 1397 __entry->peer, 1398 __entry->ee.ee_origin, 1399 __entry->ee.ee_type, 1400 __entry->ee.ee_code, 1401 __entry->ee.ee_info, 1402 __entry->ee.ee_data, 1403 __entry->ee.ee_errno, 1404 &__entry->srx.transport) 1405 ); 1406 1407 #endif /* _TRACE_RXRPC_H */ 1408 1409 /* This part must be outside protection */ 1410 #include <trace/define_trace.h> 1411