From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795536849; b=3W07dKkXN5xbMIRotstAC8QefNkZBGxX3MMjGNrvXKMpp+pIslpiraSdMkeBz/ZP5DSe pvnPtBof9lfVQDVPC6C/5zAFVGOaP3Fg9UYLUiRvtp5Od8R8aotNyk6JKX/M2MENJ/FE/ 4II1j9bN06l/3IFdXq3MkzEoqObAb+hq4LYETiYBB2cuqnQxKFP2KX7IL8A1mPr4nlXEg R7EsWxvZ6hPIygl9r06FGtmOHxW8ALj4l6CRvxUQYD7vf1hfvMQZgNFcETDi4bx4IzXvK gk82WOiQoytgyJ0J3r68GXeZPpIsq6d3Z9U1JTrSHu0enD9wFqQ58pEh08/pvO7kwiw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795536849; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=RCreZvrypwRnIZDCuQwz6MJScYzu2vEPvy8Vu7nfZq4=; b=PlbkuTa6VBH6iJxdr4TUw2DnJ2hQL2EMn4Y44UjnqLGb3m3svqAT13IeVhYa2fOfTXy+ pVeg8bzfzZHqlmd/5ugHbN68A2jMO3jJpPUdB/af3pP76jEn6gDsLhZOBSVhmmOuOYZKe W9TrvwHMaWEPtCJd1yOjSU8ZNz4Pcgx32mIPAENKzTnFhAzyAaCywsuJIgg8jzSnBvpP1 b02p0Qa9PHHnN6EvjYI0kAJYxft1BNzHGKkf22bxiH6jKDB51dIzng8sdytQP9BI08PRe 5Ju51s9oQwP664Vy7e1p8k+DtiVaji0o74a2V9ZdiMwKUTZRDihX3ZPRtG9sDh1lwTg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MKHn798I; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5199606A680 for ; Tue, 24 Nov 2026 16:14:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A5199606A680 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MKHn798I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795536847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RCreZvrypwRnIZDCuQwz6MJScYzu2vEPvy8Vu7nfZq4=; b=MKHn798IDgmdPhRu6WKMbT6ZyQBdQTfLFCA6F8uvcOy4UiMojaM/lnbdD0VMxHwFJq475p RlWJclf8yGh8q6G3SKMl1LX5V7jhuPoDS2NI6Ogth7CViYClCWRWYemNciBlqvqIHV8QS9 uIJE6rAWWPzDa/K4HZepSseaQ3/mMxQ= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-496-XPczvPTrPWunq1AwO_sgSw-1; Tue, 24 Nov 2026 16:13:59 +0000 X-MC-Unique: XPczvPTrPWunq1AwO_sgSw-1 X-Mimecast-MFC-AGG-ID: XPczvPTrPWunq1AwO_sgSw_1795536807 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CC44B1956062; Tue, 24 Nov 2026 16:13:26 +0000 (UTC) Received: from dhowells-thinkpadp1gen8.rmtgb.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CEC411801978; Tue, 24 Nov 2026 16:13:23 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Marc Dionne , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, Jeffrey Altman , stable@vger.kernel.org Subject: [PATCH net v3 03/10] rxrpc: Fix carrying of in-flight calc over retransmission Date: Tue, 24 Nov 2026 16:12:51 +0000 Message-ID: <20261124161302.4044422-4-dhowells@redhat.com> In-Reply-To: <20261124161302.4044422-1-dhowells@redhat.com> References: <20261124161302.4044422-1-dhowells@redhat.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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 cc: Marc Dionne cc: Jeffrey Altman cc: Eric Dumazet cc: "David S. Miller" cc: Jakub Kicinski cc: Paolo Abeni cc: Simon Horman cc: linux-afs@lists.infradead.org cc: stable@vger.kernel.org --- 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;