__entry->abort_code, __entry->error, __entry->why)
);
+TRACE_EVENT(rxrpc_transmit,
+ TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
+
+ TP_ARGS(call, why),
+
+ TP_STRUCT__entry(
+ __field(struct rxrpc_call *, call )
+ __field(enum rxrpc_transmit_trace, why )
+ __field(rxrpc_seq_t, tx_hard_ack )
+ __field(rxrpc_seq_t, tx_top )
+ ),
+
+ TP_fast_assign(
+ __entry->call = call;
+ __entry->why = why;
+ __entry->tx_hard_ack = call->tx_hard_ack;
+ __entry->tx_top = call->tx_top;
+ ),
+
+ TP_printk("c=%p %s f=%08x n=%u",
+ __entry->call,
+ rxrpc_transmit_traces[__entry->why],
+ __entry->tx_hard_ack + 1,
+ __entry->tx_top - __entry->tx_hard_ack)
+ );
+
#endif /* _TRACE_RXRPC_H */
/* This part must be outside protection */
extern const char rxrpc_call_traces[rxrpc_call__nr_trace][4];
+enum rxrpc_transmit_trace {
+ rxrpc_transmit_wait,
+ rxrpc_transmit_queue,
+ rxrpc_transmit_queue_reqack,
+ rxrpc_transmit_queue_last,
+ rxrpc_transmit_rotate,
+ rxrpc_transmit_end,
+ rxrpc_transmit__nr_trace
+};
+
+extern const char rxrpc_transmit_traces[rxrpc_transmit__nr_trace][4];
+
extern const char *const rxrpc_pkts[];
extern const char *rxrpc_acks(u8 reason);
spin_unlock(&call->lock);
+ trace_rxrpc_transmit(call, rxrpc_transmit_rotate);
wake_up(&call->waitq);
while (list) {
}
write_unlock(&call->state_lock);
+ trace_rxrpc_transmit(call, rxrpc_transmit_end);
_leave(" = ok");
return true;
}
[rxrpc_client_to_waiting] = "->Wait",
[rxrpc_client_uncount] = "Uncoun",
};
+
+const char rxrpc_transmit_traces[rxrpc_transmit__nr_trace][4] = {
+ [rxrpc_transmit_wait] = "WAI",
+ [rxrpc_transmit_queue] = "QUE",
+ [rxrpc_transmit_queue_reqack] = "QRA",
+ [rxrpc_transmit_queue_last] = "QLS",
+ [rxrpc_transmit_rotate] = "ROT",
+ [rxrpc_transmit_end] = "END",
+};
break;
}
+ trace_rxrpc_transmit(call, rxrpc_transmit_wait);
release_sock(&rx->sk);
*timeo = schedule_timeout(*timeo);
lock_sock(&rx->sk);
smp_wmb();
call->rxtx_buffer[ix] = skb;
call->tx_top = seq;
- if (last)
+ if (last) {
set_bit(RXRPC_CALL_TX_LAST, &call->flags);
+ trace_rxrpc_transmit(call, rxrpc_transmit_queue_last);
+ } else if (sp->hdr.flags & RXRPC_REQUEST_ACK) {
+ trace_rxrpc_transmit(call, rxrpc_transmit_queue_reqack);
+ } else {
+ trace_rxrpc_transmit(call, rxrpc_transmit_queue);
+ }
if (last || call->state == RXRPC_CALL_SERVER_ACK_REQUEST) {
_debug("________awaiting reply/ACK__________");