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 EM(afs_abort_unsupported_sec_class, "afs-unsup-sec-class") \ 29 /* rxperf errors */ \ 30 EM(rxperf_abort_general_error, "rxperf-error") \ 31 EM(rxperf_abort_oom, "rxperf-oom") \ 32 EM(rxperf_abort_op_not_supported, "rxperf-op-notsupp") \ 33 EM(rxperf_abort_unmarshal_error, "rxperf-unmarshal") \ 34 /* RxKAD security errors */ \ 35 EM(rxkad_abort_1_short_check, "rxkad1-short-check") \ 36 EM(rxkad_abort_1_short_data, "rxkad1-short-data") \ 37 EM(rxkad_abort_1_short_encdata, "rxkad1-short-encdata") \ 38 EM(rxkad_abort_1_short_header, "rxkad1-short-hdr") \ 39 EM(rxkad_abort_2_short_check, "rxkad2-short-check") \ 40 EM(rxkad_abort_2_short_data, "rxkad2-short-data") \ 41 EM(rxkad_abort_2_short_header, "rxkad2-short-hdr") \ 42 EM(rxkad_abort_2_short_len, "rxkad2-short-len") \ 43 EM(rxkad_abort_bad_checksum, "rxkad2-bad-cksum") \ 44 EM(rxkad_abort_chall_key_expired, "rxkad-chall-key-exp") \ 45 EM(rxkad_abort_chall_level, "rxkad-chall-level") \ 46 EM(rxkad_abort_chall_no_key, "rxkad-chall-nokey") \ 47 EM(rxkad_abort_chall_short, "rxkad-chall-short") \ 48 EM(rxkad_abort_chall_version, "rxkad-chall-version") \ 49 EM(rxkad_abort_resp_bad_callid, "rxkad-resp-bad-callid") \ 50 EM(rxkad_abort_resp_bad_checksum, "rxkad-resp-bad-cksum") \ 51 EM(rxkad_abort_resp_bad_param, "rxkad-resp-bad-param") \ 52 EM(rxkad_abort_resp_call_ctr, "rxkad-resp-call-ctr") \ 53 EM(rxkad_abort_resp_call_state, "rxkad-resp-call-state") \ 54 EM(rxkad_abort_resp_key_expired, "rxkad-resp-key-exp") \ 55 EM(rxkad_abort_resp_key_rejected, "rxkad-resp-key-rej") \ 56 EM(rxkad_abort_resp_level, "rxkad-resp-level") \ 57 EM(rxkad_abort_resp_nokey, "rxkad-resp-nokey") \ 58 EM(rxkad_abort_resp_ooseq, "rxkad-resp-ooseq") \ 59 EM(rxkad_abort_resp_short, "rxkad-resp-short") \ 60 EM(rxkad_abort_resp_short_tkt, "rxkad-resp-short-tkt") \ 61 EM(rxkad_abort_resp_tkt_aname, "rxkad-resp-tk-aname") \ 62 EM(rxkad_abort_resp_tkt_expired, "rxkad-resp-tk-exp") \ 63 EM(rxkad_abort_resp_tkt_future, "rxkad-resp-tk-future") \ 64 EM(rxkad_abort_resp_tkt_inst, "rxkad-resp-tk-inst") \ 65 EM(rxkad_abort_resp_tkt_len, "rxkad-resp-tk-len") \ 66 EM(rxkad_abort_resp_tkt_realm, "rxkad-resp-tk-realm") \ 67 EM(rxkad_abort_resp_tkt_short, "rxkad-resp-tk-short") \ 68 EM(rxkad_abort_resp_tkt_sinst, "rxkad-resp-tk-sinst") \ 69 EM(rxkad_abort_resp_tkt_sname, "rxkad-resp-tk-sname") \ 70 EM(rxkad_abort_resp_unknown_tkt, "rxkad-resp-unknown-tkt") \ 71 EM(rxkad_abort_resp_version, "rxkad-resp-version") \ 72 /* RxGK security errors */ \ 73 EM(rxgk_abort_1_verify_mic_eproto, "rxgk1-vfy-mic-eproto") \ 74 EM(rxgk_abort_2_decrypt_eproto, "rxgk2-dec-eproto") \ 75 EM(rxgk_abort_2_short_data, "rxgk2-short-data") \ 76 EM(rxgk_abort_2_short_encdata, "rxgk2-short-encdata") \ 77 EM(rxgk_abort_2_short_header, "rxgk2-short-hdr") \ 78 EM(rxgk_abort_bad_key_number, "rxgk-bad-key-num") \ 79 EM(rxgk_abort_chall_key_expired, "rxgk-chall-key-exp") \ 80 EM(rxgk_abort_chall_no_key, "rxgk-chall-nokey") \ 81 EM(rxgk_abort_chall_short, "rxgk-chall-short") \ 82 EM(rxgk_abort_resp_auth_dec, "rxgk-resp-auth-dec") \ 83 EM(rxgk_abort_resp_bad_callid, "rxgk-resp-bad-callid") \ 84 EM(rxgk_abort_resp_bad_nonce, "rxgk-resp-bad-nonce") \ 85 EM(rxgk_abort_resp_bad_param, "rxgk-resp-bad-param") \ 86 EM(rxgk_abort_resp_call_ctr, "rxgk-resp-call-ctr") \ 87 EM(rxgk_abort_resp_call_state, "rxgk-resp-call-state") \ 88 EM(rxgk_abort_resp_internal_error, "rxgk-resp-int-error") \ 89 EM(rxgk_abort_resp_nopkg, "rxgk-resp-nopkg") \ 90 EM(rxgk_abort_resp_short_applen, "rxgk-resp-short-applen") \ 91 EM(rxgk_abort_resp_short_auth, "rxgk-resp-short-auth") \ 92 EM(rxgk_abort_resp_short_call_list, "rxgk-resp-short-callls") \ 93 EM(rxgk_abort_resp_short_packet, "rxgk-resp-short-packet") \ 94 EM(rxgk_abort_resp_short_yfs_klen, "rxgk-resp-short-yfs-klen") \ 95 EM(rxgk_abort_resp_short_yfs_key, "rxgk-resp-short-yfs-key") \ 96 EM(rxgk_abort_resp_short_yfs_tkt, "rxgk-resp-short-yfs-tkt") \ 97 EM(rxgk_abort_resp_tok_dec, "rxgk-resp-tok-dec") \ 98 EM(rxgk_abort_resp_tok_internal_error, "rxgk-resp-tok-int-err") \ 99 EM(rxgk_abort_resp_tok_keyerr, "rxgk-resp-tok-keyerr") \ 100 EM(rxgk_abort_resp_tok_nokey, "rxgk-resp-tok-nokey") \ 101 EM(rxgk_abort_resp_tok_nopkg, "rxgk-resp-tok-nopkg") \ 102 EM(rxgk_abort_resp_tok_short, "rxgk-resp-tok-short") \ 103 EM(rxgk_abort_resp_xdr_align, "rxgk-resp-xdr-align") \ 104 /* rxrpc errors */ \ 105 EM(rxrpc_abort_call_improper_term, "call-improper-term") \ 106 EM(rxrpc_abort_call_reset, "call-reset") \ 107 EM(rxrpc_abort_call_sendmsg, "call-sendmsg") \ 108 EM(rxrpc_abort_call_sock_release, "call-sock-rel") \ 109 EM(rxrpc_abort_call_sock_release_tba, "call-sock-rel-tba") \ 110 EM(rxrpc_abort_call_timeout, "call-timeout") \ 111 EM(rxrpc_abort_no_service_key, "no-serv-key") \ 112 EM(rxrpc_abort_nomem, "nomem") \ 113 EM(rxrpc_abort_response_sendmsg, "resp-sendmsg") \ 114 EM(rxrpc_abort_service_not_offered, "serv-not-offered") \ 115 EM(rxrpc_abort_shut_down, "shut-down") \ 116 EM(rxrpc_abort_unsupported_security, "unsup-sec") \ 117 EM(rxrpc_badmsg_bad_abort, "bad-abort") \ 118 EM(rxrpc_badmsg_bad_jumbo, "bad-jumbo") \ 119 EM(rxrpc_badmsg_short_ack, "short-ack") \ 120 EM(rxrpc_badmsg_short_ack_trailer, "short-ack-trailer") \ 121 EM(rxrpc_badmsg_short_hdr, "short-hdr") \ 122 EM(rxrpc_badmsg_unsupported_packet, "unsup-pkt") \ 123 EM(rxrpc_badmsg_zero_call, "zero-call") \ 124 EM(rxrpc_badmsg_zero_seq, "zero-seq") \ 125 EM(rxrpc_badmsg_zero_service, "zero-service") \ 126 EM(rxrpc_eproto_ackr_outside_window, "ackr-out-win") \ 127 EM(rxrpc_eproto_ackr_sack_overflow, "ackr-sack-over") \ 128 EM(rxrpc_eproto_ackr_short_sack, "ackr-short-sack") \ 129 EM(rxrpc_eproto_ackr_zero, "ackr-zero") \ 130 EM(rxrpc_eproto_bad_upgrade, "bad-upgrade") \ 131 EM(rxrpc_eproto_data_after_last, "data-after-last") \ 132 EM(rxrpc_eproto_different_last, "diff-last") \ 133 EM(rxrpc_eproto_early_reply, "early-reply") \ 134 EM(rxrpc_eproto_improper_term, "improper-term") \ 135 EM(rxrpc_eproto_no_client_call, "no-cl-call") \ 136 EM(rxrpc_eproto_no_client_conn, "no-cl-conn") \ 137 EM(rxrpc_eproto_no_service_call, "no-sv-call") \ 138 EM(rxrpc_eproto_reupgrade, "re-upgrade") \ 139 EM(rxrpc_eproto_rxnull_challenge, "rxnull-chall") \ 140 EM(rxrpc_eproto_rxnull_response, "rxnull-resp") \ 141 EM(rxrpc_eproto_tx_rot_last, "tx-rot-last") \ 142 EM(rxrpc_eproto_unexpected_ack, "unex-ack") \ 143 EM(rxrpc_eproto_unexpected_ackall, "unex-ackall") \ 144 EM(rxrpc_eproto_unexpected_implicit_end, "unex-impl-end") \ 145 EM(rxrpc_eproto_unexpected_reply, "unex-reply") \ 146 EM(rxrpc_eproto_wrong_security, "wrong-sec") \ 147 EM(rxrpc_recvmsg_excess_data, "recvmsg-excess") \ 148 EM(rxrpc_recvmsg_short_data, "recvmsg-short") \ 149 E_(rxrpc_sendmsg_late_send, "sendmsg-late") 150 151 #define rxrpc_call_poke_traces \ 152 EM(rxrpc_call_poke_abort, "Abort") \ 153 EM(rxrpc_call_poke_complete, "Compl") \ 154 EM(rxrpc_call_poke_conn_abort, "Conn-abort") \ 155 EM(rxrpc_call_poke_error, "Error") \ 156 EM(rxrpc_call_poke_idle, "Idle") \ 157 EM(rxrpc_call_poke_rx_packet, "Rx-packet") \ 158 EM(rxrpc_call_poke_set_timeout, "Set-timo") \ 159 EM(rxrpc_call_poke_start, "Start") \ 160 EM(rxrpc_call_poke_timer, "Timer") \ 161 E_(rxrpc_call_poke_timer_now, "Timer-now") 162 163 #define rxrpc_skb_traces \ 164 EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \ 165 EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \ 166 EM(rxrpc_skb_get_call_rx, "GET call-rx ") \ 167 EM(rxrpc_skb_get_conn_secured, "GET conn-secd") \ 168 EM(rxrpc_skb_get_conn_work, "GET conn-work") \ 169 EM(rxrpc_skb_get_local_work, "GET locl-work") \ 170 EM(rxrpc_skb_get_post_oob, "GET post-oob ") \ 171 EM(rxrpc_skb_get_reject_work, "GET rej-work ") \ 172 EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \ 173 EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \ 174 EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \ 175 EM(rxrpc_skb_new_error_report, "NEW error-rpt") \ 176 EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \ 177 EM(rxrpc_skb_new_response_rxgk, "NEW resp-rxgk") \ 178 EM(rxrpc_skb_new_response_rxkad, "NEW resp-rxkd") \ 179 EM(rxrpc_skb_new_unshared, "NEW unshared ") \ 180 EM(rxrpc_skb_put_call_rx, "PUT call-rx ") \ 181 EM(rxrpc_skb_put_challenge, "PUT challenge") \ 182 EM(rxrpc_skb_put_conn_secured, "PUT conn-secd") \ 183 EM(rxrpc_skb_put_conn_work, "PUT conn-work") \ 184 EM(rxrpc_skb_put_error_report, "PUT error-rep") \ 185 EM(rxrpc_skb_put_input, "PUT input ") \ 186 EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \ 187 EM(rxrpc_skb_put_oob, "PUT oob ") \ 188 EM(rxrpc_skb_put_purge, "PUT purge ") \ 189 EM(rxrpc_skb_put_purge_oob, "PUT purge-oob") \ 190 EM(rxrpc_skb_put_response, "PUT response ") \ 191 EM(rxrpc_skb_put_rotate, "PUT rotate ") \ 192 EM(rxrpc_skb_put_unknown, "PUT unknown ") \ 193 EM(rxrpc_skb_see_conn_work, "SEE conn-work") \ 194 EM(rxrpc_skb_see_oob_challenge, "SEE oob-chall") \ 195 EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \ 196 EM(rxrpc_skb_see_recvmsg_oob, "SEE recvm-oob") \ 197 EM(rxrpc_skb_see_reject, "SEE reject ") \ 198 EM(rxrpc_skb_see_rotate, "SEE rotate ") \ 199 E_(rxrpc_skb_see_version, "SEE version ") 200 201 #define rxrpc_local_traces \ 202 EM(rxrpc_local_free, "FREE ") \ 203 EM(rxrpc_local_get_call, "GET call ") \ 204 EM(rxrpc_local_get_client_conn, "GET conn-cln") \ 205 EM(rxrpc_local_get_for_use, "GET for-use ") \ 206 EM(rxrpc_local_get_peer, "GET peer ") \ 207 EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \ 208 EM(rxrpc_local_new, "NEW ") \ 209 EM(rxrpc_local_put_bind, "PUT bind ") \ 210 EM(rxrpc_local_put_call, "PUT call ") \ 211 EM(rxrpc_local_put_for_use, "PUT for-use ") \ 212 EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \ 213 EM(rxrpc_local_put_peer, "PUT peer ") \ 214 EM(rxrpc_local_put_prealloc_peer, "PUT peer-pre") \ 215 EM(rxrpc_local_put_release_sock, "PUT rel-sock") \ 216 EM(rxrpc_local_stop, "STOP ") \ 217 EM(rxrpc_local_stopped, "STOPPED ") \ 218 EM(rxrpc_local_unuse_bind, "UNU bind ") \ 219 EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \ 220 EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \ 221 EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \ 222 EM(rxrpc_local_use_conn_work, "USE conn-wrk") \ 223 EM(rxrpc_local_use_lookup, "USE lookup ") \ 224 E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa") 225 226 #define rxrpc_peer_traces \ 227 EM(rxrpc_peer_free, "FREE ") \ 228 EM(rxrpc_peer_get_accept, "GET accept ") \ 229 EM(rxrpc_peer_get_application, "GET app ") \ 230 EM(rxrpc_peer_get_bundle, "GET bundle ") \ 231 EM(rxrpc_peer_get_call, "GET call ") \ 232 EM(rxrpc_peer_get_client_conn, "GET cln-conn") \ 233 EM(rxrpc_peer_get_input, "GET input ") \ 234 EM(rxrpc_peer_get_input_error, "GET inpt-err") \ 235 EM(rxrpc_peer_get_keepalive, "GET keepaliv") \ 236 EM(rxrpc_peer_get_lookup_client, "GET look-cln") \ 237 EM(rxrpc_peer_get_service_conn, "GET srv-conn") \ 238 EM(rxrpc_peer_new_client, "NEW client ") \ 239 EM(rxrpc_peer_new_prealloc, "NEW prealloc") \ 240 EM(rxrpc_peer_put_application, "PUT app ") \ 241 EM(rxrpc_peer_put_bundle, "PUT bundle ") \ 242 EM(rxrpc_peer_put_call, "PUT call ") \ 243 EM(rxrpc_peer_put_conn, "PUT conn ") \ 244 EM(rxrpc_peer_put_input, "PUT input ") \ 245 EM(rxrpc_peer_put_input_error, "PUT inpt-err") \ 246 E_(rxrpc_peer_put_keepalive, "PUT keepaliv") 247 248 #define rxrpc_bundle_traces \ 249 EM(rxrpc_bundle_free, "FREE ") \ 250 EM(rxrpc_bundle_get_client_call, "GET clt-call") \ 251 EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \ 252 EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \ 253 EM(rxrpc_bundle_put_call, "PUT call ") \ 254 EM(rxrpc_bundle_put_conn, "PUT conn ") \ 255 EM(rxrpc_bundle_put_discard, "PUT discard ") \ 256 E_(rxrpc_bundle_new, "NEW ") 257 258 #define rxrpc_conn_traces \ 259 EM(rxrpc_conn_free, "FREE ") \ 260 EM(rxrpc_conn_get_activate_call, "GET act-call") \ 261 EM(rxrpc_conn_get_call_input, "GET inp-call") \ 262 EM(rxrpc_conn_get_challenge_input, "GET inp-chal") \ 263 EM(rxrpc_conn_get_conn_input, "GET inp-conn") \ 264 EM(rxrpc_conn_get_idle, "GET idle ") \ 265 EM(rxrpc_conn_get_poke_abort, "GET pk-abort") \ 266 EM(rxrpc_conn_get_poke_response, "GET response") \ 267 EM(rxrpc_conn_get_poke_secured, "GET secured ") \ 268 EM(rxrpc_conn_get_poke_timer, "GET poke ") \ 269 EM(rxrpc_conn_get_service_conn, "GET svc-conn") \ 270 EM(rxrpc_conn_new_client, "NEW client ") \ 271 EM(rxrpc_conn_new_service, "NEW service ") \ 272 EM(rxrpc_conn_put_call, "PUT call ") \ 273 EM(rxrpc_conn_put_call_input, "PUT inp-call") \ 274 EM(rxrpc_conn_put_challenge_input, "PUT inp-chal") \ 275 EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \ 276 EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \ 277 EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \ 278 EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \ 279 EM(rxrpc_conn_put_oob, "PUT oob ") \ 280 EM(rxrpc_conn_put_poke, "PUT poke ") \ 281 EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \ 282 EM(rxrpc_conn_put_unbundle, "PUT unbundle") \ 283 EM(rxrpc_conn_put_unidle, "PUT unidle ") \ 284 EM(rxrpc_conn_put_work, "PUT work ") \ 285 EM(rxrpc_conn_queue_challenge, "QUE chall ") \ 286 EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \ 287 EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \ 288 EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \ 289 EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \ 290 E_(rxrpc_conn_see_work, "SEE work ") 291 292 #define rxrpc_client_traces \ 293 EM(rxrpc_client_activate_chans, "Activa") \ 294 EM(rxrpc_client_alloc, "Alloc ") \ 295 EM(rxrpc_client_chan_activate, "ChActv") \ 296 EM(rxrpc_client_chan_disconnect, "ChDisc") \ 297 EM(rxrpc_client_chan_pass, "ChPass") \ 298 EM(rxrpc_client_cleanup, "Clean ") \ 299 EM(rxrpc_client_discard, "Discar") \ 300 EM(rxrpc_client_exposed, "Expose") \ 301 EM(rxrpc_client_replace, "Replac") \ 302 EM(rxrpc_client_queue_new_call, "Q-Call") \ 303 EM(rxrpc_client_to_active, "->Actv") \ 304 E_(rxrpc_client_to_idle, "->Idle") 305 306 #define rxrpc_call_traces \ 307 EM(rxrpc_call_get_io_thread, "GET iothread") \ 308 EM(rxrpc_call_get_input, "GET input ") \ 309 EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \ 310 EM(rxrpc_call_get_notify_socket, "GET notify ") \ 311 EM(rxrpc_call_get_poke, "GET poke ") \ 312 EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \ 313 EM(rxrpc_call_get_release_sock, "GET rel-sock") \ 314 EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \ 315 EM(rxrpc_call_get_userid, "GET user-id ") \ 316 EM(rxrpc_call_new_client, "NEW client ") \ 317 EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \ 318 EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \ 319 EM(rxrpc_call_put_discard_error, "PUT disc-err") \ 320 EM(rxrpc_call_put_io_thread, "PUT iothread") \ 321 EM(rxrpc_call_put_input, "PUT input ") \ 322 EM(rxrpc_call_put_kernel, "PUT kernel ") \ 323 EM(rxrpc_call_put_poke, "PUT poke ") \ 324 EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \ 325 EM(rxrpc_call_put_release_sock, "PUT rls-sock") \ 326 EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \ 327 EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \ 328 EM(rxrpc_call_put_unnotify, "PUT unnotify") \ 329 EM(rxrpc_call_put_userid_exists, "PUT u-exists") \ 330 EM(rxrpc_call_put_userid, "PUT user-id ") \ 331 EM(rxrpc_call_see_accept, "SEE accept ") \ 332 EM(rxrpc_call_see_activate_client, "SEE act-clnt") \ 333 EM(rxrpc_call_see_connect_failed, "SEE con-fail") \ 334 EM(rxrpc_call_see_connected, "SEE connect ") \ 335 EM(rxrpc_call_see_conn_abort, "SEE conn-abt") \ 336 EM(rxrpc_call_see_disconnected, "SEE disconn ") \ 337 EM(rxrpc_call_see_distribute_error, "SEE dist-err") \ 338 EM(rxrpc_call_see_input, "SEE input ") \ 339 EM(rxrpc_call_see_release, "SEE release ") \ 340 EM(rxrpc_call_see_userid_exists, "SEE u-exists") \ 341 EM(rxrpc_call_see_waiting_call, "SEE q-conn ") \ 342 E_(rxrpc_call_see_zap, "SEE zap ") 343 344 #define rxrpc_txqueue_traces \ 345 EM(rxrpc_txqueue_await_reply, "AWR") \ 346 EM(rxrpc_txqueue_end, "END") \ 347 EM(rxrpc_txqueue_queue, "QUE") \ 348 EM(rxrpc_txqueue_queue_last, "QLS") \ 349 EM(rxrpc_txqueue_rotate, "ROT") \ 350 EM(rxrpc_txqueue_rotate_last, "RLS") \ 351 E_(rxrpc_txqueue_wait, "WAI") 352 353 #define rxrpc_txdata_traces \ 354 EM(rxrpc_txdata_inject_loss, " *INJ-LOSS*") \ 355 EM(rxrpc_txdata_new_data, " ") \ 356 EM(rxrpc_txdata_retransmit, " *RETRANS*") \ 357 EM(rxrpc_txdata_tlp_new_data, " *TLP-NEW*") \ 358 E_(rxrpc_txdata_tlp_retransmit, " *TLP-RETRANS*") 359 360 #define rxrpc_receive_traces \ 361 EM(rxrpc_receive_end, "END") \ 362 EM(rxrpc_receive_front, "FRN") \ 363 EM(rxrpc_receive_incoming, "INC") \ 364 EM(rxrpc_receive_queue, "QUE") \ 365 EM(rxrpc_receive_queue_last, "QLS") \ 366 EM(rxrpc_receive_queue_oos, "QUO") \ 367 EM(rxrpc_receive_queue_oos_last, "QOL") \ 368 EM(rxrpc_receive_oos, "OOS") \ 369 EM(rxrpc_receive_oos_last, "OSL") \ 370 EM(rxrpc_receive_rotate, "ROT") \ 371 E_(rxrpc_receive_rotate_last, "RLS") 372 373 #define rxrpc_recvmsg_traces \ 374 EM(rxrpc_recvmsg_cont, "CONT") \ 375 EM(rxrpc_recvmsg_data_return, "DATA") \ 376 EM(rxrpc_recvmsg_dequeue, "DEQU") \ 377 EM(rxrpc_recvmsg_enter, "ENTR") \ 378 EM(rxrpc_recvmsg_full, "FULL") \ 379 EM(rxrpc_recvmsg_hole, "HOLE") \ 380 EM(rxrpc_recvmsg_next, "NEXT") \ 381 EM(rxrpc_recvmsg_oobq, "OOBQ") \ 382 EM(rxrpc_recvmsg_requeue, "REQU") \ 383 EM(rxrpc_recvmsg_return, "RETN") \ 384 EM(rxrpc_recvmsg_terminal, "TERM") \ 385 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ 386 EM(rxrpc_recvmsg_unqueue, "UNQU") \ 387 E_(rxrpc_recvmsg_wait, "WAIT") 388 389 #define rxrpc_rtt_tx_traces \ 390 EM(rxrpc_rtt_tx_cancel, "CNCE") \ 391 EM(rxrpc_rtt_tx_data, "DATA") \ 392 EM(rxrpc_rtt_tx_no_slot, "FULL") \ 393 E_(rxrpc_rtt_tx_ping, "PING") 394 395 #define rxrpc_rtt_rx_traces \ 396 EM(rxrpc_rtt_rx_data_ack, "DACK") \ 397 EM(rxrpc_rtt_rx_obsolete, "OBSL") \ 398 EM(rxrpc_rtt_rx_lost, "LOST") \ 399 E_(rxrpc_rtt_rx_ping_response, "PONG") 400 401 #define rxrpc_timer_traces \ 402 EM(rxrpc_timer_trace_delayed_ack, "DelayAck ") \ 403 EM(rxrpc_timer_trace_expect_rx, "ExpectRx ") \ 404 EM(rxrpc_timer_trace_hard, "HardLimit") \ 405 EM(rxrpc_timer_trace_idle, "IdleLimit") \ 406 EM(rxrpc_timer_trace_keepalive, "KeepAlive") \ 407 EM(rxrpc_timer_trace_ping, "DelayPing") \ 408 EM(rxrpc_timer_trace_rack_off, "RACK-OFF ") \ 409 EM(rxrpc_timer_trace_rack_zwp, "RACK-ZWP ") \ 410 EM(rxrpc_timer_trace_rack_reo, "RACK-Reo ") \ 411 EM(rxrpc_timer_trace_rack_tlp_pto, "TLP-PTO ") \ 412 E_(rxrpc_timer_trace_rack_rto, "RTO ") 413 414 #define rxrpc_propose_ack_traces \ 415 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 416 EM(rxrpc_propose_ack_delayed_ack, "DlydAck") \ 417 EM(rxrpc_propose_ack_input_data, "DataIn ") \ 418 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \ 419 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ 420 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 421 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 422 EM(rxrpc_propose_ack_ping_for_0_retrans, "0-Retrn") \ 423 EM(rxrpc_propose_ack_ping_for_mtu_probe, "MTUProb") \ 424 EM(rxrpc_propose_ack_ping_for_old_rtt, "OldRtt ") \ 425 EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 426 EM(rxrpc_propose_ack_ping_for_rtt, "Rtt ") \ 427 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ 428 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ 429 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ 430 EM(rxrpc_propose_ack_retransmit, "Retrans") \ 431 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ 432 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ 433 EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \ 434 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 435 436 #define rxrpc_ca_states \ 437 EM(RXRPC_CA_CONGEST_AVOIDANCE, "CongAvoid") \ 438 EM(RXRPC_CA_FAST_RETRANSMIT, "FastReTx ") \ 439 EM(RXRPC_CA_PACKET_LOSS, "PktLoss ") \ 440 E_(RXRPC_CA_SLOW_START, "SlowStart") 441 442 #define rxrpc_congest_changes \ 443 EM(rxrpc_cong_begin_retransmission, " Retrans") \ 444 EM(rxrpc_cong_cleared_nacks, " Cleared") \ 445 EM(rxrpc_cong_new_low_nack, " NewLowN") \ 446 EM(rxrpc_cong_no_change, " -") \ 447 EM(rxrpc_cong_progress, " Progres") \ 448 EM(rxrpc_cong_idle_reset, " IdleRes") \ 449 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 450 EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 451 E_(rxrpc_cong_saw_nack, " SawNack") 452 453 #define rxrpc_pkts \ 454 EM(0, "?00") \ 455 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 456 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 457 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 458 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 459 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 460 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 461 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 462 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 463 EM(9, "?09") \ 464 EM(10, "?10") \ 465 EM(11, "?11") \ 466 EM(12, "?12") \ 467 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 468 EM(14, "?14") \ 469 E_(15, "?15") 470 471 #define rxrpc_ack_names \ 472 EM(0, "-0-") \ 473 EM(RXRPC_ACK_REQUESTED, "REQ") \ 474 EM(RXRPC_ACK_DUPLICATE, "DUP") \ 475 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 476 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 477 EM(RXRPC_ACK_NOSPACE, "MEM") \ 478 EM(RXRPC_ACK_PING, "PNG") \ 479 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 480 EM(RXRPC_ACK_DELAY, "DLY") \ 481 EM(RXRPC_ACK_IDLE, "IDL") \ 482 E_(RXRPC_ACK__INVALID, "-?-") 483 484 #define rxrpc_sack_traces \ 485 EM(rxrpc_sack_advance, "ADV") \ 486 EM(rxrpc_sack_fill, "FIL") \ 487 EM(rxrpc_sack_nack, "NAK") \ 488 EM(rxrpc_sack_none, "---") \ 489 E_(rxrpc_sack_oos, "OOS") 490 491 #define rxrpc_completions \ 492 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ 493 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ 494 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ 495 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ 496 E_(RXRPC_CALL_NETWORK_ERROR, "NetError") 497 498 #define rxrpc_tx_points \ 499 EM(rxrpc_tx_point_call_abort, "CallAbort") \ 500 EM(rxrpc_tx_point_call_ack, "CallAck") \ 501 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ 502 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ 503 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ 504 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ 505 EM(rxrpc_tx_point_reject, "Reject") \ 506 EM(rxrpc_tx_point_rxgk_challenge, "RxGKChall") \ 507 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ 508 EM(rxrpc_tx_point_response, "Response") \ 509 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ 510 E_(rxrpc_tx_point_version_reply, "VerReply") 511 512 #define rxrpc_req_ack_traces \ 513 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \ 514 EM(rxrpc_reqack_app_stall, "APP-STALL ") \ 515 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \ 516 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \ 517 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \ 518 EM(rxrpc_reqack_retrans, "RETRANS ") \ 519 EM(rxrpc_reqack_slow_start, "SLOW-START") \ 520 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN") 521 /* ---- Must update size of stat_why_req_ack[] if more are added! */ 522 523 #define rxrpc_txbuf_traces \ 524 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \ 525 EM(rxrpc_txbuf_alloc_response, "ALLOC RESP ") \ 526 EM(rxrpc_txbuf_free, "FREE ") \ 527 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \ 528 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \ 529 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \ 530 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \ 531 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \ 532 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \ 533 EM(rxrpc_txbuf_put_response_tx, "PUT RESP TX") \ 534 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \ 535 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \ 536 EM(rxrpc_txbuf_see_lost, "SEE LOST ") \ 537 EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \ 538 E_(rxrpc_txbuf_see_send_more, "SEE SEND+ ") 539 540 #define rxrpc_tq_traces \ 541 EM(rxrpc_tq_alloc, "ALLOC") \ 542 EM(rxrpc_tq_cleaned, "CLEAN") \ 543 EM(rxrpc_tq_decant, "DCNT ") \ 544 EM(rxrpc_tq_decant_advance, "DCNT>") \ 545 EM(rxrpc_tq_queue, "QUEUE") \ 546 EM(rxrpc_tq_queue_dup, "QUE!!") \ 547 EM(rxrpc_tq_rotate, "ROT ") \ 548 EM(rxrpc_tq_rotate_and_free, "ROT-F") \ 549 EM(rxrpc_tq_rotate_and_keep, "ROT-K") \ 550 EM(rxrpc_tq_transmit, "XMIT ") \ 551 E_(rxrpc_tq_transmit_advance, "XMIT>") 552 553 #define rxrpc_pmtud_reduce_traces \ 554 EM(rxrpc_pmtud_reduce_ack, "Ack ") \ 555 EM(rxrpc_pmtud_reduce_icmp, "Icmp ") \ 556 E_(rxrpc_pmtud_reduce_route, "Route") 557 558 #define rxrpc_rotate_traces \ 559 EM(rxrpc_rotate_trace_hack, "hard-ack") \ 560 EM(rxrpc_rotate_trace_sack, "soft-ack") \ 561 E_(rxrpc_rotate_trace_snak, "soft-nack") 562 563 #define rxrpc_rack_timer_modes \ 564 EM(RXRPC_CALL_RACKTIMER_OFF, "---") \ 565 EM(RXRPC_CALL_RACKTIMER_RACK_REORDER, "REO") \ 566 EM(RXRPC_CALL_RACKTIMER_TLP_PTO, "TLP") \ 567 E_(RXRPC_CALL_RACKTIMER_RTO, "RTO") 568 569 #define rxrpc_tlp_probe_traces \ 570 EM(rxrpc_tlp_probe_trace_busy, "busy") \ 571 EM(rxrpc_tlp_probe_trace_transmit_new, "transmit-new") \ 572 E_(rxrpc_tlp_probe_trace_retransmit, "retransmit") 573 574 #define rxrpc_tlp_ack_traces \ 575 EM(rxrpc_tlp_ack_trace_acked, "acked") \ 576 EM(rxrpc_tlp_ack_trace_dup_acked, "dup-acked") \ 577 EM(rxrpc_tlp_ack_trace_hard_beyond, "hard-beyond") \ 578 EM(rxrpc_tlp_ack_trace_incomplete, "incomplete") \ 579 E_(rxrpc_tlp_ack_trace_new_data, "new-data") 580 581 /* 582 * Generate enums for tracing information. 583 */ 584 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 585 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 586 587 #undef EM 588 #undef E_ 589 #define EM(a, b) a, 590 #define E_(a, b) a 591 592 enum rxrpc_abort_reason { rxrpc_abort_reasons } __mode(byte); 593 enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte); 594 enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte); 595 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte); 596 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte); 597 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte); 598 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte); 599 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte); 600 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte); 601 enum rxrpc_pmtud_reduce_trace { rxrpc_pmtud_reduce_traces } __mode(byte); 602 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte); 603 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte); 604 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte); 605 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte); 606 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte); 607 enum rxrpc_rotate_trace { rxrpc_rotate_traces } __mode(byte); 608 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte); 609 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte); 610 enum rxrpc_sack_trace { rxrpc_sack_traces } __mode(byte); 611 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte); 612 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte); 613 enum rxrpc_tlp_ack_trace { rxrpc_tlp_ack_traces } __mode(byte); 614 enum rxrpc_tlp_probe_trace { rxrpc_tlp_probe_traces } __mode(byte); 615 enum rxrpc_tq_trace { rxrpc_tq_traces } __mode(byte); 616 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte); 617 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte); 618 enum rxrpc_txdata_trace { rxrpc_txdata_traces } __mode(byte); 619 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte); 620 621 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 622 623 /* 624 * Export enum symbols via userspace. 625 */ 626 #undef EM 627 #undef E_ 628 629 #ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS 630 631 #define EM(a, b) TRACE_DEFINE_ENUM(a); 632 #define E_(a, b) TRACE_DEFINE_ENUM(a); 633 634 rxrpc_abort_reasons; 635 rxrpc_bundle_traces; 636 rxrpc_ca_states; 637 rxrpc_call_poke_traces; 638 rxrpc_call_traces; 639 rxrpc_client_traces; 640 rxrpc_congest_changes; 641 rxrpc_conn_traces; 642 rxrpc_local_traces; 643 rxrpc_pmtud_reduce_traces; 644 rxrpc_propose_ack_traces; 645 rxrpc_rack_timer_modes; 646 rxrpc_receive_traces; 647 rxrpc_recvmsg_traces; 648 rxrpc_req_ack_traces; 649 rxrpc_rotate_traces; 650 rxrpc_rtt_rx_traces; 651 rxrpc_rtt_tx_traces; 652 rxrpc_sack_traces; 653 rxrpc_skb_traces; 654 rxrpc_timer_traces; 655 rxrpc_tlp_ack_traces; 656 rxrpc_tlp_probe_traces; 657 rxrpc_tq_traces; 658 rxrpc_tx_points; 659 rxrpc_txbuf_traces; 660 rxrpc_txdata_traces; 661 rxrpc_txqueue_traces; 662 663 /* 664 * Now redefine the EM() and E_() macros to map the enums to the strings that 665 * will be printed in the output. 666 */ 667 #undef EM 668 #undef E_ 669 #define EM(a, b) { a, b }, 670 #define E_(a, b) { a, b } 671 672 TRACE_EVENT(rxrpc_local, 673 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op, 674 int ref, int usage), 675 676 TP_ARGS(local_debug_id, op, ref, usage), 677 678 TP_STRUCT__entry( 679 __field(unsigned int, local) 680 __field(int, op) 681 __field(int, ref) 682 __field(int, usage) 683 ), 684 685 TP_fast_assign( 686 __entry->local = local_debug_id; 687 __entry->op = op; 688 __entry->ref = ref; 689 __entry->usage = usage; 690 ), 691 692 TP_printk("L=%08x %s r=%d u=%d", 693 __entry->local, 694 __print_symbolic(__entry->op, rxrpc_local_traces), 695 __entry->ref, 696 __entry->usage) 697 ); 698 699 TRACE_EVENT(rxrpc_iothread_rx, 700 TP_PROTO(struct rxrpc_local *local, unsigned int nr_rx), 701 TP_ARGS(local, nr_rx), 702 TP_STRUCT__entry( 703 __field(unsigned int, local) 704 __field(unsigned int, nr_rx) 705 ), 706 TP_fast_assign( 707 __entry->local = local->debug_id; 708 __entry->nr_rx = nr_rx; 709 ), 710 TP_printk("L=%08x nrx=%u", __entry->local, __entry->nr_rx) 711 ); 712 713 TRACE_EVENT(rxrpc_peer, 714 TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why), 715 716 TP_ARGS(peer_debug_id, ref, why), 717 718 TP_STRUCT__entry( 719 __field(unsigned int, peer) 720 __field(int, ref) 721 __field(enum rxrpc_peer_trace, why) 722 ), 723 724 TP_fast_assign( 725 __entry->peer = peer_debug_id; 726 __entry->ref = ref; 727 __entry->why = why; 728 ), 729 730 TP_printk("P=%08x %s r=%d", 731 __entry->peer, 732 __print_symbolic(__entry->why, rxrpc_peer_traces), 733 __entry->ref) 734 ); 735 736 TRACE_EVENT(rxrpc_bundle, 737 TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why), 738 739 TP_ARGS(bundle_debug_id, ref, why), 740 741 TP_STRUCT__entry( 742 __field(unsigned int, bundle) 743 __field(int, ref) 744 __field(int, why) 745 ), 746 747 TP_fast_assign( 748 __entry->bundle = bundle_debug_id; 749 __entry->ref = ref; 750 __entry->why = why; 751 ), 752 753 TP_printk("CB=%08x %s r=%d", 754 __entry->bundle, 755 __print_symbolic(__entry->why, rxrpc_bundle_traces), 756 __entry->ref) 757 ); 758 759 TRACE_EVENT(rxrpc_conn, 760 TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why), 761 762 TP_ARGS(conn_debug_id, ref, why), 763 764 TP_STRUCT__entry( 765 __field(unsigned int, conn) 766 __field(int, ref) 767 __field(int, why) 768 ), 769 770 TP_fast_assign( 771 __entry->conn = conn_debug_id; 772 __entry->ref = ref; 773 __entry->why = why; 774 ), 775 776 TP_printk("C=%08x %s r=%d", 777 __entry->conn, 778 __print_symbolic(__entry->why, rxrpc_conn_traces), 779 __entry->ref) 780 ); 781 782 TRACE_EVENT(rxrpc_client, 783 TP_PROTO(struct rxrpc_connection *conn, int channel, 784 enum rxrpc_client_trace op), 785 786 TP_ARGS(conn, channel, op), 787 788 TP_STRUCT__entry( 789 __field(unsigned int, conn) 790 __field(u32, cid) 791 __field(int, channel) 792 __field(int, usage) 793 __field(enum rxrpc_client_trace, op) 794 ), 795 796 TP_fast_assign( 797 __entry->conn = conn ? conn->debug_id : 0; 798 __entry->channel = channel; 799 __entry->usage = conn ? refcount_read(&conn->ref) : -2; 800 __entry->op = op; 801 __entry->cid = conn ? conn->proto.cid : 0; 802 ), 803 804 TP_printk("C=%08x h=%2d %s i=%08x u=%d", 805 __entry->conn, 806 __entry->channel, 807 __print_symbolic(__entry->op, rxrpc_client_traces), 808 __entry->cid, 809 __entry->usage) 810 ); 811 812 TRACE_EVENT(rxrpc_call, 813 TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux, 814 enum rxrpc_call_trace why), 815 816 TP_ARGS(call_debug_id, ref, aux, why), 817 818 TP_STRUCT__entry( 819 __field(unsigned int, call) 820 __field(int, ref) 821 __field(int, why) 822 __field(unsigned long, aux) 823 ), 824 825 TP_fast_assign( 826 __entry->call = call_debug_id; 827 __entry->ref = ref; 828 __entry->why = why; 829 __entry->aux = aux; 830 ), 831 832 TP_printk("c=%08x %s r=%d a=%lx", 833 __entry->call, 834 __print_symbolic(__entry->why, rxrpc_call_traces), 835 __entry->ref, 836 __entry->aux) 837 ); 838 839 TRACE_EVENT(rxrpc_skb, 840 TP_PROTO(struct sk_buff *skb, int usage, int mod_count, 841 enum rxrpc_skb_trace why), 842 843 TP_ARGS(skb, usage, mod_count, why), 844 845 TP_STRUCT__entry( 846 __field(struct sk_buff *, skb) 847 __field(int, usage) 848 __field(int, mod_count) 849 __field(enum rxrpc_skb_trace, why) 850 ), 851 852 TP_fast_assign( 853 __entry->skb = skb; 854 __entry->usage = usage; 855 __entry->mod_count = mod_count; 856 __entry->why = why; 857 ), 858 859 TP_printk("s=%p Rx %s u=%d m=%d", 860 __entry->skb, 861 __print_symbolic(__entry->why, rxrpc_skb_traces), 862 __entry->usage, 863 __entry->mod_count) 864 ); 865 866 TRACE_EVENT(rxrpc_rx_packet, 867 TP_PROTO(struct rxrpc_skb_priv *sp), 868 869 TP_ARGS(sp), 870 871 TP_STRUCT__entry( 872 __field_struct(struct rxrpc_host_header, hdr) 873 ), 874 875 TP_fast_assign( 876 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 877 ), 878 879 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 880 __entry->hdr.epoch, __entry->hdr.cid, 881 __entry->hdr.callNumber, __entry->hdr.serviceId, 882 __entry->hdr.serial, __entry->hdr.seq, 883 __entry->hdr.securityIndex, __entry->hdr.flags, 884 __print_symbolic(__entry->hdr.type, rxrpc_pkts)) 885 ); 886 887 TRACE_EVENT(rxrpc_rx_done, 888 TP_PROTO(int result, int abort_code), 889 890 TP_ARGS(result, abort_code), 891 892 TP_STRUCT__entry( 893 __field(int, result) 894 __field(int, abort_code) 895 ), 896 897 TP_fast_assign( 898 __entry->result = result; 899 __entry->abort_code = abort_code; 900 ), 901 902 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 903 ); 904 905 TRACE_EVENT(rxrpc_abort_call, 906 TP_PROTO(const struct rxrpc_call *call, int abort_code), 907 908 TP_ARGS(call, abort_code), 909 910 TP_STRUCT__entry( 911 __field(unsigned int, call_nr) 912 __field(enum rxrpc_abort_reason, why) 913 __field(int, abort_code) 914 __field(int, error) 915 ), 916 917 TP_fast_assign( 918 __entry->call_nr = call->debug_id; 919 __entry->why = call->send_abort_why; 920 __entry->abort_code = abort_code; 921 __entry->error = call->send_abort_err; 922 ), 923 924 TP_printk("c=%08x a=%d e=%d %s", 925 __entry->call_nr, 926 __entry->abort_code, __entry->error, 927 __print_symbolic(__entry->why, rxrpc_abort_reasons)) 928 ); 929 930 TRACE_EVENT(rxrpc_abort, 931 TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why, 932 u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error), 933 934 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), 935 936 TP_STRUCT__entry( 937 __field(unsigned int, call_nr) 938 __field(enum rxrpc_abort_reason, why) 939 __field(u32, cid) 940 __field(u32, call_id) 941 __field(rxrpc_seq_t, seq) 942 __field(int, abort_code) 943 __field(int, error) 944 ), 945 946 TP_fast_assign( 947 __entry->call_nr = call_nr; 948 __entry->why = why; 949 __entry->cid = cid; 950 __entry->call_id = call_id; 951 __entry->abort_code = abort_code; 952 __entry->error = error; 953 __entry->seq = seq; 954 ), 955 956 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", 957 __entry->call_nr, 958 __entry->cid, __entry->call_id, __entry->seq, 959 __entry->abort_code, __entry->error, 960 __print_symbolic(__entry->why, rxrpc_abort_reasons)) 961 ); 962 963 TRACE_EVENT(rxrpc_call_complete, 964 TP_PROTO(struct rxrpc_call *call), 965 966 TP_ARGS(call), 967 968 TP_STRUCT__entry( 969 __field(unsigned int, call) 970 __field(enum rxrpc_call_completion, compl) 971 __field(int, error) 972 __field(u32, abort_code) 973 ), 974 975 TP_fast_assign( 976 __entry->call = call->debug_id; 977 __entry->compl = call->completion; 978 __entry->error = call->error; 979 __entry->abort_code = call->abort_code; 980 ), 981 982 TP_printk("c=%08x %s r=%d ac=%d", 983 __entry->call, 984 __print_symbolic(__entry->compl, rxrpc_completions), 985 __entry->error, 986 __entry->abort_code) 987 ); 988 989 TRACE_EVENT(rxrpc_txqueue, 990 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why), 991 992 TP_ARGS(call, why), 993 994 TP_STRUCT__entry( 995 __field(unsigned int, call) 996 __field(enum rxrpc_txqueue_trace, why) 997 __field(rxrpc_seq_t, tx_bottom) 998 __field(rxrpc_seq_t, acks_hard_ack) 999 __field(rxrpc_seq_t, tx_top) 1000 __field(rxrpc_seq_t, send_top) 1001 __field(int, tx_winsize) 1002 ), 1003 1004 TP_fast_assign( 1005 __entry->call = call->debug_id; 1006 __entry->why = why; 1007 __entry->tx_bottom = call->tx_bottom; 1008 __entry->acks_hard_ack = call->acks_hard_ack; 1009 __entry->tx_top = call->tx_top; 1010 __entry->send_top = call->send_top; 1011 __entry->tx_winsize = call->tx_winsize; 1012 ), 1013 1014 TP_printk("c=%08x %s b=%08x h=%08x n=%u/%u/%u/%u", 1015 __entry->call, 1016 __print_symbolic(__entry->why, rxrpc_txqueue_traces), 1017 __entry->tx_bottom, 1018 __entry->acks_hard_ack, 1019 __entry->acks_hard_ack - __entry->tx_bottom, 1020 __entry->tx_top - __entry->acks_hard_ack, 1021 __entry->send_top - __entry->tx_top, 1022 __entry->tx_winsize) 1023 ); 1024 1025 TRACE_EVENT(rxrpc_transmit, 1026 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t send_top, int space), 1027 1028 TP_ARGS(call, send_top, space), 1029 1030 TP_STRUCT__entry( 1031 __field(unsigned int, call) 1032 __field(rxrpc_seq_t, seq) 1033 __field(u16, space) 1034 __field(u16, tx_winsize) 1035 __field(u16, cong_cwnd) 1036 __field(u16, cong_extra) 1037 __field(u16, in_flight) 1038 __field(u16, prepared) 1039 __field(u16, pmtud_jumbo) 1040 ), 1041 1042 TP_fast_assign( 1043 __entry->call = call->debug_id; 1044 __entry->seq = call->tx_top + 1; 1045 __entry->space = space; 1046 __entry->tx_winsize = call->tx_winsize; 1047 __entry->cong_cwnd = call->cong_cwnd; 1048 __entry->cong_extra = call->cong_extra; 1049 __entry->prepared = send_top - call->tx_bottom; 1050 __entry->in_flight = call->tx_top - call->tx_bottom; 1051 __entry->pmtud_jumbo = call->peer->pmtud_jumbo; 1052 ), 1053 1054 TP_printk("c=%08x q=%08x sp=%u tw=%u cw=%u+%u pr=%u if=%u pj=%u", 1055 __entry->call, 1056 __entry->seq, 1057 __entry->space, 1058 __entry->tx_winsize, 1059 __entry->cong_cwnd, 1060 __entry->cong_extra, 1061 __entry->prepared, 1062 __entry->in_flight, 1063 __entry->pmtud_jumbo) 1064 ); 1065 1066 TRACE_EVENT(rxrpc_tx_rotate, 1067 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, rxrpc_seq_t to), 1068 1069 TP_ARGS(call, seq, to), 1070 1071 TP_STRUCT__entry( 1072 __field(unsigned int, call) 1073 __field(rxrpc_seq_t, seq) 1074 __field(rxrpc_seq_t, to) 1075 __field(rxrpc_seq_t, top) 1076 ), 1077 1078 TP_fast_assign( 1079 __entry->call = call->debug_id; 1080 __entry->seq = seq; 1081 __entry->to = to; 1082 __entry->top = call->tx_top; 1083 ), 1084 1085 TP_printk("c=%08x q=%08x-%08x-%08x", 1086 __entry->call, 1087 __entry->seq, 1088 __entry->to, 1089 __entry->top) 1090 ); 1091 1092 TRACE_EVENT(rxrpc_rx_data, 1093 TP_PROTO(unsigned int call, rxrpc_seq_t seq, 1094 rxrpc_serial_t serial, u8 flags), 1095 1096 TP_ARGS(call, seq, serial, flags), 1097 1098 TP_STRUCT__entry( 1099 __field(unsigned int, call) 1100 __field(rxrpc_seq_t, seq) 1101 __field(rxrpc_serial_t, serial) 1102 __field(u8, flags) 1103 ), 1104 1105 TP_fast_assign( 1106 __entry->call = call; 1107 __entry->seq = seq; 1108 __entry->serial = serial; 1109 __entry->flags = flags; 1110 ), 1111 1112 TP_printk("c=%08x DATA %08x q=%08x fl=%02x", 1113 __entry->call, 1114 __entry->serial, 1115 __entry->seq, 1116 __entry->flags) 1117 ); 1118 1119 TRACE_EVENT(rxrpc_rx_ack, 1120 TP_PROTO(struct rxrpc_call *call, struct rxrpc_skb_priv *sp), 1121 1122 TP_ARGS(call, sp), 1123 1124 TP_STRUCT__entry( 1125 __field(unsigned int, call) 1126 __field(rxrpc_serial_t, serial) 1127 __field(rxrpc_serial_t, ack_serial) 1128 __field(rxrpc_seq_t, first) 1129 __field(rxrpc_seq_t, prev) 1130 __field(u8, reason) 1131 __field(u8, n_acks) 1132 __field(u8, user_status) 1133 ), 1134 1135 TP_fast_assign( 1136 __entry->call = call->debug_id; 1137 __entry->serial = sp->hdr.serial; 1138 __entry->user_status = sp->hdr.userStatus; 1139 __entry->ack_serial = sp->ack.acked_serial; 1140 __entry->first = sp->ack.first_ack; 1141 __entry->prev = sp->ack.prev_ack; 1142 __entry->reason = sp->ack.reason; 1143 __entry->n_acks = sp->ack.nr_acks; 1144 ), 1145 1146 TP_printk("c=%08x %08x %s r=%08x us=%02x f=%08x p=%08x n=%u", 1147 __entry->call, 1148 __entry->serial, 1149 __print_symbolic(__entry->reason, rxrpc_ack_names), 1150 __entry->ack_serial, 1151 __entry->user_status, 1152 __entry->first, 1153 __entry->prev, 1154 __entry->n_acks) 1155 ); 1156 1157 TRACE_EVENT(rxrpc_rx_abort, 1158 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1159 u32 abort_code), 1160 1161 TP_ARGS(call, serial, abort_code), 1162 1163 TP_STRUCT__entry( 1164 __field(unsigned int, call) 1165 __field(rxrpc_serial_t, serial) 1166 __field(u32, abort_code) 1167 ), 1168 1169 TP_fast_assign( 1170 __entry->call = call->debug_id; 1171 __entry->serial = serial; 1172 __entry->abort_code = abort_code; 1173 ), 1174 1175 TP_printk("c=%08x ABORT %08x ac=%d", 1176 __entry->call, 1177 __entry->serial, 1178 __entry->abort_code) 1179 ); 1180 1181 TRACE_EVENT(rxrpc_rx_conn_abort, 1182 TP_PROTO(const struct rxrpc_connection *conn, const struct sk_buff *skb), 1183 1184 TP_ARGS(conn, skb), 1185 1186 TP_STRUCT__entry( 1187 __field(unsigned int, conn) 1188 __field(rxrpc_serial_t, serial) 1189 __field(u32, abort_code) 1190 ), 1191 1192 TP_fast_assign( 1193 __entry->conn = conn->debug_id; 1194 __entry->serial = rxrpc_skb(skb)->hdr.serial; 1195 __entry->abort_code = skb->priority; 1196 ), 1197 1198 TP_printk("C=%08x ABORT %08x ac=%d", 1199 __entry->conn, 1200 __entry->serial, 1201 __entry->abort_code) 1202 ); 1203 1204 TRACE_EVENT(rxrpc_rx_challenge, 1205 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial, 1206 u32 version, u32 nonce, u32 min_level), 1207 1208 TP_ARGS(conn, serial, version, nonce, min_level), 1209 1210 TP_STRUCT__entry( 1211 __field(unsigned int, conn) 1212 __field(rxrpc_serial_t, serial) 1213 __field(u32, version) 1214 __field(u32, nonce) 1215 __field(u32, min_level) 1216 __field(u8, security_ix) 1217 ), 1218 1219 TP_fast_assign( 1220 __entry->conn = conn->debug_id; 1221 __entry->serial = serial; 1222 __entry->version = version; 1223 __entry->nonce = nonce; 1224 __entry->min_level = min_level; 1225 __entry->security_ix = conn->security_ix; 1226 ), 1227 1228 TP_printk("C=%08x CHALLENGE r=%08x sx=%u v=%x n=%x ml=%x", 1229 __entry->conn, 1230 __entry->serial, 1231 __entry->security_ix, 1232 __entry->version, 1233 __entry->nonce, 1234 __entry->min_level) 1235 ); 1236 1237 TRACE_EVENT(rxrpc_rx_response, 1238 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial, 1239 u32 version, u32 kvno, u32 ticket_len), 1240 1241 TP_ARGS(conn, serial, version, kvno, ticket_len), 1242 1243 TP_STRUCT__entry( 1244 __field(unsigned int, conn) 1245 __field(rxrpc_serial_t, serial) 1246 __field(u32, version) 1247 __field(u32, kvno) 1248 __field(u32, ticket_len) 1249 __field(u8, security_ix) 1250 ), 1251 1252 TP_fast_assign( 1253 __entry->conn = conn->debug_id; 1254 __entry->serial = serial; 1255 __entry->version = version; 1256 __entry->kvno = kvno; 1257 __entry->ticket_len = ticket_len; 1258 __entry->security_ix = conn->security_ix; 1259 ), 1260 1261 TP_printk("C=%08x RESPONSE r=%08x sx=%u v=%x kvno=%x tl=%x", 1262 __entry->conn, 1263 __entry->serial, 1264 __entry->security_ix, 1265 __entry->version, 1266 __entry->kvno, 1267 __entry->ticket_len) 1268 ); 1269 1270 TRACE_EVENT(rxrpc_rx_rwind_change, 1271 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1272 u32 rwind, bool wake), 1273 1274 TP_ARGS(call, serial, rwind, wake), 1275 1276 TP_STRUCT__entry( 1277 __field(unsigned int, call) 1278 __field(rxrpc_serial_t, serial) 1279 __field(u32, rwind) 1280 __field(bool, wake) 1281 ), 1282 1283 TP_fast_assign( 1284 __entry->call = call->debug_id; 1285 __entry->serial = serial; 1286 __entry->rwind = rwind; 1287 __entry->wake = wake; 1288 ), 1289 1290 TP_printk("c=%08x %08x rw=%u%s", 1291 __entry->call, 1292 __entry->serial, 1293 __entry->rwind, 1294 __entry->wake ? " wake" : "") 1295 ); 1296 1297 TRACE_EVENT(rxrpc_tx_packet, 1298 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, 1299 enum rxrpc_tx_point where), 1300 1301 TP_ARGS(call_id, whdr, where), 1302 1303 TP_STRUCT__entry( 1304 __field(unsigned int, call) 1305 __field(enum rxrpc_tx_point, where) 1306 __field_struct(struct rxrpc_wire_header, whdr) 1307 ), 1308 1309 TP_fast_assign( 1310 __entry->call = call_id; 1311 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); 1312 __entry->where = where; 1313 ), 1314 1315 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", 1316 __entry->call, 1317 ntohl(__entry->whdr.epoch), 1318 ntohl(__entry->whdr.cid), 1319 ntohl(__entry->whdr.callNumber), 1320 ntohs(__entry->whdr.serviceId), 1321 ntohl(__entry->whdr.serial), 1322 ntohl(__entry->whdr.seq), 1323 __entry->whdr.type, __entry->whdr.flags, 1324 __entry->whdr.type <= 15 ? 1325 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", 1326 __print_symbolic(__entry->where, rxrpc_tx_points)) 1327 ); 1328 1329 TRACE_EVENT(rxrpc_tx_data, 1330 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 1331 rxrpc_serial_t serial, unsigned int flags, 1332 enum rxrpc_txdata_trace trace), 1333 1334 TP_ARGS(call, seq, serial, flags, trace), 1335 1336 TP_STRUCT__entry( 1337 __field(unsigned int, call) 1338 __field(rxrpc_seq_t, seq) 1339 __field(rxrpc_serial_t, serial) 1340 __field(u32, cid) 1341 __field(u32, call_id) 1342 __field(u16, flags) 1343 __field(enum rxrpc_txdata_trace, trace) 1344 ), 1345 1346 TP_fast_assign( 1347 __entry->call = call->debug_id; 1348 __entry->cid = call->cid; 1349 __entry->call_id = call->call_id; 1350 __entry->seq = seq; 1351 __entry->serial = serial; 1352 __entry->flags = flags; 1353 __entry->trace = trace; 1354 ), 1355 1356 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s", 1357 __entry->call, 1358 __entry->cid, 1359 __entry->call_id, 1360 __entry->serial, 1361 __entry->seq, 1362 __entry->flags & RXRPC_TXBUF_WIRE_FLAGS, 1363 __print_symbolic(__entry->trace, rxrpc_txdata_traces)) 1364 ); 1365 1366 TRACE_EVENT(rxrpc_tx_ack, 1367 TP_PROTO(unsigned int call, rxrpc_serial_t serial, 1368 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 1369 u8 reason, u8 n_acks, u16 rwind, 1370 enum rxrpc_propose_ack_trace trace), 1371 1372 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks, rwind, trace), 1373 1374 TP_STRUCT__entry( 1375 __field(unsigned int, call) 1376 __field(rxrpc_serial_t, serial) 1377 __field(rxrpc_seq_t, ack_first) 1378 __field(rxrpc_serial_t, ack_serial) 1379 __field(u8, reason) 1380 __field(u8, n_acks) 1381 __field(u16, rwind) 1382 __field(enum rxrpc_propose_ack_trace, trace) 1383 ), 1384 1385 TP_fast_assign( 1386 __entry->call = call; 1387 __entry->serial = serial; 1388 __entry->ack_first = ack_first; 1389 __entry->ack_serial = ack_serial; 1390 __entry->reason = reason; 1391 __entry->n_acks = n_acks; 1392 __entry->rwind = rwind; 1393 __entry->trace = trace; 1394 ), 1395 1396 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u rw=%u %s", 1397 __entry->call, 1398 __entry->serial, 1399 __print_symbolic(__entry->reason, rxrpc_ack_names), 1400 __entry->ack_first, 1401 __entry->ack_serial, 1402 __entry->n_acks, 1403 __entry->rwind, 1404 __print_symbolic(__entry->trace, rxrpc_propose_ack_traces)) 1405 ); 1406 1407 TRACE_EVENT(rxrpc_receive, 1408 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 1409 rxrpc_serial_t serial, rxrpc_seq_t seq), 1410 1411 TP_ARGS(call, why, serial, seq), 1412 1413 TP_STRUCT__entry( 1414 __field(unsigned int, call) 1415 __field(enum rxrpc_receive_trace, why) 1416 __field(rxrpc_serial_t, serial) 1417 __field(rxrpc_seq_t, seq) 1418 __field(rxrpc_seq_t, window) 1419 __field(rxrpc_seq_t, wtop) 1420 ), 1421 1422 TP_fast_assign( 1423 __entry->call = call->debug_id; 1424 __entry->why = why; 1425 __entry->serial = serial; 1426 __entry->seq = seq; 1427 __entry->window = call->ackr_window; 1428 __entry->wtop = call->ackr_wtop; 1429 ), 1430 1431 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", 1432 __entry->call, 1433 __print_symbolic(__entry->why, rxrpc_receive_traces), 1434 __entry->serial, 1435 __entry->seq, 1436 __entry->window, 1437 __entry->wtop) 1438 ); 1439 1440 TRACE_EVENT(rxrpc_recvmsg, 1441 TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why, 1442 int ret), 1443 1444 TP_ARGS(call_debug_id, why, ret), 1445 1446 TP_STRUCT__entry( 1447 __field(unsigned int, call) 1448 __field(enum rxrpc_recvmsg_trace, why) 1449 __field(int, ret) 1450 ), 1451 1452 TP_fast_assign( 1453 __entry->call = call_debug_id; 1454 __entry->why = why; 1455 __entry->ret = ret; 1456 ), 1457 1458 TP_printk("c=%08x %s ret=%d", 1459 __entry->call, 1460 __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 1461 __entry->ret) 1462 ); 1463 1464 TRACE_EVENT(rxrpc_recvdata, 1465 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 1466 rxrpc_seq_t seq, unsigned int offset, unsigned int len, 1467 int ret), 1468 1469 TP_ARGS(call, why, seq, offset, len, ret), 1470 1471 TP_STRUCT__entry( 1472 __field(unsigned int, call) 1473 __field(enum rxrpc_recvmsg_trace, why) 1474 __field(rxrpc_seq_t, seq) 1475 __field(unsigned int, offset) 1476 __field(unsigned int, len) 1477 __field(int, ret) 1478 ), 1479 1480 TP_fast_assign( 1481 __entry->call = call ? call->debug_id : 0; 1482 __entry->why = why; 1483 __entry->seq = seq; 1484 __entry->offset = offset; 1485 __entry->len = len; 1486 __entry->ret = ret; 1487 ), 1488 1489 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", 1490 __entry->call, 1491 __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 1492 __entry->seq, 1493 __entry->offset, 1494 __entry->len, 1495 __entry->ret) 1496 ); 1497 1498 TRACE_EVENT(rxrpc_rtt_tx, 1499 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 1500 int slot, rxrpc_serial_t send_serial), 1501 1502 TP_ARGS(call, why, slot, send_serial), 1503 1504 TP_STRUCT__entry( 1505 __field(unsigned int, call) 1506 __field(enum rxrpc_rtt_tx_trace, why) 1507 __field(int, slot) 1508 __field(rxrpc_serial_t, send_serial) 1509 ), 1510 1511 TP_fast_assign( 1512 __entry->call = call->debug_id; 1513 __entry->why = why; 1514 __entry->slot = slot; 1515 __entry->send_serial = send_serial; 1516 ), 1517 1518 TP_printk("c=%08x [%d] %s sr=%08x", 1519 __entry->call, 1520 __entry->slot, 1521 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 1522 __entry->send_serial) 1523 ); 1524 1525 TRACE_EVENT(rxrpc_rtt_rx, 1526 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 1527 int slot, 1528 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 1529 u32 rtt, u32 srtt, u32 rto), 1530 1531 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, srtt, rto), 1532 1533 TP_STRUCT__entry( 1534 __field(unsigned int, call) 1535 __field(enum rxrpc_rtt_rx_trace, why) 1536 __field(int, slot) 1537 __field(rxrpc_serial_t, send_serial) 1538 __field(rxrpc_serial_t, resp_serial) 1539 __field(u32, rtt) 1540 __field(u32, srtt) 1541 __field(u32, rto) 1542 __field(u32, min_rtt) 1543 ), 1544 1545 TP_fast_assign( 1546 __entry->call = call->debug_id; 1547 __entry->why = why; 1548 __entry->slot = slot; 1549 __entry->send_serial = send_serial; 1550 __entry->resp_serial = resp_serial; 1551 __entry->rtt = rtt; 1552 __entry->srtt = srtt; 1553 __entry->rto = rto; 1554 __entry->min_rtt = minmax_get(&call->min_rtt) 1555 ), 1556 1557 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u srtt=%u rto=%u min=%u", 1558 __entry->call, 1559 __entry->slot, 1560 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 1561 __entry->send_serial, 1562 __entry->resp_serial, 1563 __entry->rtt, 1564 __entry->srtt / 8, 1565 __entry->rto, 1566 __entry->min_rtt) 1567 ); 1568 1569 TRACE_EVENT(rxrpc_timer_set, 1570 TP_PROTO(struct rxrpc_call *call, ktime_t delay, 1571 enum rxrpc_timer_trace why), 1572 1573 TP_ARGS(call, delay, why), 1574 1575 TP_STRUCT__entry( 1576 __field(unsigned int, call) 1577 __field(enum rxrpc_timer_trace, why) 1578 __field(ktime_t, delay) 1579 ), 1580 1581 TP_fast_assign( 1582 __entry->call = call->debug_id; 1583 __entry->why = why; 1584 __entry->delay = delay; 1585 ), 1586 1587 TP_printk("c=%08x %s to=%lld", 1588 __entry->call, 1589 __print_symbolic(__entry->why, rxrpc_timer_traces), 1590 ktime_to_us(__entry->delay)) 1591 ); 1592 1593 TRACE_EVENT(rxrpc_timer_exp, 1594 TP_PROTO(struct rxrpc_call *call, ktime_t delay, 1595 enum rxrpc_timer_trace why), 1596 1597 TP_ARGS(call, delay, why), 1598 1599 TP_STRUCT__entry( 1600 __field(unsigned int, call) 1601 __field(enum rxrpc_timer_trace, why) 1602 __field(ktime_t, delay) 1603 ), 1604 1605 TP_fast_assign( 1606 __entry->call = call->debug_id; 1607 __entry->why = why; 1608 __entry->delay = delay; 1609 ), 1610 1611 TP_printk("c=%08x %s to=%lld", 1612 __entry->call, 1613 __print_symbolic(__entry->why, rxrpc_timer_traces), 1614 ktime_to_us(__entry->delay)) 1615 ); 1616 1617 TRACE_EVENT(rxrpc_timer_can, 1618 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why), 1619 1620 TP_ARGS(call, why), 1621 1622 TP_STRUCT__entry( 1623 __field(unsigned int, call) 1624 __field(enum rxrpc_timer_trace, why) 1625 ), 1626 1627 TP_fast_assign( 1628 __entry->call = call->debug_id; 1629 __entry->why = why; 1630 ), 1631 1632 TP_printk("c=%08x %s", 1633 __entry->call, 1634 __print_symbolic(__entry->why, rxrpc_timer_traces)) 1635 ); 1636 1637 TRACE_EVENT(rxrpc_timer_restart, 1638 TP_PROTO(struct rxrpc_call *call, ktime_t delay, unsigned long delayj), 1639 1640 TP_ARGS(call, delay, delayj), 1641 1642 TP_STRUCT__entry( 1643 __field(unsigned int, call) 1644 __field(unsigned long, delayj) 1645 __field(ktime_t, delay) 1646 ), 1647 1648 TP_fast_assign( 1649 __entry->call = call->debug_id; 1650 __entry->delayj = delayj; 1651 __entry->delay = delay; 1652 ), 1653 1654 TP_printk("c=%08x to=%lld j=%ld", 1655 __entry->call, 1656 ktime_to_us(__entry->delay), 1657 __entry->delayj) 1658 ); 1659 1660 TRACE_EVENT(rxrpc_timer_expired, 1661 TP_PROTO(struct rxrpc_call *call), 1662 1663 TP_ARGS(call), 1664 1665 TP_STRUCT__entry( 1666 __field(unsigned int, call) 1667 ), 1668 1669 TP_fast_assign( 1670 __entry->call = call->debug_id; 1671 ), 1672 1673 TP_printk("c=%08x EXPIRED", 1674 __entry->call) 1675 ); 1676 1677 TRACE_EVENT(rxrpc_rx_lose, 1678 TP_PROTO(struct rxrpc_skb_priv *sp), 1679 1680 TP_ARGS(sp), 1681 1682 TP_STRUCT__entry( 1683 __field_struct(struct rxrpc_host_header, hdr) 1684 ), 1685 1686 TP_fast_assign( 1687 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 1688 ), 1689 1690 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 1691 __entry->hdr.epoch, __entry->hdr.cid, 1692 __entry->hdr.callNumber, __entry->hdr.serviceId, 1693 __entry->hdr.serial, __entry->hdr.seq, 1694 __entry->hdr.type, __entry->hdr.flags, 1695 __entry->hdr.type <= 15 ? 1696 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 1697 ); 1698 1699 TRACE_EVENT(rxrpc_propose_ack, 1700 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1701 u8 ack_reason, rxrpc_serial_t serial), 1702 1703 TP_ARGS(call, why, ack_reason, serial), 1704 1705 TP_STRUCT__entry( 1706 __field(unsigned int, call) 1707 __field(enum rxrpc_propose_ack_trace, why) 1708 __field(rxrpc_serial_t, serial) 1709 __field(u8, ack_reason) 1710 ), 1711 1712 TP_fast_assign( 1713 __entry->call = call->debug_id; 1714 __entry->why = why; 1715 __entry->serial = serial; 1716 __entry->ack_reason = ack_reason; 1717 ), 1718 1719 TP_printk("c=%08x %s %s r=%08x", 1720 __entry->call, 1721 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1722 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1723 __entry->serial) 1724 ); 1725 1726 TRACE_EVENT(rxrpc_send_ack, 1727 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1728 u8 ack_reason, rxrpc_serial_t serial), 1729 1730 TP_ARGS(call, why, ack_reason, serial), 1731 1732 TP_STRUCT__entry( 1733 __field(unsigned int, call) 1734 __field(enum rxrpc_propose_ack_trace, why) 1735 __field(rxrpc_serial_t, serial) 1736 __field(u8, ack_reason) 1737 ), 1738 1739 TP_fast_assign( 1740 __entry->call = call->debug_id; 1741 __entry->why = why; 1742 __entry->serial = serial; 1743 __entry->ack_reason = ack_reason; 1744 ), 1745 1746 TP_printk("c=%08x %s %s r=%08x", 1747 __entry->call, 1748 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1749 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1750 __entry->serial) 1751 ); 1752 1753 TRACE_EVENT(rxrpc_drop_ack, 1754 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1755 u8 ack_reason, rxrpc_serial_t serial, bool nobuf), 1756 1757 TP_ARGS(call, why, ack_reason, serial, nobuf), 1758 1759 TP_STRUCT__entry( 1760 __field(unsigned int, call) 1761 __field(enum rxrpc_propose_ack_trace, why) 1762 __field(rxrpc_serial_t, serial) 1763 __field(u8, ack_reason) 1764 __field(bool, nobuf) 1765 ), 1766 1767 TP_fast_assign( 1768 __entry->call = call->debug_id; 1769 __entry->why = why; 1770 __entry->serial = serial; 1771 __entry->ack_reason = ack_reason; 1772 __entry->nobuf = nobuf; 1773 ), 1774 1775 TP_printk("c=%08x %s %s r=%08x nbf=%u", 1776 __entry->call, 1777 __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1778 __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1779 __entry->serial, __entry->nobuf) 1780 ); 1781 1782 TRACE_EVENT(rxrpc_retransmit, 1783 TP_PROTO(struct rxrpc_call *call, 1784 struct rxrpc_send_data_req *req, 1785 struct rxrpc_txbuf *txb), 1786 1787 TP_ARGS(call, req, txb), 1788 1789 TP_STRUCT__entry( 1790 __field(unsigned int, call) 1791 __field(unsigned int, qbase) 1792 __field(rxrpc_seq_t, seq) 1793 __field(rxrpc_serial_t, serial) 1794 ), 1795 1796 TP_fast_assign( 1797 __entry->call = call->debug_id; 1798 __entry->qbase = req->tq->qbase; 1799 __entry->seq = req->seq; 1800 __entry->serial = txb->serial; 1801 ), 1802 1803 TP_printk("c=%08x tq=%x q=%x r=%x", 1804 __entry->call, 1805 __entry->qbase, 1806 __entry->seq, 1807 __entry->serial) 1808 ); 1809 1810 TRACE_EVENT(rxrpc_congest, 1811 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary), 1812 1813 TP_ARGS(call, summary), 1814 1815 TP_STRUCT__entry( 1816 __field(unsigned int, call) 1817 __field(enum rxrpc_ca_state, ca_state) 1818 __field(rxrpc_seq_t, hard_ack) 1819 __field(rxrpc_seq_t, top) 1820 __field(rxrpc_seq_t, lowest_nak) 1821 __field(u16, nr_sacks) 1822 __field(u16, nr_snacks) 1823 __field(u16, cwnd) 1824 __field(u16, ssthresh) 1825 __field(u16, cumul_acks) 1826 __field(u16, dup_acks) 1827 __field_struct(struct rxrpc_ack_summary, sum) 1828 ), 1829 1830 TP_fast_assign( 1831 __entry->call = call->debug_id; 1832 __entry->ca_state = call->cong_ca_state; 1833 __entry->hard_ack = call->acks_hard_ack; 1834 __entry->top = call->tx_top; 1835 __entry->lowest_nak = call->acks_lowest_nak; 1836 __entry->nr_sacks = call->acks_nr_sacks; 1837 __entry->nr_snacks = call->acks_nr_snacks; 1838 __entry->cwnd = call->cong_cwnd; 1839 __entry->ssthresh = call->cong_ssthresh; 1840 __entry->cumul_acks = call->cong_cumul_acks; 1841 __entry->dup_acks = call->cong_dup_acks; 1842 memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 1843 ), 1844 1845 TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u A=%u+%u/%u+%u r=%u b=%u u=%u d=%u l=%x%s%s%s", 1846 __entry->call, 1847 __entry->sum.acked_serial, 1848 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 1849 __entry->hard_ack, 1850 __print_symbolic(__entry->ca_state, rxrpc_ca_states), 1851 __entry->cwnd, 1852 __entry->ssthresh, 1853 __entry->nr_sacks, __entry->sum.nr_new_sacks, 1854 __entry->nr_snacks, __entry->sum.nr_new_snacks, 1855 __entry->sum.nr_new_hacks, 1856 __entry->top - __entry->hard_ack, 1857 __entry->cumul_acks, 1858 __entry->dup_acks, 1859 __entry->lowest_nak, __entry->sum.new_low_snack ? "!" : "", 1860 __print_symbolic(__entry->sum.change, rxrpc_congest_changes), 1861 __entry->sum.retrans_timeo ? " rTxTo" : "") 1862 ); 1863 1864 TRACE_EVENT(rxrpc_reset_cwnd, 1865 TP_PROTO(struct rxrpc_call *call, ktime_t since_last_tx, ktime_t rtt), 1866 1867 TP_ARGS(call, since_last_tx, rtt), 1868 1869 TP_STRUCT__entry( 1870 __field(unsigned int, call) 1871 __field(enum rxrpc_ca_state, ca_state) 1872 __field(unsigned short, cwnd) 1873 __field(unsigned short, extra) 1874 __field(rxrpc_seq_t, hard_ack) 1875 __field(rxrpc_seq_t, prepared) 1876 __field(ktime_t, since_last_tx) 1877 __field(ktime_t, rtt) 1878 __field(bool, has_data) 1879 ), 1880 1881 TP_fast_assign( 1882 __entry->call = call->debug_id; 1883 __entry->ca_state = call->cong_ca_state; 1884 __entry->cwnd = call->cong_cwnd; 1885 __entry->extra = call->cong_extra; 1886 __entry->hard_ack = call->acks_hard_ack; 1887 __entry->prepared = call->send_top - call->tx_bottom; 1888 __entry->since_last_tx = since_last_tx; 1889 __entry->rtt = rtt; 1890 __entry->has_data = call->tx_bottom != call->tx_top; 1891 ), 1892 1893 TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu/%llu d=%u", 1894 __entry->call, 1895 __entry->hard_ack, 1896 __print_symbolic(__entry->ca_state, rxrpc_ca_states), 1897 __entry->cwnd, 1898 __entry->extra, 1899 __entry->prepared, 1900 ktime_to_us(__entry->since_last_tx), 1901 ktime_to_us(__entry->rtt), 1902 __entry->has_data) 1903 ); 1904 1905 TRACE_EVENT(rxrpc_disconnect_call, 1906 TP_PROTO(struct rxrpc_call *call), 1907 1908 TP_ARGS(call), 1909 1910 TP_STRUCT__entry( 1911 __field(unsigned int, call) 1912 __field(u32, abort_code) 1913 ), 1914 1915 TP_fast_assign( 1916 __entry->call = call->debug_id; 1917 __entry->abort_code = call->abort_code; 1918 ), 1919 1920 TP_printk("c=%08x ab=%08x", 1921 __entry->call, 1922 __entry->abort_code) 1923 ); 1924 1925 TRACE_EVENT(rxrpc_improper_term, 1926 TP_PROTO(struct rxrpc_call *call), 1927 1928 TP_ARGS(call), 1929 1930 TP_STRUCT__entry( 1931 __field(unsigned int, call) 1932 __field(u32, abort_code) 1933 ), 1934 1935 TP_fast_assign( 1936 __entry->call = call->debug_id; 1937 __entry->abort_code = call->abort_code; 1938 ), 1939 1940 TP_printk("c=%08x ab=%08x", 1941 __entry->call, 1942 __entry->abort_code) 1943 ); 1944 1945 TRACE_EVENT(rxrpc_connect_call, 1946 TP_PROTO(struct rxrpc_call *call), 1947 1948 TP_ARGS(call), 1949 1950 TP_STRUCT__entry( 1951 __field(unsigned int, call) 1952 __field(unsigned long, user_call_ID) 1953 __field(u32, cid) 1954 __field(u32, call_id) 1955 __field_struct(struct sockaddr_rxrpc, srx) 1956 ), 1957 1958 TP_fast_assign( 1959 __entry->call = call->debug_id; 1960 __entry->user_call_ID = call->user_call_ID; 1961 __entry->cid = call->cid; 1962 __entry->call_id = call->call_id; 1963 __entry->srx = call->dest_srx; 1964 ), 1965 1966 TP_printk("c=%08x u=%p %08x:%08x dst=%pISp", 1967 __entry->call, 1968 (void *)__entry->user_call_ID, 1969 __entry->cid, 1970 __entry->call_id, 1971 &__entry->srx.transport) 1972 ); 1973 1974 TRACE_EVENT(rxrpc_apply_acks, 1975 TP_PROTO(struct rxrpc_call *call, struct rxrpc_txqueue *tq), 1976 1977 TP_ARGS(call, tq), 1978 1979 TP_STRUCT__entry( 1980 __field(unsigned int, call) 1981 __field(unsigned int, nr_rep) 1982 __field(rxrpc_seq_t, qbase) 1983 __field(unsigned long, acks) 1984 ), 1985 1986 TP_fast_assign( 1987 __entry->call = call->debug_id; 1988 __entry->qbase = tq->qbase; 1989 __entry->acks = tq->segment_acked; 1990 __entry->nr_rep = tq->nr_reported_acks; 1991 ), 1992 1993 TP_printk("c=%08x tq=%x acks=%016lx rep=%u", 1994 __entry->call, 1995 __entry->qbase, 1996 __entry->acks, 1997 __entry->nr_rep) 1998 ); 1999 2000 TRACE_EVENT(rxrpc_resend, 2001 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t ack_serial), 2002 2003 TP_ARGS(call, ack_serial), 2004 2005 TP_STRUCT__entry( 2006 __field(unsigned int, call) 2007 __field(rxrpc_seq_t, seq) 2008 __field(rxrpc_seq_t, transmitted) 2009 __field(rxrpc_serial_t, ack_serial) 2010 ), 2011 2012 TP_fast_assign( 2013 __entry->call = call->debug_id; 2014 __entry->seq = call->acks_hard_ack; 2015 __entry->transmitted = call->tx_transmitted; 2016 __entry->ack_serial = ack_serial; 2017 ), 2018 2019 TP_printk("c=%08x r=%x q=%x tq=%x", 2020 __entry->call, 2021 __entry->ack_serial, 2022 __entry->seq, 2023 __entry->transmitted) 2024 ); 2025 2026 TRACE_EVENT(rxrpc_resend_lost, 2027 TP_PROTO(struct rxrpc_call *call, struct rxrpc_txqueue *tq, unsigned long lost), 2028 2029 TP_ARGS(call, tq, lost), 2030 2031 TP_STRUCT__entry( 2032 __field(unsigned int, call) 2033 __field(rxrpc_seq_t, qbase) 2034 __field(u8, nr_rep) 2035 __field(unsigned long, lost) 2036 ), 2037 2038 TP_fast_assign( 2039 __entry->call = call->debug_id; 2040 __entry->qbase = tq->qbase; 2041 __entry->nr_rep = tq->nr_reported_acks; 2042 __entry->lost = lost; 2043 ), 2044 2045 TP_printk("c=%08x tq=%x lost=%016lx nr=%u", 2046 __entry->call, 2047 __entry->qbase, 2048 __entry->lost, 2049 __entry->nr_rep) 2050 ); 2051 2052 TRACE_EVENT(rxrpc_rotate, 2053 TP_PROTO(struct rxrpc_call *call, struct rxrpc_txqueue *tq, 2054 struct rxrpc_ack_summary *summary, rxrpc_seq_t seq, 2055 enum rxrpc_rotate_trace trace), 2056 2057 TP_ARGS(call, tq, summary, seq, trace), 2058 2059 TP_STRUCT__entry( 2060 __field(unsigned int, call) 2061 __field(rxrpc_seq_t, qbase) 2062 __field(rxrpc_seq_t, seq) 2063 __field(unsigned int, nr_rep) 2064 __field(enum rxrpc_rotate_trace, trace) 2065 ), 2066 2067 TP_fast_assign( 2068 __entry->call = call->debug_id; 2069 __entry->qbase = tq->qbase; 2070 __entry->seq = seq; 2071 __entry->nr_rep = tq->nr_reported_acks; 2072 __entry->trace = trace; 2073 ), 2074 2075 TP_printk("c=%08x tq=%x q=%x nr=%x %s", 2076 __entry->call, 2077 __entry->qbase, 2078 __entry->seq, 2079 __entry->nr_rep, 2080 __print_symbolic(__entry->trace, rxrpc_rotate_traces)) 2081 ); 2082 2083 TRACE_EVENT(rxrpc_rx_icmp, 2084 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, 2085 struct sockaddr_rxrpc *srx), 2086 2087 TP_ARGS(peer, ee, srx), 2088 2089 TP_STRUCT__entry( 2090 __field(unsigned int, peer) 2091 __field_struct(struct sock_extended_err, ee) 2092 __field_struct(struct sockaddr_rxrpc, srx) 2093 ), 2094 2095 TP_fast_assign( 2096 __entry->peer = peer->debug_id; 2097 memcpy(&__entry->ee, ee, sizeof(__entry->ee)); 2098 memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 2099 ), 2100 2101 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", 2102 __entry->peer, 2103 __entry->ee.ee_origin, 2104 __entry->ee.ee_type, 2105 __entry->ee.ee_code, 2106 __entry->ee.ee_info, 2107 __entry->ee.ee_data, 2108 __entry->ee.ee_errno, 2109 &__entry->srx.transport) 2110 ); 2111 2112 TRACE_EVENT(rxrpc_tx_fail, 2113 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, 2114 enum rxrpc_tx_point where), 2115 2116 TP_ARGS(debug_id, serial, ret, where), 2117 2118 TP_STRUCT__entry( 2119 __field(unsigned int, debug_id) 2120 __field(rxrpc_serial_t, serial) 2121 __field(int, ret) 2122 __field(enum rxrpc_tx_point, where) 2123 ), 2124 2125 TP_fast_assign( 2126 __entry->debug_id = debug_id; 2127 __entry->serial = serial; 2128 __entry->ret = ret; 2129 __entry->where = where; 2130 ), 2131 2132 TP_printk("c=%08x r=%x ret=%d %s", 2133 __entry->debug_id, 2134 __entry->serial, 2135 __entry->ret, 2136 __print_symbolic(__entry->where, rxrpc_tx_points)) 2137 ); 2138 2139 TRACE_EVENT(rxrpc_call_reset, 2140 TP_PROTO(struct rxrpc_call *call), 2141 2142 TP_ARGS(call), 2143 2144 TP_STRUCT__entry( 2145 __field(unsigned int, debug_id) 2146 __field(u32, cid) 2147 __field(u32, call_id) 2148 __field(rxrpc_serial_t, call_serial) 2149 __field(rxrpc_serial_t, conn_serial) 2150 __field(rxrpc_seq_t, tx_seq) 2151 __field(rxrpc_seq_t, rx_seq) 2152 ), 2153 2154 TP_fast_assign( 2155 __entry->debug_id = call->debug_id; 2156 __entry->cid = call->cid; 2157 __entry->call_id = call->call_id; 2158 __entry->call_serial = call->rx_serial; 2159 __entry->conn_serial = call->conn->hi_serial; 2160 __entry->tx_seq = call->acks_hard_ack; 2161 __entry->rx_seq = call->rx_highest_seq; 2162 ), 2163 2164 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", 2165 __entry->debug_id, 2166 __entry->cid, __entry->call_id, 2167 __entry->call_serial, __entry->conn_serial, 2168 __entry->tx_seq, __entry->rx_seq) 2169 ); 2170 2171 TRACE_EVENT(rxrpc_notify_socket, 2172 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), 2173 2174 TP_ARGS(debug_id, serial), 2175 2176 TP_STRUCT__entry( 2177 __field(unsigned int, debug_id) 2178 __field(rxrpc_serial_t, serial) 2179 ), 2180 2181 TP_fast_assign( 2182 __entry->debug_id = debug_id; 2183 __entry->serial = serial; 2184 ), 2185 2186 TP_printk("c=%08x r=%08x", 2187 __entry->debug_id, 2188 __entry->serial) 2189 ); 2190 2191 TRACE_EVENT(rxrpc_rx_discard_ack, 2192 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 2193 rxrpc_seq_t hard_ack, rxrpc_seq_t prev_pkt), 2194 2195 TP_ARGS(call, serial, hard_ack, prev_pkt), 2196 2197 TP_STRUCT__entry( 2198 __field(unsigned int, debug_id) 2199 __field(rxrpc_serial_t, serial) 2200 __field(rxrpc_seq_t, hard_ack) 2201 __field(rxrpc_seq_t, prev_pkt) 2202 __field(rxrpc_seq_t, acks_hard_ack) 2203 __field(rxrpc_seq_t, acks_prev_seq) 2204 ), 2205 2206 TP_fast_assign( 2207 __entry->debug_id = call->debug_id; 2208 __entry->serial = serial; 2209 __entry->hard_ack = hard_ack; 2210 __entry->prev_pkt = prev_pkt; 2211 __entry->acks_hard_ack = call->acks_hard_ack; 2212 __entry->acks_prev_seq = call->acks_prev_seq; 2213 ), 2214 2215 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x", 2216 __entry->debug_id, 2217 __entry->serial, 2218 __entry->hard_ack, 2219 __entry->acks_hard_ack, 2220 __entry->prev_pkt, 2221 __entry->acks_prev_seq) 2222 ); 2223 2224 TRACE_EVENT(rxrpc_req_ack, 2225 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq, 2226 enum rxrpc_req_ack_trace why), 2227 2228 TP_ARGS(call_debug_id, seq, why), 2229 2230 TP_STRUCT__entry( 2231 __field(unsigned int, call_debug_id) 2232 __field(rxrpc_seq_t, seq) 2233 __field(enum rxrpc_req_ack_trace, why) 2234 ), 2235 2236 TP_fast_assign( 2237 __entry->call_debug_id = call_debug_id; 2238 __entry->seq = seq; 2239 __entry->why = why; 2240 ), 2241 2242 TP_printk("c=%08x q=%08x REQ-%s", 2243 __entry->call_debug_id, 2244 __entry->seq, 2245 __print_symbolic(__entry->why, rxrpc_req_ack_traces)) 2246 ); 2247 2248 TRACE_EVENT(rxrpc_txbuf, 2249 TP_PROTO(unsigned int debug_id, 2250 unsigned int call_debug_id, rxrpc_seq_t seq, 2251 int ref, enum rxrpc_txbuf_trace what), 2252 2253 TP_ARGS(debug_id, call_debug_id, seq, ref, what), 2254 2255 TP_STRUCT__entry( 2256 __field(unsigned int, debug_id) 2257 __field(unsigned int, call_debug_id) 2258 __field(rxrpc_seq_t, seq) 2259 __field(int, ref) 2260 __field(enum rxrpc_txbuf_trace, what) 2261 ), 2262 2263 TP_fast_assign( 2264 __entry->debug_id = debug_id; 2265 __entry->call_debug_id = call_debug_id; 2266 __entry->seq = seq; 2267 __entry->ref = ref; 2268 __entry->what = what; 2269 ), 2270 2271 TP_printk("B=%08x c=%08x q=%08x %s r=%d", 2272 __entry->debug_id, 2273 __entry->call_debug_id, 2274 __entry->seq, 2275 __print_symbolic(__entry->what, rxrpc_txbuf_traces), 2276 __entry->ref) 2277 ); 2278 2279 TRACE_EVENT(rxrpc_tq, 2280 TP_PROTO(struct rxrpc_call *call, struct rxrpc_txqueue *tq, 2281 rxrpc_seq_t seq, enum rxrpc_tq_trace trace), 2282 2283 TP_ARGS(call, tq, seq, trace), 2284 2285 TP_STRUCT__entry( 2286 __field(unsigned int, call_debug_id) 2287 __field(rxrpc_seq_t, qbase) 2288 __field(rxrpc_seq_t, seq) 2289 __field(enum rxrpc_tq_trace, trace) 2290 ), 2291 2292 TP_fast_assign( 2293 __entry->call_debug_id = call->debug_id; 2294 __entry->qbase = tq ? tq->qbase : call->tx_qbase; 2295 __entry->seq = seq; 2296 __entry->trace = trace; 2297 ), 2298 2299 TP_printk("c=%08x bq=%08x q=%08x %s", 2300 __entry->call_debug_id, 2301 __entry->qbase, 2302 __entry->seq, 2303 __print_symbolic(__entry->trace, rxrpc_tq_traces)) 2304 ); 2305 2306 TRACE_EVENT(rxrpc_poke_call, 2307 TP_PROTO(struct rxrpc_call *call, bool busy, 2308 enum rxrpc_call_poke_trace what), 2309 2310 TP_ARGS(call, busy, what), 2311 2312 TP_STRUCT__entry( 2313 __field(unsigned int, call_debug_id) 2314 __field(bool, busy) 2315 __field(enum rxrpc_call_poke_trace, what) 2316 ), 2317 2318 TP_fast_assign( 2319 __entry->call_debug_id = call->debug_id; 2320 __entry->busy = busy; 2321 __entry->what = what; 2322 ), 2323 2324 TP_printk("c=%08x %s%s", 2325 __entry->call_debug_id, 2326 __print_symbolic(__entry->what, rxrpc_call_poke_traces), 2327 __entry->busy ? "!" : "") 2328 ); 2329 2330 TRACE_EVENT(rxrpc_call_poked, 2331 TP_PROTO(struct rxrpc_call *call), 2332 2333 TP_ARGS(call), 2334 2335 TP_STRUCT__entry( 2336 __field(unsigned int, call_debug_id) 2337 ), 2338 2339 TP_fast_assign( 2340 __entry->call_debug_id = call->debug_id; 2341 ), 2342 2343 TP_printk("c=%08x", 2344 __entry->call_debug_id) 2345 ); 2346 2347 TRACE_EVENT(rxrpc_sack, 2348 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 2349 unsigned int sack, enum rxrpc_sack_trace what), 2350 2351 TP_ARGS(call, seq, sack, what), 2352 2353 TP_STRUCT__entry( 2354 __field(unsigned int, call_debug_id) 2355 __field(rxrpc_seq_t, seq) 2356 __field(unsigned int, sack) 2357 __field(enum rxrpc_sack_trace, what) 2358 ), 2359 2360 TP_fast_assign( 2361 __entry->call_debug_id = call->debug_id; 2362 __entry->seq = seq; 2363 __entry->sack = sack; 2364 __entry->what = what; 2365 ), 2366 2367 TP_printk("c=%08x q=%08x %s k=%x", 2368 __entry->call_debug_id, 2369 __entry->seq, 2370 __print_symbolic(__entry->what, rxrpc_sack_traces), 2371 __entry->sack) 2372 ); 2373 2374 TRACE_EVENT(rxrpc_pmtud_tx, 2375 TP_PROTO(struct rxrpc_call *call), 2376 2377 TP_ARGS(call), 2378 2379 TP_STRUCT__entry( 2380 __field(unsigned int, peer_debug_id) 2381 __field(unsigned int, call_debug_id) 2382 __field(rxrpc_serial_t, ping_serial) 2383 __field(unsigned short, pmtud_trial) 2384 __field(unsigned short, pmtud_good) 2385 __field(unsigned short, pmtud_bad) 2386 ), 2387 2388 TP_fast_assign( 2389 __entry->peer_debug_id = call->peer->debug_id; 2390 __entry->call_debug_id = call->debug_id; 2391 __entry->ping_serial = call->conn->pmtud_probe; 2392 __entry->pmtud_trial = call->peer->pmtud_trial; 2393 __entry->pmtud_good = call->peer->pmtud_good; 2394 __entry->pmtud_bad = call->peer->pmtud_bad; 2395 ), 2396 2397 TP_printk("P=%08x c=%08x pr=%08x %u-%u-%u", 2398 __entry->peer_debug_id, 2399 __entry->call_debug_id, 2400 __entry->ping_serial, 2401 __entry->pmtud_good, 2402 __entry->pmtud_trial, 2403 __entry->pmtud_bad) 2404 ); 2405 2406 TRACE_EVENT(rxrpc_pmtud_rx, 2407 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t resp_serial), 2408 2409 TP_ARGS(conn, resp_serial), 2410 2411 TP_STRUCT__entry( 2412 __field(unsigned int, peer_debug_id) 2413 __field(unsigned int, call_debug_id) 2414 __field(rxrpc_serial_t, ping_serial) 2415 __field(rxrpc_serial_t, resp_serial) 2416 __field(unsigned short, max_data) 2417 __field(u8, jumbo_max) 2418 ), 2419 2420 TP_fast_assign( 2421 __entry->peer_debug_id = conn->peer->debug_id; 2422 __entry->call_debug_id = conn->pmtud_call; 2423 __entry->ping_serial = conn->pmtud_probe; 2424 __entry->resp_serial = resp_serial; 2425 __entry->max_data = conn->peer->max_data; 2426 __entry->jumbo_max = conn->peer->pmtud_jumbo; 2427 ), 2428 2429 TP_printk("P=%08x c=%08x pr=%08x rr=%08x max=%u jm=%u", 2430 __entry->peer_debug_id, 2431 __entry->call_debug_id, 2432 __entry->ping_serial, 2433 __entry->resp_serial, 2434 __entry->max_data, 2435 __entry->jumbo_max) 2436 ); 2437 2438 TRACE_EVENT(rxrpc_pmtud_lost, 2439 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t resp_serial), 2440 2441 TP_ARGS(conn, resp_serial), 2442 2443 TP_STRUCT__entry( 2444 __field(unsigned int, peer_debug_id) 2445 __field(unsigned int, call_debug_id) 2446 __field(rxrpc_serial_t, ping_serial) 2447 __field(rxrpc_serial_t, resp_serial) 2448 ), 2449 2450 TP_fast_assign( 2451 __entry->peer_debug_id = conn->peer->debug_id; 2452 __entry->call_debug_id = conn->pmtud_call; 2453 __entry->ping_serial = conn->pmtud_probe; 2454 __entry->resp_serial = resp_serial; 2455 ), 2456 2457 TP_printk("P=%08x c=%08x pr=%08x rr=%08x", 2458 __entry->peer_debug_id, 2459 __entry->call_debug_id, 2460 __entry->ping_serial, 2461 __entry->resp_serial) 2462 ); 2463 2464 TRACE_EVENT(rxrpc_pmtud_reduce, 2465 TP_PROTO(struct rxrpc_peer *peer, rxrpc_serial_t serial, 2466 unsigned int max_data, enum rxrpc_pmtud_reduce_trace reason), 2467 2468 TP_ARGS(peer, serial, max_data, reason), 2469 2470 TP_STRUCT__entry( 2471 __field(unsigned int, peer_debug_id) 2472 __field(rxrpc_serial_t, serial) 2473 __field(unsigned int, max_data) 2474 __field(enum rxrpc_pmtud_reduce_trace, reason) 2475 ), 2476 2477 TP_fast_assign( 2478 __entry->peer_debug_id = peer->debug_id; 2479 __entry->serial = serial; 2480 __entry->max_data = max_data; 2481 __entry->reason = reason; 2482 ), 2483 2484 TP_printk("P=%08x %s r=%08x m=%u", 2485 __entry->peer_debug_id, 2486 __print_symbolic(__entry->reason, rxrpc_pmtud_reduce_traces), 2487 __entry->serial, __entry->max_data) 2488 ); 2489 2490 TRACE_EVENT(rxrpc_rack, 2491 TP_PROTO(struct rxrpc_call *call, ktime_t timo), 2492 2493 TP_ARGS(call, timo), 2494 2495 TP_STRUCT__entry( 2496 __field(unsigned int, call) 2497 __field(rxrpc_serial_t, ack_serial) 2498 __field(rxrpc_seq_t, seq) 2499 __field(enum rxrpc_rack_timer_mode, mode) 2500 __field(unsigned short, nr_sent) 2501 __field(unsigned short, nr_lost) 2502 __field(unsigned short, nr_resent) 2503 __field(unsigned short, nr_sacked) 2504 __field(ktime_t, timo) 2505 ), 2506 2507 TP_fast_assign( 2508 __entry->call = call->debug_id; 2509 __entry->ack_serial = call->rx_serial; 2510 __entry->seq = call->rack_end_seq; 2511 __entry->mode = call->rack_timer_mode; 2512 __entry->nr_sent = call->tx_nr_sent; 2513 __entry->nr_lost = call->tx_nr_lost; 2514 __entry->nr_resent = call->tx_nr_resent; 2515 __entry->nr_sacked = call->acks_nr_sacks; 2516 __entry->timo = timo; 2517 ), 2518 2519 TP_printk("c=%08x r=%08x q=%08x %s slrs=%u,%u,%u,%u t=%lld", 2520 __entry->call, __entry->ack_serial, __entry->seq, 2521 __print_symbolic(__entry->mode, rxrpc_rack_timer_modes), 2522 __entry->nr_sent, __entry->nr_lost, 2523 __entry->nr_resent, __entry->nr_sacked, 2524 ktime_to_us(__entry->timo)) 2525 ); 2526 2527 TRACE_EVENT(rxrpc_rack_update, 2528 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary), 2529 2530 TP_ARGS(call, summary), 2531 2532 TP_STRUCT__entry( 2533 __field(unsigned int, call) 2534 __field(rxrpc_serial_t, ack_serial) 2535 __field(rxrpc_seq_t, seq) 2536 __field(int, xmit_ts) 2537 ), 2538 2539 TP_fast_assign( 2540 __entry->call = call->debug_id; 2541 __entry->ack_serial = call->rx_serial; 2542 __entry->seq = call->rack_end_seq; 2543 __entry->xmit_ts = ktime_sub(call->acks_latest_ts, call->rack_xmit_ts); 2544 ), 2545 2546 TP_printk("c=%08x r=%08x q=%08x xt=%lld", 2547 __entry->call, __entry->ack_serial, __entry->seq, 2548 ktime_to_us(__entry->xmit_ts)) 2549 ); 2550 2551 TRACE_EVENT(rxrpc_rack_scan_loss, 2552 TP_PROTO(struct rxrpc_call *call), 2553 2554 TP_ARGS(call), 2555 2556 TP_STRUCT__entry( 2557 __field(unsigned int, call) 2558 __field(ktime_t, rack_rtt) 2559 __field(ktime_t, rack_reo_wnd) 2560 ), 2561 2562 TP_fast_assign( 2563 __entry->call = call->debug_id; 2564 __entry->rack_rtt = call->rack_rtt; 2565 __entry->rack_reo_wnd = call->rack_reo_wnd; 2566 ), 2567 2568 TP_printk("c=%08x rtt=%lld reow=%lld", 2569 __entry->call, ktime_to_us(__entry->rack_rtt), 2570 ktime_to_us(__entry->rack_reo_wnd)) 2571 ); 2572 2573 TRACE_EVENT(rxrpc_rack_scan_loss_tq, 2574 TP_PROTO(struct rxrpc_call *call, const struct rxrpc_txqueue *tq, 2575 unsigned long nacks), 2576 2577 TP_ARGS(call, tq, nacks), 2578 2579 TP_STRUCT__entry( 2580 __field(unsigned int, call) 2581 __field(rxrpc_seq_t, qbase) 2582 __field(unsigned long, nacks) 2583 __field(unsigned long, lost) 2584 __field(unsigned long, retrans) 2585 ), 2586 2587 TP_fast_assign( 2588 __entry->call = call->debug_id; 2589 __entry->qbase = tq->qbase; 2590 __entry->nacks = nacks; 2591 __entry->lost = tq->segment_lost; 2592 __entry->retrans = tq->segment_retransmitted; 2593 ), 2594 2595 TP_printk("c=%08x q=%08x n=%lx l=%lx r=%lx", 2596 __entry->call, __entry->qbase, 2597 __entry->nacks, __entry->lost, __entry->retrans) 2598 ); 2599 2600 TRACE_EVENT(rxrpc_rack_detect_loss, 2601 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 2602 rxrpc_seq_t seq), 2603 2604 TP_ARGS(call, summary, seq), 2605 2606 TP_STRUCT__entry( 2607 __field(unsigned int, call) 2608 __field(rxrpc_serial_t, ack_serial) 2609 __field(rxrpc_seq_t, seq) 2610 ), 2611 2612 TP_fast_assign( 2613 __entry->call = call->debug_id; 2614 __entry->ack_serial = call->rx_serial; 2615 __entry->seq = seq; 2616 ), 2617 2618 TP_printk("c=%08x r=%08x q=%08x", 2619 __entry->call, __entry->ack_serial, __entry->seq) 2620 ); 2621 2622 TRACE_EVENT(rxrpc_rack_mark_loss_tq, 2623 TP_PROTO(struct rxrpc_call *call, const struct rxrpc_txqueue *tq), 2624 2625 TP_ARGS(call, tq), 2626 2627 TP_STRUCT__entry( 2628 __field(unsigned int, call) 2629 __field(rxrpc_seq_t, qbase) 2630 __field(rxrpc_seq_t, trans) 2631 __field(unsigned long, acked) 2632 __field(unsigned long, lost) 2633 __field(unsigned long, retrans) 2634 ), 2635 2636 TP_fast_assign( 2637 __entry->call = call->debug_id; 2638 __entry->qbase = tq->qbase; 2639 __entry->trans = call->tx_transmitted; 2640 __entry->acked = tq->segment_acked; 2641 __entry->lost = tq->segment_lost; 2642 __entry->retrans = tq->segment_retransmitted; 2643 ), 2644 2645 TP_printk("c=%08x tq=%08x txq=%08x a=%lx l=%lx r=%lx", 2646 __entry->call, __entry->qbase, __entry->trans, 2647 __entry->acked, __entry->lost, __entry->retrans) 2648 ); 2649 2650 TRACE_EVENT(rxrpc_tlp_probe, 2651 TP_PROTO(struct rxrpc_call *call, enum rxrpc_tlp_probe_trace trace), 2652 2653 TP_ARGS(call, trace), 2654 2655 TP_STRUCT__entry( 2656 __field(unsigned int, call) 2657 __field(rxrpc_serial_t, serial) 2658 __field(rxrpc_seq_t, seq) 2659 __field(enum rxrpc_tlp_probe_trace, trace) 2660 ), 2661 2662 TP_fast_assign( 2663 __entry->call = call->debug_id; 2664 __entry->serial = call->tlp_serial; 2665 __entry->seq = call->tlp_seq; 2666 __entry->trace = trace; 2667 ), 2668 2669 TP_printk("c=%08x r=%08x pq=%08x %s", 2670 __entry->call, __entry->serial, __entry->seq, 2671 __print_symbolic(__entry->trace, rxrpc_tlp_probe_traces)) 2672 ); 2673 2674 TRACE_EVENT(rxrpc_tlp_ack, 2675 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 2676 enum rxrpc_tlp_ack_trace trace), 2677 2678 TP_ARGS(call, summary, trace), 2679 2680 TP_STRUCT__entry( 2681 __field(unsigned int, call) 2682 __field(rxrpc_serial_t, serial) 2683 __field(rxrpc_seq_t, tlp_seq) 2684 __field(rxrpc_seq_t, hard_ack) 2685 __field(enum rxrpc_tlp_ack_trace, trace) 2686 ), 2687 2688 TP_fast_assign( 2689 __entry->call = call->debug_id; 2690 __entry->serial = call->tlp_serial; 2691 __entry->tlp_seq = call->tlp_seq; 2692 __entry->hard_ack = call->acks_hard_ack; 2693 __entry->trace = trace; 2694 ), 2695 2696 TP_printk("c=%08x r=%08x pq=%08x hq=%08x %s", 2697 __entry->call, __entry->serial, 2698 __entry->tlp_seq, __entry->hard_ack, 2699 __print_symbolic(__entry->trace, rxrpc_tlp_ack_traces)) 2700 ); 2701 2702 TRACE_EVENT(rxrpc_rack_timer, 2703 TP_PROTO(struct rxrpc_call *call, ktime_t delay, bool exp), 2704 2705 TP_ARGS(call, delay, exp), 2706 2707 TP_STRUCT__entry( 2708 __field(unsigned int, call) 2709 __field(bool, exp) 2710 __field(enum rxrpc_rack_timer_mode, mode) 2711 __field(ktime_t, delay) 2712 ), 2713 2714 TP_fast_assign( 2715 __entry->call = call->debug_id; 2716 __entry->exp = exp; 2717 __entry->mode = call->rack_timer_mode; 2718 __entry->delay = delay; 2719 ), 2720 2721 TP_printk("c=%08x %s %s to=%lld", 2722 __entry->call, 2723 __entry->exp ? "Exp" : "Set", 2724 __print_symbolic(__entry->mode, rxrpc_rack_timer_modes), 2725 ktime_to_us(__entry->delay)) 2726 ); 2727 2728 #undef EM 2729 #undef E_ 2730 2731 #endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */ 2732 #endif /* _TRACE_RXRPC_H */ 2733 2734 /* This part must be outside protection */ 2735 #include <trace/define_trace.h> 2736