forked from Minki/linux
rxrpc: Trace discarded ACKs
Add a tracepoint to track received ACKs that are discarded due to being outside of the Tx window. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
c410bf0193
commit
d1f129470e
@ -1541,6 +1541,41 @@ TRACE_EVENT(rxrpc_notify_socket,
|
||||
__entry->serial)
|
||||
);
|
||||
|
||||
TRACE_EVENT(rxrpc_rx_discard_ack,
|
||||
TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
|
||||
rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
|
||||
rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
|
||||
|
||||
TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
|
||||
prev_pkt, call_ackr_prev),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, debug_id )
|
||||
__field(rxrpc_serial_t, serial )
|
||||
__field(rxrpc_seq_t, first_soft_ack)
|
||||
__field(rxrpc_seq_t, call_ackr_first)
|
||||
__field(rxrpc_seq_t, prev_pkt)
|
||||
__field(rxrpc_seq_t, call_ackr_prev)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->debug_id = debug_id;
|
||||
__entry->serial = serial;
|
||||
__entry->first_soft_ack = first_soft_ack;
|
||||
__entry->call_ackr_first = call_ackr_first;
|
||||
__entry->prev_pkt = prev_pkt;
|
||||
__entry->call_ackr_prev = call_ackr_prev;
|
||||
),
|
||||
|
||||
TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
|
||||
__entry->debug_id,
|
||||
__entry->serial,
|
||||
__entry->first_soft_ack,
|
||||
__entry->call_ackr_first,
|
||||
__entry->prev_pkt,
|
||||
__entry->call_ackr_prev)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_RXRPC_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
@ -866,8 +866,12 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb)
|
||||
|
||||
/* Discard any out-of-order or duplicate ACKs (outside lock). */
|
||||
if (before(first_soft_ack, call->ackr_first_seq) ||
|
||||
before(prev_pkt, call->ackr_prev_seq))
|
||||
before(prev_pkt, call->ackr_prev_seq)) {
|
||||
trace_rxrpc_rx_discard_ack(call->debug_id, sp->hdr.serial,
|
||||
first_soft_ack, call->ackr_first_seq,
|
||||
prev_pkt, call->ackr_prev_seq);
|
||||
return;
|
||||
}
|
||||
|
||||
buf.info.rxMTU = 0;
|
||||
ioffset = offset + nr_acks + 3;
|
||||
@ -879,8 +883,12 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb)
|
||||
|
||||
/* Discard any out-of-order or duplicate ACKs (inside lock). */
|
||||
if (before(first_soft_ack, call->ackr_first_seq) ||
|
||||
before(prev_pkt, call->ackr_prev_seq))
|
||||
before(prev_pkt, call->ackr_prev_seq)) {
|
||||
trace_rxrpc_rx_discard_ack(call->debug_id, sp->hdr.serial,
|
||||
first_soft_ack, call->ackr_first_seq,
|
||||
prev_pkt, call->ackr_prev_seq);
|
||||
goto out;
|
||||
}
|
||||
call->acks_latest_ts = skb->tstamp;
|
||||
|
||||
call->ackr_first_seq = first_soft_ack;
|
||||
|
Loading…
Reference in New Issue
Block a user