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