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_abort_reasons \ 20 /* AFS errors */ \ 21 EM(afs_abort_general_error, "afs-error") \ 22 EM(afs_abort_interrupted, "afs-intr") \ 23 EM(afs_abort_oom, "afs-oom") \ 24 EM(afs_abort_op_not_supported, "afs-op-notsupp") \ 25 EM(afs_abort_probeuuid_negative, "afs-probeuuid-neg") \ 26 EM(afs_abort_send_data_error, "afs-send-data") \ 27 EM(afs_abort_unmarshal_error, "afs-unmarshal") \ 28 /* rxperf errors */ \ 29 EM(rxperf_abort_general_error, "rxperf-error") \ 30 EM(rxperf_abort_oom, "rxperf-oom") \ 31 EM(rxperf_abort_op_not_supported, "rxperf-op-notsupp") \ 32 EM(rxperf_abort_unmarshal_error, "rxperf-unmarshal") \ 33 /* RxKAD security errors */ \ 34 EM(rxkad_abort_1_short_check, "rxkad1-short-check") \ 35 EM(rxkad_abort_1_short_data, "rxkad1-short-data") \ 36 EM(rxkad_abort_1_short_encdata, "rxkad1-short-encdata") \ 37 EM(rxkad_abort_1_short_header, "rxkad1-short-hdr") \ 38 EM(rxkad_abort_2_short_check, "rxkad2-short-check") \ 39 EM(rxkad_abort_2_short_data, "rxkad2-short-data") \ 40 EM(rxkad_abort_2_short_header, "rxkad2-short-hdr") \ 41 EM(rxkad_abort_2_short_len, "rxkad2-short-len") \ 42 EM(rxkad_abort_bad_checksum, "rxkad2-bad-cksum") \ 43 EM(rxkad_abort_chall_key_expired, "rxkad-chall-key-exp") \ 44 EM(rxkad_abort_chall_level, "rxkad-chall-level") \ 45 EM(rxkad_abort_chall_no_key, "rxkad-chall-nokey") \ 46 EM(rxkad_abort_chall_short, "rxkad-chall-short") \ 47 EM(rxkad_abort_chall_version, "rxkad-chall-version") \ 48 EM(rxkad_abort_resp_bad_callid, "rxkad-resp-bad-callid") \ 49 EM(rxkad_abort_resp_bad_checksum, "rxkad-resp-bad-cksum") \ 50 EM(rxkad_abort_resp_bad_param, "rxkad-resp-bad-param") \ 51 EM(rxkad_abort_resp_call_ctr, "rxkad-resp-call-ctr") \ 52 EM(rxkad_abort_resp_call_state, "rxkad-resp-call-state") \ 53 EM(rxkad_abort_resp_key_expired, "rxkad-resp-key-exp") \ 54 EM(rxkad_abort_resp_key_rejected, "rxkad-resp-key-rej") \ 55 EM(rxkad_abort_resp_level, "rxkad-resp-level") \ 56 EM(rxkad_abort_resp_nokey, "rxkad-resp-nokey") \ 57 EM(rxkad_abort_resp_ooseq, "rxkad-resp-ooseq") \ 58 EM(rxkad_abort_resp_short, "rxkad-resp-short") \ 59 EM(rxkad_abort_resp_short_tkt, "rxkad-resp-short-tkt") \ 60 EM(rxkad_abort_resp_tkt_aname, "rxkad-resp-tk-aname") \ 61 EM(rxkad_abort_resp_tkt_expired, "rxkad-resp-tk-exp") \ 62 EM(rxkad_abort_resp_tkt_future, "rxkad-resp-tk-future") \ 63 EM(rxkad_abort_resp_tkt_inst, "rxkad-resp-tk-inst") \ 64 EM(rxkad_abort_resp_tkt_len, "rxkad-resp-tk-len") \ 65 EM(rxkad_abort_resp_tkt_realm, "rxkad-resp-tk-realm") \ 66 EM(rxkad_abort_resp_tkt_short, "rxkad-resp-tk-short") \ 67 EM(rxkad_abort_resp_tkt_sinst, "rxkad-resp-tk-sinst") \ 68 EM(rxkad_abort_resp_tkt_sname, "rxkad-resp-tk-sname") \ 69 EM(rxkad_abort_resp_unknown_tkt, "rxkad-resp-unknown-tkt") \ 70 EM(rxkad_abort_resp_version, "rxkad-resp-version") \ 71 /* rxrpc errors */ \ 72 EM(rxrpc_abort_call_improper_term, "call-improper-term") \ 73 EM(rxrpc_abort_call_reset, "call-reset") \ 74 EM(rxrpc_abort_call_sendmsg, "call-sendmsg") \ 75 EM(rxrpc_abort_call_sock_release, "call-sock-rel") \ 76 EM(rxrpc_abort_call_sock_release_tba, "call-sock-rel-tba") \ 77 EM(rxrpc_abort_call_timeout, "call-timeout") \ 78 EM(rxrpc_abort_no_service_key, "no-serv-key") \ 79 EM(rxrpc_abort_nomem, "nomem") \ 80 EM(rxrpc_abort_service_not_offered, "serv-not-offered") \ 81 EM(rxrpc_abort_shut_down, "shut-down") \ 82 EM(rxrpc_abort_unsupported_security, "unsup-sec") \ 83 EM(rxrpc_badmsg_bad_abort, "bad-abort") \ 84 EM(rxrpc_badmsg_bad_jumbo, "bad-jumbo") \ 85 EM(rxrpc_badmsg_short_ack, "short-ack") \ 86 EM(rxrpc_badmsg_short_ack_trailer, "short-ack-trailer") \ 87 EM(rxrpc_badmsg_short_hdr, "short-hdr") \ 88 EM(rxrpc_badmsg_unsupported_packet, "unsup-pkt") \ 89 EM(rxrpc_badmsg_zero_call, "zero-call") \ 90 EM(rxrpc_badmsg_zero_seq, "zero-seq") \ 91 EM(rxrpc_badmsg_zero_service, "zero-service") \ 92 EM(rxrpc_eproto_ackr_outside_window, "ackr-out-win") \ 93 EM(rxrpc_eproto_ackr_sack_overflow, "ackr-sack-over") \ 94 EM(rxrpc_eproto_ackr_short_sack, "ackr-short-sack") \ 95 EM(rxrpc_eproto_ackr_zero, "ackr-zero") \ 96 EM(rxrpc_eproto_bad_upgrade, "bad-upgrade") \ 97 EM(rxrpc_eproto_data_after_last, "data-after-last") \ 98 EM(rxrpc_eproto_different_last, "diff-last") \ 99 EM(rxrpc_eproto_early_reply, "early-reply") \ 100 EM(rxrpc_eproto_improper_term, "improper-term") \ 101 EM(rxrpc_eproto_no_client_call, "no-cl-call") \ 102 EM(rxrpc_eproto_no_client_conn, "no-cl-conn") \ 103 EM(rxrpc_eproto_no_service_call, "no-sv-call") \ 104 EM(rxrpc_eproto_reupgrade, "re-upgrade") \ 105 EM(rxrpc_eproto_rxnull_challenge, "rxnull-chall") \ 106 EM(rxrpc_eproto_rxnull_response, "rxnull-resp") \ 107 EM(rxrpc_eproto_tx_rot_last, "tx-rot-last") \ 108 EM(rxrpc_eproto_unexpected_ack, "unex-ack") \ 109 EM(rxrpc_eproto_unexpected_ackall, "unex-ackall") \ 110 EM(rxrpc_eproto_unexpected_implicit_end, "unex-impl-end") \ 111 EM(rxrpc_eproto_unexpected_reply, "unex-reply") \ 112 EM(rxrpc_eproto_wrong_security, "wrong-sec") \ 113 EM(rxrpc_recvmsg_excess_data, "recvmsg-excess") \ 114 EM(rxrpc_recvmsg_short_data, "recvmsg-short") \ 115 E_(rxrpc_sendmsg_late_send, "sendmsg-late") 116 117 #define rxrpc_call_poke_traces \ 118 EM(rxrpc_call_poke_abort, "Abort") \ 119 EM(rxrpc_call_poke_complete, "Compl") \ 120 EM(rxrpc_call_poke_conn_abort, "Conn-abort") \ 121 EM(rxrpc_call_poke_error, "Error") \ 122 EM(rxrpc_call_poke_idle, "Idle") \ 123 EM(rxrpc_call_poke_set_timeout, "Set-timo") \ 124 EM(rxrpc_call_poke_start, "Start") \ 125 EM(rxrpc_call_poke_timer, "Timer") \ 126 E_(rxrpc_call_poke_timer_now, "Timer-now") 127 128 #define rxrpc_skb_traces \ 129 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \ 130 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \ 131 EM(rxrpc_skb_get_conn_secured, "GET conn-secd") \ 132 EM(rxrpc_skb_get_conn_work, "GET conn-work") \ 133 EM(rxrpc_skb_get_last_nack, "GET last-nack") \ 134 EM(rxrpc_skb_get_local_work, "GET locl-work") \ 135 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \ 136 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \ 137 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \ 138 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \ 139 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \ 140 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \ 141 EM(rxrpc_skb_new_unshared, "NEW unshared ") \ 142 EM(rxrpc_skb_put_conn_secured, "PUT conn-secd") \ 143 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \ 144 EM(rxrpc_skb_put_error_report, "PUT error-rep") \ 145 EM(rxrpc_skb_put_input, "PUT input ") \ 146 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \ 147 EM(rxrpc_skb_put_last_nack, "PUT last-nack") \ 148 EM(rxrpc_skb_put_purge, "PUT purge ") \ 149 EM(rxrpc_skb_put_rotate, "PUT rotate ") \ 150 EM(rxrpc_skb_put_unknown, "PUT unknown ") \ 151 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \ 152 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \ 153 EM(rxrpc_skb_see_reject, "SEE reject ") \ 154 EM(rxrpc_skb_see_rotate, "SEE rotate ") \ 155 E_(rxrpc_skb_see_version, "SEE version ") 156 157 #define rxrpc_local_traces \ 158 EM(rxrpc_local_free, "FREE ") \ 159 EM(rxrpc_local_get_call, "GET call ") \ 160 EM(rxrpc_local_get_client_conn, "GET conn-cln") \ 161 EM(rxrpc_local_get_for_use, "GET for-use ") \ 162 EM(rxrpc_local_get_peer, "GET peer ") \ 163 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \ 164 EM(rxrpc_local_new, "NEW ") \ 165 EM(rxrpc_local_put_bind, "PUT bind ") \ 166 EM(rxrpc_local_put_call, "PUT call ") \ 167 EM(rxrpc_local_put_for_use, "PUT for-use ") \ 168 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \ 169 EM(rxrpc_local_put_peer, "PUT peer ") \ 170 EM(rxrpc_local_put_prealloc_peer, "PUT peer-pre") \ 171 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \ 172 EM(rxrpc_local_stop, "STOP ") \ 173 EM(rxrpc_local_stopped, "STOPPED ") \ 174 EM(rxrpc_local_unuse_bind, "UNU bind ") \ 175 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \ 176 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \ 177 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \ 178 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \ 179 EM(rxrpc_local_use_lookup, "USE lookup ") \ 180 E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa") 181 182 #define rxrpc_peer_traces \ 183 EM(rxrpc_peer_free, "FREE ") \ 184 EM(rxrpc_peer_get_accept, "GET accept ") \ 185 EM(rxrpc_peer_get_application, "GET app ") \ 186 EM(rxrpc_peer_get_bundle, "GET bundle ") \ 187 EM(rxrpc_peer_get_call, "GET call ") \ 188 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \ 189 EM(rxrpc_peer_get_input, "GET input ") \ 190 EM(rxrpc_peer_get_input_error, "GET inpt-err") \ 191 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \ 192 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \ 193 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \ 194 EM(rxrpc_peer_new_client, "NEW client ") \ 195 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \ 196 EM(rxrpc_peer_put_application, "PUT app ") \ 197 EM(rxrpc_peer_put_bundle, "PUT bundle ") \ 198 EM(rxrpc_peer_put_call, "PUT call ") \ 199 EM(rxrpc_peer_put_conn, "PUT conn ") \ 200 EM(rxrpc_peer_put_input, "PUT input ") \ 201 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \ 202 E_(rxrpc_peer_put_keepalive, "PUT keepaliv") 203 204 #define rxrpc_bundle_traces \ 205 EM(rxrpc_bundle_free, "FREE ") \ 206 EM(rxrpc_bundle_get_client_call, "GET clt-call") \ 207 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \ 208 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \ 209 EM(rxrpc_bundle_put_call, "PUT call ") \ 210 EM(rxrpc_bundle_put_conn, "PUT conn ") \ 211 EM(rxrpc_bundle_put_discard, "PUT discard ") \ 212 E_(rxrpc_bundle_new, "NEW ") 213 214 #define rxrpc_conn_traces \ 215 EM(rxrpc_conn_free, "FREE ") \ 216 EM(rxrpc_conn_get_activate_call, "GET act-call") \ 217 EM(rxrpc_conn_get_call_input, "GET inp-call") \ 218 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \ 219 EM(rxrpc_conn_get_idle, "GET idle ") \ 220 EM(rxrpc_conn_get_poke_abort, "GET pk-abort") \ 221 EM(rxrpc_conn_get_poke_secured, "GET secured ") \ 222 EM(rxrpc_conn_get_poke_timer, "GET poke ") \ 223 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \ 224 EM(rxrpc_conn_new_client, "NEW client ") \ 225 EM(rxrpc_conn_new_service, "NEW service ") \ 226 EM(rxrpc_conn_put_call, "PUT call ") \ 227 EM(rxrpc_conn_put_call_input, "PUT inp-call") \ 228 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \ 229 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \ 230 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \ 231 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \ 232 EM(rxrpc_conn_put_poke, "PUT poke ") \ 233 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \ 234 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \ 235 EM(rxrpc_conn_put_unidle, "PUT unidle ") \ 236 EM(rxrpc_conn_put_work, "PUT work ") \ 237 EM(rxrpc_conn_queue_challenge, "QUE chall ") \ 238 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \ 239 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \ 240 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \ 241 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \ 242 E_(rxrpc_conn_see_work, "SEE work ") 243 244 #define rxrpc_client_traces \ 245 EM(rxrpc_client_activate_chans, "Activa") \ 246 EM(rxrpc_client_alloc, "Alloc ") \ 247 EM(rxrpc_client_chan_activate, "ChActv") \ 248 EM(rxrpc_client_chan_disconnect, "ChDisc") \ 249 EM(rxrpc_client_chan_pass, "ChPass") \ 250 EM(rxrpc_client_cleanup, "Clean ") \ 251 EM(rxrpc_client_discard, "Discar") \ 252 EM(rxrpc_client_exposed, "Expose") \ 253 EM(rxrpc_client_replace, "Replac") \ 254 EM(rxrpc_client_queue_new_call, "Q-Call") \ 255 EM(rxrpc_client_to_active, "->Actv") \ 256 E_(rxrpc_client_to_idle, "->Idle") 257 258 #define rxrpc_call_traces \ 259 EM(rxrpc_call_get_io_thread, "GET iothread") \ 260 EM(rxrpc_call_get_input, "GET input ") \ 261 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \ 262 EM(rxrpc_call_get_notify_socket, "GET notify ") \ 263 EM(rxrpc_call_get_poke, "GET poke ") \ 264 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \ 265 EM(rxrpc_call_get_release_sock, "GET rel-sock") \ 266 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \ 267 EM(rxrpc_call_get_userid, "GET user-id ") \ 268 EM(rxrpc_call_new_client, "NEW client ") \ 269 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \ 270 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \ 271 EM(rxrpc_call_put_discard_error, "PUT disc-err") \ 272 EM(rxrpc_call_put_io_thread, "PUT iothread") \ 273 EM(rxrpc_call_put_input, "PUT input ") \ 274 EM(rxrpc_call_put_kernel, "PUT kernel ") \ 275 EM(rxrpc_call_put_poke, "PUT poke ") \ 276 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \ 277 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \ 278 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \ 279 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \ 280 EM(rxrpc_call_put_unnotify, "PUT unnotify") \ 281 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \ 282 EM(rxrpc_call_put_userid, "PUT user-id ") \ 283 EM(rxrpc_call_see_accept, "SEE accept ") \ 284 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \ 285 EM(rxrpc_call_see_already_released, "SEE alrdy-rl") \ 286 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \ 287 EM(rxrpc_call_see_connected, "SEE connect ") \ 288 EM(rxrpc_call_see_conn_abort, "SEE conn-abt") \ 289 EM(rxrpc_call_see_discard, "SEE discard ") \ 290 EM(rxrpc_call_see_disconnected, "SEE disconn ") \ 291 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \ 292 EM(rxrpc_call_see_input, "SEE input ") \ 293 EM(rxrpc_call_see_recvmsg, "SEE recvmsg ") \ 294 EM(rxrpc_call_see_release, "SEE release ") \ 295 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \ 296 EM(rxrpc_call_see_waiting_call, "SEE q-conn ") \ 297 E_(rxrpc_call_see_zap, "SEE zap ") 298 299 #define rxrpc_txqueue_traces \ 300 EM(rxrpc_txqueue_await_reply, "AWR") \ 301 EM(rxrpc_txqueue_dequeue, "DEQ") \ 302 EM(rxrpc_txqueue_end, "END") \ 303 EM(rxrpc_txqueue_queue, "QUE") \ 304 EM(rxrpc_txqueue_queue_last, "QLS") \ 305 EM(rxrpc_txqueue_rotate, "ROT") \ 306 EM(rxrpc_txqueue_rotate_last, "RLS") \ 307 E_(rxrpc_txqueue_wait, "WAI") 308 309 #define rxrpc_receive_traces \ 310 EM(rxrpc_receive_end, "END") \ 311 EM(rxrpc_receive_front, "FRN") \ 312 EM(rxrpc_receive_incoming, "INC") \ 313 EM(rxrpc_receive_queue, "QUE") \ 314 EM(rxrpc_receive_queue_last, "QLS") \ 315 EM(rxrpc_receive_queue_oos, "QUO") \ 316 EM(rxrpc_receive_queue_oos_last, "QOL") \ 317 EM(rxrpc_receive_oos, "OOS") \ 318 EM(rxrpc_receive_oos_last, "OSL") \ 319 EM(rxrpc_receive_rotate, "ROT") \ 320 E_(rxrpc_receive_rotate_last, "RLS") 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 EM(rxrpc_recvmsg_unqueue, "UNQU") \ 335 E_(rxrpc_recvmsg_wait, "WAIT") 336 337 #define rxrpc_rtt_tx_traces \ 338 EM(rxrpc_rtt_tx_cancel, "CNCE") \ 339 EM(rxrpc_rtt_tx_data, "DATA") \ 340 EM(rxrpc_rtt_tx_no_slot, "FULL") \ 341 E_(rxrpc_rtt_tx_ping, "PING") 342 343 #define rxrpc_rtt_rx_traces \ 344 EM(rxrpc_rtt_rx_other_ack, "OACK") \ 345 EM(rxrpc_rtt_rx_obsolete, "OBSL") \ 346 EM(rxrpc_rtt_rx_lost, "LOST") \ 347 EM(rxrpc_rtt_rx_ping_response, "PONG") \ 348 E_(rxrpc_rtt_rx_requested_ack, "RACK") 349 350 #define rxrpc_timer_traces \ 351 EM(rxrpc_timer_trace_delayed_ack, "DelayAck ") \ 352 EM(rxrpc_timer_trace_expect_rx, "ExpectRx ") \ 353 EM(rxrpc_timer_trace_hard, "HardLimit") \ 354 EM(rxrpc_timer_trace_idle, "IdleLimit") \ 355 EM(rxrpc_timer_trace_keepalive, "KeepAlive") \ 356 EM(rxrpc_timer_trace_lost_ack, "LostAck ") \ 357 EM(rxrpc_timer_trace_ping, "DelayPing") \ 358 EM(rxrpc_timer_trace_resend, "Resend ") \ 359 EM(rxrpc_timer_trace_resend_reset, "ResendRst") \ 360 E_(rxrpc_timer_trace_resend_tx, "ResendTx ") 361 362 #define rxrpc_propose_ack_traces \ 363 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 364 EM(rxrpc_propose_ack_delayed_ack, "DlydAck") \ 365 EM(rxrpc_propose_ack_input_data, "DataIn ") \ 366 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \ 367 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ 368 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 369 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 370 EM(rxrpc_propose_ack_ping_for_0_retrans, "0-Retrn") \ 371 EM(rxrpc_propose_ack_ping_for_old_rtt, "OldRtt ") \ 372 EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 373 EM(rxrpc_propose_ack_ping_for_rtt, "Rtt ") \ 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 EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \ 380 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 381 382 #define rxrpc_congest_modes \ 383 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ 384 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ 385 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ 386 E_(RXRPC_CALL_SLOW_START, "SlowStart") 387 388 #define rxrpc_congest_changes \ 389 EM(rxrpc_cong_begin_retransmission, " Retrans") \ 390 EM(rxrpc_cong_cleared_nacks, " Cleared") \ 391 EM(rxrpc_cong_new_low_nack, " NewLowN") \ 392 EM(rxrpc_cong_no_change, " -") \ 393 EM(rxrpc_cong_progress, " Progres") \ 394 EM(rxrpc_cong_idle_reset, " IdleRes") \ 395 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 396 EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 397 E_(rxrpc_cong_saw_nack, " SawNack") 398 399 #define rxrpc_pkts \ 400 EM(0, "?00") \ 401 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 402 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 403 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 404 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 405 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 406 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 407 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 408 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 409 EM(9, "?09") \ 410 EM(10, "?10") \ 411 EM(11, "?11") \ 412 EM(12, "?12") \ 413 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 414 EM(14, "?14") \ 415 E_(15, "?15") 416 417 #define rxrpc_ack_names \ 418 EM(0, "-0-") \ 419 EM(RXRPC_ACK_REQUESTED, "REQ") \ 420 EM(RXRPC_ACK_DUPLICATE, "DUP") \ 421 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 422 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 423 EM(RXRPC_ACK_NOSPACE, "MEM") \ 424 EM(RXRPC_ACK_PING, "PNG") \ 425 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 426 EM(RXRPC_ACK_DELAY, "DLY") \ 427 EM(RXRPC_ACK_IDLE, "IDL") \ 428 E_(RXRPC_ACK__INVALID, "-?-") 429 430 #define rxrpc_sack_traces \ 431 EM(rxrpc_sack_advance, "ADV") \ 432 EM(rxrpc_sack_fill, "FIL") \ 433 EM(rxrpc_sack_nack, "NAK") \ 434 EM(rxrpc_sack_none, "---") \ 435 E_(rxrpc_sack_oos, "OOS") 436 437 #define rxrpc_completions \ 438 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ 439 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ 440 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ 441 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ 442 E_(RXRPC_CALL_NETWORK_ERROR, "NetError") 443 444 #define rxrpc_tx_points \ 445 EM(rxrpc_tx_point_call_abort, "CallAbort") \ 446 EM(rxrpc_tx_point_call_ack, "CallAck") \ 447 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ 448 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ 449 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ 450 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ 451 EM(rxrpc_tx_point_reject, "Reject") \ 452 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ 453 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \ 454 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ 455 E_(rxrpc_tx_point_version_reply, "VerReply") 456 457 #define rxrpc_req_ack_traces \ 458 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \ 459 EM(rxrpc_reqack_already_on, "ALREADY-ON") \ 460 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \ 461 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \ 462 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \ 463 EM(rxrpc_reqack_retrans, "RETRANS ") \ 464 EM(rxrpc_reqack_slow_start, "SLOW-START") \ 465 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN") 466 /* ---- Must update size of stat_why_req_ack[] if more are added! */ 467 468 #define rxrpc_txbuf_traces \ 469 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \ 470 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \ 471 EM(rxrpc_txbuf_free, "FREE ") \ 472 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \ 473 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \ 474 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \ 475 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \ 476 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \ 477 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \ 478 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \ 479 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \ 480 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \ 481 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \ 482 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \ 483 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED") 484 485 /* 486 * Generate enums for tracing information. 487 */ 488 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 489 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 490 491 #undef EM 492 #undef E_ 493 #define EM(a, b) a, 494 #define E_(a, b) a 495 496 enum rxrpc_abort_reason { rxrpc_abort_reasons } __mode(byte); 497 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte); 498 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte); 499 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte); 500 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte); 501 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte); 502 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte); 503 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte); 504 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte); 505 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte); 506 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte); 507 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte); 508 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte); 509 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte); 510 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte); 511 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte); 512 enum rxrpc_sack_trace { rxrpc_sack_traces } __mode(byte); 513 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte); 514 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte); 515 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte); 516 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte); 517 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte); 518 519 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 520 521 /* 522 * Export enum symbols via userspace. 523 */ 524 #undef EM 525 #undef E_ 526 527 #ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS 528 529 #define EM(a, b) TRACE_DEFINE_ENUM(a); 530 #define E_(a, b) TRACE_DEFINE_ENUM(a); 531 532 rxrpc_abort_reasons; 533 rxrpc_bundle_traces; 534 rxrpc_call_poke_traces; 535 rxrpc_call_traces; 536 rxrpc_client_traces; 537 rxrpc_congest_changes; 538 rxrpc_congest_modes; 539 rxrpc_conn_traces; 540 rxrpc_local_traces; 541 rxrpc_propose_ack_traces; 542 rxrpc_receive_traces; 543 rxrpc_recvmsg_traces; 544 rxrpc_req_ack_traces; 545 rxrpc_rtt_rx_traces; 546 rxrpc_rtt_tx_traces; 547 rxrpc_sack_traces; 548 rxrpc_skb_traces; 549 rxrpc_timer_traces; 550 rxrpc_tx_points; 551 rxrpc_txbuf_traces; 552 rxrpc_txqueue_traces; 553 554 /* 555 * Now redefine the EM() and E_() macros to map the enums to the strings that 556 * will be printed in the output. 557 */ 558 #undef EM 559 #undef E_ 560 #define EM(a, b) { a, b }, 561 #define E_(a, b) { a, b } 562 563 TRACE_EVENT(rxrpc_local, 564 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op, 565 int ref, int usage), 566 567 TP_ARGS(local_debug_id, op, ref, usage), 568 569 TP_STRUCT__entry( 570 __field(unsigned int, local) 571 __field(int, op) 572 __field(int, ref) 573 __field(int, usage) 574 ), 575 576 TP_fast_assign( 577 __entry->local = local_debug_id; 578 __entry->op = op; 579 __entry->ref = ref; 580 __entry->usage = usage; 581 ), 582 583 TP_printk("L=%08x %s r=%d u=%d", 584 __entry->local, 585 __print_symbolic(__entry->op, rxrpc_local_traces), 586 __entry->ref, 587 __entry->usage) 588 ); 589 590 TRACE_EVENT(rxrpc_peer, 591 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why), 592 593 TP_ARGS(peer_debug_id, ref, why), 594 595 TP_STRUCT__entry( 596 __field(unsigned int, peer) 597 __field(int, ref) 598 __field(enum rxrpc_peer_trace, why) 599 ), 600 601 TP_fast_assign( 602 __entry->peer = peer_debug_id; 603 __entry->ref = ref; 604 __entry->why = why; 605 ), 606 607 TP_printk("P=%08x %s r=%d", 608 __entry->peer, 609 __print_symbolic(__entry->why, rxrpc_peer_traces), 610 __entry->ref) 611 ); 612 613 TRACE_EVENT(rxrpc_bundle, 614 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why), 615 616 TP_ARGS(bundle_debug_id, ref, why), 617 618 TP_STRUCT__entry( 619 __field(unsigned int, bundle) 620 __field(int, ref) 621 __field(int, why) 622 ), 623 624 TP_fast_assign( 625 __entry->bundle = bundle_debug_id; 626 __entry->ref = ref; 627 __entry->why = why; 628 ), 629 630 TP_printk("CB=%08x %s r=%d", 631 __entry->bundle, 632 __print_symbolic(__entry->why, rxrpc_bundle_traces), 633 __entry->ref) 634 ); 635 636 TRACE_EVENT(rxrpc_conn, 637 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why), 638 639 TP_ARGS(conn_debug_id, ref, why), 640 641 TP_STRUCT__entry( 642 __field(unsigned int, conn) 643 __field(int, ref) 644 __field(int, why) 645 ), 646 647 TP_fast_assign( 648 __entry->conn = conn_debug_id; 649 __entry->ref = ref; 650 __entry->why = why; 651 ), 652 653 TP_printk("C=%08x %s r=%d", 654 __entry->conn, 655 __print_symbolic(__entry->why, rxrpc_conn_traces), 656 __entry->ref) 657 ); 658 659 TRACE_EVENT(rxrpc_client, 660 TP_PROTO(struct rxrpc_connection *conn, int channel, 661 enum rxrpc_client_trace op), 662 663 TP_ARGS(conn, channel, op), 664 665 TP_STRUCT__entry( 666 __field(unsigned int, conn) 667 __field(u32, cid) 668 __field(int, channel) 669 __field(int, usage) 670 __field(enum rxrpc_client_trace, op) 671 ), 672 673 TP_fast_assign( 674 __entry->conn = conn ? conn->debug_id : 0; 675 __entry->channel = channel; 676 __entry->usage = conn ? refcount_read(&conn->ref) : -2; 677 __entry->op = op; 678 __entry->cid = conn ? conn->proto.cid : 0; 679 ), 680 681 TP_printk("C=%08x h=%2d %s i=%08x u=%d", 682 __entry->conn, 683 __entry->channel, 684 __print_symbolic(__entry->op, rxrpc_client_traces), 685 __entry->cid, 686 __entry->usage) 687 ); 688 689 TRACE_EVENT(rxrpc_call, 690 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux, 691 enum rxrpc_call_trace why), 692 693 TP_ARGS(call_debug_id, ref, aux, why), 694 695 TP_STRUCT__entry( 696 __field(unsigned int, call) 697 __field(int, ref) 698 __field(int, why) 699 __field(unsigned long, aux) 700 ), 701 702 TP_fast_assign( 703 __entry->call = call_debug_id; 704 __entry->ref = ref; 705 __entry->why = why; 706 __entry->aux = aux; 707 ), 708 709 TP_printk("c=%08x %s r=%d a=%lx", 710 __entry->call, 711 __print_symbolic(__entry->why, rxrpc_call_traces), 712 __entry->ref, 713 __entry->aux) 714 ); 715 716 TRACE_EVENT(rxrpc_skb, 717 TP_PROTO(struct sk_buff *skb, int usage, int mod_count, 718 enum rxrpc_skb_trace why), 719 720 TP_ARGS(skb, usage, mod_count, why), 721 722 TP_STRUCT__entry( 723 __field(struct sk_buff *, skb) 724 __field(int, usage) 725 __field(int, mod_count) 726 __field(enum rxrpc_skb_trace, why) 727 ), 728 729 TP_fast_assign( 730 __entry->skb = skb; 731 __entry->usage = usage; 732 __entry->mod_count = mod_count; 733 __entry->why = why; 734 ), 735 736 TP_printk("s=%p Rx %s u=%d m=%d", 737 __entry->skb, 738 __print_symbolic(__entry->why, rxrpc_skb_traces), 739 __entry->usage, 740 __entry->mod_count) 741 ); 742 743 TRACE_EVENT(rxrpc_rx_packet, 744 TP_PROTO(struct rxrpc_skb_priv *sp), 745 746 TP_ARGS(sp), 747 748 TP_STRUCT__entry( 749 __field_struct(struct rxrpc_host_header, hdr) 750 ), 751 752 TP_fast_assign( 753 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 754 ), 755 756 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 757 __entry->hdr.epoch, __entry->hdr.cid, 758 __entry->hdr.callNumber, __entry->hdr.serviceId, 759 __entry->hdr.serial, __entry->hdr.seq, 760 __entry->hdr.securityIndex, __entry->hdr.flags, 761 __print_symbolic(__entry->hdr.type, rxrpc_pkts)) 762 ); 763 764 TRACE_EVENT(rxrpc_rx_done, 765 TP_PROTO(int result, int abort_code), 766 767 TP_ARGS(result, abort_code), 768 769 TP_STRUCT__entry( 770 __field(int, result) 771 __field(int, abort_code) 772 ), 773 774 TP_fast_assign( 775 __entry->result = result; 776 __entry->abort_code = abort_code; 777 ), 778 779 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 780 ); 781 782 TRACE_EVENT(rxrpc_abort, 783 TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why, 784 u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error), 785 786 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), 787 788 TP_STRUCT__entry( 789 __field(unsigned int, call_nr) 790 __field(enum rxrpc_abort_reason, why) 791 __field(u32, cid) 792 __field(u32, call_id) 793 __field(rxrpc_seq_t, seq) 794 __field(int, abort_code) 795 __field(int, error) 796 ), 797 798 TP_fast_assign( 799 __entry->call_nr = call_nr; 800 __entry->why = why; 801 __entry->cid = cid; 802 __entry->call_id = call_id; 803 __entry->abort_code = abort_code; 804 __entry->error = error; 805 __entry->seq = seq; 806 ), 807 808 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", 809 __entry->call_nr, 810 __entry->cid, __entry->call_id, __entry->seq, 811 __entry->abort_code, __entry->error, 812 __print_symbolic(__entry->why, rxrpc_abort_reasons)) 813 ); 814 815 TRACE_EVENT(rxrpc_call_complete, 816 TP_PROTO(struct rxrpc_call *call), 817 818 TP_ARGS(call), 819 820 TP_STRUCT__entry( 821 __field(unsigned int, call) 822 __field(enum rxrpc_call_completion, compl) 823 __field(int, error) 824 __field(u32, abort_code) 825 ), 826 827 TP_fast_assign( 828 __entry->call = call->debug_id; 829 __entry->compl = call->completion; 830 __entry->error = call->error; 831 __entry->abort_code = call->abort_code; 832 ), 833 834 TP_printk("c=%08x %s r=%d ac=%d", 835 __entry->call, 836 __print_symbolic(__entry->compl, rxrpc_completions), 837 __entry->error, 838 __entry->abort_code) 839 ); 840 841 TRACE_EVENT(rxrpc_txqueue, 842 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why), 843 844 TP_ARGS(call, why), 845 846 TP_STRUCT__entry( 847 __field(unsigned int, call) 848 __field(enum rxrpc_txqueue_trace, why) 849 __field(rxrpc_seq_t, acks_hard_ack) 850 __field(rxrpc_seq_t, tx_bottom) 851 __field(rxrpc_seq_t, tx_top) 852 __field(rxrpc_seq_t, tx_prepared) 853 __field(int, tx_winsize) 854 ), 855 856 TP_fast_assign( 857 __entry->call = call->debug_id; 858 __entry->why = why; 859 __entry->acks_hard_ack = call->acks_hard_ack; 860 __entry->tx_bottom = call->tx_bottom; 861 __entry->tx_top = call->tx_top; 862 __entry->tx_prepared = call->tx_prepared; 863 __entry->tx_winsize = call->tx_winsize; 864 ), 865 866 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u", 867 __entry->call, 868 __print_symbolic(__entry->why, rxrpc_txqueue_traces), 869 __entry->tx_bottom, 870 __entry->acks_hard_ack, 871 __entry->tx_top - __entry->tx_bottom, 872 __entry->tx_top - __entry->acks_hard_ack, 873 __entry->tx_prepared - __entry->tx_bottom, 874 __entry->tx_winsize) 875 ); 876 877 TRACE_EVENT(rxrpc_rx_data, 878 TP_PROTO(unsigned int call, rxrpc_seq_t seq, 879 rxrpc_serial_t serial, u8 flags), 880 881 TP_ARGS(call, seq, serial, flags), 882 883 TP_STRUCT__entry( 884 __field(unsigned int, call) 885 __field(rxrpc_seq_t, seq) 886 __field(rxrpc_serial_t, serial) 887 __field(u8, flags) 888 ), 889 890 TP_fast_assign( 891 __entry->call = call; 892 __entry->seq = seq; 893 __entry->serial = serial; 894 __entry->flags = flags; 895 ), 896 897 TP_printk("c=%08x DATA %08x q=%08x fl=%02x", 898 __entry->call, 899 __entry->serial, 900 __entry->seq, 901 __entry->flags) 902 ); 903 904 TRACE_EVENT(rxrpc_rx_ack, 905 TP_PROTO(struct rxrpc_call *call, 906 rxrpc_serial_t serial, rxrpc_serial_t ack_serial, 907 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), 908 909 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), 910 911 TP_STRUCT__entry( 912 __field(unsigned int, call) 913 __field(rxrpc_serial_t, serial) 914 __field(rxrpc_serial_t, ack_serial) 915 __field(rxrpc_seq_t, first) 916 __field(rxrpc_seq_t, prev) 917 __field(u8, reason) 918 __field(u8, n_acks) 919 ), 920 921 TP_fast_assign( 922 __entry->call = call->debug_id; 923 __entry->serial = serial; 924 __entry->ack_serial = ack_serial; 925 __entry->first = first; 926 __entry->prev = prev; 927 __entry->reason = reason; 928 __entry->n_acks = n_acks; 929 ), 930 931 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", 932 __entry->call, 933 __entry->serial, 934 __print_symbolic(__entry->reason, rxrpc_ack_names), 935 __entry->ack_serial, 936 __entry->first, 937 __entry->prev, 938 __entry->n_acks) 939 ); 940 941 TRACE_EVENT(rxrpc_rx_abort, 942 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 943 u32 abort_code), 944 945 TP_ARGS(call, serial, abort_code), 946 947 TP_STRUCT__entry( 948 __field(unsigned int, call) 949 __field(rxrpc_serial_t, serial) 950 __field(u32, abort_code) 951 ), 952 953 TP_fast_assign( 954 __entry->call = call->debug_id; 955 __entry->serial = serial; 956 __entry->abort_code = abort_code; 957 ), 958 959 TP_printk("c=%08x ABORT %08x ac=%d", 960 __entry->call, 961 __entry->serial, 962 __entry->abort_code) 963 ); 964 965 TRACE_EVENT(rxrpc_rx_conn_abort, 966 TP_PROTO(const struct rxrpc_connection *conn, const struct sk_buff *skb), 967 968 TP_ARGS(conn, skb), 969 970 TP_STRUCT__entry( 971 __field(unsigned int, conn) 972 __field(rxrpc_serial_t, serial) 973 __field(u32, abort_code) 974 ), 975 976 TP_fast_assign( 977 __entry->conn = conn->debug_id; 978 __entry->serial = rxrpc_skb(skb)->hdr.serial; 979 __entry->abort_code = skb->priority; 980 ), 981 982 TP_printk("C=%08x ABORT %08x ac=%d", 983 __entry->conn, 984 __entry->serial, 985 __entry->abort_code) 986 ); 987 988 TRACE_EVENT(rxrpc_rx_challenge, 989 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial, 990 u32 version, u32 nonce, u32 min_level), 991 992 TP_ARGS(conn, serial, version, nonce, min_level), 993 994 TP_STRUCT__entry( 995 __field(unsigned int, conn) 996 __field(rxrpc_serial_t, serial) 997 __field(u32, version) 998 __field(u32, nonce) 999 __field(u32, min_level) 1000 ), 1001 1002 TP_fast_assign( 1003 __entry->conn = conn->debug_id; 1004 __entry->serial = serial; 1005 __entry->version = version; 1006 __entry->nonce = nonce; 1007 __entry->min_level = min_level; 1008 ), 1009 1010 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x", 1011 __entry->conn, 1012 __entry->serial, 1013 __entry->version, 1014 __entry->nonce, 1015 __entry->min_level) 1016 ); 1017 1018 TRACE_EVENT(rxrpc_rx_response, 1019 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial, 1020 u32 version, u32 kvno, u32 ticket_len), 1021 1022 TP_ARGS(conn, serial, version, kvno, ticket_len), 1023 1024 TP_STRUCT__entry( 1025 __field(unsigned int, conn) 1026 __field(rxrpc_serial_t, serial) 1027 __field(u32, version) 1028 __field(u32, kvno) 1029 __field(u32, ticket_len) 1030 ), 1031 1032 TP_fast_assign( 1033 __entry->conn = conn->debug_id; 1034 __entry->serial = serial; 1035 __entry->version = version; 1036 __entry->kvno = kvno; 1037 __entry->ticket_len = ticket_len; 1038 ), 1039 1040 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x", 1041 __entry->conn, 1042 __entry->serial, 1043 __entry->version, 1044 __entry->kvno, 1045 __entry->ticket_len) 1046 ); 1047 1048 TRACE_EVENT(rxrpc_rx_rwind_change, 1049 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1050 u32 rwind, bool wake), 1051 1052 TP_ARGS(call, serial, rwind, wake), 1053 1054 TP_STRUCT__entry( 1055 __field(unsigned int, call) 1056 __field(rxrpc_serial_t, serial) 1057 __field(u32, rwind) 1058 __field(bool, wake) 1059 ), 1060 1061 TP_fast_assign( 1062 __entry->call = call->debug_id; 1063 __entry->serial = serial; 1064 __entry->rwind = rwind; 1065 __entry->wake = wake; 1066 ), 1067 1068 TP_printk("c=%08x %08x rw=%u%s", 1069 __entry->call, 1070 __entry->serial, 1071 __entry->rwind, 1072 __entry->wake ? " wake" : "") 1073 ); 1074 1075 TRACE_EVENT(rxrpc_tx_packet, 1076 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, 1077 enum rxrpc_tx_point where), 1078 1079 TP_ARGS(call_id, whdr, where), 1080 1081 TP_STRUCT__entry( 1082 __field(unsigned int, call) 1083 __field(enum rxrpc_tx_point, where) 1084 __field_struct(struct rxrpc_wire_header, whdr) 1085 ), 1086 1087 TP_fast_assign( 1088 __entry->call = call_id; 1089 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); 1090 __entry->where = where; 1091 ), 1092 1093 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", 1094 __entry->call, 1095 ntohl(__entry->whdr.epoch), 1096 ntohl(__entry->whdr.cid), 1097 ntohl(__entry->whdr.callNumber), 1098 ntohs(__entry->whdr.serviceId), 1099 ntohl(__entry->whdr.serial), 1100 ntohl(__entry->whdr.seq), 1101 __entry->whdr.type, __entry->whdr.flags, 1102 __entry->whdr.type <= 15 ? 1103 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", 1104 __print_symbolic(__entry->where, rxrpc_tx_points)) 1105 ); 1106 1107 TRACE_EVENT(rxrpc_tx_data, 1108 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 1109 rxrpc_serial_t serial, unsigned int flags, bool lose), 1110 1111 TP_ARGS(call, seq, serial, flags, lose), 1112 1113 TP_STRUCT__entry( 1114 __field(unsigned int, call) 1115 __field(rxrpc_seq_t, seq) 1116 __field(rxrpc_serial_t, serial) 1117 __field(u32, cid) 1118 __field(u32, call_id) 1119 __field(u16, flags) 1120 __field(bool, lose) 1121 ), 1122 1123 TP_fast_assign( 1124 __entry->call = call->debug_id; 1125 __entry->cid = call->cid; 1126 __entry->call_id = call->call_id; 1127 __entry->seq = seq; 1128 __entry->serial = serial; 1129 __entry->flags = flags; 1130 __entry->lose = lose; 1131 ), 1132 1133 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s", 1134 __entry->call, 1135 __entry->cid, 1136 __entry->call_id, 1137 __entry->serial, 1138 __entry->seq, 1139 __entry->flags & RXRPC_TXBUF_WIRE_FLAGS, 1140 __entry->flags & RXRPC_TXBUF_RESENT ? " *RETRANS*" : "", 1141 __entry->lose ? " *LOSE*" : "") 1142 ); 1143 1144 TRACE_EVENT(rxrpc_tx_ack, 1145 TP_PROTO(unsigned int call, rxrpc_serial_t serial, 1146 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 1147 u8 reason, u8 n_acks, u16 rwind), 1148 1149 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks, rwind), 1150 1151 TP_STRUCT__entry( 1152 __field(unsigned int, call) 1153 __field(rxrpc_serial_t, serial) 1154 __field(rxrpc_seq_t, ack_first) 1155 __field(rxrpc_serial_t, ack_serial) 1156 __field(u8, reason) 1157 __field(u8, n_acks) 1158 __field(u16, rwind) 1159 ), 1160 1161 TP_fast_assign( 1162 __entry->call = call; 1163 __entry->serial = serial; 1164 __entry->ack_first = ack_first; 1165 __entry->ack_serial = ack_serial; 1166 __entry->reason = reason; 1167 __entry->n_acks = n_acks; 1168 __entry->rwind = rwind; 1169 ), 1170 1171 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u rw=%u", 1172 __entry->call, 1173 __entry->serial, 1174 __print_symbolic(__entry->reason, rxrpc_ack_names), 1175 __entry->ack_first, 1176 __entry->ack_serial, 1177 __entry->n_acks, 1178 __entry->rwind) 1179 ); 1180 1181 TRACE_EVENT(rxrpc_receive, 1182 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 1183 rxrpc_serial_t serial, rxrpc_seq_t seq), 1184 1185 TP_ARGS(call, why, serial, seq), 1186 1187 TP_STRUCT__entry( 1188 __field(unsigned int, call) 1189 __field(enum rxrpc_receive_trace, why) 1190 __field(rxrpc_serial_t, serial) 1191 __field(rxrpc_seq_t, seq) 1192 __field(rxrpc_seq_t, window) 1193 __field(rxrpc_seq_t, wtop) 1194 ), 1195 1196 TP_fast_assign( 1197 __entry->call = call->debug_id; 1198 __entry->why = why; 1199 __entry->serial = serial; 1200 __entry->seq = seq; 1201 __entry->window = call->ackr_window; 1202 __entry->wtop = call->ackr_wtop; 1203 ), 1204 1205 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", 1206 __entry->call, 1207 __print_symbolic(__entry->why, rxrpc_receive_traces), 1208 __entry->serial, 1209 __entry->seq, 1210 __entry->window, 1211 __entry->wtop) 1212 ); 1213 1214 TRACE_EVENT(rxrpc_recvmsg, 1215 TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why, 1216 int ret), 1217 1218 TP_ARGS(call_debug_id, why, ret), 1219 1220 TP_STRUCT__entry( 1221 __field(unsigned int, call) 1222 __field(enum rxrpc_recvmsg_trace, why) 1223 __field(int, ret) 1224 ), 1225 1226 TP_fast_assign( 1227 __entry->call = call_debug_id; 1228 __entry->why = why; 1229 __entry->ret = ret; 1230 ), 1231 1232 TP_printk("c=%08x %s ret=%d", 1233 __entry->call, 1234 __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 1235 __entry->ret) 1236 ); 1237 1238 TRACE_EVENT(rxrpc_recvdata, 1239 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 1240 rxrpc_seq_t seq, unsigned int offset, unsigned int len, 1241 int ret), 1242 1243 TP_ARGS(call, why, seq, offset, len, ret), 1244 1245 TP_STRUCT__entry( 1246 __field(unsigned int, call) 1247 __field(enum rxrpc_recvmsg_trace, why) 1248 __field(rxrpc_seq_t, seq) 1249 __field(unsigned int, offset) 1250 __field(unsigned int, len) 1251 __field(int, ret) 1252 ), 1253 1254 TP_fast_assign( 1255 __entry->call = call ? call->debug_id : 0; 1256 __entry->why = why; 1257 __entry->seq = seq; 1258 __entry->offset = offset; 1259 __entry->len = len; 1260 __entry->ret = ret; 1261 ), 1262 1263 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", 1264 __entry->call, 1265 __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 1266 __entry->seq, 1267 __entry->offset, 1268 __entry->len, 1269 __entry->ret) 1270 ); 1271 1272 TRACE_EVENT(rxrpc_rtt_tx, 1273 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 1274 int slot, rxrpc_serial_t send_serial), 1275 1276 TP_ARGS(call, why, slot, send_serial), 1277 1278 TP_STRUCT__entry( 1279 __field(unsigned int, call) 1280 __field(enum rxrpc_rtt_tx_trace, why) 1281 __field(int, slot) 1282 __field(rxrpc_serial_t, send_serial) 1283 ), 1284 1285 TP_fast_assign( 1286 __entry->call = call->debug_id; 1287 __entry->why = why; 1288 __entry->slot = slot; 1289 __entry->send_serial = send_serial; 1290 ), 1291 1292 TP_printk("c=%08x [%d] %s sr=%08x", 1293 __entry->call, 1294 __entry->slot, 1295 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 1296 __entry->send_serial) 1297 ); 1298 1299 TRACE_EVENT(rxrpc_rtt_rx, 1300 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 1301 int slot, 1302 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 1303 u32 rtt, u32 rto), 1304 1305 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto), 1306 1307 TP_STRUCT__entry( 1308 __field(unsigned int, call) 1309 __field(enum rxrpc_rtt_rx_trace, why) 1310 __field(int, slot) 1311 __field(rxrpc_serial_t, send_serial) 1312 __field(rxrpc_serial_t, resp_serial) 1313 __field(u32, rtt) 1314 __field(u32, rto) 1315 ), 1316 1317 TP_fast_assign( 1318 __entry->call = call->debug_id; 1319 __entry->why = why; 1320 __entry->slot = slot; 1321 __entry->send_serial = send_serial; 1322 __entry->resp_serial = resp_serial; 1323 __entry->rtt = rtt; 1324 __entry->rto = rto; 1325 ), 1326 1327 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u", 1328 __entry->call, 1329 __entry->slot, 1330 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 1331 __entry->send_serial, 1332 __entry->resp_serial, 1333 __entry->rtt, 1334 __entry->rto) 1335 ); 1336 1337 TRACE_EVENT(rxrpc_timer_set, 1338 TP_PROTO(struct rxrpc_call *call, ktime_t delay, 1339 enum rxrpc_timer_trace why), 1340 1341 TP_ARGS(call, delay, why), 1342 1343 TP_STRUCT__entry( 1344 __field(unsigned int, call) 1345 __field(enum rxrpc_timer_trace, why) 1346 __field(ktime_t, delay) 1347 ), 1348 1349 TP_fast_assign( 1350 __entry->call = call->debug_id; 1351 __entry->why = why; 1352 __entry->delay = delay; 1353 ), 1354 1355 TP_printk("c=%08x %s to=%lld", 1356 __entry->call, 1357 __print_symbolic(__entry->why, rxrpc_timer_traces), 1358 ktime_to_us(__entry->delay)) 1359 ); 1360 1361 TRACE_EVENT(rxrpc_timer_exp, 1362 TP_PROTO(struct rxrpc_call *call, ktime_t delay, 1363 enum rxrpc_timer_trace why), 1364 1365 TP_ARGS(call, delay, why), 1366 1367 TP_STRUCT__entry( 1368 __field(unsigned int, call) 1369 __field(enum rxrpc_timer_trace, why) 1370 __field(ktime_t, delay) 1371 ), 1372 1373 TP_fast_assign( 1374 __entry->call = call->debug_id; 1375 __entry->why = why; 1376 __entry->delay = delay; 1377 ), 1378 1379 TP_printk("c=%08x %s to=%lld", 1380 __entry->call, 1381 __print_symbolic(__entry->why, rxrpc_timer_traces), 1382 ktime_to_us(__entry->delay)) 1383 ); 1384 1385 TRACE_EVENT(rxrpc_timer_can, 1386 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why), 1387 1388 TP_ARGS(call, why), 1389 1390 TP_STRUCT__entry( 1391 __field(unsigned int, call) 1392 __field(enum rxrpc_timer_trace, why) 1393 ), 1394 1395 TP_fast_assign( 1396 __entry->call = call->debug_id; 1397 __entry->why = why; 1398 ), 1399 1400 TP_printk("c=%08x %s", 1401 __entry->call, 1402 __print_symbolic(__entry->why, rxrpc_timer_traces)) 1403 ); 1404 1405 TRACE_EVENT(rxrpc_timer_restart, 1406 TP_PROTO(struct rxrpc_call *call, ktime_t delay, unsigned long delayj), 1407 1408 TP_ARGS(call, delay, delayj), 1409 1410 TP_STRUCT__entry( 1411 __field(unsigned int, call) 1412 __field(unsigned long, delayj) 1413 __field(ktime_t, delay) 1414 ), 1415 1416 TP_fast_assign( 1417 __entry->call = call->debug_id; 1418 __entry->delayj = delayj; 1419 __entry->delay = delay; 1420 ), 1421 1422 TP_printk("c=%08x to=%lld j=%ld", 1423 __entry->call, 1424 ktime_to_us(__entry->delay), 1425 __entry->delayj) 1426 ); 1427 1428 TRACE_EVENT(rxrpc_timer_expired, 1429 TP_PROTO(struct rxrpc_call *call), 1430 1431 TP_ARGS(call), 1432 1433 TP_STRUCT__entry( 1434 __field(unsigned int, call) 1435 ), 1436 1437 TP_fast_assign( 1438 __entry->call = call->debug_id; 1439 ), 1440 1441 TP_printk("c=%08x EXPIRED", 1442 __entry->call) 1443 ); 1444 1445 TRACE_EVENT(rxrpc_rx_lose, 1446 TP_PROTO(struct rxrpc_skb_priv *sp), 1447 1448 TP_ARGS(sp), 1449 1450 TP_STRUCT__entry( 1451 __field_struct(struct rxrpc_host_header, hdr) 1452 ), 1453 1454 TP_fast_assign( 1455 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 1456 ), 1457 1458 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 1459 __entry->hdr.epoch, __entry->hdr.cid, 1460 __entry->hdr.callNumber, __entry->hdr.serviceId, 1461 __entry->hdr.serial, __entry->hdr.seq, 1462 __entry->hdr.type, __entry->hdr.flags, 1463 __entry->hdr.type <= 15 ? 1464 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 1465 ); 1466 1467 TRACE_EVENT(rxrpc_propose_ack, 1468 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1469 u8 ack_reason, rxrpc_serial_t serial), 1470 1471 TP_ARGS(call, why, ack_reason, serial), 1472 1473 TP_STRUCT__entry( 1474 __field(unsigned int, call) 1475 __field(enum rxrpc_propose_ack_trace, why) 1476 __field(rxrpc_serial_t, serial) 1477 __field(u8, ack_reason) 1478 ), 1479 1480 TP_fast_assign( 1481 __entry->call = call->debug_id; 1482 __entry->why = why; 1483 __entry->serial = serial; 1484 __entry->ack_reason = ack_reason; 1485 ), 1486 1487 TP_printk("c=%08x %s %s r=%08x", 1488 __entry->call, 1489 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1490 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1491 __entry->serial) 1492 ); 1493 1494 TRACE_EVENT(rxrpc_send_ack, 1495 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1496 u8 ack_reason, rxrpc_serial_t serial), 1497 1498 TP_ARGS(call, why, ack_reason, serial), 1499 1500 TP_STRUCT__entry( 1501 __field(unsigned int, call) 1502 __field(enum rxrpc_propose_ack_trace, why) 1503 __field(rxrpc_serial_t, serial) 1504 __field(u8, ack_reason) 1505 ), 1506 1507 TP_fast_assign( 1508 __entry->call = call->debug_id; 1509 __entry->why = why; 1510 __entry->serial = serial; 1511 __entry->ack_reason = ack_reason; 1512 ), 1513 1514 TP_printk("c=%08x %s %s r=%08x", 1515 __entry->call, 1516 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1517 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1518 __entry->serial) 1519 ); 1520 1521 TRACE_EVENT(rxrpc_drop_ack, 1522 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1523 u8 ack_reason, rxrpc_serial_t serial, bool nobuf), 1524 1525 TP_ARGS(call, why, ack_reason, serial, nobuf), 1526 1527 TP_STRUCT__entry( 1528 __field(unsigned int, call) 1529 __field(enum rxrpc_propose_ack_trace, why) 1530 __field(rxrpc_serial_t, serial) 1531 __field(u8, ack_reason) 1532 __field(bool, nobuf) 1533 ), 1534 1535 TP_fast_assign( 1536 __entry->call = call->debug_id; 1537 __entry->why = why; 1538 __entry->serial = serial; 1539 __entry->ack_reason = ack_reason; 1540 __entry->nobuf = nobuf; 1541 ), 1542 1543 TP_printk("c=%08x %s %s r=%08x nbf=%u", 1544 __entry->call, 1545 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1546 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1547 __entry->serial, __entry->nobuf) 1548 ); 1549 1550 TRACE_EVENT(rxrpc_retransmit, 1551 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 1552 rxrpc_serial_t serial, ktime_t expiry), 1553 1554 TP_ARGS(call, seq, serial, expiry), 1555 1556 TP_STRUCT__entry( 1557 __field(unsigned int, call) 1558 __field(rxrpc_seq_t, seq) 1559 __field(rxrpc_serial_t, serial) 1560 __field(ktime_t, expiry) 1561 ), 1562 1563 TP_fast_assign( 1564 __entry->call = call->debug_id; 1565 __entry->seq = seq; 1566 __entry->serial = serial; 1567 __entry->expiry = expiry; 1568 ), 1569 1570 TP_printk("c=%08x q=%x r=%x xp=%lld", 1571 __entry->call, 1572 __entry->seq, 1573 __entry->serial, 1574 ktime_to_us(__entry->expiry)) 1575 ); 1576 1577 TRACE_EVENT(rxrpc_congest, 1578 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 1579 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), 1580 1581 TP_ARGS(call, summary, ack_serial, change), 1582 1583 TP_STRUCT__entry( 1584 __field(unsigned int, call) 1585 __field(enum rxrpc_congest_change, change) 1586 __field(rxrpc_seq_t, hard_ack) 1587 __field(rxrpc_seq_t, top) 1588 __field(rxrpc_seq_t, lowest_nak) 1589 __field(rxrpc_serial_t, ack_serial) 1590 __field_struct(struct rxrpc_ack_summary, sum) 1591 ), 1592 1593 TP_fast_assign( 1594 __entry->call = call->debug_id; 1595 __entry->change = change; 1596 __entry->hard_ack = call->acks_hard_ack; 1597 __entry->top = call->tx_top; 1598 __entry->lowest_nak = call->acks_lowest_nak; 1599 __entry->ack_serial = ack_serial; 1600 memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 1601 ), 1602 1603 TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nA=%u,%u+%u,%u b=%u u=%u d=%u l=%x%s%s%s", 1604 __entry->call, 1605 __entry->ack_serial, 1606 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 1607 __entry->hard_ack, 1608 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), 1609 __entry->sum.cwnd, 1610 __entry->sum.ssthresh, 1611 __entry->sum.nr_acks, __entry->sum.nr_retained_nacks, 1612 __entry->sum.nr_new_acks, 1613 __entry->sum.nr_new_nacks, 1614 __entry->top - __entry->hard_ack, 1615 __entry->sum.cumulative_acks, 1616 __entry->sum.dup_acks, 1617 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", 1618 __print_symbolic(__entry->change, rxrpc_congest_changes), 1619 __entry->sum.retrans_timeo ? " rTxTo" : "") 1620 ); 1621 1622 TRACE_EVENT(rxrpc_reset_cwnd, 1623 TP_PROTO(struct rxrpc_call *call, ktime_t now), 1624 1625 TP_ARGS(call, now), 1626 1627 TP_STRUCT__entry( 1628 __field(unsigned int, call) 1629 __field(enum rxrpc_congest_mode, mode) 1630 __field(unsigned short, cwnd) 1631 __field(unsigned short, extra) 1632 __field(rxrpc_seq_t, hard_ack) 1633 __field(rxrpc_seq_t, prepared) 1634 __field(ktime_t, since_last_tx) 1635 __field(bool, has_data) 1636 ), 1637 1638 TP_fast_assign( 1639 __entry->call = call->debug_id; 1640 __entry->mode = call->cong_mode; 1641 __entry->cwnd = call->cong_cwnd; 1642 __entry->extra = call->cong_extra; 1643 __entry->hard_ack = call->acks_hard_ack; 1644 __entry->prepared = call->tx_prepared - call->tx_bottom; 1645 __entry->since_last_tx = ktime_sub(now, call->tx_last_sent); 1646 __entry->has_data = !list_empty(&call->tx_sendmsg); 1647 ), 1648 1649 TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u", 1650 __entry->call, 1651 __entry->hard_ack, 1652 __print_symbolic(__entry->mode, rxrpc_congest_modes), 1653 __entry->cwnd, 1654 __entry->extra, 1655 __entry->prepared, 1656 ktime_to_ns(__entry->since_last_tx), 1657 __entry->has_data) 1658 ); 1659 1660 TRACE_EVENT(rxrpc_disconnect_call, 1661 TP_PROTO(struct rxrpc_call *call), 1662 1663 TP_ARGS(call), 1664 1665 TP_STRUCT__entry( 1666 __field(unsigned int, call) 1667 __field(u32, abort_code) 1668 ), 1669 1670 TP_fast_assign( 1671 __entry->call = call->debug_id; 1672 __entry->abort_code = call->abort_code; 1673 ), 1674 1675 TP_printk("c=%08x ab=%08x", 1676 __entry->call, 1677 __entry->abort_code) 1678 ); 1679 1680 TRACE_EVENT(rxrpc_improper_term, 1681 TP_PROTO(struct rxrpc_call *call), 1682 1683 TP_ARGS(call), 1684 1685 TP_STRUCT__entry( 1686 __field(unsigned int, call) 1687 __field(u32, abort_code) 1688 ), 1689 1690 TP_fast_assign( 1691 __entry->call = call->debug_id; 1692 __entry->abort_code = call->abort_code; 1693 ), 1694 1695 TP_printk("c=%08x ab=%08x", 1696 __entry->call, 1697 __entry->abort_code) 1698 ); 1699 1700 TRACE_EVENT(rxrpc_connect_call, 1701 TP_PROTO(struct rxrpc_call *call), 1702 1703 TP_ARGS(call), 1704 1705 TP_STRUCT__entry( 1706 __field(unsigned int, call) 1707 __field(unsigned long, user_call_ID) 1708 __field(u32, cid) 1709 __field(u32, call_id) 1710 __field_struct(struct sockaddr_rxrpc, srx) 1711 ), 1712 1713 TP_fast_assign( 1714 __entry->call = call->debug_id; 1715 __entry->user_call_ID = call->user_call_ID; 1716 __entry->cid = call->cid; 1717 __entry->call_id = call->call_id; 1718 __entry->srx = call->dest_srx; 1719 ), 1720 1721 TP_printk("c=%08x u=%p %08x:%08x dst=%pISp", 1722 __entry->call, 1723 (void *)__entry->user_call_ID, 1724 __entry->cid, 1725 __entry->call_id, 1726 &__entry->srx.transport) 1727 ); 1728 1729 TRACE_EVENT(rxrpc_resend, 1730 TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack), 1731 1732 TP_ARGS(call, ack), 1733 1734 TP_STRUCT__entry( 1735 __field(unsigned int, call) 1736 __field(rxrpc_seq_t, seq) 1737 __field(rxrpc_seq_t, transmitted) 1738 __field(rxrpc_serial_t, ack_serial) 1739 ), 1740 1741 TP_fast_assign( 1742 struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL; 1743 __entry->call = call->debug_id; 1744 __entry->seq = call->acks_hard_ack; 1745 __entry->transmitted = call->tx_transmitted; 1746 __entry->ack_serial = sp ? sp->hdr.serial : 0; 1747 ), 1748 1749 TP_printk("c=%08x r=%x q=%x tq=%x", 1750 __entry->call, 1751 __entry->ack_serial, 1752 __entry->seq, 1753 __entry->transmitted) 1754 ); 1755 1756 TRACE_EVENT(rxrpc_rx_icmp, 1757 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, 1758 struct sockaddr_rxrpc *srx), 1759 1760 TP_ARGS(peer, ee, srx), 1761 1762 TP_STRUCT__entry( 1763 __field(unsigned int, peer) 1764 __field_struct(struct sock_extended_err, ee) 1765 __field_struct(struct sockaddr_rxrpc, srx) 1766 ), 1767 1768 TP_fast_assign( 1769 __entry->peer = peer->debug_id; 1770 memcpy(&__entry->ee, ee, sizeof(__entry->ee)); 1771 memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 1772 ), 1773 1774 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", 1775 __entry->peer, 1776 __entry->ee.ee_origin, 1777 __entry->ee.ee_type, 1778 __entry->ee.ee_code, 1779 __entry->ee.ee_info, 1780 __entry->ee.ee_data, 1781 __entry->ee.ee_errno, 1782 &__entry->srx.transport) 1783 ); 1784 1785 TRACE_EVENT(rxrpc_tx_fail, 1786 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, 1787 enum rxrpc_tx_point where), 1788 1789 TP_ARGS(debug_id, serial, ret, where), 1790 1791 TP_STRUCT__entry( 1792 __field(unsigned int, debug_id) 1793 __field(rxrpc_serial_t, serial) 1794 __field(int, ret) 1795 __field(enum rxrpc_tx_point, where) 1796 ), 1797 1798 TP_fast_assign( 1799 __entry->debug_id = debug_id; 1800 __entry->serial = serial; 1801 __entry->ret = ret; 1802 __entry->where = where; 1803 ), 1804 1805 TP_printk("c=%08x r=%x ret=%d %s", 1806 __entry->debug_id, 1807 __entry->serial, 1808 __entry->ret, 1809 __print_symbolic(__entry->where, rxrpc_tx_points)) 1810 ); 1811 1812 TRACE_EVENT(rxrpc_call_reset, 1813 TP_PROTO(struct rxrpc_call *call), 1814 1815 TP_ARGS(call), 1816 1817 TP_STRUCT__entry( 1818 __field(unsigned int, debug_id) 1819 __field(u32, cid) 1820 __field(u32, call_id) 1821 __field(rxrpc_serial_t, call_serial) 1822 __field(rxrpc_serial_t, conn_serial) 1823 __field(rxrpc_seq_t, tx_seq) 1824 __field(rxrpc_seq_t, rx_seq) 1825 ), 1826 1827 TP_fast_assign( 1828 __entry->debug_id = call->debug_id; 1829 __entry->cid = call->cid; 1830 __entry->call_id = call->call_id; 1831 __entry->call_serial = call->rx_serial; 1832 __entry->conn_serial = call->conn->hi_serial; 1833 __entry->tx_seq = call->acks_hard_ack; 1834 __entry->rx_seq = call->rx_highest_seq; 1835 ), 1836 1837 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", 1838 __entry->debug_id, 1839 __entry->cid, __entry->call_id, 1840 __entry->call_serial, __entry->conn_serial, 1841 __entry->tx_seq, __entry->rx_seq) 1842 ); 1843 1844 TRACE_EVENT(rxrpc_notify_socket, 1845 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), 1846 1847 TP_ARGS(debug_id, serial), 1848 1849 TP_STRUCT__entry( 1850 __field(unsigned int, debug_id) 1851 __field(rxrpc_serial_t, serial) 1852 ), 1853 1854 TP_fast_assign( 1855 __entry->debug_id = debug_id; 1856 __entry->serial = serial; 1857 ), 1858 1859 TP_printk("c=%08x r=%08x", 1860 __entry->debug_id, 1861 __entry->serial) 1862 ); 1863 1864 TRACE_EVENT(rxrpc_rx_discard_ack, 1865 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, 1866 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first, 1867 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev), 1868 1869 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first, 1870 prev_pkt, call_ackr_prev), 1871 1872 TP_STRUCT__entry( 1873 __field(unsigned int, debug_id) 1874 __field(rxrpc_serial_t, serial) 1875 __field(rxrpc_seq_t, first_soft_ack) 1876 __field(rxrpc_seq_t, call_ackr_first) 1877 __field(rxrpc_seq_t, prev_pkt) 1878 __field(rxrpc_seq_t, call_ackr_prev) 1879 ), 1880 1881 TP_fast_assign( 1882 __entry->debug_id = debug_id; 1883 __entry->serial = serial; 1884 __entry->first_soft_ack = first_soft_ack; 1885 __entry->call_ackr_first = call_ackr_first; 1886 __entry->prev_pkt = prev_pkt; 1887 __entry->call_ackr_prev = call_ackr_prev; 1888 ), 1889 1890 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x", 1891 __entry->debug_id, 1892 __entry->serial, 1893 __entry->first_soft_ack, 1894 __entry->call_ackr_first, 1895 __entry->prev_pkt, 1896 __entry->call_ackr_prev) 1897 ); 1898 1899 TRACE_EVENT(rxrpc_req_ack, 1900 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq, 1901 enum rxrpc_req_ack_trace why), 1902 1903 TP_ARGS(call_debug_id, seq, why), 1904 1905 TP_STRUCT__entry( 1906 __field(unsigned int, call_debug_id) 1907 __field(rxrpc_seq_t, seq) 1908 __field(enum rxrpc_req_ack_trace, why) 1909 ), 1910 1911 TP_fast_assign( 1912 __entry->call_debug_id = call_debug_id; 1913 __entry->seq = seq; 1914 __entry->why = why; 1915 ), 1916 1917 TP_printk("c=%08x q=%08x REQ-%s", 1918 __entry->call_debug_id, 1919 __entry->seq, 1920 __print_symbolic(__entry->why, rxrpc_req_ack_traces)) 1921 ); 1922 1923 TRACE_EVENT(rxrpc_txbuf, 1924 TP_PROTO(unsigned int debug_id, 1925 unsigned int call_debug_id, rxrpc_seq_t seq, 1926 int ref, enum rxrpc_txbuf_trace what), 1927 1928 TP_ARGS(debug_id, call_debug_id, seq, ref, what), 1929 1930 TP_STRUCT__entry( 1931 __field(unsigned int, debug_id) 1932 __field(unsigned int, call_debug_id) 1933 __field(rxrpc_seq_t, seq) 1934 __field(int, ref) 1935 __field(enum rxrpc_txbuf_trace, what) 1936 ), 1937 1938 TP_fast_assign( 1939 __entry->debug_id = debug_id; 1940 __entry->call_debug_id = call_debug_id; 1941 __entry->seq = seq; 1942 __entry->ref = ref; 1943 __entry->what = what; 1944 ), 1945 1946 TP_printk("B=%08x c=%08x q=%08x %s r=%d", 1947 __entry->debug_id, 1948 __entry->call_debug_id, 1949 __entry->seq, 1950 __print_symbolic(__entry->what, rxrpc_txbuf_traces), 1951 __entry->ref) 1952 ); 1953 1954 TRACE_EVENT(rxrpc_poke_call, 1955 TP_PROTO(struct rxrpc_call *call, bool busy, 1956 enum rxrpc_call_poke_trace what), 1957 1958 TP_ARGS(call, busy, what), 1959 1960 TP_STRUCT__entry( 1961 __field(unsigned int, call_debug_id) 1962 __field(bool, busy) 1963 __field(enum rxrpc_call_poke_trace, what) 1964 ), 1965 1966 TP_fast_assign( 1967 __entry->call_debug_id = call->debug_id; 1968 __entry->busy = busy; 1969 __entry->what = what; 1970 ), 1971 1972 TP_printk("c=%08x %s%s", 1973 __entry->call_debug_id, 1974 __print_symbolic(__entry->what, rxrpc_call_poke_traces), 1975 __entry->busy ? "!" : "") 1976 ); 1977 1978 TRACE_EVENT(rxrpc_call_poked, 1979 TP_PROTO(struct rxrpc_call *call), 1980 1981 TP_ARGS(call), 1982 1983 TP_STRUCT__entry( 1984 __field(unsigned int, call_debug_id) 1985 ), 1986 1987 TP_fast_assign( 1988 __entry->call_debug_id = call->debug_id; 1989 ), 1990 1991 TP_printk("c=%08x", 1992 __entry->call_debug_id) 1993 ); 1994 1995 TRACE_EVENT(rxrpc_sack, 1996 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 1997 unsigned int sack, enum rxrpc_sack_trace what), 1998 1999 TP_ARGS(call, seq, sack, what), 2000 2001 TP_STRUCT__entry( 2002 __field(unsigned int, call_debug_id) 2003 __field(rxrpc_seq_t, seq) 2004 __field(unsigned int, sack) 2005 __field(enum rxrpc_sack_trace, what) 2006 ), 2007 2008 TP_fast_assign( 2009 __entry->call_debug_id = call->debug_id; 2010 __entry->seq = seq; 2011 __entry->sack = sack; 2012 __entry->what = what; 2013 ), 2014 2015 TP_printk("c=%08x q=%08x %s k=%x", 2016 __entry->call_debug_id, 2017 __entry->seq, 2018 __print_symbolic(__entry->what, rxrpc_sack_traces), 2019 __entry->sack) 2020 ); 2021 2022 #undef EM 2023 #undef E_ 2024 2025 #endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */ 2026 #endif /* _TRACE_RXRPC_H */ 2027 2028 /* This part must be outside protection */ 2029 #include <trace/define_trace.h> 2030