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