1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* AF_RXRPC tracepoints
4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
8 #define TRACE_SYSTEM rxrpc
10 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
11 #define _TRACE_RXRPC_H
13 #include <linux/tracepoint.h>
14 #include <linux/errqueue.h>
17 * Declare tracing information enums and their string mappings for display.
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")
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 ")
65 #define rxrpc_peer_traces \
66 EM(rxrpc_peer_got, "GOT") \
67 EM(rxrpc_peer_new, "NEW") \
68 EM(rxrpc_peer_processing, "PRO") \
69 E_(rxrpc_peer_put, "PUT")
71 #define rxrpc_conn_traces \
72 EM(rxrpc_conn_got, "GOT") \
73 EM(rxrpc_conn_new_client, "NWc") \
74 EM(rxrpc_conn_new_service, "NWs") \
75 EM(rxrpc_conn_put_client, "PTc") \
76 EM(rxrpc_conn_put_service, "PTs") \
77 EM(rxrpc_conn_queued, "QUE") \
78 EM(rxrpc_conn_reap_service, "RPs") \
79 E_(rxrpc_conn_seen, "SEE")
81 #define rxrpc_client_traces \
82 EM(rxrpc_client_activate_chans, "Activa") \
83 EM(rxrpc_client_alloc, "Alloc ") \
84 EM(rxrpc_client_chan_activate, "ChActv") \
85 EM(rxrpc_client_chan_disconnect, "ChDisc") \
86 EM(rxrpc_client_chan_pass, "ChPass") \
87 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
88 EM(rxrpc_client_cleanup, "Clean ") \
89 EM(rxrpc_client_discard, "Discar") \
90 EM(rxrpc_client_duplicate, "Duplic") \
91 EM(rxrpc_client_exposed, "Expose") \
92 EM(rxrpc_client_replace, "Replac") \
93 EM(rxrpc_client_to_active, "->Actv") \
94 E_(rxrpc_client_to_idle, "->Idle")
96 #define rxrpc_call_traces \
97 EM(rxrpc_call_connected, "CON") \
98 EM(rxrpc_call_error, "*E*") \
99 EM(rxrpc_call_got, "GOT") \
100 EM(rxrpc_call_got_kernel, "Gke") \
101 EM(rxrpc_call_got_timer, "GTM") \
102 EM(rxrpc_call_got_tx, "Gtx") \
103 EM(rxrpc_call_got_userid, "Gus") \
104 EM(rxrpc_call_new_client, "NWc") \
105 EM(rxrpc_call_new_service, "NWs") \
106 EM(rxrpc_call_put, "PUT") \
107 EM(rxrpc_call_put_kernel, "Pke") \
108 EM(rxrpc_call_put_noqueue, "PnQ") \
109 EM(rxrpc_call_put_notimer, "PnT") \
110 EM(rxrpc_call_put_timer, "PTM") \
111 EM(rxrpc_call_put_tx, "Ptx") \
112 EM(rxrpc_call_put_userid, "Pus") \
113 EM(rxrpc_call_queued, "QUE") \
114 EM(rxrpc_call_queued_ref, "QUR") \
115 EM(rxrpc_call_release, "RLS") \
116 E_(rxrpc_call_seen, "SEE")
118 #define rxrpc_txqueue_traces \
119 EM(rxrpc_txqueue_await_reply, "AWR") \
120 EM(rxrpc_txqueue_dequeue, "DEQ") \
121 EM(rxrpc_txqueue_end, "END") \
122 EM(rxrpc_txqueue_queue, "QUE") \
123 EM(rxrpc_txqueue_queue_last, "QLS") \
124 EM(rxrpc_txqueue_rotate, "ROT") \
125 EM(rxrpc_txqueue_rotate_last, "RLS") \
126 E_(rxrpc_txqueue_wait, "WAI")
128 #define rxrpc_receive_traces \
129 EM(rxrpc_receive_end, "END") \
130 EM(rxrpc_receive_front, "FRN") \
131 EM(rxrpc_receive_incoming, "INC") \
132 EM(rxrpc_receive_queue, "QUE") \
133 EM(rxrpc_receive_queue_last, "QLS") \
134 EM(rxrpc_receive_queue_oos, "QUO") \
135 EM(rxrpc_receive_queue_oos_last, "QOL") \
136 EM(rxrpc_receive_oos, "OOS") \
137 EM(rxrpc_receive_oos_last, "OSL") \
138 EM(rxrpc_receive_rotate, "ROT") \
139 E_(rxrpc_receive_rotate_last, "RLS")
141 #define rxrpc_recvmsg_traces \
142 EM(rxrpc_recvmsg_cont, "CONT") \
143 EM(rxrpc_recvmsg_data_return, "DATA") \
144 EM(rxrpc_recvmsg_dequeue, "DEQU") \
145 EM(rxrpc_recvmsg_enter, "ENTR") \
146 EM(rxrpc_recvmsg_full, "FULL") \
147 EM(rxrpc_recvmsg_hole, "HOLE") \
148 EM(rxrpc_recvmsg_next, "NEXT") \
149 EM(rxrpc_recvmsg_requeue, "REQU") \
150 EM(rxrpc_recvmsg_return, "RETN") \
151 EM(rxrpc_recvmsg_terminal, "TERM") \
152 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
153 E_(rxrpc_recvmsg_wait, "WAIT")
155 #define rxrpc_rtt_tx_traces \
156 EM(rxrpc_rtt_tx_cancel, "CNCE") \
157 EM(rxrpc_rtt_tx_data, "DATA") \
158 EM(rxrpc_rtt_tx_no_slot, "FULL") \
159 E_(rxrpc_rtt_tx_ping, "PING")
161 #define rxrpc_rtt_rx_traces \
162 EM(rxrpc_rtt_rx_cancel, "CNCL") \
163 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
164 EM(rxrpc_rtt_rx_lost, "LOST") \
165 EM(rxrpc_rtt_rx_ping_response, "PONG") \
166 E_(rxrpc_rtt_rx_requested_ack, "RACK")
168 #define rxrpc_timer_traces \
169 EM(rxrpc_timer_begin, "Begin ") \
170 EM(rxrpc_timer_exp_ack, "ExpAck") \
171 EM(rxrpc_timer_exp_hard, "ExpHrd") \
172 EM(rxrpc_timer_exp_idle, "ExpIdl") \
173 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
174 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
175 EM(rxrpc_timer_exp_normal, "ExpNml") \
176 EM(rxrpc_timer_exp_ping, "ExpPng") \
177 EM(rxrpc_timer_exp_resend, "ExpRsn") \
178 EM(rxrpc_timer_init_for_reply, "IniRpl") \
179 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
180 EM(rxrpc_timer_restart, "Restrt") \
181 EM(rxrpc_timer_set_for_ack, "SetAck") \
182 EM(rxrpc_timer_set_for_hard, "SetHrd") \
183 EM(rxrpc_timer_set_for_idle, "SetIdl") \
184 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
185 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
186 EM(rxrpc_timer_set_for_normal, "SetNml") \
187 EM(rxrpc_timer_set_for_ping, "SetPng") \
188 EM(rxrpc_timer_set_for_resend, "SetRTx") \
189 E_(rxrpc_timer_set_for_send, "SetSnd")
191 #define rxrpc_propose_ack_traces \
192 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
193 EM(rxrpc_propose_ack_input_data, "DataIn ") \
194 EM(rxrpc_propose_ack_input_data_hole, "DataInH") \
195 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
196 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
197 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
198 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
199 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
200 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
201 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
202 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
203 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
204 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
205 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
207 #define rxrpc_congest_modes \
208 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
209 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
210 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
211 E_(RXRPC_CALL_SLOW_START, "SlowStart")
213 #define rxrpc_congest_changes \
214 EM(rxrpc_cong_begin_retransmission, " Retrans") \
215 EM(rxrpc_cong_cleared_nacks, " Cleared") \
216 EM(rxrpc_cong_new_low_nack, " NewLowN") \
217 EM(rxrpc_cong_no_change, " -") \
218 EM(rxrpc_cong_progress, " Progres") \
219 EM(rxrpc_cong_idle_reset, " IdleRes") \
220 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
221 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
222 E_(rxrpc_cong_saw_nack, " SawNack")
226 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
227 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
228 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
229 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
230 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
231 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
232 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
233 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
238 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
242 #define rxrpc_ack_names \
244 EM(RXRPC_ACK_REQUESTED, "REQ") \
245 EM(RXRPC_ACK_DUPLICATE, "DUP") \
246 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
247 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
248 EM(RXRPC_ACK_NOSPACE, "MEM") \
249 EM(RXRPC_ACK_PING, "PNG") \
250 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
251 EM(RXRPC_ACK_DELAY, "DLY") \
252 EM(RXRPC_ACK_IDLE, "IDL") \
253 E_(RXRPC_ACK__INVALID, "-?-")
255 #define rxrpc_completions \
256 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
257 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
258 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
259 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
260 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
262 #define rxrpc_tx_points \
263 EM(rxrpc_tx_point_call_abort, "CallAbort") \
264 EM(rxrpc_tx_point_call_ack, "CallAck") \
265 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
266 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
267 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
268 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
269 EM(rxrpc_tx_point_reject, "Reject") \
270 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
271 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
272 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
273 E_(rxrpc_tx_point_version_reply, "VerReply")
275 #define rxrpc_req_ack_traces \
276 EM(rxrpc_reqack_ack_lost, "ACK-LOST ") \
277 EM(rxrpc_reqack_already_on, "ALREADY-ON") \
278 EM(rxrpc_reqack_more_rtt, "MORE-RTT ") \
279 EM(rxrpc_reqack_no_srv_last, "NO-SRVLAST") \
280 EM(rxrpc_reqack_old_rtt, "OLD-RTT ") \
281 EM(rxrpc_reqack_retrans, "RETRANS ") \
282 EM(rxrpc_reqack_slow_start, "SLOW-START") \
283 E_(rxrpc_reqack_small_txwin, "SMALL-TXWN")
284 /* ---- Must update size of stat_why_req_ack[] if more are added! */
286 #define rxrpc_txbuf_traces \
287 EM(rxrpc_txbuf_alloc_ack, "ALLOC ACK ") \
288 EM(rxrpc_txbuf_alloc_data, "ALLOC DATA ") \
289 EM(rxrpc_txbuf_free, "FREE ") \
290 EM(rxrpc_txbuf_get_buffer, "GET BUFFER ") \
291 EM(rxrpc_txbuf_get_trans, "GET TRANS ") \
292 EM(rxrpc_txbuf_get_retrans, "GET RETRANS") \
293 EM(rxrpc_txbuf_put_ack_tx, "PUT ACK TX ") \
294 EM(rxrpc_txbuf_put_cleaned, "PUT CLEANED") \
295 EM(rxrpc_txbuf_put_nomem, "PUT NOMEM ") \
296 EM(rxrpc_txbuf_put_rotated, "PUT ROTATED") \
297 EM(rxrpc_txbuf_put_send_aborted, "PUT SEND-X ") \
298 EM(rxrpc_txbuf_put_trans, "PUT TRANS ") \
299 EM(rxrpc_txbuf_see_send_more, "SEE SEND+ ") \
300 E_(rxrpc_txbuf_see_unacked, "SEE UNACKED")
303 * Generate enums for tracing information.
305 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
306 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
313 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
314 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
315 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
316 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
317 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
318 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
319 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
320 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
321 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
322 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
323 enum rxrpc_req_ack_trace { rxrpc_req_ack_traces } __mode(byte);
324 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
325 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
326 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
327 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
328 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
329 enum rxrpc_txbuf_trace { rxrpc_txbuf_traces } __mode(byte);
330 enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
332 #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */
335 * Export enum symbols via userspace.
339 #define EM(a, b) TRACE_DEFINE_ENUM(a);
340 #define E_(a, b) TRACE_DEFINE_ENUM(a);
344 rxrpc_congest_changes;
348 rxrpc_propose_ack_traces;
349 rxrpc_receive_traces;
350 rxrpc_recvmsg_traces;
351 rxrpc_req_ack_traces;
358 rxrpc_txqueue_traces;
361 * Now redefine the EM() and E_() macros to map the enums to the strings that
362 * will be printed in the output.
366 #define EM(a, b) { a, b },
367 #define E_(a, b) { a, b }
369 TRACE_EVENT(rxrpc_local,
370 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
373 TP_ARGS(local_debug_id, op, ref, usage),
376 __field(unsigned int, local )
383 __entry->local = local_debug_id;
386 __entry->usage = usage;
389 TP_printk("L=%08x %s r=%d u=%d",
391 __print_symbolic(__entry->op, rxrpc_local_traces),
396 TRACE_EVENT(rxrpc_peer,
397 TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op,
398 int usage, const void *where),
400 TP_ARGS(peer_debug_id, op, usage, where),
403 __field(unsigned int, peer )
406 __field(const void *, where )
410 __entry->peer = peer_debug_id;
412 __entry->usage = usage;
413 __entry->where = where;
416 TP_printk("P=%08x %s u=%d sp=%pSR",
418 __print_symbolic(__entry->op, rxrpc_peer_traces),
423 TRACE_EVENT(rxrpc_conn,
424 TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op,
425 int usage, const void *where),
427 TP_ARGS(conn_debug_id, op, usage, where),
430 __field(unsigned int, conn )
433 __field(const void *, where )
437 __entry->conn = conn_debug_id;
439 __entry->usage = usage;
440 __entry->where = where;
443 TP_printk("C=%08x %s u=%d sp=%pSR",
445 __print_symbolic(__entry->op, rxrpc_conn_traces),
450 TRACE_EVENT(rxrpc_client,
451 TP_PROTO(struct rxrpc_connection *conn, int channel,
452 enum rxrpc_client_trace op),
454 TP_ARGS(conn, channel, op),
457 __field(unsigned int, conn )
459 __field(int, channel )
461 __field(enum rxrpc_client_trace, op )
465 __entry->conn = conn ? conn->debug_id : 0;
466 __entry->channel = channel;
467 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
469 __entry->cid = conn ? conn->proto.cid : 0;
472 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
475 __print_symbolic(__entry->op, rxrpc_client_traces),
480 TRACE_EVENT(rxrpc_call,
481 TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
482 int usage, const void *where, const void *aux),
484 TP_ARGS(call_debug_id, op, usage, where, aux),
487 __field(unsigned int, call )
490 __field(const void *, where )
491 __field(const void *, aux )
495 __entry->call = call_debug_id;
497 __entry->usage = usage;
498 __entry->where = where;
502 TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
504 __print_symbolic(__entry->op, rxrpc_call_traces),
510 TRACE_EVENT(rxrpc_skb,
511 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
512 int usage, int mod_count, const void *where),
514 TP_ARGS(skb, op, usage, mod_count, where),
517 __field(struct sk_buff *, skb )
518 __field(enum rxrpc_skb_trace, op )
520 __field(int, mod_count )
521 __field(const void *, where )
527 __entry->usage = usage;
528 __entry->mod_count = mod_count;
529 __entry->where = where;
532 TP_printk("s=%p Rx %s u=%d m=%d p=%pSR",
534 __print_symbolic(__entry->op, rxrpc_skb_traces),
540 TRACE_EVENT(rxrpc_rx_packet,
541 TP_PROTO(struct rxrpc_skb_priv *sp),
546 __field_struct(struct rxrpc_host_header, hdr )
550 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
553 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
554 __entry->hdr.epoch, __entry->hdr.cid,
555 __entry->hdr.callNumber, __entry->hdr.serviceId,
556 __entry->hdr.serial, __entry->hdr.seq,
557 __entry->hdr.type, __entry->hdr.flags,
558 __entry->hdr.type <= 15 ?
559 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
562 TRACE_EVENT(rxrpc_rx_done,
563 TP_PROTO(int result, int abort_code),
565 TP_ARGS(result, abort_code),
568 __field(int, result )
569 __field(int, abort_code )
573 __entry->result = result;
574 __entry->abort_code = abort_code;
577 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
580 TRACE_EVENT(rxrpc_abort,
581 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
582 rxrpc_seq_t seq, int abort_code, int error),
584 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
587 __field(unsigned int, call_nr )
588 __array(char, why, 4 )
590 __field(u32, call_id )
591 __field(rxrpc_seq_t, seq )
592 __field(int, abort_code )
597 memcpy(__entry->why, why, 4);
598 __entry->call_nr = call_nr;
600 __entry->call_id = call_id;
601 __entry->abort_code = abort_code;
602 __entry->error = error;
606 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
608 __entry->cid, __entry->call_id, __entry->seq,
609 __entry->abort_code, __entry->error, __entry->why)
612 TRACE_EVENT(rxrpc_call_complete,
613 TP_PROTO(struct rxrpc_call *call),
618 __field(unsigned int, call )
619 __field(enum rxrpc_call_completion, compl )
621 __field(u32, abort_code )
625 __entry->call = call->debug_id;
626 __entry->compl = call->completion;
627 __entry->error = call->error;
628 __entry->abort_code = call->abort_code;
631 TP_printk("c=%08x %s r=%d ac=%d",
633 __print_symbolic(__entry->compl, rxrpc_completions),
638 TRACE_EVENT(rxrpc_txqueue,
639 TP_PROTO(struct rxrpc_call *call, enum rxrpc_txqueue_trace why),
644 __field(unsigned int, call )
645 __field(enum rxrpc_txqueue_trace, why )
646 __field(rxrpc_seq_t, acks_hard_ack )
647 __field(rxrpc_seq_t, tx_bottom )
648 __field(rxrpc_seq_t, tx_top )
649 __field(int, tx_winsize )
653 __entry->call = call->debug_id;
655 __entry->acks_hard_ack = call->acks_hard_ack;
656 __entry->tx_bottom = call->tx_bottom;
657 __entry->tx_top = call->tx_top;
658 __entry->tx_winsize = call->tx_winsize;
661 TP_printk("c=%08x %s f=%08x h=%08x n=%u/%u/%u",
663 __print_symbolic(__entry->why, rxrpc_txqueue_traces),
665 __entry->acks_hard_ack,
666 __entry->tx_top - __entry->tx_bottom,
667 __entry->tx_top - __entry->acks_hard_ack,
671 TRACE_EVENT(rxrpc_rx_data,
672 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
673 rxrpc_serial_t serial, u8 flags),
675 TP_ARGS(call, seq, serial, flags),
678 __field(unsigned int, call )
679 __field(rxrpc_seq_t, seq )
680 __field(rxrpc_serial_t, serial )
685 __entry->call = call;
687 __entry->serial = serial;
688 __entry->flags = flags;
691 TP_printk("c=%08x DATA %08x q=%08x fl=%02x",
698 TRACE_EVENT(rxrpc_rx_ack,
699 TP_PROTO(struct rxrpc_call *call,
700 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
701 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
703 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
706 __field(unsigned int, call )
707 __field(rxrpc_serial_t, serial )
708 __field(rxrpc_serial_t, ack_serial )
709 __field(rxrpc_seq_t, first )
710 __field(rxrpc_seq_t, prev )
716 __entry->call = call->debug_id;
717 __entry->serial = serial;
718 __entry->ack_serial = ack_serial;
719 __entry->first = first;
720 __entry->prev = prev;
721 __entry->reason = reason;
722 __entry->n_acks = n_acks;
725 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
728 __print_symbolic(__entry->reason, rxrpc_ack_names),
735 TRACE_EVENT(rxrpc_rx_abort,
736 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
739 TP_ARGS(call, serial, abort_code),
742 __field(unsigned int, call )
743 __field(rxrpc_serial_t, serial )
744 __field(u32, abort_code )
748 __entry->call = call->debug_id;
749 __entry->serial = serial;
750 __entry->abort_code = abort_code;
753 TP_printk("c=%08x ABORT %08x ac=%d",
759 TRACE_EVENT(rxrpc_rx_challenge,
760 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
761 u32 version, u32 nonce, u32 min_level),
763 TP_ARGS(conn, serial, version, nonce, min_level),
766 __field(unsigned int, conn )
767 __field(rxrpc_serial_t, serial )
768 __field(u32, version )
770 __field(u32, min_level )
774 __entry->conn = conn->debug_id;
775 __entry->serial = serial;
776 __entry->version = version;
777 __entry->nonce = nonce;
778 __entry->min_level = min_level;
781 TP_printk("C=%08x CHALLENGE %08x v=%x n=%x ml=%x",
789 TRACE_EVENT(rxrpc_rx_response,
790 TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
791 u32 version, u32 kvno, u32 ticket_len),
793 TP_ARGS(conn, serial, version, kvno, ticket_len),
796 __field(unsigned int, conn )
797 __field(rxrpc_serial_t, serial )
798 __field(u32, version )
800 __field(u32, ticket_len )
804 __entry->conn = conn->debug_id;
805 __entry->serial = serial;
806 __entry->version = version;
807 __entry->kvno = kvno;
808 __entry->ticket_len = ticket_len;
811 TP_printk("C=%08x RESPONSE %08x v=%x kvno=%x tl=%x",
819 TRACE_EVENT(rxrpc_rx_rwind_change,
820 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
821 u32 rwind, bool wake),
823 TP_ARGS(call, serial, rwind, wake),
826 __field(unsigned int, call )
827 __field(rxrpc_serial_t, serial )
833 __entry->call = call->debug_id;
834 __entry->serial = serial;
835 __entry->rwind = rwind;
836 __entry->wake = wake;
839 TP_printk("c=%08x %08x rw=%u%s",
843 __entry->wake ? " wake" : "")
846 TRACE_EVENT(rxrpc_tx_packet,
847 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
848 enum rxrpc_tx_point where),
850 TP_ARGS(call_id, whdr, where),
853 __field(unsigned int, call )
854 __field(enum rxrpc_tx_point, where )
855 __field_struct(struct rxrpc_wire_header, whdr )
859 __entry->call = call_id;
860 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
861 __entry->where = where;
864 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
866 ntohl(__entry->whdr.epoch),
867 ntohl(__entry->whdr.cid),
868 ntohl(__entry->whdr.callNumber),
869 ntohs(__entry->whdr.serviceId),
870 ntohl(__entry->whdr.serial),
871 ntohl(__entry->whdr.seq),
872 __entry->whdr.type, __entry->whdr.flags,
873 __entry->whdr.type <= 15 ?
874 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
875 __print_symbolic(__entry->where, rxrpc_tx_points))
878 TRACE_EVENT(rxrpc_tx_data,
879 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
880 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
882 TP_ARGS(call, seq, serial, flags, retrans, lose),
885 __field(unsigned int, call )
886 __field(rxrpc_seq_t, seq )
887 __field(rxrpc_serial_t, serial )
889 __field(u32, call_id )
891 __field(bool, retrans )
896 __entry->call = call->debug_id;
897 __entry->cid = call->cid;
898 __entry->call_id = call->call_id;
900 __entry->serial = serial;
901 __entry->flags = flags;
902 __entry->retrans = retrans;
903 __entry->lose = lose;
906 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
913 __entry->retrans ? " *RETRANS*" : "",
914 __entry->lose ? " *LOSE*" : "")
917 TRACE_EVENT(rxrpc_tx_ack,
918 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
919 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
920 u8 reason, u8 n_acks),
922 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
925 __field(unsigned int, call )
926 __field(rxrpc_serial_t, serial )
927 __field(rxrpc_seq_t, ack_first )
928 __field(rxrpc_serial_t, ack_serial )
934 __entry->call = call;
935 __entry->serial = serial;
936 __entry->ack_first = ack_first;
937 __entry->ack_serial = ack_serial;
938 __entry->reason = reason;
939 __entry->n_acks = n_acks;
942 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
945 __print_symbolic(__entry->reason, rxrpc_ack_names),
951 TRACE_EVENT(rxrpc_receive,
952 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
953 rxrpc_serial_t serial, rxrpc_seq_t seq),
955 TP_ARGS(call, why, serial, seq),
958 __field(unsigned int, call )
959 __field(enum rxrpc_receive_trace, why )
960 __field(rxrpc_serial_t, serial )
961 __field(rxrpc_seq_t, seq )
962 __field(u64, window )
966 __entry->call = call->debug_id;
968 __entry->serial = serial;
970 __entry->window = atomic64_read(&call->ackr_window);
973 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
975 __print_symbolic(__entry->why, rxrpc_receive_traces),
978 lower_32_bits(__entry->window),
979 upper_32_bits(__entry->window))
982 TRACE_EVENT(rxrpc_recvmsg,
983 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
986 TP_ARGS(call, why, ret),
989 __field(unsigned int, call )
990 __field(enum rxrpc_recvmsg_trace, why )
995 __entry->call = call ? call->debug_id : 0;
1000 TP_printk("c=%08x %s ret=%d",
1002 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1006 TRACE_EVENT(rxrpc_recvdata,
1007 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
1008 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
1011 TP_ARGS(call, why, seq, offset, len, ret),
1014 __field(unsigned int, call )
1015 __field(enum rxrpc_recvmsg_trace, why )
1016 __field(rxrpc_seq_t, seq )
1017 __field(unsigned int, offset )
1018 __field(unsigned int, len )
1023 __entry->call = call ? call->debug_id : 0;
1026 __entry->offset = offset;
1031 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
1033 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
1040 TRACE_EVENT(rxrpc_rtt_tx,
1041 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1042 int slot, rxrpc_serial_t send_serial),
1044 TP_ARGS(call, why, slot, send_serial),
1047 __field(unsigned int, call )
1048 __field(enum rxrpc_rtt_tx_trace, why )
1050 __field(rxrpc_serial_t, send_serial )
1054 __entry->call = call->debug_id;
1056 __entry->slot = slot;
1057 __entry->send_serial = send_serial;
1060 TP_printk("c=%08x [%d] %s sr=%08x",
1063 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
1064 __entry->send_serial)
1067 TRACE_EVENT(rxrpc_rtt_rx,
1068 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1070 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1073 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
1076 __field(unsigned int, call )
1077 __field(enum rxrpc_rtt_rx_trace, why )
1079 __field(rxrpc_serial_t, send_serial )
1080 __field(rxrpc_serial_t, resp_serial )
1086 __entry->call = call->debug_id;
1088 __entry->slot = slot;
1089 __entry->send_serial = send_serial;
1090 __entry->resp_serial = resp_serial;
1095 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
1098 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
1099 __entry->send_serial,
1100 __entry->resp_serial,
1105 TRACE_EVENT(rxrpc_timer,
1106 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
1109 TP_ARGS(call, why, now),
1112 __field(unsigned int, call )
1113 __field(enum rxrpc_timer_trace, why )
1115 __field(long, ack_at )
1116 __field(long, ack_lost_at )
1117 __field(long, resend_at )
1118 __field(long, ping_at )
1119 __field(long, expect_rx_by )
1120 __field(long, expect_req_by )
1121 __field(long, expect_term_by )
1122 __field(long, timer )
1126 __entry->call = call->debug_id;
1129 __entry->ack_at = call->delay_ack_at;
1130 __entry->ack_lost_at = call->ack_lost_at;
1131 __entry->resend_at = call->resend_at;
1132 __entry->expect_rx_by = call->expect_rx_by;
1133 __entry->expect_req_by = call->expect_req_by;
1134 __entry->expect_term_by = call->expect_term_by;
1135 __entry->timer = call->timer.expires;
1138 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1140 __print_symbolic(__entry->why, rxrpc_timer_traces),
1141 __entry->ack_at - __entry->now,
1142 __entry->ack_lost_at - __entry->now,
1143 __entry->resend_at - __entry->now,
1144 __entry->expect_rx_by - __entry->now,
1145 __entry->expect_req_by - __entry->now,
1146 __entry->expect_term_by - __entry->now,
1147 __entry->timer - __entry->now)
1150 TRACE_EVENT(rxrpc_timer_expired,
1151 TP_PROTO(struct rxrpc_call *call, unsigned long now),
1156 __field(unsigned int, call )
1158 __field(long, ack_at )
1159 __field(long, ack_lost_at )
1160 __field(long, resend_at )
1161 __field(long, ping_at )
1162 __field(long, expect_rx_by )
1163 __field(long, expect_req_by )
1164 __field(long, expect_term_by )
1165 __field(long, timer )
1169 __entry->call = call->debug_id;
1171 __entry->ack_at = call->delay_ack_at;
1172 __entry->ack_lost_at = call->ack_lost_at;
1173 __entry->resend_at = call->resend_at;
1174 __entry->expect_rx_by = call->expect_rx_by;
1175 __entry->expect_req_by = call->expect_req_by;
1176 __entry->expect_term_by = call->expect_term_by;
1177 __entry->timer = call->timer.expires;
1180 TP_printk("c=%08x EXPIRED a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
1182 __entry->ack_at - __entry->now,
1183 __entry->ack_lost_at - __entry->now,
1184 __entry->resend_at - __entry->now,
1185 __entry->expect_rx_by - __entry->now,
1186 __entry->expect_req_by - __entry->now,
1187 __entry->expect_term_by - __entry->now,
1188 __entry->timer - __entry->now)
1191 TRACE_EVENT(rxrpc_rx_lose,
1192 TP_PROTO(struct rxrpc_skb_priv *sp),
1197 __field_struct(struct rxrpc_host_header, hdr )
1201 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1204 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1205 __entry->hdr.epoch, __entry->hdr.cid,
1206 __entry->hdr.callNumber, __entry->hdr.serviceId,
1207 __entry->hdr.serial, __entry->hdr.seq,
1208 __entry->hdr.type, __entry->hdr.flags,
1209 __entry->hdr.type <= 15 ?
1210 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1213 TRACE_EVENT(rxrpc_propose_ack,
1214 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1215 u8 ack_reason, rxrpc_serial_t serial),
1217 TP_ARGS(call, why, ack_reason, serial),
1220 __field(unsigned int, call )
1221 __field(enum rxrpc_propose_ack_trace, why )
1222 __field(rxrpc_serial_t, serial )
1223 __field(u8, ack_reason )
1227 __entry->call = call->debug_id;
1229 __entry->serial = serial;
1230 __entry->ack_reason = ack_reason;
1233 TP_printk("c=%08x %s %s r=%08x",
1235 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1236 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1240 TRACE_EVENT(rxrpc_send_ack,
1241 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1242 u8 ack_reason, rxrpc_serial_t serial),
1244 TP_ARGS(call, why, ack_reason, serial),
1247 __field(unsigned int, call )
1248 __field(enum rxrpc_propose_ack_trace, why )
1249 __field(rxrpc_serial_t, serial )
1250 __field(u8, ack_reason )
1254 __entry->call = call->debug_id;
1256 __entry->serial = serial;
1257 __entry->ack_reason = ack_reason;
1260 TP_printk("c=%08x %s %s r=%08x",
1262 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1263 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1267 TRACE_EVENT(rxrpc_drop_ack,
1268 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1269 u8 ack_reason, rxrpc_serial_t serial, bool nobuf),
1271 TP_ARGS(call, why, ack_reason, serial, nobuf),
1274 __field(unsigned int, call )
1275 __field(enum rxrpc_propose_ack_trace, why )
1276 __field(rxrpc_serial_t, serial )
1277 __field(u8, ack_reason )
1278 __field(bool, nobuf )
1282 __entry->call = call->debug_id;
1284 __entry->serial = serial;
1285 __entry->ack_reason = ack_reason;
1286 __entry->nobuf = nobuf;
1289 TP_printk("c=%08x %s %s r=%08x nbf=%u",
1291 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1292 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1293 __entry->serial, __entry->nobuf)
1296 TRACE_EVENT(rxrpc_retransmit,
1297 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, s64 expiry),
1299 TP_ARGS(call, seq, expiry),
1302 __field(unsigned int, call )
1303 __field(rxrpc_seq_t, seq )
1304 __field(s64, expiry )
1308 __entry->call = call->debug_id;
1310 __entry->expiry = expiry;
1313 TP_printk("c=%08x q=%x xp=%lld",
1319 TRACE_EVENT(rxrpc_congest,
1320 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1321 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1323 TP_ARGS(call, summary, ack_serial, change),
1326 __field(unsigned int, call )
1327 __field(enum rxrpc_congest_change, change )
1328 __field(rxrpc_seq_t, hard_ack )
1329 __field(rxrpc_seq_t, top )
1330 __field(rxrpc_seq_t, lowest_nak )
1331 __field(rxrpc_serial_t, ack_serial )
1332 __field_struct(struct rxrpc_ack_summary, sum )
1336 __entry->call = call->debug_id;
1337 __entry->change = change;
1338 __entry->hard_ack = call->acks_hard_ack;
1339 __entry->top = call->tx_top;
1340 __entry->lowest_nak = call->acks_lowest_nak;
1341 __entry->ack_serial = ack_serial;
1342 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1345 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",
1347 __entry->ack_serial,
1348 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1350 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1352 __entry->sum.ssthresh,
1353 __entry->sum.nr_acks, __entry->sum.saw_nacks,
1354 __entry->sum.nr_new_acks,
1355 __entry->sum.nr_rot_new_acks,
1356 __entry->top - __entry->hard_ack,
1357 __entry->sum.cumulative_acks,
1358 __entry->sum.dup_acks,
1359 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1360 __print_symbolic(__entry->change, rxrpc_congest_changes),
1361 __entry->sum.retrans_timeo ? " rTxTo" : "")
1364 TRACE_EVENT(rxrpc_disconnect_call,
1365 TP_PROTO(struct rxrpc_call *call),
1370 __field(unsigned int, call )
1371 __field(u32, abort_code )
1375 __entry->call = call->debug_id;
1376 __entry->abort_code = call->abort_code;
1379 TP_printk("c=%08x ab=%08x",
1381 __entry->abort_code)
1384 TRACE_EVENT(rxrpc_improper_term,
1385 TP_PROTO(struct rxrpc_call *call),
1390 __field(unsigned int, call )
1391 __field(u32, abort_code )
1395 __entry->call = call->debug_id;
1396 __entry->abort_code = call->abort_code;
1399 TP_printk("c=%08x ab=%08x",
1401 __entry->abort_code)
1404 TRACE_EVENT(rxrpc_rx_eproto,
1405 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1408 TP_ARGS(call, serial, why),
1411 __field(unsigned int, call )
1412 __field(rxrpc_serial_t, serial )
1413 __field(const char *, why )
1417 __entry->call = call ? call->debug_id : 0;
1418 __entry->serial = serial;
1422 TP_printk("c=%08x EPROTO %08x %s",
1428 TRACE_EVENT(rxrpc_connect_call,
1429 TP_PROTO(struct rxrpc_call *call),
1434 __field(unsigned int, call )
1435 __field(unsigned long, user_call_ID )
1437 __field(u32, call_id )
1441 __entry->call = call->debug_id;
1442 __entry->user_call_ID = call->user_call_ID;
1443 __entry->cid = call->cid;
1444 __entry->call_id = call->call_id;
1447 TP_printk("c=%08x u=%p %08x:%08x",
1449 (void *)__entry->user_call_ID,
1454 TRACE_EVENT(rxrpc_resend,
1455 TP_PROTO(struct rxrpc_call *call),
1460 __field(unsigned int, call )
1461 __field(rxrpc_seq_t, seq )
1465 __entry->call = call->debug_id;
1466 __entry->seq = call->acks_hard_ack;
1469 TP_printk("c=%08x q=%x",
1474 TRACE_EVENT(rxrpc_rx_icmp,
1475 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1476 struct sockaddr_rxrpc *srx),
1478 TP_ARGS(peer, ee, srx),
1481 __field(unsigned int, peer )
1482 __field_struct(struct sock_extended_err, ee )
1483 __field_struct(struct sockaddr_rxrpc, srx )
1487 __entry->peer = peer->debug_id;
1488 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1489 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1492 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1494 __entry->ee.ee_origin,
1495 __entry->ee.ee_type,
1496 __entry->ee.ee_code,
1497 __entry->ee.ee_info,
1498 __entry->ee.ee_data,
1499 __entry->ee.ee_errno,
1500 &__entry->srx.transport)
1503 TRACE_EVENT(rxrpc_tx_fail,
1504 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1505 enum rxrpc_tx_point where),
1507 TP_ARGS(debug_id, serial, ret, where),
1510 __field(unsigned int, debug_id )
1511 __field(rxrpc_serial_t, serial )
1513 __field(enum rxrpc_tx_point, where )
1517 __entry->debug_id = debug_id;
1518 __entry->serial = serial;
1520 __entry->where = where;
1523 TP_printk("c=%08x r=%x ret=%d %s",
1527 __print_symbolic(__entry->where, rxrpc_tx_points))
1530 TRACE_EVENT(rxrpc_call_reset,
1531 TP_PROTO(struct rxrpc_call *call),
1536 __field(unsigned int, debug_id )
1538 __field(u32, call_id )
1539 __field(rxrpc_serial_t, call_serial )
1540 __field(rxrpc_serial_t, conn_serial )
1541 __field(rxrpc_seq_t, tx_seq )
1542 __field(rxrpc_seq_t, rx_seq )
1546 __entry->debug_id = call->debug_id;
1547 __entry->cid = call->cid;
1548 __entry->call_id = call->call_id;
1549 __entry->call_serial = call->rx_serial;
1550 __entry->conn_serial = call->conn->hi_serial;
1551 __entry->tx_seq = call->acks_hard_ack;
1552 __entry->rx_seq = call->rx_highest_seq;
1555 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1557 __entry->cid, __entry->call_id,
1558 __entry->call_serial, __entry->conn_serial,
1559 __entry->tx_seq, __entry->rx_seq)
1562 TRACE_EVENT(rxrpc_notify_socket,
1563 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1565 TP_ARGS(debug_id, serial),
1568 __field(unsigned int, debug_id )
1569 __field(rxrpc_serial_t, serial )
1573 __entry->debug_id = debug_id;
1574 __entry->serial = serial;
1577 TP_printk("c=%08x r=%08x",
1582 TRACE_EVENT(rxrpc_rx_discard_ack,
1583 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1584 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1585 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1587 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1588 prev_pkt, call_ackr_prev),
1591 __field(unsigned int, debug_id )
1592 __field(rxrpc_serial_t, serial )
1593 __field(rxrpc_seq_t, first_soft_ack)
1594 __field(rxrpc_seq_t, call_ackr_first)
1595 __field(rxrpc_seq_t, prev_pkt)
1596 __field(rxrpc_seq_t, call_ackr_prev)
1600 __entry->debug_id = debug_id;
1601 __entry->serial = serial;
1602 __entry->first_soft_ack = first_soft_ack;
1603 __entry->call_ackr_first = call_ackr_first;
1604 __entry->prev_pkt = prev_pkt;
1605 __entry->call_ackr_prev = call_ackr_prev;
1608 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1611 __entry->first_soft_ack,
1612 __entry->call_ackr_first,
1614 __entry->call_ackr_prev)
1617 TRACE_EVENT(rxrpc_req_ack,
1618 TP_PROTO(unsigned int call_debug_id, rxrpc_seq_t seq,
1619 enum rxrpc_req_ack_trace why),
1621 TP_ARGS(call_debug_id, seq, why),
1624 __field(unsigned int, call_debug_id )
1625 __field(rxrpc_seq_t, seq )
1626 __field(enum rxrpc_req_ack_trace, why )
1630 __entry->call_debug_id = call_debug_id;
1635 TP_printk("c=%08x q=%08x REQ-%s",
1636 __entry->call_debug_id,
1638 __print_symbolic(__entry->why, rxrpc_req_ack_traces))
1641 TRACE_EVENT(rxrpc_txbuf,
1642 TP_PROTO(unsigned int debug_id,
1643 unsigned int call_debug_id, rxrpc_seq_t seq,
1644 int ref, enum rxrpc_txbuf_trace what),
1646 TP_ARGS(debug_id, call_debug_id, seq, ref, what),
1649 __field(unsigned int, debug_id )
1650 __field(unsigned int, call_debug_id )
1651 __field(rxrpc_seq_t, seq )
1653 __field(enum rxrpc_txbuf_trace, what )
1657 __entry->debug_id = debug_id;
1658 __entry->call_debug_id = call_debug_id;
1661 __entry->what = what;
1664 TP_printk("B=%08x c=%08x q=%08x %s r=%d",
1666 __entry->call_debug_id,
1668 __print_symbolic(__entry->what, rxrpc_txbuf_traces),
1674 #endif /* _TRACE_RXRPC_H */
1676 /* This part must be outside protection */
1677 #include <trace/define_trace.h>