1b4d0d230SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 2df844fd4SDavid Howells /* AF_RXRPC tracepoints 3df844fd4SDavid Howells * 4df844fd4SDavid Howells * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 5df844fd4SDavid Howells * Written by David Howells (dhowells@redhat.com) 6df844fd4SDavid Howells */ 7df844fd4SDavid Howells #undef TRACE_SYSTEM 8df844fd4SDavid Howells #define TRACE_SYSTEM rxrpc 9df844fd4SDavid Howells 10df844fd4SDavid Howells #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) 11df844fd4SDavid Howells #define _TRACE_RXRPC_H 12df844fd4SDavid Howells 13df844fd4SDavid Howells #include <linux/tracepoint.h> 14494337c9SDavid Howells #include <linux/errqueue.h> 15df844fd4SDavid Howells 16b54a134aSDavid Howells /* 17b54a134aSDavid Howells * Declare tracing information enums and their string mappings for display. 18b54a134aSDavid Howells */ 1957af281eSDavid Howells #define rxrpc_abort_reasons \ 2057af281eSDavid Howells /* AFS errors */ \ 2157af281eSDavid Howells EM(afs_abort_general_error, "afs-error") \ 2257af281eSDavid Howells EM(afs_abort_interrupted, "afs-intr") \ 2357af281eSDavid Howells EM(afs_abort_oom, "afs-oom") \ 2457af281eSDavid Howells EM(afs_abort_op_not_supported, "afs-op-notsupp") \ 2557af281eSDavid Howells EM(afs_abort_probeuuid_negative, "afs-probeuuid-neg") \ 2657af281eSDavid Howells EM(afs_abort_send_data_error, "afs-send-data") \ 2757af281eSDavid Howells EM(afs_abort_unmarshal_error, "afs-unmarshal") \ 2857af281eSDavid Howells /* rxperf errors */ \ 2957af281eSDavid Howells EM(rxperf_abort_general_error, "rxperf-error") \ 3057af281eSDavid Howells EM(rxperf_abort_oom, "rxperf-oom") \ 3157af281eSDavid Howells EM(rxperf_abort_op_not_supported, "rxperf-op-notsupp") \ 3257af281eSDavid Howells EM(rxperf_abort_unmarshal_error, "rxperf-unmarshal") \ 3357af281eSDavid Howells /* RxKAD security errors */ \ 3457af281eSDavid Howells EM(rxkad_abort_1_short_check, "rxkad1-short-check") \ 3557af281eSDavid Howells EM(rxkad_abort_1_short_data, "rxkad1-short-data") \ 3657af281eSDavid Howells EM(rxkad_abort_1_short_encdata, "rxkad1-short-encdata") \ 3757af281eSDavid Howells EM(rxkad_abort_1_short_header, "rxkad1-short-hdr") \ 3857af281eSDavid Howells EM(rxkad_abort_2_short_check, "rxkad2-short-check") \ 3957af281eSDavid Howells EM(rxkad_abort_2_short_data, "rxkad2-short-data") \ 4057af281eSDavid Howells EM(rxkad_abort_2_short_header, "rxkad2-short-hdr") \ 4157af281eSDavid Howells EM(rxkad_abort_2_short_len, "rxkad2-short-len") \ 4257af281eSDavid Howells EM(rxkad_abort_bad_checksum, "rxkad2-bad-cksum") \ 4357af281eSDavid Howells EM(rxkad_abort_chall_key_expired, "rxkad-chall-key-exp") \ 4457af281eSDavid Howells EM(rxkad_abort_chall_level, "rxkad-chall-level") \ 4557af281eSDavid Howells EM(rxkad_abort_chall_no_key, "rxkad-chall-nokey") \ 4657af281eSDavid Howells EM(rxkad_abort_chall_short, "rxkad-chall-short") \ 4757af281eSDavid Howells EM(rxkad_abort_chall_version, "rxkad-chall-version") \ 4857af281eSDavid Howells EM(rxkad_abort_resp_bad_callid, "rxkad-resp-bad-callid") \ 4957af281eSDavid Howells EM(rxkad_abort_resp_bad_checksum, "rxkad-resp-bad-cksum") \ 5057af281eSDavid Howells EM(rxkad_abort_resp_bad_param, "rxkad-resp-bad-param") \ 5157af281eSDavid Howells EM(rxkad_abort_resp_call_ctr, "rxkad-resp-call-ctr") \ 5257af281eSDavid Howells EM(rxkad_abort_resp_call_state, "rxkad-resp-call-state") \ 5357af281eSDavid Howells EM(rxkad_abort_resp_key_expired, "rxkad-resp-key-exp") \ 5457af281eSDavid Howells EM(rxkad_abort_resp_key_rejected, "rxkad-resp-key-rej") \ 5557af281eSDavid Howells EM(rxkad_abort_resp_level, "rxkad-resp-level") \ 5657af281eSDavid Howells EM(rxkad_abort_resp_nokey, "rxkad-resp-nokey") \ 5757af281eSDavid Howells EM(rxkad_abort_resp_ooseq, "rxkad-resp-ooseq") \ 5857af281eSDavid Howells EM(rxkad_abort_resp_short, "rxkad-resp-short") \ 5957af281eSDavid Howells EM(rxkad_abort_resp_short_tkt, "rxkad-resp-short-tkt") \ 6057af281eSDavid Howells EM(rxkad_abort_resp_tkt_aname, "rxkad-resp-tk-aname") \ 6157af281eSDavid Howells EM(rxkad_abort_resp_tkt_expired, "rxkad-resp-tk-exp") \ 6257af281eSDavid Howells EM(rxkad_abort_resp_tkt_future, "rxkad-resp-tk-future") \ 6357af281eSDavid Howells EM(rxkad_abort_resp_tkt_inst, "rxkad-resp-tk-inst") \ 6457af281eSDavid Howells EM(rxkad_abort_resp_tkt_len, "rxkad-resp-tk-len") \ 6557af281eSDavid Howells EM(rxkad_abort_resp_tkt_realm, "rxkad-resp-tk-realm") \ 6657af281eSDavid Howells EM(rxkad_abort_resp_tkt_short, "rxkad-resp-tk-short") \ 6757af281eSDavid Howells EM(rxkad_abort_resp_tkt_sinst, "rxkad-resp-tk-sinst") \ 6857af281eSDavid Howells EM(rxkad_abort_resp_tkt_sname, "rxkad-resp-tk-sname") \ 6957af281eSDavid Howells EM(rxkad_abort_resp_unknown_tkt, "rxkad-resp-unknown-tkt") \ 7057af281eSDavid Howells EM(rxkad_abort_resp_version, "rxkad-resp-version") \ 7157af281eSDavid Howells /* rxrpc errors */ \ 7257af281eSDavid Howells EM(rxrpc_abort_call_improper_term, "call-improper-term") \ 7357af281eSDavid Howells EM(rxrpc_abort_call_reset, "call-reset") \ 7457af281eSDavid Howells EM(rxrpc_abort_call_sendmsg, "call-sendmsg") \ 7557af281eSDavid Howells EM(rxrpc_abort_call_sock_release, "call-sock-rel") \ 7657af281eSDavid Howells EM(rxrpc_abort_call_sock_release_tba, "call-sock-rel-tba") \ 7757af281eSDavid Howells EM(rxrpc_abort_call_timeout, "call-timeout") \ 7857af281eSDavid Howells EM(rxrpc_abort_no_service_key, "no-serv-key") \ 7957af281eSDavid Howells EM(rxrpc_abort_nomem, "nomem") \ 8057af281eSDavid Howells EM(rxrpc_abort_service_not_offered, "serv-not-offered") \ 8157af281eSDavid Howells EM(rxrpc_abort_shut_down, "shut-down") \ 8257af281eSDavid Howells EM(rxrpc_abort_unsupported_security, "unsup-sec") \ 8357af281eSDavid Howells EM(rxrpc_badmsg_bad_abort, "bad-abort") \ 8457af281eSDavid Howells EM(rxrpc_badmsg_bad_jumbo, "bad-jumbo") \ 8557af281eSDavid Howells EM(rxrpc_badmsg_short_ack, "short-ack") \ 8659881e57SDavid Howells EM(rxrpc_badmsg_short_ack_trailer, "short-ack-trailer") \ 8757af281eSDavid Howells EM(rxrpc_badmsg_short_hdr, "short-hdr") \ 8857af281eSDavid Howells EM(rxrpc_badmsg_unsupported_packet, "unsup-pkt") \ 8957af281eSDavid Howells EM(rxrpc_badmsg_zero_call, "zero-call") \ 9057af281eSDavid Howells EM(rxrpc_badmsg_zero_seq, "zero-seq") \ 9157af281eSDavid Howells EM(rxrpc_badmsg_zero_service, "zero-service") \ 9257af281eSDavid Howells EM(rxrpc_eproto_ackr_outside_window, "ackr-out-win") \ 9357af281eSDavid Howells EM(rxrpc_eproto_ackr_sack_overflow, "ackr-sack-over") \ 9457af281eSDavid Howells EM(rxrpc_eproto_ackr_short_sack, "ackr-short-sack") \ 9557af281eSDavid Howells EM(rxrpc_eproto_ackr_zero, "ackr-zero") \ 9657af281eSDavid Howells EM(rxrpc_eproto_bad_upgrade, "bad-upgrade") \ 9757af281eSDavid Howells EM(rxrpc_eproto_data_after_last, "data-after-last") \ 9857af281eSDavid Howells EM(rxrpc_eproto_different_last, "diff-last") \ 9957af281eSDavid Howells EM(rxrpc_eproto_early_reply, "early-reply") \ 10057af281eSDavid Howells EM(rxrpc_eproto_improper_term, "improper-term") \ 10157af281eSDavid Howells EM(rxrpc_eproto_no_client_call, "no-cl-call") \ 10257af281eSDavid Howells EM(rxrpc_eproto_no_client_conn, "no-cl-conn") \ 10357af281eSDavid Howells EM(rxrpc_eproto_no_service_call, "no-sv-call") \ 10457af281eSDavid Howells EM(rxrpc_eproto_reupgrade, "re-upgrade") \ 10557af281eSDavid Howells EM(rxrpc_eproto_rxnull_challenge, "rxnull-chall") \ 10657af281eSDavid Howells EM(rxrpc_eproto_rxnull_response, "rxnull-resp") \ 10757af281eSDavid Howells EM(rxrpc_eproto_tx_rot_last, "tx-rot-last") \ 10857af281eSDavid Howells EM(rxrpc_eproto_unexpected_ack, "unex-ack") \ 10957af281eSDavid Howells EM(rxrpc_eproto_unexpected_ackall, "unex-ackall") \ 11057af281eSDavid Howells EM(rxrpc_eproto_unexpected_implicit_end, "unex-impl-end") \ 11157af281eSDavid Howells EM(rxrpc_eproto_unexpected_reply, "unex-reply") \ 11257af281eSDavid Howells EM(rxrpc_eproto_wrong_security, "wrong-sec") \ 11357af281eSDavid Howells EM(rxrpc_recvmsg_excess_data, "recvmsg-excess") \ 11457af281eSDavid Howells EM(rxrpc_recvmsg_short_data, "recvmsg-short") \ 11557af281eSDavid Howells E_(rxrpc_sendmsg_late_send, "sendmsg-late") 11657af281eSDavid Howells 11715f661dcSDavid Howells #define rxrpc_call_poke_traces \ 118a343b174SDavid Howells EM(rxrpc_call_poke_abort, "Abort") \ 11903fc55adSDavid Howells EM(rxrpc_call_poke_complete, "Compl") \ 12015f661dcSDavid Howells EM(rxrpc_call_poke_error, "Error") \ 12115f661dcSDavid Howells EM(rxrpc_call_poke_idle, "Idle") \ 12215f661dcSDavid Howells EM(rxrpc_call_poke_start, "Start") \ 12315f661dcSDavid Howells EM(rxrpc_call_poke_timer, "Timer") \ 12415f661dcSDavid Howells E_(rxrpc_call_poke_timer_now, "Timer-now") 12515f661dcSDavid Howells 126b54a134aSDavid Howells #define rxrpc_skb_traces \ 1279a36a6bcSDavid Howells EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \ 1289a36a6bcSDavid Howells EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \ 1292953d3b8SDavid Howells EM(rxrpc_skb_get_conn_secured, "GET conn-secd") \ 1309a36a6bcSDavid Howells EM(rxrpc_skb_get_conn_work, "GET conn-work") \ 131024b2511SDavid Howells EM(rxrpc_skb_get_last_nack, "GET last-nack") \ 1322d1faf7aSDavid Howells EM(rxrpc_skb_get_local_work, "GET locl-work") \ 1332d1faf7aSDavid Howells EM(rxrpc_skb_get_reject_work, "GET rej-work ") \ 1349a36a6bcSDavid Howells EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \ 1359a36a6bcSDavid Howells EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \ 1369a36a6bcSDavid Howells EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \ 1379a36a6bcSDavid Howells EM(rxrpc_skb_new_error_report, "NEW error-rpt") \ 1389a36a6bcSDavid Howells EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \ 1399a36a6bcSDavid Howells EM(rxrpc_skb_new_unshared, "NEW unshared ") \ 1402953d3b8SDavid Howells EM(rxrpc_skb_put_conn_secured, "PUT conn-secd") \ 1419a36a6bcSDavid Howells EM(rxrpc_skb_put_conn_work, "PUT conn-work") \ 1429a36a6bcSDavid Howells EM(rxrpc_skb_put_error_report, "PUT error-rep") \ 1439a36a6bcSDavid Howells EM(rxrpc_skb_put_input, "PUT input ") \ 1449a36a6bcSDavid Howells EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \ 145024b2511SDavid Howells EM(rxrpc_skb_put_last_nack, "PUT last-nack") \ 1469a36a6bcSDavid Howells EM(rxrpc_skb_put_purge, "PUT purge ") \ 1479a36a6bcSDavid Howells EM(rxrpc_skb_put_rotate, "PUT rotate ") \ 1489a36a6bcSDavid Howells EM(rxrpc_skb_put_unknown, "PUT unknown ") \ 1499a36a6bcSDavid Howells EM(rxrpc_skb_see_conn_work, "SEE conn-work") \ 1509a36a6bcSDavid Howells EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \ 1519a36a6bcSDavid Howells EM(rxrpc_skb_see_reject, "SEE reject ") \ 1529a36a6bcSDavid Howells EM(rxrpc_skb_see_rotate, "SEE rotate ") \ 1539a36a6bcSDavid Howells E_(rxrpc_skb_see_version, "SEE version ") 154b54a134aSDavid Howells 15509d2bf59SDavid Howells #define rxrpc_local_traces \ 1560fde882fSDavid Howells EM(rxrpc_local_free, "FREE ") \ 157f3441d41SDavid Howells EM(rxrpc_local_get_call, "GET call ") \ 1580fde882fSDavid Howells EM(rxrpc_local_get_client_conn, "GET conn-cln") \ 1590fde882fSDavid Howells EM(rxrpc_local_get_for_use, "GET for-use ") \ 1600fde882fSDavid Howells EM(rxrpc_local_get_peer, "GET peer ") \ 1610fde882fSDavid Howells EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \ 16209d2bf59SDavid Howells EM(rxrpc_local_new, "NEW ") \ 1630fde882fSDavid Howells EM(rxrpc_local_put_bind, "PUT bind ") \ 164f3441d41SDavid Howells EM(rxrpc_local_put_call, "PUT call ") \ 1650fde882fSDavid Howells EM(rxrpc_local_put_for_use, "PUT for-use ") \ 1660fde882fSDavid Howells EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \ 1670fde882fSDavid Howells EM(rxrpc_local_put_peer, "PUT peer ") \ 1688395406bSDavid Howells EM(rxrpc_local_put_prealloc_peer, "PUT peer-pre") \ 1690fde882fSDavid Howells EM(rxrpc_local_put_release_sock, "PUT rel-sock") \ 1700fde882fSDavid Howells EM(rxrpc_local_stop, "STOP ") \ 1710fde882fSDavid Howells EM(rxrpc_local_stopped, "STOPPED ") \ 1720fde882fSDavid Howells EM(rxrpc_local_unuse_bind, "UNU bind ") \ 1730fde882fSDavid Howells EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \ 1740fde882fSDavid Howells EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \ 1750fde882fSDavid Howells EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \ 1760fde882fSDavid Howells EM(rxrpc_local_use_conn_work, "USE conn-wrk") \ 1770fde882fSDavid Howells EM(rxrpc_local_use_lookup, "USE lookup ") \ 1785e6ef4f1SDavid Howells E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa") 17909d2bf59SDavid Howells 1801159d4b4SDavid Howells #define rxrpc_peer_traces \ 18147c810a7SDavid Howells EM(rxrpc_peer_free, "FREE ") \ 18247c810a7SDavid Howells EM(rxrpc_peer_get_accept, "GET accept ") \ 18347c810a7SDavid Howells EM(rxrpc_peer_get_bundle, "GET bundle ") \ 18447c810a7SDavid Howells EM(rxrpc_peer_get_client_conn, "GET cln-conn") \ 1855e6ef4f1SDavid Howells EM(rxrpc_peer_get_input, "GET input ") \ 18647c810a7SDavid Howells EM(rxrpc_peer_get_input_error, "GET inpt-err") \ 18747c810a7SDavid Howells EM(rxrpc_peer_get_keepalive, "GET keepaliv") \ 18847c810a7SDavid Howells EM(rxrpc_peer_get_lookup_client, "GET look-cln") \ 18947c810a7SDavid Howells EM(rxrpc_peer_get_service_conn, "GET srv-conn") \ 19047c810a7SDavid Howells EM(rxrpc_peer_new_client, "NEW client ") \ 19147c810a7SDavid Howells EM(rxrpc_peer_new_prealloc, "NEW prealloc") \ 19247c810a7SDavid Howells EM(rxrpc_peer_put_bundle, "PUT bundle ") \ 19347c810a7SDavid Howells EM(rxrpc_peer_put_call, "PUT call ") \ 19447c810a7SDavid Howells EM(rxrpc_peer_put_conn, "PUT conn ") \ 1955e6ef4f1SDavid Howells EM(rxrpc_peer_put_input, "PUT input ") \ 19647c810a7SDavid Howells EM(rxrpc_peer_put_input_error, "PUT inpt-err") \ 19747c810a7SDavid Howells E_(rxrpc_peer_put_keepalive, "PUT keepaliv") 1981159d4b4SDavid Howells 199fa3492abSDavid Howells #define rxrpc_bundle_traces \ 200fa3492abSDavid Howells EM(rxrpc_bundle_free, "FREE ") \ 201fa3492abSDavid Howells EM(rxrpc_bundle_get_client_call, "GET clt-call") \ 202fa3492abSDavid Howells EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \ 203fa3492abSDavid Howells EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \ 2041bab27afSDavid Howells EM(rxrpc_bundle_put_call, "PUT call ") \ 205fa3492abSDavid Howells EM(rxrpc_bundle_put_conn, "PUT conn ") \ 206fa3492abSDavid Howells EM(rxrpc_bundle_put_discard, "PUT discard ") \ 207fa3492abSDavid Howells E_(rxrpc_bundle_new, "NEW ") 208fa3492abSDavid Howells 209b54a134aSDavid Howells #define rxrpc_conn_traces \ 2107fa25105SDavid Howells EM(rxrpc_conn_free, "FREE ") \ 2117fa25105SDavid Howells EM(rxrpc_conn_get_activate_call, "GET act-call") \ 2127fa25105SDavid Howells EM(rxrpc_conn_get_call_input, "GET inp-call") \ 2137fa25105SDavid Howells EM(rxrpc_conn_get_conn_input, "GET inp-conn") \ 2147fa25105SDavid Howells EM(rxrpc_conn_get_idle, "GET idle ") \ 215a00ce28bSDavid Howells EM(rxrpc_conn_get_poke_abort, "GET pk-abort") \ 216f2cce89aSDavid Howells EM(rxrpc_conn_get_poke_timer, "GET poke ") \ 2177fa25105SDavid Howells EM(rxrpc_conn_get_service_conn, "GET svc-conn") \ 2187fa25105SDavid Howells EM(rxrpc_conn_new_client, "NEW client ") \ 2197fa25105SDavid Howells EM(rxrpc_conn_new_service, "NEW service ") \ 2207fa25105SDavid Howells EM(rxrpc_conn_put_call, "PUT call ") \ 2217fa25105SDavid Howells EM(rxrpc_conn_put_call_input, "PUT inp-call") \ 2227fa25105SDavid Howells EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \ 2237fa25105SDavid Howells EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \ 2247fa25105SDavid Howells EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \ 2257fa25105SDavid Howells EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \ 2267fa25105SDavid Howells EM(rxrpc_conn_put_poke, "PUT poke ") \ 2273cec055cSDavid Howells EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \ 2287fa25105SDavid Howells EM(rxrpc_conn_put_unbundle, "PUT unbundle") \ 2297fa25105SDavid Howells EM(rxrpc_conn_put_unidle, "PUT unidle ") \ 230f2cce89aSDavid Howells EM(rxrpc_conn_put_work, "PUT work ") \ 2313cec055cSDavid Howells EM(rxrpc_conn_queue_challenge, "QUE chall ") \ 232a00ce28bSDavid Howells EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \ 2333cec055cSDavid Howells EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \ 2347fa25105SDavid Howells EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \ 2357fa25105SDavid Howells EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \ 2367fa25105SDavid Howells E_(rxrpc_conn_see_work, "SEE work ") 237b54a134aSDavid Howells 238b54a134aSDavid Howells #define rxrpc_client_traces \ 239b54a134aSDavid Howells EM(rxrpc_client_activate_chans, "Activa") \ 240b54a134aSDavid Howells EM(rxrpc_client_alloc, "Alloc ") \ 241b54a134aSDavid Howells EM(rxrpc_client_chan_activate, "ChActv") \ 242b54a134aSDavid Howells EM(rxrpc_client_chan_disconnect, "ChDisc") \ 243b54a134aSDavid Howells EM(rxrpc_client_chan_pass, "ChPass") \ 244b54a134aSDavid Howells EM(rxrpc_client_cleanup, "Clean ") \ 245b54a134aSDavid Howells EM(rxrpc_client_discard, "Discar") \ 246b54a134aSDavid Howells EM(rxrpc_client_exposed, "Expose") \ 247b54a134aSDavid Howells EM(rxrpc_client_replace, "Replac") \ 2489d35d880SDavid Howells EM(rxrpc_client_queue_new_call, "Q-Call") \ 249b54a134aSDavid Howells EM(rxrpc_client_to_active, "->Actv") \ 250245500d8SDavid Howells E_(rxrpc_client_to_idle, "->Idle") 251b54a134aSDavid Howells 252b54a134aSDavid Howells #define rxrpc_call_traces \ 2535040011dSDavid Howells EM(rxrpc_call_get_io_thread, "GET iothread") \ 254cb0fc0c9SDavid Howells EM(rxrpc_call_get_input, "GET input ") \ 255cb0fc0c9SDavid Howells EM(rxrpc_call_get_kernel_service, "GET krnl-srv") \ 256cb0fc0c9SDavid Howells EM(rxrpc_call_get_notify_socket, "GET notify ") \ 25715f661dcSDavid Howells EM(rxrpc_call_get_poke, "GET poke ") \ 258cb0fc0c9SDavid Howells EM(rxrpc_call_get_recvmsg, "GET recvmsg ") \ 259cb0fc0c9SDavid Howells EM(rxrpc_call_get_release_sock, "GET rel-sock") \ 260cb0fc0c9SDavid Howells EM(rxrpc_call_get_sendmsg, "GET sendmsg ") \ 261cb0fc0c9SDavid Howells EM(rxrpc_call_get_userid, "GET user-id ") \ 262cb0fc0c9SDavid Howells EM(rxrpc_call_new_client, "NEW client ") \ 263cb0fc0c9SDavid Howells EM(rxrpc_call_new_prealloc_service, "NEW prealloc") \ 264cb0fc0c9SDavid Howells EM(rxrpc_call_put_discard_prealloc, "PUT disc-pre") \ 265f3441d41SDavid Howells EM(rxrpc_call_put_discard_error, "PUT disc-err") \ 2665040011dSDavid Howells EM(rxrpc_call_put_io_thread, "PUT iothread") \ 267cb0fc0c9SDavid Howells EM(rxrpc_call_put_input, "PUT input ") \ 268cb0fc0c9SDavid Howells EM(rxrpc_call_put_kernel, "PUT kernel ") \ 26915f661dcSDavid Howells EM(rxrpc_call_put_poke, "PUT poke ") \ 270cb0fc0c9SDavid Howells EM(rxrpc_call_put_recvmsg, "PUT recvmsg ") \ 271cb0fc0c9SDavid Howells EM(rxrpc_call_put_release_sock, "PUT rls-sock") \ 272cb0fc0c9SDavid Howells EM(rxrpc_call_put_release_sock_tba, "PUT rls-sk-a") \ 273cb0fc0c9SDavid Howells EM(rxrpc_call_put_sendmsg, "PUT sendmsg ") \ 274cb0fc0c9SDavid Howells EM(rxrpc_call_put_unnotify, "PUT unnotify") \ 275cb0fc0c9SDavid Howells EM(rxrpc_call_put_userid_exists, "PUT u-exists") \ 2769d35d880SDavid Howells EM(rxrpc_call_put_userid, "PUT user-id ") \ 277cb0fc0c9SDavid Howells EM(rxrpc_call_see_accept, "SEE accept ") \ 278cb0fc0c9SDavid Howells EM(rxrpc_call_see_activate_client, "SEE act-clnt") \ 279cb0fc0c9SDavid Howells EM(rxrpc_call_see_connect_failed, "SEE con-fail") \ 280cb0fc0c9SDavid Howells EM(rxrpc_call_see_connected, "SEE connect ") \ 2815040011dSDavid Howells EM(rxrpc_call_see_disconnected, "SEE disconn ") \ 282cb0fc0c9SDavid Howells EM(rxrpc_call_see_distribute_error, "SEE dist-err") \ 283cb0fc0c9SDavid Howells EM(rxrpc_call_see_input, "SEE input ") \ 284cb0fc0c9SDavid Howells EM(rxrpc_call_see_release, "SEE release ") \ 285cb0fc0c9SDavid Howells EM(rxrpc_call_see_userid_exists, "SEE u-exists") \ 286*996a7208SDavid Howells EM(rxrpc_call_see_waiting_call, "SEE q-conn ") \ 287cb0fc0c9SDavid Howells E_(rxrpc_call_see_zap, "SEE zap ") 288b54a134aSDavid Howells 289a4ea4c47SDavid Howells #define rxrpc_txqueue_traces \ 290a4ea4c47SDavid Howells EM(rxrpc_txqueue_await_reply, "AWR") \ 291a4ea4c47SDavid Howells EM(rxrpc_txqueue_dequeue, "DEQ") \ 292a4ea4c47SDavid Howells EM(rxrpc_txqueue_end, "END") \ 293a4ea4c47SDavid Howells EM(rxrpc_txqueue_queue, "QUE") \ 294a4ea4c47SDavid Howells EM(rxrpc_txqueue_queue_last, "QLS") \ 295a4ea4c47SDavid Howells EM(rxrpc_txqueue_rotate, "ROT") \ 296a4ea4c47SDavid Howells EM(rxrpc_txqueue_rotate_last, "RLS") \ 297a4ea4c47SDavid Howells E_(rxrpc_txqueue_wait, "WAI") 298b54a134aSDavid Howells 299b54a134aSDavid Howells #define rxrpc_receive_traces \ 300b54a134aSDavid Howells EM(rxrpc_receive_end, "END") \ 301b54a134aSDavid Howells EM(rxrpc_receive_front, "FRN") \ 302b54a134aSDavid Howells EM(rxrpc_receive_incoming, "INC") \ 303b54a134aSDavid Howells EM(rxrpc_receive_queue, "QUE") \ 304b54a134aSDavid Howells EM(rxrpc_receive_queue_last, "QLS") \ 3055d7edbc9SDavid Howells EM(rxrpc_receive_queue_oos, "QUO") \ 3065d7edbc9SDavid Howells EM(rxrpc_receive_queue_oos_last, "QOL") \ 3075d7edbc9SDavid Howells EM(rxrpc_receive_oos, "OOS") \ 3085d7edbc9SDavid Howells EM(rxrpc_receive_oos_last, "OSL") \ 3095d7edbc9SDavid Howells EM(rxrpc_receive_rotate, "ROT") \ 3105d7edbc9SDavid Howells E_(rxrpc_receive_rotate_last, "RLS") 311b54a134aSDavid Howells 312b54a134aSDavid Howells #define rxrpc_recvmsg_traces \ 313b54a134aSDavid Howells EM(rxrpc_recvmsg_cont, "CONT") \ 314b54a134aSDavid Howells EM(rxrpc_recvmsg_data_return, "DATA") \ 315b54a134aSDavid Howells EM(rxrpc_recvmsg_dequeue, "DEQU") \ 316b54a134aSDavid Howells EM(rxrpc_recvmsg_enter, "ENTR") \ 317b54a134aSDavid Howells EM(rxrpc_recvmsg_full, "FULL") \ 318b54a134aSDavid Howells EM(rxrpc_recvmsg_hole, "HOLE") \ 319b54a134aSDavid Howells EM(rxrpc_recvmsg_next, "NEXT") \ 320540b1c48SDavid Howells EM(rxrpc_recvmsg_requeue, "REQU") \ 321b54a134aSDavid Howells EM(rxrpc_recvmsg_return, "RETN") \ 322b54a134aSDavid Howells EM(rxrpc_recvmsg_terminal, "TERM") \ 323b54a134aSDavid Howells EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ 324c0783818SDavid Howells EM(rxrpc_recvmsg_unqueue, "UNQU") \ 325b54a134aSDavid Howells E_(rxrpc_recvmsg_wait, "WAIT") 326b54a134aSDavid Howells 327b54a134aSDavid Howells #define rxrpc_rtt_tx_traces \ 3284700c4d8SDavid Howells EM(rxrpc_rtt_tx_cancel, "CNCE") \ 329b54a134aSDavid Howells EM(rxrpc_rtt_tx_data, "DATA") \ 3304700c4d8SDavid Howells EM(rxrpc_rtt_tx_no_slot, "FULL") \ 331b54a134aSDavid Howells E_(rxrpc_rtt_tx_ping, "PING") 332b54a134aSDavid Howells 333b54a134aSDavid Howells #define rxrpc_rtt_rx_traces \ 334d299ab02SDavid Howells EM(rxrpc_rtt_rx_other_ack, "OACK") \ 3354700c4d8SDavid Howells EM(rxrpc_rtt_rx_obsolete, "OBSL") \ 3364700c4d8SDavid Howells EM(rxrpc_rtt_rx_lost, "LOST") \ 337b54a134aSDavid Howells EM(rxrpc_rtt_rx_ping_response, "PONG") \ 338b54a134aSDavid Howells E_(rxrpc_rtt_rx_requested_ack, "RACK") 339b54a134aSDavid Howells 340b54a134aSDavid Howells #define rxrpc_timer_traces \ 341b54a134aSDavid Howells EM(rxrpc_timer_begin, "Begin ") \ 342a158bdd3SDavid Howells EM(rxrpc_timer_exp_ack, "ExpAck") \ 343a158bdd3SDavid Howells EM(rxrpc_timer_exp_hard, "ExpHrd") \ 344a158bdd3SDavid Howells EM(rxrpc_timer_exp_idle, "ExpIdl") \ 345415f44e4SDavid Howells EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ 346bd1fdf8cSDavid Howells EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ 347a158bdd3SDavid Howells EM(rxrpc_timer_exp_normal, "ExpNml") \ 348a158bdd3SDavid Howells EM(rxrpc_timer_exp_ping, "ExpPng") \ 349a158bdd3SDavid Howells EM(rxrpc_timer_exp_resend, "ExpRsn") \ 350b54a134aSDavid Howells EM(rxrpc_timer_init_for_reply, "IniRpl") \ 351b54a134aSDavid Howells EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ 352a158bdd3SDavid Howells EM(rxrpc_timer_restart, "Restrt") \ 353b54a134aSDavid Howells EM(rxrpc_timer_set_for_ack, "SetAck") \ 354a158bdd3SDavid Howells EM(rxrpc_timer_set_for_hard, "SetHrd") \ 355a158bdd3SDavid Howells EM(rxrpc_timer_set_for_idle, "SetIdl") \ 356415f44e4SDavid Howells EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ 357bd1fdf8cSDavid Howells EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ 358a158bdd3SDavid Howells EM(rxrpc_timer_set_for_normal, "SetNml") \ 359b54a134aSDavid Howells EM(rxrpc_timer_set_for_ping, "SetPng") \ 360b54a134aSDavid Howells EM(rxrpc_timer_set_for_resend, "SetRTx") \ 361a158bdd3SDavid Howells E_(rxrpc_timer_set_for_send, "SetSnd") 362b54a134aSDavid Howells 363b54a134aSDavid Howells #define rxrpc_propose_ack_traces \ 364b54a134aSDavid Howells EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ 365b54a134aSDavid Howells EM(rxrpc_propose_ack_input_data, "DataIn ") \ 366530403d9SDavid Howells EM(rxrpc_propose_ack_input_data_hole, "DataInH") \ 367415f44e4SDavid Howells EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ 368b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ 369b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ 37084e28aa5SDavid Howells EM(rxrpc_propose_ack_ping_for_old_rtt, "OldRtt ") \ 371b54a134aSDavid Howells EM(rxrpc_propose_ack_ping_for_params, "Params ") \ 37284e28aa5SDavid Howells EM(rxrpc_propose_ack_ping_for_rtt, "Rtt ") \ 373b54a134aSDavid Howells EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ 374b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ 375b54a134aSDavid Howells EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ 376b54a134aSDavid Howells EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ 377b54a134aSDavid Howells EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ 3785e6ef4f1SDavid Howells EM(rxrpc_propose_ack_rx_idle, "RxIdle ") \ 379b54a134aSDavid Howells E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") 380b54a134aSDavid Howells 381b54a134aSDavid Howells #define rxrpc_congest_modes \ 382b54a134aSDavid Howells EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ 383b54a134aSDavid Howells EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ 384b54a134aSDavid Howells EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ 385b54a134aSDavid Howells E_(RXRPC_CALL_SLOW_START, "SlowStart") 386b54a134aSDavid Howells 387b54a134aSDavid Howells #define rxrpc_congest_changes \ 388b54a134aSDavid Howells EM(rxrpc_cong_begin_retransmission, " Retrans") \ 389b54a134aSDavid Howells EM(rxrpc_cong_cleared_nacks, " Cleared") \ 390b54a134aSDavid Howells EM(rxrpc_cong_new_low_nack, " NewLowN") \ 391aadf9dceSDavid Howells EM(rxrpc_cong_no_change, " -") \ 392b54a134aSDavid Howells EM(rxrpc_cong_progress, " Progres") \ 3931fc4fa2aSDavid Howells EM(rxrpc_cong_idle_reset, " IdleRes") \ 394b54a134aSDavid Howells EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ 395b54a134aSDavid Howells EM(rxrpc_cong_rtt_window_end, " RttWinE") \ 396b54a134aSDavid Howells E_(rxrpc_cong_saw_nack, " SawNack") 397b54a134aSDavid Howells 398b54a134aSDavid Howells #define rxrpc_pkts \ 399b54a134aSDavid Howells EM(0, "?00") \ 400b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ 401b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ 402b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ 403b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ 404b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ 405b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ 406b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ 407b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ 408b54a134aSDavid Howells EM(9, "?09") \ 409b54a134aSDavid Howells EM(10, "?10") \ 410b54a134aSDavid Howells EM(11, "?11") \ 411b54a134aSDavid Howells EM(12, "?12") \ 412b54a134aSDavid Howells EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ 413b54a134aSDavid Howells EM(14, "?14") \ 414b54a134aSDavid Howells E_(15, "?15") 415b54a134aSDavid Howells 416b54a134aSDavid Howells #define rxrpc_ack_names \ 417b54a134aSDavid Howells EM(0, "-0-") \ 418b54a134aSDavid Howells EM(RXRPC_ACK_REQUESTED, "REQ") \ 419b54a134aSDavid Howells EM(RXRPC_ACK_DUPLICATE, "DUP") \ 420b54a134aSDavid Howells EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ 421b54a134aSDavid Howells EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ 422b54a134aSDavid Howells EM(RXRPC_ACK_NOSPACE, "MEM") \ 423b54a134aSDavid Howells EM(RXRPC_ACK_PING, "PNG") \ 424b54a134aSDavid Howells EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ 425b54a134aSDavid Howells EM(RXRPC_ACK_DELAY, "DLY") \ 426b54a134aSDavid Howells EM(RXRPC_ACK_IDLE, "IDL") \ 427b54a134aSDavid Howells E_(RXRPC_ACK__INVALID, "-?-") 428b54a134aSDavid Howells 429f21e9348SDavid Howells #define rxrpc_sack_traces \ 430f21e9348SDavid Howells EM(rxrpc_sack_advance, "ADV") \ 431f21e9348SDavid Howells EM(rxrpc_sack_fill, "FIL") \ 432f21e9348SDavid Howells EM(rxrpc_sack_nack, "NAK") \ 433f21e9348SDavid Howells EM(rxrpc_sack_none, "---") \ 434f21e9348SDavid Howells E_(rxrpc_sack_oos, "OOS") 435f21e9348SDavid Howells 4361bae5d22SDavid Howells #define rxrpc_completions \ 4371bae5d22SDavid Howells EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ 4381bae5d22SDavid Howells EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ 4391bae5d22SDavid Howells EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ 4401bae5d22SDavid Howells EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ 4411bae5d22SDavid Howells E_(RXRPC_CALL_NETWORK_ERROR, "NetError") 4421bae5d22SDavid Howells 4434764c0daSDavid Howells #define rxrpc_tx_points \ 4444764c0daSDavid Howells EM(rxrpc_tx_point_call_abort, "CallAbort") \ 4454764c0daSDavid Howells EM(rxrpc_tx_point_call_ack, "CallAck") \ 4464764c0daSDavid Howells EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ 4474764c0daSDavid Howells EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ 4484764c0daSDavid Howells EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ 4494764c0daSDavid Howells EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ 4504764c0daSDavid Howells EM(rxrpc_tx_point_reject, "Reject") \ 4514764c0daSDavid Howells EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ 4524764c0daSDavid Howells EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \ 4534764c0daSDavid Howells EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ 4544764c0daSDavid Howells E_(rxrpc_tx_point_version_reply, "VerReply") 4556b47fe1dSDavid Howells 4564d843be5SDavid Howells #define rxrpc_req_ack_traces \ 4574d843be5SDavid Howells EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \ 4584d843be5SDavid Howells EM(rxrpc_reqack_already_on, "ALREADY-ON") \ 4594d843be5SDavid Howells EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \ 4604d843be5SDavid Howells EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \ 4614d843be5SDavid Howells EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \ 4624d843be5SDavid Howells EM(rxrpc_reqack_retrans, "RETRANS ") \ 4634d843be5SDavid Howells EM(rxrpc_reqack_slow_start, "SLOW-START") \ 4644d843be5SDavid Howells E_(rxrpc_reqack_small_txwin, "SMALL-TXWN") 465f7fa5242SDavid Howells /* ---- Must update size of stat_why_req_ack[] if more are added! */ 4664d843be5SDavid Howells 46702a19356SDavid Howells #define rxrpc_txbuf_traces \ 46802a19356SDavid Howells EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \ 46902a19356SDavid Howells EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \ 47002a19356SDavid Howells EM(rxrpc_txbuf_free, "FREE ") \ 471a4ea4c47SDavid Howells EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \ 47202a19356SDavid Howells EM(rxrpc_txbuf_get_trans, "GET TRANS ") \ 47302a19356SDavid Howells EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \ 47472f0c6fbSDavid Howells EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \ 47502a19356SDavid Howells EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \ 47672f0c6fbSDavid Howells EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \ 47702a19356SDavid Howells EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \ 47802a19356SDavid Howells EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \ 479a4ea4c47SDavid Howells EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \ 4803feda9d6SDavid Howells EM(rxrpc_txbuf_see_out_of_step, "OUT-OF-STEP") \ 48102a19356SDavid Howells EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \ 48202a19356SDavid Howells E_(rxrpc_txbuf_see_unacked, "SEE UNACKED") 48302a19356SDavid Howells 484b54a134aSDavid Howells /* 485dc9fd093SDavid Howells * Generate enums for tracing information. 486dc9fd093SDavid Howells */ 487dc9fd093SDavid Howells #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 488dc9fd093SDavid Howells #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 489dc9fd093SDavid Howells 490dc9fd093SDavid Howells #undef EM 491dc9fd093SDavid Howells #undef E_ 492dc9fd093SDavid Howells #define EM(a, b) a, 493dc9fd093SDavid Howells #define E_(a, b) a 494dc9fd093SDavid Howells 49557af281eSDavid Howells enum rxrpc_abort_reason { rxrpc_abort_reasons } __mode(byte); 496fa3492abSDavid Howells enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode(byte); 49715f661dcSDavid Howells enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode(byte); 498dc9fd093SDavid Howells enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte); 499dc9fd093SDavid Howells enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte); 500dc9fd093SDavid Howells enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte); 501dc9fd093SDavid Howells enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte); 502dc9fd093SDavid Howells enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte); 503dc9fd093SDavid Howells enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte); 504dc9fd093SDavid Howells enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte); 505dc9fd093SDavid Howells enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte); 506dc9fd093SDavid Howells enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte); 507dc9fd093SDavid Howells enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte); 5084d843be5SDavid Howells enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte); 509dc9fd093SDavid Howells enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte); 510dc9fd093SDavid Howells enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte); 511f21e9348SDavid Howells enum rxrpc_sack_trace { rxrpc_sack_traces } __mode(byte); 512dc9fd093SDavid Howells enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte); 513dc9fd093SDavid Howells enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte); 514dc9fd093SDavid Howells enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte); 51502a19356SDavid Howells enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte); 516a4ea4c47SDavid Howells enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte); 517dc9fd093SDavid Howells 518dc9fd093SDavid Howells #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 519dc9fd093SDavid Howells 520dc9fd093SDavid Howells /* 521b54a134aSDavid Howells * Export enum symbols via userspace. 522b54a134aSDavid Howells */ 523b54a134aSDavid Howells #undef EM 524b54a134aSDavid Howells #undef E_ 52557af281eSDavid Howells 52657af281eSDavid Howells #ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS 52757af281eSDavid Howells 528b54a134aSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a); 529b54a134aSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a); 530b54a134aSDavid Howells 53157af281eSDavid Howells rxrpc_abort_reasons; 532fa3492abSDavid Howells rxrpc_bundle_traces; 53315f661dcSDavid Howells rxrpc_call_poke_traces; 534b54a134aSDavid Howells rxrpc_call_traces; 535dc9fd093SDavid Howells rxrpc_client_traces; 536dc9fd093SDavid Howells rxrpc_congest_changes; 537dc9fd093SDavid Howells rxrpc_congest_modes; 538dc9fd093SDavid Howells rxrpc_conn_traces; 539dc9fd093SDavid Howells rxrpc_local_traces; 540dc9fd093SDavid Howells rxrpc_propose_ack_traces; 541b54a134aSDavid Howells rxrpc_receive_traces; 542b54a134aSDavid Howells rxrpc_recvmsg_traces; 5434d843be5SDavid Howells rxrpc_req_ack_traces; 544b54a134aSDavid Howells rxrpc_rtt_rx_traces; 545dc9fd093SDavid Howells rxrpc_rtt_tx_traces; 546f21e9348SDavid Howells rxrpc_sack_traces; 547dc9fd093SDavid Howells rxrpc_skb_traces; 548b54a134aSDavid Howells rxrpc_timer_traces; 5494764c0daSDavid Howells rxrpc_tx_points; 55002a19356SDavid Howells rxrpc_txbuf_traces; 551a4ea4c47SDavid Howells rxrpc_txqueue_traces; 552b54a134aSDavid Howells 553b54a134aSDavid Howells /* 554b54a134aSDavid Howells * Now redefine the EM() and E_() macros to map the enums to the strings that 555b54a134aSDavid Howells * will be printed in the output. 556b54a134aSDavid Howells */ 557b54a134aSDavid Howells #undef EM 558b54a134aSDavid Howells #undef E_ 559b54a134aSDavid Howells #define EM(a, b) { a, b }, 560b54a134aSDavid Howells #define E_(a, b) { a, b } 561b54a134aSDavid Howells 56209d2bf59SDavid Howells TRACE_EVENT(rxrpc_local, 56306d9532fSDavid Howells TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op, 5640fde882fSDavid Howells int ref, int usage), 56509d2bf59SDavid Howells 5660fde882fSDavid Howells TP_ARGS(local_debug_id, op, ref, usage), 56709d2bf59SDavid Howells 56809d2bf59SDavid Howells TP_STRUCT__entry( 56909d2bf59SDavid Howells __field(unsigned int, local) 57009d2bf59SDavid Howells __field(int, op) 5710fde882fSDavid Howells __field(int, ref) 57209d2bf59SDavid Howells __field(int, usage) 57309d2bf59SDavid Howells ), 57409d2bf59SDavid Howells 57509d2bf59SDavid Howells TP_fast_assign( 57606d9532fSDavid Howells __entry->local = local_debug_id; 57709d2bf59SDavid Howells __entry->op = op; 5780fde882fSDavid Howells __entry->ref = ref; 57909d2bf59SDavid Howells __entry->usage = usage; 58009d2bf59SDavid Howells ), 58109d2bf59SDavid Howells 5820fde882fSDavid Howells TP_printk("L=%08x %s r=%d u=%d", 58309d2bf59SDavid Howells __entry->local, 58409d2bf59SDavid Howells __print_symbolic(__entry->op, rxrpc_local_traces), 5850fde882fSDavid Howells __entry->ref, 5860fde882fSDavid Howells __entry->usage) 58709d2bf59SDavid Howells ); 58809d2bf59SDavid Howells 5891159d4b4SDavid Howells TRACE_EVENT(rxrpc_peer, 59047c810a7SDavid Howells TP_PROTO(unsigned int peer_debug_id, int ref, enum rxrpc_peer_trace why), 5911159d4b4SDavid Howells 59247c810a7SDavid Howells TP_ARGS(peer_debug_id, ref, why), 5931159d4b4SDavid Howells 5941159d4b4SDavid Howells TP_STRUCT__entry( 5951159d4b4SDavid Howells __field(unsigned int, peer) 59647c810a7SDavid Howells __field(int, ref) 597c838f1a7SDavid Howells __field(enum rxrpc_peer_trace, why) 5981159d4b4SDavid Howells ), 5991159d4b4SDavid Howells 6001159d4b4SDavid Howells TP_fast_assign( 60155f6c98eSDavid Howells __entry->peer = peer_debug_id; 60247c810a7SDavid Howells __entry->ref = ref; 60347c810a7SDavid Howells __entry->why = why; 6041159d4b4SDavid Howells ), 6051159d4b4SDavid Howells 60647c810a7SDavid Howells TP_printk("P=%08x %s r=%d", 6071159d4b4SDavid Howells __entry->peer, 60847c810a7SDavid Howells __print_symbolic(__entry->why, rxrpc_peer_traces), 60947c810a7SDavid Howells __entry->ref) 6101159d4b4SDavid Howells ); 6111159d4b4SDavid Howells 612fa3492abSDavid Howells TRACE_EVENT(rxrpc_bundle, 613fa3492abSDavid Howells TP_PROTO(unsigned int bundle_debug_id, int ref, enum rxrpc_bundle_trace why), 614fa3492abSDavid Howells 615fa3492abSDavid Howells TP_ARGS(bundle_debug_id, ref, why), 616fa3492abSDavid Howells 617fa3492abSDavid Howells TP_STRUCT__entry( 618fa3492abSDavid Howells __field(unsigned int, bundle) 619fa3492abSDavid Howells __field(int, ref) 620fa3492abSDavid Howells __field(int, why) 621fa3492abSDavid Howells ), 622fa3492abSDavid Howells 623fa3492abSDavid Howells TP_fast_assign( 624fa3492abSDavid Howells __entry->bundle = bundle_debug_id; 625fa3492abSDavid Howells __entry->ref = ref; 626fa3492abSDavid Howells __entry->why = why; 627fa3492abSDavid Howells ), 628fa3492abSDavid Howells 629fa3492abSDavid Howells TP_printk("CB=%08x %s r=%d", 630fa3492abSDavid Howells __entry->bundle, 631fa3492abSDavid Howells __print_symbolic(__entry->why, rxrpc_bundle_traces), 632fa3492abSDavid Howells __entry->ref) 633fa3492abSDavid Howells ); 634fa3492abSDavid Howells 635363deeabSDavid Howells TRACE_EVENT(rxrpc_conn, 6367fa25105SDavid Howells TP_PROTO(unsigned int conn_debug_id, int ref, enum rxrpc_conn_trace why), 637363deeabSDavid Howells 6387fa25105SDavid Howells TP_ARGS(conn_debug_id, ref, why), 639363deeabSDavid Howells 640363deeabSDavid Howells TP_STRUCT__entry( 641a25e21f0SDavid Howells __field(unsigned int, conn) 6427fa25105SDavid Howells __field(int, ref) 6437fa25105SDavid Howells __field(int, why) 644363deeabSDavid Howells ), 645363deeabSDavid Howells 646363deeabSDavid Howells TP_fast_assign( 6474c1295dcSDavid Howells __entry->conn = conn_debug_id; 6487fa25105SDavid Howells __entry->ref = ref; 6497fa25105SDavid Howells __entry->why = why; 650363deeabSDavid Howells ), 651363deeabSDavid Howells 6527fa25105SDavid Howells TP_printk("C=%08x %s r=%d", 653363deeabSDavid Howells __entry->conn, 6547fa25105SDavid Howells __print_symbolic(__entry->why, rxrpc_conn_traces), 6557fa25105SDavid Howells __entry->ref) 656363deeabSDavid Howells ); 657363deeabSDavid Howells 658363deeabSDavid Howells TRACE_EVENT(rxrpc_client, 659363deeabSDavid Howells TP_PROTO(struct rxrpc_connection *conn, int channel, 660363deeabSDavid Howells enum rxrpc_client_trace op), 661363deeabSDavid Howells 662363deeabSDavid Howells TP_ARGS(conn, channel, op), 663363deeabSDavid Howells 664363deeabSDavid Howells TP_STRUCT__entry( 665a25e21f0SDavid Howells __field(unsigned int, conn) 666363deeabSDavid Howells __field(u32, cid) 667363deeabSDavid Howells __field(int, channel) 668363deeabSDavid Howells __field(int, usage) 669363deeabSDavid Howells __field(enum rxrpc_client_trace, op) 670363deeabSDavid Howells ), 671363deeabSDavid Howells 672363deeabSDavid Howells TP_fast_assign( 673245500d8SDavid Howells __entry->conn = conn ? conn->debug_id : 0; 674363deeabSDavid Howells __entry->channel = channel; 675a0575429SDavid Howells __entry->usage = conn ? refcount_read(&conn->ref) : -2; 676363deeabSDavid Howells __entry->op = op; 67796a9c425SDavid Howells __entry->cid = conn ? conn->proto.cid : 0; 678363deeabSDavid Howells ), 679363deeabSDavid Howells 680245500d8SDavid Howells TP_printk("C=%08x h=%2d %s i=%08x u=%d", 681363deeabSDavid Howells __entry->conn, 682363deeabSDavid Howells __entry->channel, 683b54a134aSDavid Howells __print_symbolic(__entry->op, rxrpc_client_traces), 684363deeabSDavid Howells __entry->cid, 685363deeabSDavid Howells __entry->usage) 686363deeabSDavid Howells ); 687363deeabSDavid Howells 688e34d4234SDavid Howells TRACE_EVENT(rxrpc_call, 689cb0fc0c9SDavid Howells TP_PROTO(unsigned int call_debug_id, int ref, unsigned long aux, 690cb0fc0c9SDavid Howells enum rxrpc_call_trace why), 691e34d4234SDavid Howells 692cb0fc0c9SDavid Howells TP_ARGS(call_debug_id, ref, aux, why), 693e34d4234SDavid Howells 694e34d4234SDavid Howells TP_STRUCT__entry( 695a25e21f0SDavid Howells __field(unsigned int, call) 696cb0fc0c9SDavid Howells __field(int, ref) 697cb0fc0c9SDavid Howells __field(int, why) 698cb0fc0c9SDavid Howells __field(unsigned long, aux) 699e34d4234SDavid Howells ), 700e34d4234SDavid Howells 701e34d4234SDavid Howells TP_fast_assign( 70248c9e0ecSDavid Howells __entry->call = call_debug_id; 703cb0fc0c9SDavid Howells __entry->ref = ref; 704cb0fc0c9SDavid Howells __entry->why = why; 705e34d4234SDavid Howells __entry->aux = aux; 706e34d4234SDavid Howells ), 707e34d4234SDavid Howells 708cb0fc0c9SDavid Howells TP_printk("c=%08x %s r=%d a=%lx", 709e34d4234SDavid Howells __entry->call, 710cb0fc0c9SDavid Howells __print_symbolic(__entry->why, rxrpc_call_traces), 711cb0fc0c9SDavid Howells __entry->ref, 712e34d4234SDavid Howells __entry->aux) 713e34d4234SDavid Howells ); 714e34d4234SDavid Howells 715df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb, 7169a36a6bcSDavid Howells TP_PROTO(struct sk_buff *skb, int usage, int mod_count, 7179a36a6bcSDavid Howells enum rxrpc_skb_trace why), 718df844fd4SDavid Howells 7199a36a6bcSDavid Howells TP_ARGS(skb, usage, mod_count, why), 720df844fd4SDavid Howells 721df844fd4SDavid Howells TP_STRUCT__entry( 722df844fd4SDavid Howells __field(struct sk_buff *, skb) 723df844fd4SDavid Howells __field(int, usage) 724df844fd4SDavid Howells __field(int, mod_count) 7259a36a6bcSDavid Howells __field(enum rxrpc_skb_trace, why) 726df844fd4SDavid Howells ), 727df844fd4SDavid Howells 728df844fd4SDavid Howells TP_fast_assign( 729df844fd4SDavid Howells __entry->skb = skb; 730df844fd4SDavid Howells __entry->usage = usage; 731df844fd4SDavid Howells __entry->mod_count = mod_count; 7329a36a6bcSDavid Howells __entry->why = why; 733df844fd4SDavid Howells ), 734df844fd4SDavid Howells 7359a36a6bcSDavid Howells TP_printk("s=%p Rx %s u=%d m=%d", 736df844fd4SDavid Howells __entry->skb, 7379a36a6bcSDavid Howells __print_symbolic(__entry->why, rxrpc_skb_traces), 738df844fd4SDavid Howells __entry->usage, 7399a36a6bcSDavid Howells __entry->mod_count) 740df844fd4SDavid Howells ); 741df844fd4SDavid Howells 74249e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet, 74349e19ec7SDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 74449e19ec7SDavid Howells 74549e19ec7SDavid Howells TP_ARGS(sp), 74649e19ec7SDavid Howells 74749e19ec7SDavid Howells TP_STRUCT__entry( 74849e19ec7SDavid Howells __field_struct(struct rxrpc_host_header, hdr) 74949e19ec7SDavid Howells ), 75049e19ec7SDavid Howells 75149e19ec7SDavid Howells TP_fast_assign( 75249e19ec7SDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 75349e19ec7SDavid Howells ), 75449e19ec7SDavid Howells 755a3868bfcSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", 75649e19ec7SDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 75749e19ec7SDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 75849e19ec7SDavid Howells __entry->hdr.serial, __entry->hdr.seq, 75983836eb4SDavid Howells __entry->hdr.securityIndex, __entry->hdr.flags, 76083836eb4SDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts)) 76149e19ec7SDavid Howells ); 76249e19ec7SDavid Howells 76349e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done, 76449e19ec7SDavid Howells TP_PROTO(int result, int abort_code), 76549e19ec7SDavid Howells 76649e19ec7SDavid Howells TP_ARGS(result, abort_code), 76749e19ec7SDavid Howells 76849e19ec7SDavid Howells TP_STRUCT__entry( 76949e19ec7SDavid Howells __field(int, result) 77049e19ec7SDavid Howells __field(int, abort_code) 77149e19ec7SDavid Howells ), 77249e19ec7SDavid Howells 77349e19ec7SDavid Howells TP_fast_assign( 77449e19ec7SDavid Howells __entry->result = result; 77549e19ec7SDavid Howells __entry->abort_code = abort_code; 77649e19ec7SDavid Howells ), 77749e19ec7SDavid Howells 77849e19ec7SDavid Howells TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) 77949e19ec7SDavid Howells ); 78049e19ec7SDavid Howells 7815a42976dSDavid Howells TRACE_EVENT(rxrpc_abort, 78257af281eSDavid Howells TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why, 78357af281eSDavid Howells u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error), 7845a42976dSDavid Howells 785a25e21f0SDavid Howells TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), 7865a42976dSDavid Howells 7875a42976dSDavid Howells TP_STRUCT__entry( 788a25e21f0SDavid Howells __field(unsigned int, call_nr) 78957af281eSDavid Howells __field(enum rxrpc_abort_reason, why) 7905a42976dSDavid Howells __field(u32, cid) 7915a42976dSDavid Howells __field(u32, call_id) 7925a42976dSDavid Howells __field(rxrpc_seq_t, seq) 7935a42976dSDavid Howells __field(int, abort_code) 7945a42976dSDavid Howells __field(int, error) 7955a42976dSDavid Howells ), 7965a42976dSDavid Howells 7975a42976dSDavid Howells TP_fast_assign( 798a25e21f0SDavid Howells __entry->call_nr = call_nr; 79957af281eSDavid Howells __entry->why = why; 8005a42976dSDavid Howells __entry->cid = cid; 8015a42976dSDavid Howells __entry->call_id = call_id; 8025a42976dSDavid Howells __entry->abort_code = abort_code; 8035a42976dSDavid Howells __entry->error = error; 8045a42976dSDavid Howells __entry->seq = seq; 8055a42976dSDavid Howells ), 8065a42976dSDavid Howells 807a25e21f0SDavid Howells TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", 808a25e21f0SDavid Howells __entry->call_nr, 8095a42976dSDavid Howells __entry->cid, __entry->call_id, __entry->seq, 81057af281eSDavid Howells __entry->abort_code, __entry->error, 81157af281eSDavid Howells __print_symbolic(__entry->why, rxrpc_abort_reasons)) 8125a42976dSDavid Howells ); 8135a42976dSDavid Howells 8141bae5d22SDavid Howells TRACE_EVENT(rxrpc_call_complete, 8151bae5d22SDavid Howells TP_PROTO(struct rxrpc_call *call), 8161bae5d22SDavid Howells 8171bae5d22SDavid Howells TP_ARGS(call), 8181bae5d22SDavid Howells 8191bae5d22SDavid Howells TP_STRUCT__entry( 8201bae5d22SDavid Howells __field(unsigned int, call) 8211bae5d22SDavid Howells __field(enum rxrpc_call_completion, compl) 8221bae5d22SDavid Howells __field(int, error) 8231bae5d22SDavid Howells __field(u32, abort_code) 8241bae5d22SDavid Howells ), 8251bae5d22SDavid Howells 8261bae5d22SDavid Howells TP_fast_assign( 8271bae5d22SDavid Howells __entry->call = call->debug_id; 8281bae5d22SDavid Howells __entry->compl = call->completion; 8291bae5d22SDavid Howells __entry->error = call->error; 8301bae5d22SDavid Howells __entry->abort_code = call->abort_code; 8311bae5d22SDavid Howells ), 8321bae5d22SDavid Howells 8331bae5d22SDavid Howells TP_printk("c=%08x %s r=%d ac=%d", 8341bae5d22SDavid Howells __entry->call, 8351bae5d22SDavid Howells __print_symbolic(__entry->compl, rxrpc_completions), 8361bae5d22SDavid Howells __entry->error, 8371bae5d22SDavid Howells __entry->abort_code) 8381bae5d22SDavid Howells ); 8391bae5d22SDavid Howells 840a4ea4c47SDavid Howells TRACE_EVENT(rxrpc_txqueue, 841a4ea4c47SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why), 842a124fe3eSDavid Howells 843a124fe3eSDavid Howells TP_ARGS(call, why), 844a124fe3eSDavid Howells 845a124fe3eSDavid Howells TP_STRUCT__entry( 846a25e21f0SDavid Howells __field(unsigned int, call) 847a4ea4c47SDavid Howells __field(enum rxrpc_txqueue_trace, why) 848a4ea4c47SDavid Howells __field(rxrpc_seq_t, acks_hard_ack) 849a4ea4c47SDavid Howells __field(rxrpc_seq_t, tx_bottom) 850a124fe3eSDavid Howells __field(rxrpc_seq_t, tx_top) 851cf37b598SDavid Howells __field(rxrpc_seq_t, tx_prepared) 852b1d9f7fdSDavid Howells __field(int, tx_winsize) 853a124fe3eSDavid Howells ), 854a124fe3eSDavid Howells 855a124fe3eSDavid Howells TP_fast_assign( 856a25e21f0SDavid Howells __entry->call = call->debug_id; 857a124fe3eSDavid Howells __entry->why = why; 858a4ea4c47SDavid Howells __entry->acks_hard_ack = call->acks_hard_ack; 859a4ea4c47SDavid Howells __entry->tx_bottom = call->tx_bottom; 860a124fe3eSDavid Howells __entry->tx_top = call->tx_top; 861cf37b598SDavid Howells __entry->tx_prepared = call->tx_prepared; 862b1d9f7fdSDavid Howells __entry->tx_winsize = call->tx_winsize; 863a124fe3eSDavid Howells ), 864a124fe3eSDavid Howells 865cf37b598SDavid Howells TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u/%u", 866a124fe3eSDavid Howells __entry->call, 867a4ea4c47SDavid Howells __print_symbolic(__entry->why, rxrpc_txqueue_traces), 868a4ea4c47SDavid Howells __entry->tx_bottom, 869a4ea4c47SDavid Howells __entry->acks_hard_ack, 870a4ea4c47SDavid Howells __entry->tx_top - __entry->tx_bottom, 871a4ea4c47SDavid Howells __entry->tx_top - __entry->acks_hard_ack, 872cf37b598SDavid Howells __entry->tx_prepared - __entry->tx_bottom, 873b1d9f7fdSDavid Howells __entry->tx_winsize) 874a124fe3eSDavid Howells ); 875a124fe3eSDavid Howells 876b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_data, 8774764c0daSDavid Howells TP_PROTO(unsigned int call, rxrpc_seq_t seq, 878d4d02d8bSDavid Howells rxrpc_serial_t serial, u8 flags), 879ec71eb9aSDavid Howells 880d4d02d8bSDavid Howells TP_ARGS(call, seq, serial, flags), 881ec71eb9aSDavid Howells 882ec71eb9aSDavid Howells TP_STRUCT__entry( 883a25e21f0SDavid Howells __field(unsigned int, call) 884b1d9f7fdSDavid Howells __field(rxrpc_seq_t, seq) 885b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial) 886b1d9f7fdSDavid Howells __field(u8, flags) 887b1d9f7fdSDavid Howells ), 888b1d9f7fdSDavid Howells 889b1d9f7fdSDavid Howells TP_fast_assign( 8904764c0daSDavid Howells __entry->call = call; 891b1d9f7fdSDavid Howells __entry->seq = seq; 892b1d9f7fdSDavid Howells __entry->serial = serial; 893b1d9f7fdSDavid Howells __entry->flags = flags; 894b1d9f7fdSDavid Howells ), 895b1d9f7fdSDavid Howells 896d4d02d8bSDavid Howells TP_printk("c=%08x DATA %08x q=%08x fl=%02x", 897b1d9f7fdSDavid Howells __entry->call, 898b1d9f7fdSDavid Howells __entry->serial, 899b1d9f7fdSDavid Howells __entry->seq, 900d4d02d8bSDavid Howells __entry->flags) 901b1d9f7fdSDavid Howells ); 902b1d9f7fdSDavid Howells 903b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_rx_ack, 904b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call, 905b1d9f7fdSDavid Howells rxrpc_serial_t serial, rxrpc_serial_t ack_serial, 906b1d9f7fdSDavid Howells rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), 907b1d9f7fdSDavid Howells 908b1d9f7fdSDavid Howells TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), 909b1d9f7fdSDavid Howells 910b1d9f7fdSDavid Howells TP_STRUCT__entry( 911a25e21f0SDavid Howells __field(unsigned int, call) 912b1d9f7fdSDavid Howells __field(rxrpc_serial_t, serial) 913b1d9f7fdSDavid Howells __field(rxrpc_serial_t, ack_serial) 914ec71eb9aSDavid Howells __field(rxrpc_seq_t, first) 915b1d9f7fdSDavid Howells __field(rxrpc_seq_t, prev) 916ec71eb9aSDavid Howells __field(u8, reason) 917ec71eb9aSDavid Howells __field(u8, n_acks) 918ec71eb9aSDavid Howells ), 919ec71eb9aSDavid Howells 920ec71eb9aSDavid Howells TP_fast_assign( 921a25e21f0SDavid Howells __entry->call = call->debug_id; 922b1d9f7fdSDavid Howells __entry->serial = serial; 923b1d9f7fdSDavid Howells __entry->ack_serial = ack_serial; 924ec71eb9aSDavid Howells __entry->first = first; 925b1d9f7fdSDavid Howells __entry->prev = prev; 926ec71eb9aSDavid Howells __entry->reason = reason; 927ec71eb9aSDavid Howells __entry->n_acks = n_acks; 928ec71eb9aSDavid Howells ), 929ec71eb9aSDavid Howells 930a25e21f0SDavid Howells TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", 931ec71eb9aSDavid Howells __entry->call, 932b1d9f7fdSDavid Howells __entry->serial, 933b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 934b1d9f7fdSDavid Howells __entry->ack_serial, 935ec71eb9aSDavid Howells __entry->first, 936b1d9f7fdSDavid Howells __entry->prev, 937ec71eb9aSDavid Howells __entry->n_acks) 938ec71eb9aSDavid Howells ); 939ec71eb9aSDavid Howells 940005ede28SDavid Howells TRACE_EVENT(rxrpc_rx_abort, 941005ede28SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 942005ede28SDavid Howells u32 abort_code), 943005ede28SDavid Howells 944005ede28SDavid Howells TP_ARGS(call, serial, abort_code), 945005ede28SDavid Howells 946005ede28SDavid Howells TP_STRUCT__entry( 947a25e21f0SDavid Howells __field(unsigned int, call) 948005ede28SDavid Howells __field(rxrpc_serial_t, serial) 949005ede28SDavid Howells __field(u32, abort_code) 950005ede28SDavid Howells ), 951005ede28SDavid Howells 952005ede28SDavid Howells TP_fast_assign( 953a25e21f0SDavid Howells __entry->call = call->debug_id; 954005ede28SDavid Howells __entry->serial = serial; 955005ede28SDavid Howells __entry->abort_code = abort_code; 956005ede28SDavid Howells ), 957005ede28SDavid Howells 958a25e21f0SDavid Howells TP_printk("c=%08x ABORT %08x ac=%d", 959005ede28SDavid Howells __entry->call, 960005ede28SDavid Howells __entry->serial, 961005ede28SDavid Howells __entry->abort_code) 962005ede28SDavid Howells ); 963005ede28SDavid Howells 9642ebdb26eSDavid Howells TRACE_EVENT(rxrpc_rx_challenge, 9652ebdb26eSDavid Howells TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial, 9662ebdb26eSDavid Howells u32 version, u32 nonce, u32 min_level), 9672ebdb26eSDavid Howells 9682ebdb26eSDavid Howells TP_ARGS(conn, serial, version, nonce, min_level), 9692ebdb26eSDavid Howells 9702ebdb26eSDavid Howells TP_STRUCT__entry( 9712ebdb26eSDavid Howells __field(unsigned int, conn) 9722ebdb26eSDavid Howells __field(rxrpc_serial_t, serial) 9732ebdb26eSDavid Howells __field(u32, version) 9742ebdb26eSDavid Howells __field(u32, nonce) 9752ebdb26eSDavid Howells __field(u32, min_level) 9762ebdb26eSDavid Howells ), 9772ebdb26eSDavid Howells 9782ebdb26eSDavid Howells TP_fast_assign( 9792ebdb26eSDavid Howells __entry->conn = conn->debug_id; 9802ebdb26eSDavid Howells __entry->serial = serial; 9812ebdb26eSDavid Howells __entry->version = version; 9822ebdb26eSDavid Howells __entry->nonce = nonce; 9832ebdb26eSDavid Howells __entry->min_level = min_level; 9842ebdb26eSDavid Howells ), 9852ebdb26eSDavid Howells 9862ebdb26eSDavid Howells TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x", 9872ebdb26eSDavid Howells __entry->conn, 9882ebdb26eSDavid Howells __entry->serial, 9892ebdb26eSDavid Howells __entry->version, 9902ebdb26eSDavid Howells __entry->nonce, 9912ebdb26eSDavid Howells __entry->min_level) 9922ebdb26eSDavid Howells ); 9932ebdb26eSDavid Howells 9942ebdb26eSDavid Howells TRACE_EVENT(rxrpc_rx_response, 9952ebdb26eSDavid Howells TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial, 9962ebdb26eSDavid Howells u32 version, u32 kvno, u32 ticket_len), 9972ebdb26eSDavid Howells 9982ebdb26eSDavid Howells TP_ARGS(conn, serial, version, kvno, ticket_len), 9992ebdb26eSDavid Howells 10002ebdb26eSDavid Howells TP_STRUCT__entry( 10012ebdb26eSDavid Howells __field(unsigned int, conn) 10022ebdb26eSDavid Howells __field(rxrpc_serial_t, serial) 10032ebdb26eSDavid Howells __field(u32, version) 10042ebdb26eSDavid Howells __field(u32, kvno) 10052ebdb26eSDavid Howells __field(u32, ticket_len) 10062ebdb26eSDavid Howells ), 10072ebdb26eSDavid Howells 10082ebdb26eSDavid Howells TP_fast_assign( 10092ebdb26eSDavid Howells __entry->conn = conn->debug_id; 10102ebdb26eSDavid Howells __entry->serial = serial; 10112ebdb26eSDavid Howells __entry->version = version; 10122ebdb26eSDavid Howells __entry->kvno = kvno; 10132ebdb26eSDavid Howells __entry->ticket_len = ticket_len; 10142ebdb26eSDavid Howells ), 10152ebdb26eSDavid Howells 10162ebdb26eSDavid Howells TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x", 10172ebdb26eSDavid Howells __entry->conn, 10182ebdb26eSDavid Howells __entry->serial, 10192ebdb26eSDavid Howells __entry->version, 10202ebdb26eSDavid Howells __entry->kvno, 10212ebdb26eSDavid Howells __entry->ticket_len) 10222ebdb26eSDavid Howells ); 10232ebdb26eSDavid Howells 1024740586d2SDavid Howells TRACE_EVENT(rxrpc_rx_rwind_change, 1025740586d2SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, 1026740586d2SDavid Howells u32 rwind, bool wake), 1027740586d2SDavid Howells 1028740586d2SDavid Howells TP_ARGS(call, serial, rwind, wake), 1029740586d2SDavid Howells 1030740586d2SDavid Howells TP_STRUCT__entry( 1031a25e21f0SDavid Howells __field(unsigned int, call) 1032740586d2SDavid Howells __field(rxrpc_serial_t, serial) 1033740586d2SDavid Howells __field(u32, rwind) 1034740586d2SDavid Howells __field(bool, wake) 1035740586d2SDavid Howells ), 1036740586d2SDavid Howells 1037740586d2SDavid Howells TP_fast_assign( 1038a25e21f0SDavid Howells __entry->call = call->debug_id; 1039740586d2SDavid Howells __entry->serial = serial; 1040740586d2SDavid Howells __entry->rwind = rwind; 1041740586d2SDavid Howells __entry->wake = wake; 1042740586d2SDavid Howells ), 1043740586d2SDavid Howells 1044a25e21f0SDavid Howells TP_printk("c=%08x %08x rw=%u%s", 1045740586d2SDavid Howells __entry->call, 1046740586d2SDavid Howells __entry->serial, 1047740586d2SDavid Howells __entry->rwind, 1048740586d2SDavid Howells __entry->wake ? " wake" : "") 1049740586d2SDavid Howells ); 1050740586d2SDavid Howells 10514764c0daSDavid Howells TRACE_EVENT(rxrpc_tx_packet, 10524764c0daSDavid Howells TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, 10534764c0daSDavid Howells enum rxrpc_tx_point where), 10544764c0daSDavid Howells 10554764c0daSDavid Howells TP_ARGS(call_id, whdr, where), 10564764c0daSDavid Howells 10574764c0daSDavid Howells TP_STRUCT__entry( 10584764c0daSDavid Howells __field(unsigned int, call) 10594764c0daSDavid Howells __field(enum rxrpc_tx_point, where) 10604764c0daSDavid Howells __field_struct(struct rxrpc_wire_header, whdr) 10614764c0daSDavid Howells ), 10624764c0daSDavid Howells 10634764c0daSDavid Howells TP_fast_assign( 10644764c0daSDavid Howells __entry->call = call_id; 10654764c0daSDavid Howells memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); 10664e2abd3cSDavid Howells __entry->where = where; 10674764c0daSDavid Howells ), 10684764c0daSDavid Howells 10694764c0daSDavid Howells TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", 10704764c0daSDavid Howells __entry->call, 10714764c0daSDavid Howells ntohl(__entry->whdr.epoch), 10724764c0daSDavid Howells ntohl(__entry->whdr.cid), 10734764c0daSDavid Howells ntohl(__entry->whdr.callNumber), 10744764c0daSDavid Howells ntohs(__entry->whdr.serviceId), 10754764c0daSDavid Howells ntohl(__entry->whdr.serial), 10764764c0daSDavid Howells ntohl(__entry->whdr.seq), 10774764c0daSDavid Howells __entry->whdr.type, __entry->whdr.flags, 10784764c0daSDavid Howells __entry->whdr.type <= 15 ? 10794764c0daSDavid Howells __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", 10804764c0daSDavid Howells __print_symbolic(__entry->where, rxrpc_tx_points)) 10814764c0daSDavid Howells ); 10824764c0daSDavid Howells 1083be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_data, 1084be832aecSDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 1085a1767077SDavid Howells rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), 1086f3639df2SDavid Howells 1087a1767077SDavid Howells TP_ARGS(call, seq, serial, flags, retrans, lose), 1088f3639df2SDavid Howells 1089f3639df2SDavid Howells TP_STRUCT__entry( 1090a25e21f0SDavid Howells __field(unsigned int, call) 1091be832aecSDavid Howells __field(rxrpc_seq_t, seq) 1092f3639df2SDavid Howells __field(rxrpc_serial_t, serial) 10934764c0daSDavid Howells __field(u32, cid) 10944764c0daSDavid Howells __field(u32, call_id) 1095be832aecSDavid Howells __field(u8, flags) 1096a1767077SDavid Howells __field(bool, retrans) 1097be832aecSDavid Howells __field(bool, lose) 1098be832aecSDavid Howells ), 1099be832aecSDavid Howells 1100be832aecSDavid Howells TP_fast_assign( 1101a25e21f0SDavid Howells __entry->call = call->debug_id; 11024764c0daSDavid Howells __entry->cid = call->cid; 11034764c0daSDavid Howells __entry->call_id = call->call_id; 1104be832aecSDavid Howells __entry->seq = seq; 1105be832aecSDavid Howells __entry->serial = serial; 1106be832aecSDavid Howells __entry->flags = flags; 1107a1767077SDavid Howells __entry->retrans = retrans; 1108be832aecSDavid Howells __entry->lose = lose; 1109be832aecSDavid Howells ), 1110be832aecSDavid Howells 11114764c0daSDavid Howells TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s", 1112be832aecSDavid Howells __entry->call, 11134764c0daSDavid Howells __entry->cid, 11144764c0daSDavid Howells __entry->call_id, 1115be832aecSDavid Howells __entry->serial, 1116be832aecSDavid Howells __entry->seq, 1117be832aecSDavid Howells __entry->flags, 1118265a44bbSDavid Howells __entry->retrans ? " *RETRANS*" : "", 1119be832aecSDavid Howells __entry->lose ? " *LOSE*" : "") 1120be832aecSDavid Howells ); 1121be832aecSDavid Howells 1122be832aecSDavid Howells TRACE_EVENT(rxrpc_tx_ack, 11234764c0daSDavid Howells TP_PROTO(unsigned int call, rxrpc_serial_t serial, 1124be832aecSDavid Howells rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, 1125f789bff2SDavid Howells u8 reason, u8 n_acks, u16 rwind), 1126be832aecSDavid Howells 1127f789bff2SDavid Howells TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks, rwind), 1128be832aecSDavid Howells 1129be832aecSDavid Howells TP_STRUCT__entry( 1130a25e21f0SDavid Howells __field(unsigned int, call) 1131be832aecSDavid Howells __field(rxrpc_serial_t, serial) 1132be832aecSDavid Howells __field(rxrpc_seq_t, ack_first) 1133be832aecSDavid Howells __field(rxrpc_serial_t, ack_serial) 1134f3639df2SDavid Howells __field(u8, reason) 1135f3639df2SDavid Howells __field(u8, n_acks) 1136f789bff2SDavid Howells __field(u16, rwind) 1137f3639df2SDavid Howells ), 1138f3639df2SDavid Howells 1139f3639df2SDavid Howells TP_fast_assign( 11404764c0daSDavid Howells __entry->call = call; 1141f3639df2SDavid Howells __entry->serial = serial; 1142be832aecSDavid Howells __entry->ack_first = ack_first; 1143be832aecSDavid Howells __entry->ack_serial = ack_serial; 1144f3639df2SDavid Howells __entry->reason = reason; 1145f3639df2SDavid Howells __entry->n_acks = n_acks; 1146f789bff2SDavid Howells __entry->rwind = rwind; 1147f3639df2SDavid Howells ), 1148f3639df2SDavid Howells 1149f789bff2SDavid Howells TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u rw=%u", 1150f3639df2SDavid Howells __entry->call, 1151f3639df2SDavid Howells __entry->serial, 1152b54a134aSDavid Howells __print_symbolic(__entry->reason, rxrpc_ack_names), 1153be832aecSDavid Howells __entry->ack_first, 1154be832aecSDavid Howells __entry->ack_serial, 1155f789bff2SDavid Howells __entry->n_acks, 1156f789bff2SDavid Howells __entry->rwind) 1157f3639df2SDavid Howells ); 1158f3639df2SDavid Howells 115958dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive, 116058dc63c9SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, 116158dc63c9SDavid Howells rxrpc_serial_t serial, rxrpc_seq_t seq), 116258dc63c9SDavid Howells 116358dc63c9SDavid Howells TP_ARGS(call, why, serial, seq), 116458dc63c9SDavid Howells 116558dc63c9SDavid Howells TP_STRUCT__entry( 1166a25e21f0SDavid Howells __field(unsigned int, call) 116758dc63c9SDavid Howells __field(enum rxrpc_receive_trace, why) 116858dc63c9SDavid Howells __field(rxrpc_serial_t, serial) 116958dc63c9SDavid Howells __field(rxrpc_seq_t, seq) 11705bbf9533SDavid Howells __field(rxrpc_seq_t, window) 11715bbf9533SDavid Howells __field(rxrpc_seq_t, wtop) 117258dc63c9SDavid Howells ), 117358dc63c9SDavid Howells 117458dc63c9SDavid Howells TP_fast_assign( 1175a25e21f0SDavid Howells __entry->call = call->debug_id; 117658dc63c9SDavid Howells __entry->why = why; 117758dc63c9SDavid Howells __entry->serial = serial; 117858dc63c9SDavid Howells __entry->seq = seq; 11795bbf9533SDavid Howells __entry->window = call->ackr_window; 11805bbf9533SDavid Howells __entry->wtop = call->ackr_wtop; 118158dc63c9SDavid Howells ), 118258dc63c9SDavid Howells 1183a25e21f0SDavid Howells TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", 118458dc63c9SDavid Howells __entry->call, 1185b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_receive_traces), 118658dc63c9SDavid Howells __entry->serial, 118758dc63c9SDavid Howells __entry->seq, 11885bbf9533SDavid Howells __entry->window, 11895bbf9533SDavid Howells __entry->wtop) 119058dc63c9SDavid Howells ); 119158dc63c9SDavid Howells 119284997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg, 11930e50d999SDavid Howells TP_PROTO(unsigned int call_debug_id, enum rxrpc_recvmsg_trace why, 1194faf92e8dSDavid Howells int ret), 1195faf92e8dSDavid Howells 11960e50d999SDavid Howells TP_ARGS(call_debug_id, why, ret), 1197faf92e8dSDavid Howells 1198faf92e8dSDavid Howells TP_STRUCT__entry( 1199faf92e8dSDavid Howells __field(unsigned int, call) 1200faf92e8dSDavid Howells __field(enum rxrpc_recvmsg_trace, why) 1201faf92e8dSDavid Howells __field(int, ret) 1202faf92e8dSDavid Howells ), 1203faf92e8dSDavid Howells 1204faf92e8dSDavid Howells TP_fast_assign( 12050e50d999SDavid Howells __entry->call = call_debug_id; 1206faf92e8dSDavid Howells __entry->why = why; 1207faf92e8dSDavid Howells __entry->ret = ret; 1208faf92e8dSDavid Howells ), 1209faf92e8dSDavid Howells 1210faf92e8dSDavid Howells TP_printk("c=%08x %s ret=%d", 1211faf92e8dSDavid Howells __entry->call, 1212faf92e8dSDavid Howells __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 1213faf92e8dSDavid Howells __entry->ret) 1214faf92e8dSDavid Howells ); 1215faf92e8dSDavid Howells 1216faf92e8dSDavid Howells TRACE_EVENT(rxrpc_recvdata, 1217faf92e8dSDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, 121884997905SDavid Howells rxrpc_seq_t seq, unsigned int offset, unsigned int len, 121984997905SDavid Howells int ret), 122084997905SDavid Howells 122184997905SDavid Howells TP_ARGS(call, why, seq, offset, len, ret), 122284997905SDavid Howells 122384997905SDavid Howells TP_STRUCT__entry( 1224a25e21f0SDavid Howells __field(unsigned int, call) 122584997905SDavid Howells __field(enum rxrpc_recvmsg_trace, why) 122684997905SDavid Howells __field(rxrpc_seq_t, seq) 122784997905SDavid Howells __field(unsigned int, offset) 122884997905SDavid Howells __field(unsigned int, len) 122984997905SDavid Howells __field(int, ret) 123084997905SDavid Howells ), 123184997905SDavid Howells 123284997905SDavid Howells TP_fast_assign( 1233db9b2e0aSDavid Howells __entry->call = call ? call->debug_id : 0; 123484997905SDavid Howells __entry->why = why; 123584997905SDavid Howells __entry->seq = seq; 123684997905SDavid Howells __entry->offset = offset; 123784997905SDavid Howells __entry->len = len; 123884997905SDavid Howells __entry->ret = ret; 123984997905SDavid Howells ), 124084997905SDavid Howells 1241a25e21f0SDavid Howells TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", 124284997905SDavid Howells __entry->call, 1243b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_recvmsg_traces), 124484997905SDavid Howells __entry->seq, 124584997905SDavid Howells __entry->offset, 124684997905SDavid Howells __entry->len, 124784997905SDavid Howells __entry->ret) 124884997905SDavid Howells ); 124984997905SDavid Howells 1250cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx, 1251cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, 12524700c4d8SDavid Howells int slot, rxrpc_serial_t send_serial), 1253cf1a6474SDavid Howells 12544700c4d8SDavid Howells TP_ARGS(call, why, slot, send_serial), 1255cf1a6474SDavid Howells 1256cf1a6474SDavid Howells TP_STRUCT__entry( 1257a25e21f0SDavid Howells __field(unsigned int, call) 1258cf1a6474SDavid Howells __field(enum rxrpc_rtt_tx_trace, why) 12594700c4d8SDavid Howells __field(int, slot) 1260cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial) 1261cf1a6474SDavid Howells ), 1262cf1a6474SDavid Howells 1263cf1a6474SDavid Howells TP_fast_assign( 1264a25e21f0SDavid Howells __entry->call = call->debug_id; 1265cf1a6474SDavid Howells __entry->why = why; 12664700c4d8SDavid Howells __entry->slot = slot; 1267cf1a6474SDavid Howells __entry->send_serial = send_serial; 1268cf1a6474SDavid Howells ), 1269cf1a6474SDavid Howells 12704700c4d8SDavid Howells TP_printk("c=%08x [%d] %s sr=%08x", 1271cf1a6474SDavid Howells __entry->call, 12724700c4d8SDavid Howells __entry->slot, 1273b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), 1274cf1a6474SDavid Howells __entry->send_serial) 1275cf1a6474SDavid Howells ); 1276cf1a6474SDavid Howells 1277cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx, 1278cf1a6474SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, 12794700c4d8SDavid Howells int slot, 1280cf1a6474SDavid Howells rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, 1281c410bf01SDavid Howells u32 rtt, u32 rto), 1282cf1a6474SDavid Howells 12834700c4d8SDavid Howells TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto), 1284cf1a6474SDavid Howells 1285cf1a6474SDavid Howells TP_STRUCT__entry( 1286a25e21f0SDavid Howells __field(unsigned int, call) 1287cf1a6474SDavid Howells __field(enum rxrpc_rtt_rx_trace, why) 12884700c4d8SDavid Howells __field(int, slot) 1289cf1a6474SDavid Howells __field(rxrpc_serial_t, send_serial) 1290cf1a6474SDavid Howells __field(rxrpc_serial_t, resp_serial) 1291c410bf01SDavid Howells __field(u32, rtt) 1292c410bf01SDavid Howells __field(u32, rto) 1293cf1a6474SDavid Howells ), 1294cf1a6474SDavid Howells 1295cf1a6474SDavid Howells TP_fast_assign( 1296a25e21f0SDavid Howells __entry->call = call->debug_id; 1297cf1a6474SDavid Howells __entry->why = why; 12984700c4d8SDavid Howells __entry->slot = slot; 1299cf1a6474SDavid Howells __entry->send_serial = send_serial; 1300cf1a6474SDavid Howells __entry->resp_serial = resp_serial; 1301cf1a6474SDavid Howells __entry->rtt = rtt; 1302c410bf01SDavid Howells __entry->rto = rto; 1303cf1a6474SDavid Howells ), 1304cf1a6474SDavid Howells 13054700c4d8SDavid Howells TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u", 1306cf1a6474SDavid Howells __entry->call, 13074700c4d8SDavid Howells __entry->slot, 1308b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), 1309cf1a6474SDavid Howells __entry->send_serial, 1310cf1a6474SDavid Howells __entry->resp_serial, 1311cf1a6474SDavid Howells __entry->rtt, 1312c410bf01SDavid Howells __entry->rto) 1313cf1a6474SDavid Howells ); 1314cf1a6474SDavid Howells 1315fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer, 1316fc7ab6d2SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, 1317a158bdd3SDavid Howells unsigned long now), 1318fc7ab6d2SDavid Howells 1319a158bdd3SDavid Howells TP_ARGS(call, why, now), 1320fc7ab6d2SDavid Howells 1321fc7ab6d2SDavid Howells TP_STRUCT__entry( 1322a25e21f0SDavid Howells __field(unsigned int, call) 1323fc7ab6d2SDavid Howells __field(enum rxrpc_timer_trace, why) 1324a158bdd3SDavid Howells __field(long, now) 1325a158bdd3SDavid Howells __field(long, ack_at) 1326bd1fdf8cSDavid Howells __field(long, ack_lost_at) 1327a158bdd3SDavid Howells __field(long, resend_at) 1328a158bdd3SDavid Howells __field(long, ping_at) 1329a158bdd3SDavid Howells __field(long, expect_rx_by) 1330a158bdd3SDavid Howells __field(long, expect_req_by) 1331a158bdd3SDavid Howells __field(long, expect_term_by) 1332a158bdd3SDavid Howells __field(long, timer) 1333fc7ab6d2SDavid Howells ), 1334fc7ab6d2SDavid Howells 1335fc7ab6d2SDavid Howells TP_fast_assign( 1336a25e21f0SDavid Howells __entry->call = call->debug_id; 1337fc7ab6d2SDavid Howells __entry->why = why; 1338fc7ab6d2SDavid Howells __entry->now = now; 1339530403d9SDavid Howells __entry->ack_at = call->delay_ack_at; 1340bd1fdf8cSDavid Howells __entry->ack_lost_at = call->ack_lost_at; 1341fc7ab6d2SDavid Howells __entry->resend_at = call->resend_at; 1342a158bdd3SDavid Howells __entry->expect_rx_by = call->expect_rx_by; 1343a158bdd3SDavid Howells __entry->expect_req_by = call->expect_req_by; 1344a158bdd3SDavid Howells __entry->expect_term_by = call->expect_term_by; 1345fc7ab6d2SDavid Howells __entry->timer = call->timer.expires; 1346fc7ab6d2SDavid Howells ), 1347fc7ab6d2SDavid Howells 1348a25e21f0SDavid Howells TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 1349fc7ab6d2SDavid Howells __entry->call, 1350b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_timer_traces), 1351a158bdd3SDavid Howells __entry->ack_at - __entry->now, 1352bd1fdf8cSDavid Howells __entry->ack_lost_at - __entry->now, 1353a158bdd3SDavid Howells __entry->resend_at - __entry->now, 1354a158bdd3SDavid Howells __entry->expect_rx_by - __entry->now, 1355a158bdd3SDavid Howells __entry->expect_req_by - __entry->now, 1356a158bdd3SDavid Howells __entry->expect_term_by - __entry->now, 1357a158bdd3SDavid Howells __entry->timer - __entry->now) 1358fc7ab6d2SDavid Howells ); 1359fc7ab6d2SDavid Howells 1360334dfbfcSDavid Howells TRACE_EVENT(rxrpc_timer_expired, 1361334dfbfcSDavid Howells TP_PROTO(struct rxrpc_call *call, unsigned long now), 1362334dfbfcSDavid Howells 1363334dfbfcSDavid Howells TP_ARGS(call, now), 1364334dfbfcSDavid Howells 1365334dfbfcSDavid Howells TP_STRUCT__entry( 1366334dfbfcSDavid Howells __field(unsigned int, call) 1367334dfbfcSDavid Howells __field(long, now) 1368334dfbfcSDavid Howells __field(long, ack_at) 1369334dfbfcSDavid Howells __field(long, ack_lost_at) 1370334dfbfcSDavid Howells __field(long, resend_at) 1371334dfbfcSDavid Howells __field(long, ping_at) 1372334dfbfcSDavid Howells __field(long, expect_rx_by) 1373334dfbfcSDavid Howells __field(long, expect_req_by) 1374334dfbfcSDavid Howells __field(long, expect_term_by) 1375334dfbfcSDavid Howells __field(long, timer) 1376334dfbfcSDavid Howells ), 1377334dfbfcSDavid Howells 1378334dfbfcSDavid Howells TP_fast_assign( 1379334dfbfcSDavid Howells __entry->call = call->debug_id; 1380334dfbfcSDavid Howells __entry->now = now; 1381530403d9SDavid Howells __entry->ack_at = call->delay_ack_at; 1382334dfbfcSDavid Howells __entry->ack_lost_at = call->ack_lost_at; 1383334dfbfcSDavid Howells __entry->resend_at = call->resend_at; 1384334dfbfcSDavid Howells __entry->expect_rx_by = call->expect_rx_by; 1385334dfbfcSDavid Howells __entry->expect_req_by = call->expect_req_by; 1386334dfbfcSDavid Howells __entry->expect_term_by = call->expect_term_by; 1387334dfbfcSDavid Howells __entry->timer = call->timer.expires; 1388334dfbfcSDavid Howells ), 1389334dfbfcSDavid Howells 1390334dfbfcSDavid Howells TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", 1391334dfbfcSDavid Howells __entry->call, 1392334dfbfcSDavid Howells __entry->ack_at - __entry->now, 1393334dfbfcSDavid Howells __entry->ack_lost_at - __entry->now, 1394334dfbfcSDavid Howells __entry->resend_at - __entry->now, 1395334dfbfcSDavid Howells __entry->expect_rx_by - __entry->now, 1396334dfbfcSDavid Howells __entry->expect_req_by - __entry->now, 1397334dfbfcSDavid Howells __entry->expect_term_by - __entry->now, 1398334dfbfcSDavid Howells __entry->timer - __entry->now) 1399334dfbfcSDavid Howells ); 1400334dfbfcSDavid Howells 140189b475abSDavid Howells TRACE_EVENT(rxrpc_rx_lose, 140289b475abSDavid Howells TP_PROTO(struct rxrpc_skb_priv *sp), 140389b475abSDavid Howells 140489b475abSDavid Howells TP_ARGS(sp), 140589b475abSDavid Howells 140689b475abSDavid Howells TP_STRUCT__entry( 140789b475abSDavid Howells __field_struct(struct rxrpc_host_header, hdr) 140889b475abSDavid Howells ), 140989b475abSDavid Howells 141089b475abSDavid Howells TP_fast_assign( 141189b475abSDavid Howells memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); 141289b475abSDavid Howells ), 141389b475abSDavid Howells 141489b475abSDavid Howells TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", 141589b475abSDavid Howells __entry->hdr.epoch, __entry->hdr.cid, 141689b475abSDavid Howells __entry->hdr.callNumber, __entry->hdr.serviceId, 141789b475abSDavid Howells __entry->hdr.serial, __entry->hdr.seq, 141889b475abSDavid Howells __entry->hdr.type, __entry->hdr.flags, 1419b54a134aSDavid Howells __entry->hdr.type <= 15 ? 1420b54a134aSDavid Howells __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") 142189b475abSDavid Howells ); 142289b475abSDavid Howells 14239c7ad434SDavid Howells TRACE_EVENT(rxrpc_propose_ack, 14249c7ad434SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1425530403d9SDavid Howells u8 ack_reason, rxrpc_serial_t serial), 14269c7ad434SDavid Howells 1427530403d9SDavid Howells TP_ARGS(call, why, ack_reason, serial), 14289c7ad434SDavid Howells 14299c7ad434SDavid Howells TP_STRUCT__entry( 1430a25e21f0SDavid Howells __field(unsigned int, call) 14319c7ad434SDavid Howells __field(enum rxrpc_propose_ack_trace, why) 14329c7ad434SDavid Howells __field(rxrpc_serial_t, serial) 14339c7ad434SDavid Howells __field(u8, ack_reason) 14349c7ad434SDavid Howells ), 14359c7ad434SDavid Howells 14369c7ad434SDavid Howells TP_fast_assign( 1437a25e21f0SDavid Howells __entry->call = call->debug_id; 14389c7ad434SDavid Howells __entry->why = why; 14399c7ad434SDavid Howells __entry->serial = serial; 14409c7ad434SDavid Howells __entry->ack_reason = ack_reason; 14419c7ad434SDavid Howells ), 14429c7ad434SDavid Howells 1443530403d9SDavid Howells TP_printk("c=%08x %s %s r=%08x", 14449c7ad434SDavid Howells __entry->call, 1445b54a134aSDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1446b54a134aSDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1447530403d9SDavid Howells __entry->serial) 14489c7ad434SDavid Howells ); 14499c7ad434SDavid Howells 145072f0c6fbSDavid Howells TRACE_EVENT(rxrpc_send_ack, 145172f0c6fbSDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 145272f0c6fbSDavid Howells u8 ack_reason, rxrpc_serial_t serial), 145372f0c6fbSDavid Howells 145472f0c6fbSDavid Howells TP_ARGS(call, why, ack_reason, serial), 145572f0c6fbSDavid Howells 145672f0c6fbSDavid Howells TP_STRUCT__entry( 145772f0c6fbSDavid Howells __field(unsigned int, call) 145872f0c6fbSDavid Howells __field(enum rxrpc_propose_ack_trace, why) 145972f0c6fbSDavid Howells __field(rxrpc_serial_t, serial) 146072f0c6fbSDavid Howells __field(u8, ack_reason) 146172f0c6fbSDavid Howells ), 146272f0c6fbSDavid Howells 146372f0c6fbSDavid Howells TP_fast_assign( 146472f0c6fbSDavid Howells __entry->call = call->debug_id; 146572f0c6fbSDavid Howells __entry->why = why; 146672f0c6fbSDavid Howells __entry->serial = serial; 146772f0c6fbSDavid Howells __entry->ack_reason = ack_reason; 146872f0c6fbSDavid Howells ), 146972f0c6fbSDavid Howells 147072f0c6fbSDavid Howells TP_printk("c=%08x %s %s r=%08x", 147172f0c6fbSDavid Howells __entry->call, 147272f0c6fbSDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 147372f0c6fbSDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 147472f0c6fbSDavid Howells __entry->serial) 147572f0c6fbSDavid Howells ); 147672f0c6fbSDavid Howells 1477530403d9SDavid Howells TRACE_EVENT(rxrpc_drop_ack, 1478530403d9SDavid Howells TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, 1479530403d9SDavid Howells u8 ack_reason, rxrpc_serial_t serial, bool nobuf), 1480530403d9SDavid Howells 1481530403d9SDavid Howells TP_ARGS(call, why, ack_reason, serial, nobuf), 1482530403d9SDavid Howells 1483530403d9SDavid Howells TP_STRUCT__entry( 1484530403d9SDavid Howells __field(unsigned int, call) 1485530403d9SDavid Howells __field(enum rxrpc_propose_ack_trace, why) 1486530403d9SDavid Howells __field(rxrpc_serial_t, serial) 1487530403d9SDavid Howells __field(u8, ack_reason) 1488530403d9SDavid Howells __field(bool, nobuf) 1489530403d9SDavid Howells ), 1490530403d9SDavid Howells 1491530403d9SDavid Howells TP_fast_assign( 1492530403d9SDavid Howells __entry->call = call->debug_id; 1493530403d9SDavid Howells __entry->why = why; 1494530403d9SDavid Howells __entry->serial = serial; 1495530403d9SDavid Howells __entry->ack_reason = ack_reason; 1496530403d9SDavid Howells __entry->nobuf = nobuf; 1497530403d9SDavid Howells ), 1498530403d9SDavid Howells 1499530403d9SDavid Howells TP_printk("c=%08x %s %s r=%08x nbf=%u", 1500530403d9SDavid Howells __entry->call, 1501530403d9SDavid Howells __print_symbolic(__entry->why, rxrpc_propose_ack_traces), 1502530403d9SDavid Howells __print_symbolic(__entry->ack_reason, rxrpc_ack_names), 1503530403d9SDavid Howells __entry->serial, __entry->nobuf) 1504530403d9SDavid Howells ); 1505530403d9SDavid Howells 1506c6672e3fSDavid Howells TRACE_EVENT(rxrpc_retransmit, 1507a4ea4c47SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry), 1508c6672e3fSDavid Howells 1509a4ea4c47SDavid Howells TP_ARGS(call, seq, expiry), 1510c6672e3fSDavid Howells 1511c6672e3fSDavid Howells TP_STRUCT__entry( 1512a25e21f0SDavid Howells __field(unsigned int, call) 1513c6672e3fSDavid Howells __field(rxrpc_seq_t, seq) 1514c6672e3fSDavid Howells __field(s64, expiry) 1515c6672e3fSDavid Howells ), 1516c6672e3fSDavid Howells 1517c6672e3fSDavid Howells TP_fast_assign( 1518a25e21f0SDavid Howells __entry->call = call->debug_id; 1519c6672e3fSDavid Howells __entry->seq = seq; 1520c6672e3fSDavid Howells __entry->expiry = expiry; 1521c6672e3fSDavid Howells ), 1522c6672e3fSDavid Howells 1523a4ea4c47SDavid Howells TP_printk("c=%08x q=%x xp=%lld", 1524c6672e3fSDavid Howells __entry->call, 1525c6672e3fSDavid Howells __entry->seq, 1526c6672e3fSDavid Howells __entry->expiry) 1527c6672e3fSDavid Howells ); 1528c6672e3fSDavid Howells 152957494343SDavid Howells TRACE_EVENT(rxrpc_congest, 153057494343SDavid Howells TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, 153157494343SDavid Howells rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), 153257494343SDavid Howells 153357494343SDavid Howells TP_ARGS(call, summary, ack_serial, change), 153457494343SDavid Howells 153557494343SDavid Howells TP_STRUCT__entry( 1536a25e21f0SDavid Howells __field(unsigned int, call) 153757494343SDavid Howells __field(enum rxrpc_congest_change, change) 153857494343SDavid Howells __field(rxrpc_seq_t, hard_ack) 153957494343SDavid Howells __field(rxrpc_seq_t, top) 154057494343SDavid Howells __field(rxrpc_seq_t, lowest_nak) 154157494343SDavid Howells __field(rxrpc_serial_t, ack_serial) 154257494343SDavid Howells __field_struct(struct rxrpc_ack_summary, sum) 154357494343SDavid Howells ), 154457494343SDavid Howells 154557494343SDavid Howells TP_fast_assign( 1546a25e21f0SDavid Howells __entry->call = call->debug_id; 154757494343SDavid Howells __entry->change = change; 1548a4ea4c47SDavid Howells __entry->hard_ack = call->acks_hard_ack; 154957494343SDavid Howells __entry->top = call->tx_top; 155057494343SDavid Howells __entry->lowest_nak = call->acks_lowest_nak; 155157494343SDavid Howells __entry->ack_serial = ack_serial; 155257494343SDavid Howells memcpy(&__entry->sum, summary, sizeof(__entry->sum)); 155357494343SDavid Howells ), 155457494343SDavid Howells 1555024b2511SDavid Howells 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", 155657494343SDavid Howells __entry->call, 155757494343SDavid Howells __entry->ack_serial, 1558b54a134aSDavid Howells __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), 155957494343SDavid Howells __entry->hard_ack, 1560b54a134aSDavid Howells __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), 156157494343SDavid Howells __entry->sum.cwnd, 156257494343SDavid Howells __entry->sum.ssthresh, 1563024b2511SDavid Howells __entry->sum.nr_acks, __entry->sum.nr_retained_nacks, 1564d57a3a15SDavid Howells __entry->sum.nr_new_acks, 1565024b2511SDavid Howells __entry->sum.nr_new_nacks, 156657494343SDavid Howells __entry->top - __entry->hard_ack, 156757494343SDavid Howells __entry->sum.cumulative_acks, 156857494343SDavid Howells __entry->sum.dup_acks, 156957494343SDavid Howells __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", 1570b54a134aSDavid Howells __print_symbolic(__entry->change, rxrpc_congest_changes), 157157494343SDavid Howells __entry->sum.retrans_timeo ? " rTxTo" : "") 157257494343SDavid Howells ); 157357494343SDavid Howells 157432cf8edbSDavid Howells TRACE_EVENT(rxrpc_reset_cwnd, 157532cf8edbSDavid Howells TP_PROTO(struct rxrpc_call *call, ktime_t now), 157632cf8edbSDavid Howells 157732cf8edbSDavid Howells TP_ARGS(call, now), 157832cf8edbSDavid Howells 157932cf8edbSDavid Howells TP_STRUCT__entry( 158032cf8edbSDavid Howells __field(unsigned int, call) 158132cf8edbSDavid Howells __field(enum rxrpc_congest_mode, mode) 158232cf8edbSDavid Howells __field(unsigned short, cwnd) 158332cf8edbSDavid Howells __field(unsigned short, extra) 158432cf8edbSDavid Howells __field(rxrpc_seq_t, hard_ack) 158532cf8edbSDavid Howells __field(rxrpc_seq_t, prepared) 158632cf8edbSDavid Howells __field(ktime_t, since_last_tx) 158732cf8edbSDavid Howells __field(bool, has_data) 158832cf8edbSDavid Howells ), 158932cf8edbSDavid Howells 159032cf8edbSDavid Howells TP_fast_assign( 159132cf8edbSDavid Howells __entry->call = call->debug_id; 159232cf8edbSDavid Howells __entry->mode = call->cong_mode; 159332cf8edbSDavid Howells __entry->cwnd = call->cong_cwnd; 159432cf8edbSDavid Howells __entry->extra = call->cong_extra; 159532cf8edbSDavid Howells __entry->hard_ack = call->acks_hard_ack; 159632cf8edbSDavid Howells __entry->prepared = call->tx_prepared - call->tx_bottom; 159732cf8edbSDavid Howells __entry->since_last_tx = ktime_sub(now, call->tx_last_sent); 159832cf8edbSDavid Howells __entry->has_data = !list_empty(&call->tx_sendmsg); 159932cf8edbSDavid Howells ), 160032cf8edbSDavid Howells 160132cf8edbSDavid Howells TP_printk("c=%08x q=%08x %s cw=%u+%u pr=%u tm=%llu d=%u", 160232cf8edbSDavid Howells __entry->call, 160332cf8edbSDavid Howells __entry->hard_ack, 160432cf8edbSDavid Howells __print_symbolic(__entry->mode, rxrpc_congest_modes), 160532cf8edbSDavid Howells __entry->cwnd, 160632cf8edbSDavid Howells __entry->extra, 160732cf8edbSDavid Howells __entry->prepared, 160832cf8edbSDavid Howells ktime_to_ns(__entry->since_last_tx), 160932cf8edbSDavid Howells __entry->has_data) 161032cf8edbSDavid Howells ); 161132cf8edbSDavid Howells 1612b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_disconnect_call, 1613b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1614b1d9f7fdSDavid Howells 1615b1d9f7fdSDavid Howells TP_ARGS(call), 1616b1d9f7fdSDavid Howells 1617b1d9f7fdSDavid Howells TP_STRUCT__entry( 1618a25e21f0SDavid Howells __field(unsigned int, call) 1619b1d9f7fdSDavid Howells __field(u32, abort_code) 1620b1d9f7fdSDavid Howells ), 1621b1d9f7fdSDavid Howells 1622b1d9f7fdSDavid Howells TP_fast_assign( 1623a25e21f0SDavid Howells __entry->call = call->debug_id; 1624b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1625b1d9f7fdSDavid Howells ), 1626b1d9f7fdSDavid Howells 1627a25e21f0SDavid Howells TP_printk("c=%08x ab=%08x", 1628b1d9f7fdSDavid Howells __entry->call, 1629b1d9f7fdSDavid Howells __entry->abort_code) 1630b1d9f7fdSDavid Howells ); 1631b1d9f7fdSDavid Howells 1632b1d9f7fdSDavid Howells TRACE_EVENT(rxrpc_improper_term, 1633b1d9f7fdSDavid Howells TP_PROTO(struct rxrpc_call *call), 1634b1d9f7fdSDavid Howells 1635b1d9f7fdSDavid Howells TP_ARGS(call), 1636b1d9f7fdSDavid Howells 1637b1d9f7fdSDavid Howells TP_STRUCT__entry( 1638a25e21f0SDavid Howells __field(unsigned int, call) 1639b1d9f7fdSDavid Howells __field(u32, abort_code) 1640b1d9f7fdSDavid Howells ), 1641b1d9f7fdSDavid Howells 1642b1d9f7fdSDavid Howells TP_fast_assign( 1643a25e21f0SDavid Howells __entry->call = call->debug_id; 1644b1d9f7fdSDavid Howells __entry->abort_code = call->abort_code; 1645b1d9f7fdSDavid Howells ), 1646b1d9f7fdSDavid Howells 1647a25e21f0SDavid Howells TP_printk("c=%08x ab=%08x", 1648b1d9f7fdSDavid Howells __entry->call, 1649b1d9f7fdSDavid Howells __entry->abort_code) 1650b1d9f7fdSDavid Howells ); 1651b1d9f7fdSDavid Howells 165289ca6948SDavid Howells TRACE_EVENT(rxrpc_connect_call, 165389ca6948SDavid Howells TP_PROTO(struct rxrpc_call *call), 165489ca6948SDavid Howells 165589ca6948SDavid Howells TP_ARGS(call), 165689ca6948SDavid Howells 165789ca6948SDavid Howells TP_STRUCT__entry( 1658a25e21f0SDavid Howells __field(unsigned int, call) 165989ca6948SDavid Howells __field(unsigned long, user_call_ID) 166089ca6948SDavid Howells __field(u32, cid) 166189ca6948SDavid Howells __field(u32, call_id) 16625e6ef4f1SDavid Howells __field_struct(struct sockaddr_rxrpc, srx) 166389ca6948SDavid Howells ), 166489ca6948SDavid Howells 166589ca6948SDavid Howells TP_fast_assign( 1666a25e21f0SDavid Howells __entry->call = call->debug_id; 166789ca6948SDavid Howells __entry->user_call_ID = call->user_call_ID; 166889ca6948SDavid Howells __entry->cid = call->cid; 166989ca6948SDavid Howells __entry->call_id = call->call_id; 16705e6ef4f1SDavid Howells __entry->srx = call->dest_srx; 167189ca6948SDavid Howells ), 167289ca6948SDavid Howells 16735e6ef4f1SDavid Howells TP_printk("c=%08x u=%p %08x:%08x dst=%pISp", 167489ca6948SDavid Howells __entry->call, 167589ca6948SDavid Howells (void *)__entry->user_call_ID, 167689ca6948SDavid Howells __entry->cid, 16775e6ef4f1SDavid Howells __entry->call_id, 16785e6ef4f1SDavid Howells &__entry->srx.transport) 167989ca6948SDavid Howells ); 168089ca6948SDavid Howells 1681827efed6SDavid Howells TRACE_EVENT(rxrpc_resend, 16825e6ef4f1SDavid Howells TP_PROTO(struct rxrpc_call *call, struct sk_buff *ack), 1683827efed6SDavid Howells 16845e6ef4f1SDavid Howells TP_ARGS(call, ack), 1685827efed6SDavid Howells 1686827efed6SDavid Howells TP_STRUCT__entry( 1687a25e21f0SDavid Howells __field(unsigned int, call) 1688a4ea4c47SDavid Howells __field(rxrpc_seq_t, seq) 16895e6ef4f1SDavid Howells __field(rxrpc_seq_t, transmitted) 16905e6ef4f1SDavid Howells __field(rxrpc_serial_t, ack_serial) 1691827efed6SDavid Howells ), 1692827efed6SDavid Howells 1693827efed6SDavid Howells TP_fast_assign( 16945e6ef4f1SDavid Howells struct rxrpc_skb_priv *sp = ack ? rxrpc_skb(ack) : NULL; 1695a25e21f0SDavid Howells __entry->call = call->debug_id; 1696a4ea4c47SDavid Howells __entry->seq = call->acks_hard_ack; 16975e6ef4f1SDavid Howells __entry->transmitted = call->tx_transmitted; 16985e6ef4f1SDavid Howells __entry->ack_serial = sp ? sp->hdr.serial : 0; 1699827efed6SDavid Howells ), 1700827efed6SDavid Howells 17015e6ef4f1SDavid Howells TP_printk("c=%08x r=%x q=%x tq=%x", 1702827efed6SDavid Howells __entry->call, 17035e6ef4f1SDavid Howells __entry->ack_serial, 17045e6ef4f1SDavid Howells __entry->seq, 17055e6ef4f1SDavid Howells __entry->transmitted) 1706827efed6SDavid Howells ); 1707827efed6SDavid Howells 1708494337c9SDavid Howells TRACE_EVENT(rxrpc_rx_icmp, 1709494337c9SDavid Howells TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, 1710494337c9SDavid Howells struct sockaddr_rxrpc *srx), 1711494337c9SDavid Howells 1712494337c9SDavid Howells TP_ARGS(peer, ee, srx), 1713494337c9SDavid Howells 1714494337c9SDavid Howells TP_STRUCT__entry( 1715494337c9SDavid Howells __field(unsigned int, peer) 1716494337c9SDavid Howells __field_struct(struct sock_extended_err, ee) 1717494337c9SDavid Howells __field_struct(struct sockaddr_rxrpc, srx) 1718494337c9SDavid Howells ), 1719494337c9SDavid Howells 1720494337c9SDavid Howells TP_fast_assign( 1721494337c9SDavid Howells __entry->peer = peer->debug_id; 1722494337c9SDavid Howells memcpy(&__entry->ee, ee, sizeof(__entry->ee)); 1723494337c9SDavid Howells memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 1724494337c9SDavid Howells ), 1725494337c9SDavid Howells 1726494337c9SDavid Howells TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", 1727494337c9SDavid Howells __entry->peer, 1728494337c9SDavid Howells __entry->ee.ee_origin, 1729494337c9SDavid Howells __entry->ee.ee_type, 1730494337c9SDavid Howells __entry->ee.ee_code, 1731494337c9SDavid Howells __entry->ee.ee_info, 1732494337c9SDavid Howells __entry->ee.ee_data, 1733494337c9SDavid Howells __entry->ee.ee_errno, 1734494337c9SDavid Howells &__entry->srx.transport) 1735494337c9SDavid Howells ); 1736494337c9SDavid Howells 17376b47fe1dSDavid Howells TRACE_EVENT(rxrpc_tx_fail, 17386b47fe1dSDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, 17394764c0daSDavid Howells enum rxrpc_tx_point where), 17406b47fe1dSDavid Howells 17414764c0daSDavid Howells TP_ARGS(debug_id, serial, ret, where), 17426b47fe1dSDavid Howells 17436b47fe1dSDavid Howells TP_STRUCT__entry( 17446b47fe1dSDavid Howells __field(unsigned int, debug_id) 17456b47fe1dSDavid Howells __field(rxrpc_serial_t, serial) 17466b47fe1dSDavid Howells __field(int, ret) 17474764c0daSDavid Howells __field(enum rxrpc_tx_point, where) 17486b47fe1dSDavid Howells ), 17496b47fe1dSDavid Howells 17506b47fe1dSDavid Howells TP_fast_assign( 17516b47fe1dSDavid Howells __entry->debug_id = debug_id; 17526b47fe1dSDavid Howells __entry->serial = serial; 17536b47fe1dSDavid Howells __entry->ret = ret; 17544764c0daSDavid Howells __entry->where = where; 17556b47fe1dSDavid Howells ), 17566b47fe1dSDavid Howells 17576b47fe1dSDavid Howells TP_printk("c=%08x r=%x ret=%d %s", 17586b47fe1dSDavid Howells __entry->debug_id, 17596b47fe1dSDavid Howells __entry->serial, 17606b47fe1dSDavid Howells __entry->ret, 17614764c0daSDavid Howells __print_symbolic(__entry->where, rxrpc_tx_points)) 17626b47fe1dSDavid Howells ); 17636b47fe1dSDavid Howells 17641a025028SDavid Howells TRACE_EVENT(rxrpc_call_reset, 17651a025028SDavid Howells TP_PROTO(struct rxrpc_call *call), 17661a025028SDavid Howells 17671a025028SDavid Howells TP_ARGS(call), 17681a025028SDavid Howells 17691a025028SDavid Howells TP_STRUCT__entry( 17701a025028SDavid Howells __field(unsigned int, debug_id) 17711a025028SDavid Howells __field(u32, cid) 17721a025028SDavid Howells __field(u32, call_id) 17731a025028SDavid Howells __field(rxrpc_serial_t, call_serial) 17741a025028SDavid Howells __field(rxrpc_serial_t, conn_serial) 17751a025028SDavid Howells __field(rxrpc_seq_t, tx_seq) 17761a025028SDavid Howells __field(rxrpc_seq_t, rx_seq) 17771a025028SDavid Howells ), 17781a025028SDavid Howells 17791a025028SDavid Howells TP_fast_assign( 17801a025028SDavid Howells __entry->debug_id = call->debug_id; 17811a025028SDavid Howells __entry->cid = call->cid; 17821a025028SDavid Howells __entry->call_id = call->call_id; 17831a025028SDavid Howells __entry->call_serial = call->rx_serial; 17841a025028SDavid Howells __entry->conn_serial = call->conn->hi_serial; 1785a4ea4c47SDavid Howells __entry->tx_seq = call->acks_hard_ack; 17865d7edbc9SDavid Howells __entry->rx_seq = call->rx_highest_seq; 17871a025028SDavid Howells ), 17881a025028SDavid Howells 17891a025028SDavid Howells TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", 17901a025028SDavid Howells __entry->debug_id, 17911a025028SDavid Howells __entry->cid, __entry->call_id, 17921a025028SDavid Howells __entry->call_serial, __entry->conn_serial, 17931a025028SDavid Howells __entry->tx_seq, __entry->rx_seq) 17941a025028SDavid Howells ); 17951a025028SDavid Howells 17964272d303SDavid Howells TRACE_EVENT(rxrpc_notify_socket, 17974272d303SDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), 17984272d303SDavid Howells 17994272d303SDavid Howells TP_ARGS(debug_id, serial), 18004272d303SDavid Howells 18014272d303SDavid Howells TP_STRUCT__entry( 18024272d303SDavid Howells __field(unsigned int, debug_id) 18034272d303SDavid Howells __field(rxrpc_serial_t, serial) 18044272d303SDavid Howells ), 18054272d303SDavid Howells 18064272d303SDavid Howells TP_fast_assign( 18074272d303SDavid Howells __entry->debug_id = debug_id; 18084272d303SDavid Howells __entry->serial = serial; 18094272d303SDavid Howells ), 18104272d303SDavid Howells 18114272d303SDavid Howells TP_printk("c=%08x r=%08x", 18124272d303SDavid Howells __entry->debug_id, 18134272d303SDavid Howells __entry->serial) 18144272d303SDavid Howells ); 18154272d303SDavid Howells 1816d1f12947SDavid Howells TRACE_EVENT(rxrpc_rx_discard_ack, 1817d1f12947SDavid Howells TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, 1818d1f12947SDavid Howells rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first, 1819d1f12947SDavid Howells rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev), 1820d1f12947SDavid Howells 1821d1f12947SDavid Howells TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first, 1822d1f12947SDavid Howells prev_pkt, call_ackr_prev), 1823d1f12947SDavid Howells 1824d1f12947SDavid Howells TP_STRUCT__entry( 1825d1f12947SDavid Howells __field(unsigned int, debug_id) 1826d1f12947SDavid Howells __field(rxrpc_serial_t, serial) 1827d1f12947SDavid Howells __field(rxrpc_seq_t, first_soft_ack) 1828d1f12947SDavid Howells __field(rxrpc_seq_t, call_ackr_first) 1829d1f12947SDavid Howells __field(rxrpc_seq_t, prev_pkt) 1830d1f12947SDavid Howells __field(rxrpc_seq_t, call_ackr_prev) 1831d1f12947SDavid Howells ), 1832d1f12947SDavid Howells 1833d1f12947SDavid Howells TP_fast_assign( 1834d1f12947SDavid Howells __entry->debug_id = debug_id; 1835d1f12947SDavid Howells __entry->serial = serial; 1836d1f12947SDavid Howells __entry->first_soft_ack = first_soft_ack; 1837d1f12947SDavid Howells __entry->call_ackr_first = call_ackr_first; 1838d1f12947SDavid Howells __entry->prev_pkt = prev_pkt; 1839d1f12947SDavid Howells __entry->call_ackr_prev = call_ackr_prev; 1840d1f12947SDavid Howells ), 1841d1f12947SDavid Howells 1842d1f12947SDavid Howells TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x", 1843d1f12947SDavid Howells __entry->debug_id, 1844d1f12947SDavid Howells __entry->serial, 1845d1f12947SDavid Howells __entry->first_soft_ack, 1846d1f12947SDavid Howells __entry->call_ackr_first, 1847d1f12947SDavid Howells __entry->prev_pkt, 1848d1f12947SDavid Howells __entry->call_ackr_prev) 1849d1f12947SDavid Howells ); 1850d1f12947SDavid Howells 18514d843be5SDavid Howells TRACE_EVENT(rxrpc_req_ack, 18524d843be5SDavid Howells TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq, 18534d843be5SDavid Howells enum rxrpc_req_ack_trace why), 18544d843be5SDavid Howells 18554d843be5SDavid Howells TP_ARGS(call_debug_id, seq, why), 18564d843be5SDavid Howells 18574d843be5SDavid Howells TP_STRUCT__entry( 18584d843be5SDavid Howells __field(unsigned int, call_debug_id) 18594d843be5SDavid Howells __field(rxrpc_seq_t, seq) 18604d843be5SDavid Howells __field(enum rxrpc_req_ack_trace, why) 18614d843be5SDavid Howells ), 18624d843be5SDavid Howells 18634d843be5SDavid Howells TP_fast_assign( 18644d843be5SDavid Howells __entry->call_debug_id = call_debug_id; 18654d843be5SDavid Howells __entry->seq = seq; 18664d843be5SDavid Howells __entry->why = why; 18674d843be5SDavid Howells ), 18684d843be5SDavid Howells 18694d843be5SDavid Howells TP_printk("c=%08x q=%08x REQ-%s", 18704d843be5SDavid Howells __entry->call_debug_id, 18714d843be5SDavid Howells __entry->seq, 18724d843be5SDavid Howells __print_symbolic(__entry->why, rxrpc_req_ack_traces)) 18734d843be5SDavid Howells ); 18744d843be5SDavid Howells 187502a19356SDavid Howells TRACE_EVENT(rxrpc_txbuf, 187602a19356SDavid Howells TP_PROTO(unsigned int debug_id, 187702a19356SDavid Howells unsigned int call_debug_id, rxrpc_seq_t seq, 187802a19356SDavid Howells int ref, enum rxrpc_txbuf_trace what), 187902a19356SDavid Howells 188002a19356SDavid Howells TP_ARGS(debug_id, call_debug_id, seq, ref, what), 188102a19356SDavid Howells 188202a19356SDavid Howells TP_STRUCT__entry( 188302a19356SDavid Howells __field(unsigned int, debug_id) 188402a19356SDavid Howells __field(unsigned int, call_debug_id) 188502a19356SDavid Howells __field(rxrpc_seq_t, seq) 188602a19356SDavid Howells __field(int, ref) 188702a19356SDavid Howells __field(enum rxrpc_txbuf_trace, what) 188802a19356SDavid Howells ), 188902a19356SDavid Howells 189002a19356SDavid Howells TP_fast_assign( 189102a19356SDavid Howells __entry->debug_id = debug_id; 189202a19356SDavid Howells __entry->call_debug_id = call_debug_id; 189302a19356SDavid Howells __entry->seq = seq; 189402a19356SDavid Howells __entry->ref = ref; 189502a19356SDavid Howells __entry->what = what; 189602a19356SDavid Howells ), 189702a19356SDavid Howells 189802a19356SDavid Howells TP_printk("B=%08x c=%08x q=%08x %s r=%d", 189902a19356SDavid Howells __entry->debug_id, 190002a19356SDavid Howells __entry->call_debug_id, 190102a19356SDavid Howells __entry->seq, 190202a19356SDavid Howells __print_symbolic(__entry->what, rxrpc_txbuf_traces), 190302a19356SDavid Howells __entry->ref) 190402a19356SDavid Howells ); 190502a19356SDavid Howells 190615f661dcSDavid Howells TRACE_EVENT(rxrpc_poke_call, 190715f661dcSDavid Howells TP_PROTO(struct rxrpc_call *call, bool busy, 190815f661dcSDavid Howells enum rxrpc_call_poke_trace what), 190915f661dcSDavid Howells 191015f661dcSDavid Howells TP_ARGS(call, busy, what), 191115f661dcSDavid Howells 191215f661dcSDavid Howells TP_STRUCT__entry( 191315f661dcSDavid Howells __field(unsigned int, call_debug_id) 191415f661dcSDavid Howells __field(bool, busy) 191515f661dcSDavid Howells __field(enum rxrpc_call_poke_trace, what) 191615f661dcSDavid Howells ), 191715f661dcSDavid Howells 191815f661dcSDavid Howells TP_fast_assign( 191915f661dcSDavid Howells __entry->call_debug_id = call->debug_id; 192015f661dcSDavid Howells __entry->busy = busy; 192115f661dcSDavid Howells __entry->what = what; 192215f661dcSDavid Howells ), 192315f661dcSDavid Howells 192415f661dcSDavid Howells TP_printk("c=%08x %s%s", 192515f661dcSDavid Howells __entry->call_debug_id, 192615f661dcSDavid Howells __print_symbolic(__entry->what, rxrpc_call_poke_traces), 192715f661dcSDavid Howells __entry->busy ? "!" : "") 192815f661dcSDavid Howells ); 192915f661dcSDavid Howells 193015f661dcSDavid Howells TRACE_EVENT(rxrpc_call_poked, 193115f661dcSDavid Howells TP_PROTO(struct rxrpc_call *call), 193215f661dcSDavid Howells 193315f661dcSDavid Howells TP_ARGS(call), 193415f661dcSDavid Howells 193515f661dcSDavid Howells TP_STRUCT__entry( 193615f661dcSDavid Howells __field(unsigned int, call_debug_id) 193715f661dcSDavid Howells ), 193815f661dcSDavid Howells 193915f661dcSDavid Howells TP_fast_assign( 194015f661dcSDavid Howells __entry->call_debug_id = call->debug_id; 194115f661dcSDavid Howells ), 194215f661dcSDavid Howells 194315f661dcSDavid Howells TP_printk("c=%08x", 194415f661dcSDavid Howells __entry->call_debug_id) 194515f661dcSDavid Howells ); 194615f661dcSDavid Howells 1947f21e9348SDavid Howells TRACE_EVENT(rxrpc_sack, 1948f21e9348SDavid Howells TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, 1949f21e9348SDavid Howells unsigned int sack, enum rxrpc_sack_trace what), 1950f21e9348SDavid Howells 1951f21e9348SDavid Howells TP_ARGS(call, seq, sack, what), 1952f21e9348SDavid Howells 1953f21e9348SDavid Howells TP_STRUCT__entry( 1954f21e9348SDavid Howells __field(unsigned int, call_debug_id) 1955f21e9348SDavid Howells __field(rxrpc_seq_t, seq) 1956f21e9348SDavid Howells __field(unsigned int, sack) 1957f21e9348SDavid Howells __field(enum rxrpc_sack_trace, what) 1958f21e9348SDavid Howells ), 1959f21e9348SDavid Howells 1960f21e9348SDavid Howells TP_fast_assign( 1961f21e9348SDavid Howells __entry->call_debug_id = call->debug_id; 1962f21e9348SDavid Howells __entry->seq = seq; 1963f21e9348SDavid Howells __entry->sack = sack; 1964f21e9348SDavid Howells __entry->what = what; 1965f21e9348SDavid Howells ), 1966f21e9348SDavid Howells 1967f21e9348SDavid Howells TP_printk("c=%08x q=%08x %s k=%x", 1968f21e9348SDavid Howells __entry->call_debug_id, 1969f21e9348SDavid Howells __entry->seq, 1970f21e9348SDavid Howells __print_symbolic(__entry->what, rxrpc_sack_traces), 1971f21e9348SDavid Howells __entry->sack) 1972f21e9348SDavid Howells ); 1973f21e9348SDavid Howells 1974dc9fd093SDavid Howells #undef EM 1975dc9fd093SDavid Howells #undef E_ 197657af281eSDavid Howells 197757af281eSDavid Howells #endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */ 1978df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */ 1979df844fd4SDavid Howells 1980df844fd4SDavid Howells /* This part must be outside protection */ 1981df844fd4SDavid Howells #include <trace/define_trace.h> 1982