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