rxrpc.h 61 KB

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