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