0001
0002
0003
0004
0005
0006
0007 #undef TRACE_SYSTEM
0008 #define TRACE_SYSTEM rxrpc
0009
0010 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
0011 #define _TRACE_RXRPC_H
0012
0013 #include <linux/tracepoint.h>
0014 #include <linux/errqueue.h>
0015
0016
0017
0018
0019 #define rxrpc_skb_traces \
0020 EM(rxrpc_skb_cleaned, "CLN") \
0021 EM(rxrpc_skb_freed, "FRE") \
0022 EM(rxrpc_skb_got, "GOT") \
0023 EM(rxrpc_skb_lost, "*L*") \
0024 EM(rxrpc_skb_new, "NEW") \
0025 EM(rxrpc_skb_purged, "PUR") \
0026 EM(rxrpc_skb_received, "RCV") \
0027 EM(rxrpc_skb_rotated, "ROT") \
0028 EM(rxrpc_skb_seen, "SEE") \
0029 EM(rxrpc_skb_unshared, "UNS") \
0030 E_(rxrpc_skb_unshared_nomem, "US0")
0031
0032 #define rxrpc_local_traces \
0033 EM(rxrpc_local_got, "GOT") \
0034 EM(rxrpc_local_new, "NEW") \
0035 EM(rxrpc_local_processing, "PRO") \
0036 EM(rxrpc_local_put, "PUT") \
0037 E_(rxrpc_local_queued, "QUE")
0038
0039 #define rxrpc_peer_traces \
0040 EM(rxrpc_peer_got, "GOT") \
0041 EM(rxrpc_peer_new, "NEW") \
0042 EM(rxrpc_peer_processing, "PRO") \
0043 E_(rxrpc_peer_put, "PUT")
0044
0045 #define rxrpc_conn_traces \
0046 EM(rxrpc_conn_got, "GOT") \
0047 EM(rxrpc_conn_new_client, "NWc") \
0048 EM(rxrpc_conn_new_service, "NWs") \
0049 EM(rxrpc_conn_put_client, "PTc") \
0050 EM(rxrpc_conn_put_service, "PTs") \
0051 EM(rxrpc_conn_queued, "QUE") \
0052 EM(rxrpc_conn_reap_service, "RPs") \
0053 E_(rxrpc_conn_seen, "SEE")
0054
0055 #define rxrpc_client_traces \
0056 EM(rxrpc_client_activate_chans, "Activa") \
0057 EM(rxrpc_client_alloc, "Alloc ") \
0058 EM(rxrpc_client_chan_activate, "ChActv") \
0059 EM(rxrpc_client_chan_disconnect, "ChDisc") \
0060 EM(rxrpc_client_chan_pass, "ChPass") \
0061 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
0062 EM(rxrpc_client_cleanup, "Clean ") \
0063 EM(rxrpc_client_discard, "Discar") \
0064 EM(rxrpc_client_duplicate, "Duplic") \
0065 EM(rxrpc_client_exposed, "Expose") \
0066 EM(rxrpc_client_replace, "Replac") \
0067 EM(rxrpc_client_to_active, "->Actv") \
0068 E_(rxrpc_client_to_idle, "->Idle")
0069
0070 #define rxrpc_call_traces \
0071 EM(rxrpc_call_connected, "CON") \
0072 EM(rxrpc_call_error, "*E*") \
0073 EM(rxrpc_call_got, "GOT") \
0074 EM(rxrpc_call_got_kernel, "Gke") \
0075 EM(rxrpc_call_got_timer, "GTM") \
0076 EM(rxrpc_call_got_userid, "Gus") \
0077 EM(rxrpc_call_new_client, "NWc") \
0078 EM(rxrpc_call_new_service, "NWs") \
0079 EM(rxrpc_call_put, "PUT") \
0080 EM(rxrpc_call_put_kernel, "Pke") \
0081 EM(rxrpc_call_put_noqueue, "PnQ") \
0082 EM(rxrpc_call_put_notimer, "PnT") \
0083 EM(rxrpc_call_put_timer, "PTM") \
0084 EM(rxrpc_call_put_userid, "Pus") \
0085 EM(rxrpc_call_queued, "QUE") \
0086 EM(rxrpc_call_queued_ref, "QUR") \
0087 EM(rxrpc_call_release, "RLS") \
0088 E_(rxrpc_call_seen, "SEE")
0089
0090 #define rxrpc_transmit_traces \
0091 EM(rxrpc_transmit_await_reply, "AWR") \
0092 EM(rxrpc_transmit_end, "END") \
0093 EM(rxrpc_transmit_queue, "QUE") \
0094 EM(rxrpc_transmit_queue_last, "QLS") \
0095 EM(rxrpc_transmit_rotate, "ROT") \
0096 EM(rxrpc_transmit_rotate_last, "RLS") \
0097 E_(rxrpc_transmit_wait, "WAI")
0098
0099 #define rxrpc_receive_traces \
0100 EM(rxrpc_receive_end, "END") \
0101 EM(rxrpc_receive_front, "FRN") \
0102 EM(rxrpc_receive_incoming, "INC") \
0103 EM(rxrpc_receive_queue, "QUE") \
0104 EM(rxrpc_receive_queue_last, "QLS") \
0105 E_(rxrpc_receive_rotate, "ROT")
0106
0107 #define rxrpc_recvmsg_traces \
0108 EM(rxrpc_recvmsg_cont, "CONT") \
0109 EM(rxrpc_recvmsg_data_return, "DATA") \
0110 EM(rxrpc_recvmsg_dequeue, "DEQU") \
0111 EM(rxrpc_recvmsg_enter, "ENTR") \
0112 EM(rxrpc_recvmsg_full, "FULL") \
0113 EM(rxrpc_recvmsg_hole, "HOLE") \
0114 EM(rxrpc_recvmsg_next, "NEXT") \
0115 EM(rxrpc_recvmsg_requeue, "REQU") \
0116 EM(rxrpc_recvmsg_return, "RETN") \
0117 EM(rxrpc_recvmsg_terminal, "TERM") \
0118 EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \
0119 E_(rxrpc_recvmsg_wait, "WAIT")
0120
0121 #define rxrpc_rtt_tx_traces \
0122 EM(rxrpc_rtt_tx_cancel, "CNCE") \
0123 EM(rxrpc_rtt_tx_data, "DATA") \
0124 EM(rxrpc_rtt_tx_no_slot, "FULL") \
0125 E_(rxrpc_rtt_tx_ping, "PING")
0126
0127 #define rxrpc_rtt_rx_traces \
0128 EM(rxrpc_rtt_rx_cancel, "CNCL") \
0129 EM(rxrpc_rtt_rx_obsolete, "OBSL") \
0130 EM(rxrpc_rtt_rx_lost, "LOST") \
0131 EM(rxrpc_rtt_rx_ping_response, "PONG") \
0132 E_(rxrpc_rtt_rx_requested_ack, "RACK")
0133
0134 #define rxrpc_timer_traces \
0135 EM(rxrpc_timer_begin, "Begin ") \
0136 EM(rxrpc_timer_expired, "*EXPR*") \
0137 EM(rxrpc_timer_exp_ack, "ExpAck") \
0138 EM(rxrpc_timer_exp_hard, "ExpHrd") \
0139 EM(rxrpc_timer_exp_idle, "ExpIdl") \
0140 EM(rxrpc_timer_exp_keepalive, "ExpKA ") \
0141 EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \
0142 EM(rxrpc_timer_exp_normal, "ExpNml") \
0143 EM(rxrpc_timer_exp_ping, "ExpPng") \
0144 EM(rxrpc_timer_exp_resend, "ExpRsn") \
0145 EM(rxrpc_timer_init_for_reply, "IniRpl") \
0146 EM(rxrpc_timer_init_for_send_reply, "SndRpl") \
0147 EM(rxrpc_timer_restart, "Restrt") \
0148 EM(rxrpc_timer_set_for_ack, "SetAck") \
0149 EM(rxrpc_timer_set_for_hard, "SetHrd") \
0150 EM(rxrpc_timer_set_for_idle, "SetIdl") \
0151 EM(rxrpc_timer_set_for_keepalive, "KeepAl") \
0152 EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \
0153 EM(rxrpc_timer_set_for_normal, "SetNml") \
0154 EM(rxrpc_timer_set_for_ping, "SetPng") \
0155 EM(rxrpc_timer_set_for_resend, "SetRTx") \
0156 E_(rxrpc_timer_set_for_send, "SetSnd")
0157
0158 #define rxrpc_propose_ack_traces \
0159 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
0160 EM(rxrpc_propose_ack_input_data, "DataIn ") \
0161 EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
0162 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
0163 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
0164 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
0165 EM(rxrpc_propose_ack_ping_for_params, "Params ") \
0166 EM(rxrpc_propose_ack_processing_op, "ProcOp ") \
0167 EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \
0168 EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \
0169 EM(rxrpc_propose_ack_retry_tx, "RetryTx") \
0170 EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \
0171 E_(rxrpc_propose_ack_terminal_ack, "ClTerm ")
0172
0173 #define rxrpc_propose_ack_outcomes \
0174 EM(rxrpc_propose_ack_subsume, " Subsume") \
0175 EM(rxrpc_propose_ack_update, " Update") \
0176 E_(rxrpc_propose_ack_use, " New")
0177
0178 #define rxrpc_congest_modes \
0179 EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \
0180 EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \
0181 EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \
0182 E_(RXRPC_CALL_SLOW_START, "SlowStart")
0183
0184 #define rxrpc_congest_changes \
0185 EM(rxrpc_cong_begin_retransmission, " Retrans") \
0186 EM(rxrpc_cong_cleared_nacks, " Cleared") \
0187 EM(rxrpc_cong_new_low_nack, " NewLowN") \
0188 EM(rxrpc_cong_no_change, " -") \
0189 EM(rxrpc_cong_progress, " Progres") \
0190 EM(rxrpc_cong_retransmit_again, " ReTxAgn") \
0191 EM(rxrpc_cong_rtt_window_end, " RttWinE") \
0192 E_(rxrpc_cong_saw_nack, " SawNack")
0193
0194 #define rxrpc_pkts \
0195 EM(0, "?00") \
0196 EM(RXRPC_PACKET_TYPE_DATA, "DATA") \
0197 EM(RXRPC_PACKET_TYPE_ACK, "ACK") \
0198 EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \
0199 EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \
0200 EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \
0201 EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \
0202 EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \
0203 EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \
0204 EM(9, "?09") \
0205 EM(10, "?10") \
0206 EM(11, "?11") \
0207 EM(12, "?12") \
0208 EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \
0209 EM(14, "?14") \
0210 E_(15, "?15")
0211
0212 #define rxrpc_ack_names \
0213 EM(0, "-0-") \
0214 EM(RXRPC_ACK_REQUESTED, "REQ") \
0215 EM(RXRPC_ACK_DUPLICATE, "DUP") \
0216 EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \
0217 EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \
0218 EM(RXRPC_ACK_NOSPACE, "MEM") \
0219 EM(RXRPC_ACK_PING, "PNG") \
0220 EM(RXRPC_ACK_PING_RESPONSE, "PNR") \
0221 EM(RXRPC_ACK_DELAY, "DLY") \
0222 EM(RXRPC_ACK_IDLE, "IDL") \
0223 E_(RXRPC_ACK__INVALID, "-?-")
0224
0225 #define rxrpc_completions \
0226 EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
0227 EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
0228 EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
0229 EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
0230 E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
0231
0232 #define rxrpc_tx_points \
0233 EM(rxrpc_tx_point_call_abort, "CallAbort") \
0234 EM(rxrpc_tx_point_call_ack, "CallAck") \
0235 EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \
0236 EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \
0237 EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \
0238 EM(rxrpc_tx_point_conn_abort, "ConnAbort") \
0239 EM(rxrpc_tx_point_reject, "Reject") \
0240 EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \
0241 EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \
0242 EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \
0243 E_(rxrpc_tx_point_version_reply, "VerReply")
0244
0245
0246
0247
0248 #ifndef __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
0249 #define __NETFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
0250
0251 #undef EM
0252 #undef E_
0253 #define EM(a, b) a,
0254 #define E_(a, b) a
0255
0256 enum rxrpc_call_trace { rxrpc_call_traces } __mode(byte);
0257 enum rxrpc_client_trace { rxrpc_client_traces } __mode(byte);
0258 enum rxrpc_congest_change { rxrpc_congest_changes } __mode(byte);
0259 enum rxrpc_conn_trace { rxrpc_conn_traces } __mode(byte);
0260 enum rxrpc_local_trace { rxrpc_local_traces } __mode(byte);
0261 enum rxrpc_peer_trace { rxrpc_peer_traces } __mode(byte);
0262 enum rxrpc_propose_ack_outcome { rxrpc_propose_ack_outcomes } __mode(byte);
0263 enum rxrpc_propose_ack_trace { rxrpc_propose_ack_traces } __mode(byte);
0264 enum rxrpc_receive_trace { rxrpc_receive_traces } __mode(byte);
0265 enum rxrpc_recvmsg_trace { rxrpc_recvmsg_traces } __mode(byte);
0266 enum rxrpc_rtt_rx_trace { rxrpc_rtt_rx_traces } __mode(byte);
0267 enum rxrpc_rtt_tx_trace { rxrpc_rtt_tx_traces } __mode(byte);
0268 enum rxrpc_skb_trace { rxrpc_skb_traces } __mode(byte);
0269 enum rxrpc_timer_trace { rxrpc_timer_traces } __mode(byte);
0270 enum rxrpc_transmit_trace { rxrpc_transmit_traces } __mode(byte);
0271 enum rxrpc_tx_point { rxrpc_tx_points } __mode(byte);
0272
0273 #endif
0274
0275
0276
0277
0278 #undef EM
0279 #undef E_
0280 #define EM(a, b) TRACE_DEFINE_ENUM(a);
0281 #define E_(a, b) TRACE_DEFINE_ENUM(a);
0282
0283 rxrpc_call_traces;
0284 rxrpc_client_traces;
0285 rxrpc_congest_changes;
0286 rxrpc_congest_modes;
0287 rxrpc_conn_traces;
0288 rxrpc_local_traces;
0289 rxrpc_propose_ack_outcomes;
0290 rxrpc_propose_ack_traces;
0291 rxrpc_receive_traces;
0292 rxrpc_recvmsg_traces;
0293 rxrpc_rtt_rx_traces;
0294 rxrpc_rtt_tx_traces;
0295 rxrpc_skb_traces;
0296 rxrpc_timer_traces;
0297 rxrpc_transmit_traces;
0298 rxrpc_tx_points;
0299
0300
0301
0302
0303
0304 #undef EM
0305 #undef E_
0306 #define EM(a, b) { a, b },
0307 #define E_(a, b) { a, b }
0308
0309 TRACE_EVENT(rxrpc_local,
0310 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
0311 int usage, const void *where),
0312
0313 TP_ARGS(local_debug_id, op, usage, where),
0314
0315 TP_STRUCT__entry(
0316 __field(unsigned int, local )
0317 __field(int, op )
0318 __field(int, usage )
0319 __field(const void *, where )
0320 ),
0321
0322 TP_fast_assign(
0323 __entry->local = local_debug_id;
0324 __entry->op = op;
0325 __entry->usage = usage;
0326 __entry->where = where;
0327 ),
0328
0329 TP_printk("L=%08x %s u=%d sp=%pSR",
0330 __entry->local,
0331 __print_symbolic(__entry->op, rxrpc_local_traces),
0332 __entry->usage,
0333 __entry->where)
0334 );
0335
0336 TRACE_EVENT(rxrpc_peer,
0337 TP_PROTO(unsigned int peer_debug_id, enum rxrpc_peer_trace op,
0338 int usage, const void *where),
0339
0340 TP_ARGS(peer_debug_id, op, usage, where),
0341
0342 TP_STRUCT__entry(
0343 __field(unsigned int, peer )
0344 __field(int, op )
0345 __field(int, usage )
0346 __field(const void *, where )
0347 ),
0348
0349 TP_fast_assign(
0350 __entry->peer = peer_debug_id;
0351 __entry->op = op;
0352 __entry->usage = usage;
0353 __entry->where = where;
0354 ),
0355
0356 TP_printk("P=%08x %s u=%d sp=%pSR",
0357 __entry->peer,
0358 __print_symbolic(__entry->op, rxrpc_peer_traces),
0359 __entry->usage,
0360 __entry->where)
0361 );
0362
0363 TRACE_EVENT(rxrpc_conn,
0364 TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op,
0365 int usage, const void *where),
0366
0367 TP_ARGS(conn_debug_id, op, usage, where),
0368
0369 TP_STRUCT__entry(
0370 __field(unsigned int, conn )
0371 __field(int, op )
0372 __field(int, usage )
0373 __field(const void *, where )
0374 ),
0375
0376 TP_fast_assign(
0377 __entry->conn = conn_debug_id;
0378 __entry->op = op;
0379 __entry->usage = usage;
0380 __entry->where = where;
0381 ),
0382
0383 TP_printk("C=%08x %s u=%d sp=%pSR",
0384 __entry->conn,
0385 __print_symbolic(__entry->op, rxrpc_conn_traces),
0386 __entry->usage,
0387 __entry->where)
0388 );
0389
0390 TRACE_EVENT(rxrpc_client,
0391 TP_PROTO(struct rxrpc_connection *conn, int channel,
0392 enum rxrpc_client_trace op),
0393
0394 TP_ARGS(conn, channel, op),
0395
0396 TP_STRUCT__entry(
0397 __field(unsigned int, conn )
0398 __field(u32, cid )
0399 __field(int, channel )
0400 __field(int, usage )
0401 __field(enum rxrpc_client_trace, op )
0402 ),
0403
0404 TP_fast_assign(
0405 __entry->conn = conn ? conn->debug_id : 0;
0406 __entry->channel = channel;
0407 __entry->usage = conn ? refcount_read(&conn->ref) : -2;
0408 __entry->op = op;
0409 __entry->cid = conn ? conn->proto.cid : 0;
0410 ),
0411
0412 TP_printk("C=%08x h=%2d %s i=%08x u=%d",
0413 __entry->conn,
0414 __entry->channel,
0415 __print_symbolic(__entry->op, rxrpc_client_traces),
0416 __entry->cid,
0417 __entry->usage)
0418 );
0419
0420 TRACE_EVENT(rxrpc_call,
0421 TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
0422 int usage, const void *where, const void *aux),
0423
0424 TP_ARGS(call_debug_id, op, usage, where, aux),
0425
0426 TP_STRUCT__entry(
0427 __field(unsigned int, call )
0428 __field(int, op )
0429 __field(int, usage )
0430 __field(const void *, where )
0431 __field(const void *, aux )
0432 ),
0433
0434 TP_fast_assign(
0435 __entry->call = call_debug_id;
0436 __entry->op = op;
0437 __entry->usage = usage;
0438 __entry->where = where;
0439 __entry->aux = aux;
0440 ),
0441
0442 TP_printk("c=%08x %s u=%d sp=%pSR a=%p",
0443 __entry->call,
0444 __print_symbolic(__entry->op, rxrpc_call_traces),
0445 __entry->usage,
0446 __entry->where,
0447 __entry->aux)
0448 );
0449
0450 TRACE_EVENT(rxrpc_skb,
0451 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
0452 int usage, int mod_count, u8 flags, const void *where),
0453
0454 TP_ARGS(skb, op, usage, mod_count, flags, where),
0455
0456 TP_STRUCT__entry(
0457 __field(struct sk_buff *, skb )
0458 __field(enum rxrpc_skb_trace, op )
0459 __field(u8, flags )
0460 __field(int, usage )
0461 __field(int, mod_count )
0462 __field(const void *, where )
0463 ),
0464
0465 TP_fast_assign(
0466 __entry->skb = skb;
0467 __entry->flags = flags;
0468 __entry->op = op;
0469 __entry->usage = usage;
0470 __entry->mod_count = mod_count;
0471 __entry->where = where;
0472 ),
0473
0474 TP_printk("s=%p %cx %s u=%d m=%d p=%pSR",
0475 __entry->skb,
0476 __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R',
0477 __print_symbolic(__entry->op, rxrpc_skb_traces),
0478 __entry->usage,
0479 __entry->mod_count,
0480 __entry->where)
0481 );
0482
0483 TRACE_EVENT(rxrpc_rx_packet,
0484 TP_PROTO(struct rxrpc_skb_priv *sp),
0485
0486 TP_ARGS(sp),
0487
0488 TP_STRUCT__entry(
0489 __field_struct(struct rxrpc_host_header, hdr )
0490 ),
0491
0492 TP_fast_assign(
0493 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
0494 ),
0495
0496 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
0497 __entry->hdr.epoch, __entry->hdr.cid,
0498 __entry->hdr.callNumber, __entry->hdr.serviceId,
0499 __entry->hdr.serial, __entry->hdr.seq,
0500 __entry->hdr.type, __entry->hdr.flags,
0501 __entry->hdr.type <= 15 ?
0502 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
0503 );
0504
0505 TRACE_EVENT(rxrpc_rx_done,
0506 TP_PROTO(int result, int abort_code),
0507
0508 TP_ARGS(result, abort_code),
0509
0510 TP_STRUCT__entry(
0511 __field(int, result )
0512 __field(int, abort_code )
0513 ),
0514
0515 TP_fast_assign(
0516 __entry->result = result;
0517 __entry->abort_code = abort_code;
0518 ),
0519
0520 TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
0521 );
0522
0523 TRACE_EVENT(rxrpc_abort,
0524 TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id,
0525 rxrpc_seq_t seq, int abort_code, int error),
0526
0527 TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error),
0528
0529 TP_STRUCT__entry(
0530 __field(unsigned int, call_nr )
0531 __array(char, why, 4 )
0532 __field(u32, cid )
0533 __field(u32, call_id )
0534 __field(rxrpc_seq_t, seq )
0535 __field(int, abort_code )
0536 __field(int, error )
0537 ),
0538
0539 TP_fast_assign(
0540 memcpy(__entry->why, why, 4);
0541 __entry->call_nr = call_nr;
0542 __entry->cid = cid;
0543 __entry->call_id = call_id;
0544 __entry->abort_code = abort_code;
0545 __entry->error = error;
0546 __entry->seq = seq;
0547 ),
0548
0549 TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s",
0550 __entry->call_nr,
0551 __entry->cid, __entry->call_id, __entry->seq,
0552 __entry->abort_code, __entry->error, __entry->why)
0553 );
0554
0555 TRACE_EVENT(rxrpc_call_complete,
0556 TP_PROTO(struct rxrpc_call *call),
0557
0558 TP_ARGS(call),
0559
0560 TP_STRUCT__entry(
0561 __field(unsigned int, call )
0562 __field(enum rxrpc_call_completion, compl )
0563 __field(int, error )
0564 __field(u32, abort_code )
0565 ),
0566
0567 TP_fast_assign(
0568 __entry->call = call->debug_id;
0569 __entry->compl = call->completion;
0570 __entry->error = call->error;
0571 __entry->abort_code = call->abort_code;
0572 ),
0573
0574 TP_printk("c=%08x %s r=%d ac=%d",
0575 __entry->call,
0576 __print_symbolic(__entry->compl, rxrpc_completions),
0577 __entry->error,
0578 __entry->abort_code)
0579 );
0580
0581 TRACE_EVENT(rxrpc_transmit,
0582 TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
0583
0584 TP_ARGS(call, why),
0585
0586 TP_STRUCT__entry(
0587 __field(unsigned int, call )
0588 __field(enum rxrpc_transmit_trace, why )
0589 __field(rxrpc_seq_t, tx_hard_ack )
0590 __field(rxrpc_seq_t, tx_top )
0591 __field(int, tx_winsize )
0592 ),
0593
0594 TP_fast_assign(
0595 __entry->call = call->debug_id;
0596 __entry->why = why;
0597 __entry->tx_hard_ack = call->tx_hard_ack;
0598 __entry->tx_top = call->tx_top;
0599 __entry->tx_winsize = call->tx_winsize;
0600 ),
0601
0602 TP_printk("c=%08x %s f=%08x n=%u/%u",
0603 __entry->call,
0604 __print_symbolic(__entry->why, rxrpc_transmit_traces),
0605 __entry->tx_hard_ack + 1,
0606 __entry->tx_top - __entry->tx_hard_ack,
0607 __entry->tx_winsize)
0608 );
0609
0610 TRACE_EVENT(rxrpc_rx_data,
0611 TP_PROTO(unsigned int call, rxrpc_seq_t seq,
0612 rxrpc_serial_t serial, u8 flags, u8 anno),
0613
0614 TP_ARGS(call, seq, serial, flags, anno),
0615
0616 TP_STRUCT__entry(
0617 __field(unsigned int, call )
0618 __field(rxrpc_seq_t, seq )
0619 __field(rxrpc_serial_t, serial )
0620 __field(u8, flags )
0621 __field(u8, anno )
0622 ),
0623
0624 TP_fast_assign(
0625 __entry->call = call;
0626 __entry->seq = seq;
0627 __entry->serial = serial;
0628 __entry->flags = flags;
0629 __entry->anno = anno;
0630 ),
0631
0632 TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x",
0633 __entry->call,
0634 __entry->serial,
0635 __entry->seq,
0636 __entry->flags,
0637 __entry->anno)
0638 );
0639
0640 TRACE_EVENT(rxrpc_rx_ack,
0641 TP_PROTO(struct rxrpc_call *call,
0642 rxrpc_serial_t serial, rxrpc_serial_t ack_serial,
0643 rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks),
0644
0645 TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks),
0646
0647 TP_STRUCT__entry(
0648 __field(unsigned int, call )
0649 __field(rxrpc_serial_t, serial )
0650 __field(rxrpc_serial_t, ack_serial )
0651 __field(rxrpc_seq_t, first )
0652 __field(rxrpc_seq_t, prev )
0653 __field(u8, reason )
0654 __field(u8, n_acks )
0655 ),
0656
0657 TP_fast_assign(
0658 __entry->call = call->debug_id;
0659 __entry->serial = serial;
0660 __entry->ack_serial = ack_serial;
0661 __entry->first = first;
0662 __entry->prev = prev;
0663 __entry->reason = reason;
0664 __entry->n_acks = n_acks;
0665 ),
0666
0667 TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u",
0668 __entry->call,
0669 __entry->serial,
0670 __print_symbolic(__entry->reason, rxrpc_ack_names),
0671 __entry->ack_serial,
0672 __entry->first,
0673 __entry->prev,
0674 __entry->n_acks)
0675 );
0676
0677 TRACE_EVENT(rxrpc_rx_abort,
0678 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
0679 u32 abort_code),
0680
0681 TP_ARGS(call, serial, abort_code),
0682
0683 TP_STRUCT__entry(
0684 __field(unsigned int, call )
0685 __field(rxrpc_serial_t, serial )
0686 __field(u32, abort_code )
0687 ),
0688
0689 TP_fast_assign(
0690 __entry->call = call->debug_id;
0691 __entry->serial = serial;
0692 __entry->abort_code = abort_code;
0693 ),
0694
0695 TP_printk("c=%08x ABORT %08x ac=%d",
0696 __entry->call,
0697 __entry->serial,
0698 __entry->abort_code)
0699 );
0700
0701 TRACE_EVENT(rxrpc_rx_rwind_change,
0702 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
0703 u32 rwind, bool wake),
0704
0705 TP_ARGS(call, serial, rwind, wake),
0706
0707 TP_STRUCT__entry(
0708 __field(unsigned int, call )
0709 __field(rxrpc_serial_t, serial )
0710 __field(u32, rwind )
0711 __field(bool, wake )
0712 ),
0713
0714 TP_fast_assign(
0715 __entry->call = call->debug_id;
0716 __entry->serial = serial;
0717 __entry->rwind = rwind;
0718 __entry->wake = wake;
0719 ),
0720
0721 TP_printk("c=%08x %08x rw=%u%s",
0722 __entry->call,
0723 __entry->serial,
0724 __entry->rwind,
0725 __entry->wake ? " wake" : "")
0726 );
0727
0728 TRACE_EVENT(rxrpc_tx_packet,
0729 TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr,
0730 enum rxrpc_tx_point where),
0731
0732 TP_ARGS(call_id, whdr, where),
0733
0734 TP_STRUCT__entry(
0735 __field(unsigned int, call )
0736 __field(enum rxrpc_tx_point, where )
0737 __field_struct(struct rxrpc_wire_header, whdr )
0738 ),
0739
0740 TP_fast_assign(
0741 __entry->call = call_id;
0742 memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr));
0743 __entry->where = where;
0744 ),
0745
0746 TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s",
0747 __entry->call,
0748 ntohl(__entry->whdr.epoch),
0749 ntohl(__entry->whdr.cid),
0750 ntohl(__entry->whdr.callNumber),
0751 ntohs(__entry->whdr.serviceId),
0752 ntohl(__entry->whdr.serial),
0753 ntohl(__entry->whdr.seq),
0754 __entry->whdr.type, __entry->whdr.flags,
0755 __entry->whdr.type <= 15 ?
0756 __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK",
0757 __print_symbolic(__entry->where, rxrpc_tx_points))
0758 );
0759
0760 TRACE_EVENT(rxrpc_tx_data,
0761 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
0762 rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
0763
0764 TP_ARGS(call, seq, serial, flags, retrans, lose),
0765
0766 TP_STRUCT__entry(
0767 __field(unsigned int, call )
0768 __field(rxrpc_seq_t, seq )
0769 __field(rxrpc_serial_t, serial )
0770 __field(u32, cid )
0771 __field(u32, call_id )
0772 __field(u8, flags )
0773 __field(bool, retrans )
0774 __field(bool, lose )
0775 ),
0776
0777 TP_fast_assign(
0778 __entry->call = call->debug_id;
0779 __entry->cid = call->cid;
0780 __entry->call_id = call->call_id;
0781 __entry->seq = seq;
0782 __entry->serial = serial;
0783 __entry->flags = flags;
0784 __entry->retrans = retrans;
0785 __entry->lose = lose;
0786 ),
0787
0788 TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s",
0789 __entry->call,
0790 __entry->cid,
0791 __entry->call_id,
0792 __entry->serial,
0793 __entry->seq,
0794 __entry->flags,
0795 __entry->retrans ? " *RETRANS*" : "",
0796 __entry->lose ? " *LOSE*" : "")
0797 );
0798
0799 TRACE_EVENT(rxrpc_tx_ack,
0800 TP_PROTO(unsigned int call, rxrpc_serial_t serial,
0801 rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial,
0802 u8 reason, u8 n_acks),
0803
0804 TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks),
0805
0806 TP_STRUCT__entry(
0807 __field(unsigned int, call )
0808 __field(rxrpc_serial_t, serial )
0809 __field(rxrpc_seq_t, ack_first )
0810 __field(rxrpc_serial_t, ack_serial )
0811 __field(u8, reason )
0812 __field(u8, n_acks )
0813 ),
0814
0815 TP_fast_assign(
0816 __entry->call = call;
0817 __entry->serial = serial;
0818 __entry->ack_first = ack_first;
0819 __entry->ack_serial = ack_serial;
0820 __entry->reason = reason;
0821 __entry->n_acks = n_acks;
0822 ),
0823
0824 TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u",
0825 __entry->call,
0826 __entry->serial,
0827 __print_symbolic(__entry->reason, rxrpc_ack_names),
0828 __entry->ack_first,
0829 __entry->ack_serial,
0830 __entry->n_acks)
0831 );
0832
0833 TRACE_EVENT(rxrpc_receive,
0834 TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
0835 rxrpc_serial_t serial, rxrpc_seq_t seq),
0836
0837 TP_ARGS(call, why, serial, seq),
0838
0839 TP_STRUCT__entry(
0840 __field(unsigned int, call )
0841 __field(enum rxrpc_receive_trace, why )
0842 __field(rxrpc_serial_t, serial )
0843 __field(rxrpc_seq_t, seq )
0844 __field(rxrpc_seq_t, hard_ack )
0845 __field(rxrpc_seq_t, top )
0846 ),
0847
0848 TP_fast_assign(
0849 __entry->call = call->debug_id;
0850 __entry->why = why;
0851 __entry->serial = serial;
0852 __entry->seq = seq;
0853 __entry->hard_ack = call->rx_hard_ack;
0854 __entry->top = call->rx_top;
0855 ),
0856
0857 TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x",
0858 __entry->call,
0859 __print_symbolic(__entry->why, rxrpc_receive_traces),
0860 __entry->serial,
0861 __entry->seq,
0862 __entry->hard_ack,
0863 __entry->top)
0864 );
0865
0866 TRACE_EVENT(rxrpc_recvmsg,
0867 TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
0868 rxrpc_seq_t seq, unsigned int offset, unsigned int len,
0869 int ret),
0870
0871 TP_ARGS(call, why, seq, offset, len, ret),
0872
0873 TP_STRUCT__entry(
0874 __field(unsigned int, call )
0875 __field(enum rxrpc_recvmsg_trace, why )
0876 __field(rxrpc_seq_t, seq )
0877 __field(unsigned int, offset )
0878 __field(unsigned int, len )
0879 __field(int, ret )
0880 ),
0881
0882 TP_fast_assign(
0883 __entry->call = call ? call->debug_id : 0;
0884 __entry->why = why;
0885 __entry->seq = seq;
0886 __entry->offset = offset;
0887 __entry->len = len;
0888 __entry->ret = ret;
0889 ),
0890
0891 TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d",
0892 __entry->call,
0893 __print_symbolic(__entry->why, rxrpc_recvmsg_traces),
0894 __entry->seq,
0895 __entry->offset,
0896 __entry->len,
0897 __entry->ret)
0898 );
0899
0900 TRACE_EVENT(rxrpc_rtt_tx,
0901 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
0902 int slot, rxrpc_serial_t send_serial),
0903
0904 TP_ARGS(call, why, slot, send_serial),
0905
0906 TP_STRUCT__entry(
0907 __field(unsigned int, call )
0908 __field(enum rxrpc_rtt_tx_trace, why )
0909 __field(int, slot )
0910 __field(rxrpc_serial_t, send_serial )
0911 ),
0912
0913 TP_fast_assign(
0914 __entry->call = call->debug_id;
0915 __entry->why = why;
0916 __entry->slot = slot;
0917 __entry->send_serial = send_serial;
0918 ),
0919
0920 TP_printk("c=%08x [%d] %s sr=%08x",
0921 __entry->call,
0922 __entry->slot,
0923 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
0924 __entry->send_serial)
0925 );
0926
0927 TRACE_EVENT(rxrpc_rtt_rx,
0928 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
0929 int slot,
0930 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
0931 u32 rtt, u32 rto),
0932
0933 TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
0934
0935 TP_STRUCT__entry(
0936 __field(unsigned int, call )
0937 __field(enum rxrpc_rtt_rx_trace, why )
0938 __field(int, slot )
0939 __field(rxrpc_serial_t, send_serial )
0940 __field(rxrpc_serial_t, resp_serial )
0941 __field(u32, rtt )
0942 __field(u32, rto )
0943 ),
0944
0945 TP_fast_assign(
0946 __entry->call = call->debug_id;
0947 __entry->why = why;
0948 __entry->slot = slot;
0949 __entry->send_serial = send_serial;
0950 __entry->resp_serial = resp_serial;
0951 __entry->rtt = rtt;
0952 __entry->rto = rto;
0953 ),
0954
0955 TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
0956 __entry->call,
0957 __entry->slot,
0958 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
0959 __entry->send_serial,
0960 __entry->resp_serial,
0961 __entry->rtt,
0962 __entry->rto)
0963 );
0964
0965 TRACE_EVENT(rxrpc_timer,
0966 TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
0967 unsigned long now),
0968
0969 TP_ARGS(call, why, now),
0970
0971 TP_STRUCT__entry(
0972 __field(unsigned int, call )
0973 __field(enum rxrpc_timer_trace, why )
0974 __field(long, now )
0975 __field(long, ack_at )
0976 __field(long, ack_lost_at )
0977 __field(long, resend_at )
0978 __field(long, ping_at )
0979 __field(long, expect_rx_by )
0980 __field(long, expect_req_by )
0981 __field(long, expect_term_by )
0982 __field(long, timer )
0983 ),
0984
0985 TP_fast_assign(
0986 __entry->call = call->debug_id;
0987 __entry->why = why;
0988 __entry->now = now;
0989 __entry->ack_at = call->ack_at;
0990 __entry->ack_lost_at = call->ack_lost_at;
0991 __entry->resend_at = call->resend_at;
0992 __entry->expect_rx_by = call->expect_rx_by;
0993 __entry->expect_req_by = call->expect_req_by;
0994 __entry->expect_term_by = call->expect_term_by;
0995 __entry->timer = call->timer.expires;
0996 ),
0997
0998 TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld",
0999 __entry->call,
1000 __print_symbolic(__entry->why, rxrpc_timer_traces),
1001 __entry->ack_at - __entry->now,
1002 __entry->ack_lost_at - __entry->now,
1003 __entry->resend_at - __entry->now,
1004 __entry->expect_rx_by - __entry->now,
1005 __entry->expect_req_by - __entry->now,
1006 __entry->expect_term_by - __entry->now,
1007 __entry->timer - __entry->now)
1008 );
1009
1010 TRACE_EVENT(rxrpc_rx_lose,
1011 TP_PROTO(struct rxrpc_skb_priv *sp),
1012
1013 TP_ARGS(sp),
1014
1015 TP_STRUCT__entry(
1016 __field_struct(struct rxrpc_host_header, hdr )
1017 ),
1018
1019 TP_fast_assign(
1020 memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
1021 ),
1022
1023 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*",
1024 __entry->hdr.epoch, __entry->hdr.cid,
1025 __entry->hdr.callNumber, __entry->hdr.serviceId,
1026 __entry->hdr.serial, __entry->hdr.seq,
1027 __entry->hdr.type, __entry->hdr.flags,
1028 __entry->hdr.type <= 15 ?
1029 __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK")
1030 );
1031
1032 TRACE_EVENT(rxrpc_propose_ack,
1033 TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why,
1034 u8 ack_reason, rxrpc_serial_t serial, bool immediate,
1035 bool background, enum rxrpc_propose_ack_outcome outcome),
1036
1037 TP_ARGS(call, why, ack_reason, serial, immediate, background,
1038 outcome),
1039
1040 TP_STRUCT__entry(
1041 __field(unsigned int, call )
1042 __field(enum rxrpc_propose_ack_trace, why )
1043 __field(rxrpc_serial_t, serial )
1044 __field(u8, ack_reason )
1045 __field(bool, immediate )
1046 __field(bool, background )
1047 __field(enum rxrpc_propose_ack_outcome, outcome )
1048 ),
1049
1050 TP_fast_assign(
1051 __entry->call = call->debug_id;
1052 __entry->why = why;
1053 __entry->serial = serial;
1054 __entry->ack_reason = ack_reason;
1055 __entry->immediate = immediate;
1056 __entry->background = background;
1057 __entry->outcome = outcome;
1058 ),
1059
1060 TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s",
1061 __entry->call,
1062 __print_symbolic(__entry->why, rxrpc_propose_ack_traces),
1063 __print_symbolic(__entry->ack_reason, rxrpc_ack_names),
1064 __entry->serial,
1065 __entry->immediate,
1066 __entry->background,
1067 __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes))
1068 );
1069
1070 TRACE_EVENT(rxrpc_retransmit,
1071 TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation,
1072 s64 expiry),
1073
1074 TP_ARGS(call, seq, annotation, expiry),
1075
1076 TP_STRUCT__entry(
1077 __field(unsigned int, call )
1078 __field(rxrpc_seq_t, seq )
1079 __field(u8, annotation )
1080 __field(s64, expiry )
1081 ),
1082
1083 TP_fast_assign(
1084 __entry->call = call->debug_id;
1085 __entry->seq = seq;
1086 __entry->annotation = annotation;
1087 __entry->expiry = expiry;
1088 ),
1089
1090 TP_printk("c=%08x q=%x a=%02x xp=%lld",
1091 __entry->call,
1092 __entry->seq,
1093 __entry->annotation,
1094 __entry->expiry)
1095 );
1096
1097 TRACE_EVENT(rxrpc_congest,
1098 TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary,
1099 rxrpc_serial_t ack_serial, enum rxrpc_congest_change change),
1100
1101 TP_ARGS(call, summary, ack_serial, change),
1102
1103 TP_STRUCT__entry(
1104 __field(unsigned int, call )
1105 __field(enum rxrpc_congest_change, change )
1106 __field(rxrpc_seq_t, hard_ack )
1107 __field(rxrpc_seq_t, top )
1108 __field(rxrpc_seq_t, lowest_nak )
1109 __field(rxrpc_serial_t, ack_serial )
1110 __field_struct(struct rxrpc_ack_summary, sum )
1111 ),
1112
1113 TP_fast_assign(
1114 __entry->call = call->debug_id;
1115 __entry->change = change;
1116 __entry->hard_ack = call->tx_hard_ack;
1117 __entry->top = call->tx_top;
1118 __entry->lowest_nak = call->acks_lowest_nak;
1119 __entry->ack_serial = ack_serial;
1120 memcpy(&__entry->sum, summary, sizeof(__entry->sum));
1121 ),
1122
1123 TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s",
1124 __entry->call,
1125 __entry->ack_serial,
1126 __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names),
1127 __entry->hard_ack,
1128 __print_symbolic(__entry->sum.mode, rxrpc_congest_modes),
1129 __entry->sum.cwnd,
1130 __entry->sum.ssthresh,
1131 __entry->sum.nr_acks, __entry->sum.nr_nacks,
1132 __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks,
1133 __entry->sum.nr_rot_new_acks,
1134 __entry->top - __entry->hard_ack,
1135 __entry->sum.cumulative_acks,
1136 __entry->sum.dup_acks,
1137 __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "",
1138 __print_symbolic(__entry->change, rxrpc_congest_changes),
1139 __entry->sum.retrans_timeo ? " rTxTo" : "")
1140 );
1141
1142 TRACE_EVENT(rxrpc_disconnect_call,
1143 TP_PROTO(struct rxrpc_call *call),
1144
1145 TP_ARGS(call),
1146
1147 TP_STRUCT__entry(
1148 __field(unsigned int, call )
1149 __field(u32, abort_code )
1150 ),
1151
1152 TP_fast_assign(
1153 __entry->call = call->debug_id;
1154 __entry->abort_code = call->abort_code;
1155 ),
1156
1157 TP_printk("c=%08x ab=%08x",
1158 __entry->call,
1159 __entry->abort_code)
1160 );
1161
1162 TRACE_EVENT(rxrpc_improper_term,
1163 TP_PROTO(struct rxrpc_call *call),
1164
1165 TP_ARGS(call),
1166
1167 TP_STRUCT__entry(
1168 __field(unsigned int, call )
1169 __field(u32, abort_code )
1170 ),
1171
1172 TP_fast_assign(
1173 __entry->call = call->debug_id;
1174 __entry->abort_code = call->abort_code;
1175 ),
1176
1177 TP_printk("c=%08x ab=%08x",
1178 __entry->call,
1179 __entry->abort_code)
1180 );
1181
1182 TRACE_EVENT(rxrpc_rx_eproto,
1183 TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
1184 const char *why),
1185
1186 TP_ARGS(call, serial, why),
1187
1188 TP_STRUCT__entry(
1189 __field(unsigned int, call )
1190 __field(rxrpc_serial_t, serial )
1191 __field(const char *, why )
1192 ),
1193
1194 TP_fast_assign(
1195 __entry->call = call ? call->debug_id : 0;
1196 __entry->serial = serial;
1197 __entry->why = why;
1198 ),
1199
1200 TP_printk("c=%08x EPROTO %08x %s",
1201 __entry->call,
1202 __entry->serial,
1203 __entry->why)
1204 );
1205
1206 TRACE_EVENT(rxrpc_connect_call,
1207 TP_PROTO(struct rxrpc_call *call),
1208
1209 TP_ARGS(call),
1210
1211 TP_STRUCT__entry(
1212 __field(unsigned int, call )
1213 __field(unsigned long, user_call_ID )
1214 __field(u32, cid )
1215 __field(u32, call_id )
1216 ),
1217
1218 TP_fast_assign(
1219 __entry->call = call->debug_id;
1220 __entry->user_call_ID = call->user_call_ID;
1221 __entry->cid = call->cid;
1222 __entry->call_id = call->call_id;
1223 ),
1224
1225 TP_printk("c=%08x u=%p %08x:%08x",
1226 __entry->call,
1227 (void *)__entry->user_call_ID,
1228 __entry->cid,
1229 __entry->call_id)
1230 );
1231
1232 TRACE_EVENT(rxrpc_resend,
1233 TP_PROTO(struct rxrpc_call *call, int ix),
1234
1235 TP_ARGS(call, ix),
1236
1237 TP_STRUCT__entry(
1238 __field(unsigned int, call )
1239 __field(int, ix )
1240 __array(u8, anno, 64 )
1241 ),
1242
1243 TP_fast_assign(
1244 __entry->call = call->debug_id;
1245 __entry->ix = ix;
1246 memcpy(__entry->anno, call->rxtx_annotations, 64);
1247 ),
1248
1249 TP_printk("c=%08x ix=%u a=%64phN",
1250 __entry->call,
1251 __entry->ix,
1252 __entry->anno)
1253 );
1254
1255 TRACE_EVENT(rxrpc_rx_icmp,
1256 TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee,
1257 struct sockaddr_rxrpc *srx),
1258
1259 TP_ARGS(peer, ee, srx),
1260
1261 TP_STRUCT__entry(
1262 __field(unsigned int, peer )
1263 __field_struct(struct sock_extended_err, ee )
1264 __field_struct(struct sockaddr_rxrpc, srx )
1265 ),
1266
1267 TP_fast_assign(
1268 __entry->peer = peer->debug_id;
1269 memcpy(&__entry->ee, ee, sizeof(__entry->ee));
1270 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1271 ),
1272
1273 TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp",
1274 __entry->peer,
1275 __entry->ee.ee_origin,
1276 __entry->ee.ee_type,
1277 __entry->ee.ee_code,
1278 __entry->ee.ee_info,
1279 __entry->ee.ee_data,
1280 __entry->ee.ee_errno,
1281 &__entry->srx.transport)
1282 );
1283
1284 TRACE_EVENT(rxrpc_tx_fail,
1285 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret,
1286 enum rxrpc_tx_point where),
1287
1288 TP_ARGS(debug_id, serial, ret, where),
1289
1290 TP_STRUCT__entry(
1291 __field(unsigned int, debug_id )
1292 __field(rxrpc_serial_t, serial )
1293 __field(int, ret )
1294 __field(enum rxrpc_tx_point, where )
1295 ),
1296
1297 TP_fast_assign(
1298 __entry->debug_id = debug_id;
1299 __entry->serial = serial;
1300 __entry->ret = ret;
1301 __entry->where = where;
1302 ),
1303
1304 TP_printk("c=%08x r=%x ret=%d %s",
1305 __entry->debug_id,
1306 __entry->serial,
1307 __entry->ret,
1308 __print_symbolic(__entry->where, rxrpc_tx_points))
1309 );
1310
1311 TRACE_EVENT(rxrpc_call_reset,
1312 TP_PROTO(struct rxrpc_call *call),
1313
1314 TP_ARGS(call),
1315
1316 TP_STRUCT__entry(
1317 __field(unsigned int, debug_id )
1318 __field(u32, cid )
1319 __field(u32, call_id )
1320 __field(rxrpc_serial_t, call_serial )
1321 __field(rxrpc_serial_t, conn_serial )
1322 __field(rxrpc_seq_t, tx_seq )
1323 __field(rxrpc_seq_t, rx_seq )
1324 ),
1325
1326 TP_fast_assign(
1327 __entry->debug_id = call->debug_id;
1328 __entry->cid = call->cid;
1329 __entry->call_id = call->call_id;
1330 __entry->call_serial = call->rx_serial;
1331 __entry->conn_serial = call->conn->hi_serial;
1332 __entry->tx_seq = call->tx_hard_ack;
1333 __entry->rx_seq = call->rx_hard_ack;
1334 ),
1335
1336 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",
1337 __entry->debug_id,
1338 __entry->cid, __entry->call_id,
1339 __entry->call_serial, __entry->conn_serial,
1340 __entry->tx_seq, __entry->rx_seq)
1341 );
1342
1343 TRACE_EVENT(rxrpc_notify_socket,
1344 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial),
1345
1346 TP_ARGS(debug_id, serial),
1347
1348 TP_STRUCT__entry(
1349 __field(unsigned int, debug_id )
1350 __field(rxrpc_serial_t, serial )
1351 ),
1352
1353 TP_fast_assign(
1354 __entry->debug_id = debug_id;
1355 __entry->serial = serial;
1356 ),
1357
1358 TP_printk("c=%08x r=%08x",
1359 __entry->debug_id,
1360 __entry->serial)
1361 );
1362
1363 TRACE_EVENT(rxrpc_rx_discard_ack,
1364 TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
1365 rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
1366 rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
1367
1368 TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
1369 prev_pkt, call_ackr_prev),
1370
1371 TP_STRUCT__entry(
1372 __field(unsigned int, debug_id )
1373 __field(rxrpc_serial_t, serial )
1374 __field(rxrpc_seq_t, first_soft_ack)
1375 __field(rxrpc_seq_t, call_ackr_first)
1376 __field(rxrpc_seq_t, prev_pkt)
1377 __field(rxrpc_seq_t, call_ackr_prev)
1378 ),
1379
1380 TP_fast_assign(
1381 __entry->debug_id = debug_id;
1382 __entry->serial = serial;
1383 __entry->first_soft_ack = first_soft_ack;
1384 __entry->call_ackr_first = call_ackr_first;
1385 __entry->prev_pkt = prev_pkt;
1386 __entry->call_ackr_prev = call_ackr_prev;
1387 ),
1388
1389 TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
1390 __entry->debug_id,
1391 __entry->serial,
1392 __entry->first_soft_ack,
1393 __entry->call_ackr_first,
1394 __entry->prev_pkt,
1395 __entry->call_ackr_prev)
1396 );
1397
1398 #undef EM
1399 #undef E_
1400 #endif
1401
1402
1403 #include <trace/define_trace.h>