Skip to content

Commit

Permalink
rxrpc: Add a tracepoint to log which packets will be retransmitted
Browse files Browse the repository at this point in the history
Add a tracepoint to log in rxrpc_resend() which packets will be
retransmitted.  Note that if a positive ACK comes in whilst we have dropped
the lock to retransmit another packet, the actual retransmission may not
happen, though some of the effects will (such as altering the congestion
management).

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Sep 23, 2016
1 parent 9c7ad43 commit c6672e3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions include/trace/events/rxrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,33 @@ TRACE_EVENT(rxrpc_propose_ack,
rxrpc_propose_ack_outcomes[__entry->outcome])
);

TRACE_EVENT(rxrpc_retransmit,
TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation,
s64 expiry),

TP_ARGS(call, seq, annotation, expiry),

TP_STRUCT__entry(
__field(struct rxrpc_call *, call )
__field(rxrpc_seq_t, seq )
__field(u8, annotation )
__field(s64, expiry )
),

TP_fast_assign(
__entry->call = call;
__entry->seq = seq;
__entry->annotation = annotation;
__entry->expiry = expiry;
),

TP_printk("c=%p q=%x a=%02x xp=%lld",
__entry->call,
__entry->seq,
__entry->annotation,
__entry->expiry)
);

#endif /* _TRACE_RXRPC_H */

/* This part must be outside protection */
Expand Down
2 changes: 2 additions & 0 deletions net/rxrpc/call_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ static void rxrpc_resend(struct rxrpc_call *call)

/* Okay, we need to retransmit a packet. */
call->rxtx_annotations[ix] = RXRPC_TX_ANNO_RETRANS | annotation;
trace_rxrpc_retransmit(call, seq, annotation | anno_type,
ktime_to_ns(ktime_sub(skb->tstamp, max_age)));
}

resend_at = ktime_sub(ktime_add_ms(oldest, rxrpc_resend_timeout), now);
Expand Down

0 comments on commit c6672e3

Please sign in to comment.