[PATCH net v3 03/10] rxrpc: Fix carrying of in-flight calc over retransmission

From: David Howells

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


rxrpc_tlp_send_probe() calculates the in_flight value at the top of the
function and then doesn't use it till the bottom of the function - after it
may have done (re-)transmission, which would change the value (though it is
recalculated in one place).

Fix this by calculating that value at the point it is needed.

Fixes: 7c482665931b ("rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985]")
Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020201258.290827-1-dhowells%40redhat.com
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 | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/rxrpc/input_rack.c b/net/rxrpc/input_rack.c
index 24903eb722b9..87084cea88b1 100644
--- a/net/rxrpc/input_rack.c
+++ b/net/rxrpc/input_rack.c
@@ -313,8 +313,6 @@ ktime_t rxrpc_tlp_calc_pto(struct rxrpc_call *call, ktime_t now)
*/
void rxrpc_tlp_send_probe(struct rxrpc_call *call)
{
- unsigned int in_flight = rxrpc_tx_in_flight(call);
-
if (after_eq(call->acks_hard_ack, call->tx_transmitted))
return; /* Everything we transmitted has been acked. */

@@ -333,7 +331,6 @@ void rxrpc_tlp_send_probe(struct rxrpc_call *call)
call->tlp_serial = call->tx_last_serial;
call->tlp_seq = call->tx_transmitted;
trace_rxrpc_tlp_probe(call, rxrpc_tlp_probe_trace_transmit_new);
- in_flight = rxrpc_tx_in_flight(call);
} else {
/* Retransmit the highest-sequence DATA sent */
call->tx_last_serial = 0;
@@ -345,7 +342,7 @@ void rxrpc_tlp_send_probe(struct rxrpc_call *call)
trace_rxrpc_tlp_probe(call, rxrpc_tlp_probe_trace_busy);
}

- if (in_flight != 0) {
+ if (rxrpc_tx_in_flight(call) != 0) {
ktime_t rto = rxrpc_get_rto_backoff(call, false);

call->rack_timer_mode = RXRPC_CALL_RACKTIMER_RTO;