]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rxrpc: Fix request for an ACK when cwnd is minimum
authorDavid Howells <dhowells@redhat.com>
Wed, 4 Dec 2024 07:47:06 +0000 (07:47 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 9 Dec 2024 21:48:32 +0000 (13:48 -0800)
rxrpc_prepare_data_subpacket() sets the REQUEST-ACK flag on the outgoing
DATA packet under a number of circumstances, including, theoretically, when
the cwnd is at minimum (or less).  However, the minimum in this function is
hard-coded as 2, but the actual minimum is RXRPC_MIN_CWND (which is
currently 4) and so this never occurs.

Without this, we will miss the request of some ACKs, potentially leading to
a transmission stall until a timeout occurs on one side or the other that
leads to an ACK being generated.

Fix the function to use RXRPC_MIN_CWND rather than a hard-coded number.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rxrpc/output.c

index ecaf3becee40d8b91ef976da52e179d34d31a3e7..f934551a9b1c69c1887a435a510a46fd99c3cee6 100644 (file)
@@ -469,7 +469,7 @@ static size_t rxrpc_prepare_data_subpacket(struct rxrpc_call *call,
                why = rxrpc_reqack_ack_lost;
        else if (txb->flags & RXRPC_TXBUF_RESENT)
                why = rxrpc_reqack_retrans;
-       else if (call->cong_ca_state == RXRPC_CA_SLOW_START && call->cong_cwnd <= 2)
+       else if (call->cong_ca_state == RXRPC_CA_SLOW_START && call->cong_cwnd <= RXRPC_MIN_CWND)
                why = rxrpc_reqack_slow_start;
        else if (call->tx_winsize <= 2)
                why = rxrpc_reqack_small_txwin;