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