[PATCH net v3 05/10] rxrpc: Fix RTT processing for a presumed lost packet getting ACK'd

From: David Howells

Date: Tue Nov 24 2026 - 11:14:32 EST


With RACK-TLP, under some circumstances a packet that is presumed lost has
its xmit timestamp reset when it is marked lost. However, if an ACK then
turns up anyway, rxrpc_rack_update() sees a bad RTT calculation because the
xmit_ts is calculated as being KTIME_MAX.

Fix this by skipping the RTT processing in such a case.

Fixes: 7c482665931b ("rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985]")
Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
cc: Marc Dionne <marc.dionne@xxxxxxxxxxxx>
cc: Jeffrey Altman <jaltman@xxxxxxxxxxxx>
cc: Eric Dumazet <edumazet@xxxxxxxxxx>
cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
cc: Jakub Kicinski <kuba@xxxxxxxxxx>
cc: Paolo Abeni <pabeni@xxxxxxxxxx>
cc: Simon Horman <horms@xxxxxxxxxx>
cc: linux-afs@xxxxxxxxxxxxxxxxxxx
cc: stable@xxxxxxxxxxxxxxx
---
net/rxrpc/input_rack.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/net/rxrpc/input_rack.c b/net/rxrpc/input_rack.c
index c4276534f539..e5288e5beb59 100644
--- a/net/rxrpc/input_rack.c
+++ b/net/rxrpc/input_rack.c
@@ -71,6 +71,12 @@ static void rxrpc_rack_update(struct rxrpc_call *call,
if (__test_and_clear_bit(ix, &tq->segment_lost))
call->tx_nr_lost--;

+ /* A packet may get marked lost and then ACK'd before we get to
+ * retransmitting which can result in xmit_ts having been reset.
+ */
+ if (tq->segment_xmit_ts[ix] == UINT_MAX)
+ return;
+
if (test_bit(ix, &tq->segment_retransmitted)) {
/* Use Rx.serial instead of TCP.ACK.ts_option.echo_reply. */
if (before(call->acks_highest_serial, tq->segment_serial[ix]))