All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
	Marc Dionne <marc.dionne@auristor.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
	Jeffrey Altman <jaltman@auristor.com>,
	stable@vger.kernel.org
Subject: [PATCH net v3 04/10] rxrpc: Fix ack parsing to mark reneged ACKs as lost for RACK-TLP
Date: Tue, 24 Nov 2026 16:12:52 +0000	[thread overview]
Message-ID: <20261124161302.4044422-5-dhowells@redhat.com> (raw)
In-Reply-To: <20261124161302.4044422-1-dhowells@redhat.com>

If an packet that was ACK'd becomes NAK'd (ie. the peer discarded it), the
now-missing packet is not picked up by the RACK-TLP implementation.

Fix this by marking reneged ACKs as lost immediately.

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@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Jeffrey Altman <jaltman@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: stable@vger.kernel.org
---
 net/rxrpc/ar-internal.h |  3 ++-
 net/rxrpc/input.c       |  6 +++---
 net/rxrpc/input_rack.c  | 11 ++++++++++-
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 865f05fe37ab..d88dd02b6ab5 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -1256,7 +1256,8 @@ void rxrpc_input_rack_one(struct rxrpc_call *call,
 void rxrpc_input_rack(struct rxrpc_call *call,
 		      struct rxrpc_ack_summary *summary,
 		      struct rxrpc_txqueue *tq,
-		      unsigned long new_acks);
+		      unsigned long new_acks,
+		      unsigned long reneged_acks);
 void rxrpc_rack_detect_loss_and_arm_timer(struct rxrpc_call *call,
 					  struct rxrpc_ack_summary *summary);
 ktime_t rxrpc_tlp_calc_pto(struct rxrpc_call *call, ktime_t now);
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index bda6e7d77013..9b02e36264aa 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -888,7 +888,7 @@ static void rxrpc_input_soft_ack_tq(struct rxrpc_call *call,
 				    rxrpc_seq_t *lowest_nak)
 {
 	unsigned long old_reported = 0, flipped, new_acks = 0;
-	unsigned long a_to_n, n_to_a = 0;
+	unsigned long a_to_n = 0, n_to_a = 0;
 	int new, a, n;
 
 	if (tq->nr_reported_acks > 0)
@@ -951,8 +951,8 @@ static void rxrpc_input_soft_ack_tq(struct rxrpc_call *call,
 		rxrpc_input_soft_rtt(call, summary, tq);
 
 	new_acks |= n_to_a;
-	if (new_acks)
-		rxrpc_input_rack(call, summary, tq, new_acks);
+	if (new_acks || a_to_n)
+		rxrpc_input_rack(call, summary, tq, new_acks, a_to_n);
 
 	if (call->tlp_serial &&
 	    rxrpc_seq_in_txq(tq, call->tlp_seq) &&
diff --git a/net/rxrpc/input_rack.c b/net/rxrpc/input_rack.c
index 87084cea88b1..c4276534f539 100644
--- a/net/rxrpc/input_rack.c
+++ b/net/rxrpc/input_rack.c
@@ -130,8 +130,17 @@ void rxrpc_input_rack_one(struct rxrpc_call *call,
 void rxrpc_input_rack(struct rxrpc_call *call,
 		      struct rxrpc_ack_summary *summary,
 		      struct rxrpc_txqueue *tq,
-		      unsigned long new_acks)
+		      unsigned long new_acks,
+		      unsigned long reneged_acks)
 {
+	/* Packets that got un-ACK'd get marked lost. */
+	while (reneged_acks) {
+		unsigned int ix = __ffs(reneged_acks);
+
+		__clear_bit(ix, &reneged_acks);
+		rxrpc_rack_mark_lost(call, tq, ix);
+	}
+
 	while (new_acks) {
 		unsigned int ix = __ffs(new_acks);
 


  parent reply	other threads:[~2026-11-24 16:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 16:12 [PATCH net v3 00/10] rxrpc: RACK-TLP fixes David Howells
2026-11-24 16:12 ` [PATCH net v3 01/10] rxrpc: Fix incorrect unit conversion David Howells
2026-11-24 16:12 ` [PATCH net v3 02/10] rxrpc: Fix time unit conversion truncation David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:12 ` [PATCH net v3 03/10] rxrpc: Fix carrying of in-flight calc over retransmission David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:12 ` David Howells [this message]
2026-11-27 10:13   ` [PATCH net v3 04/10] rxrpc: Fix ack parsing to mark reneged ACKs as lost for RACK-TLP netdev-bot+sashiko
2026-11-24 16:12 ` [PATCH net v3 05/10] rxrpc: Fix RTT processing for a presumed lost packet getting ACK'd David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:12 ` [PATCH net v3 06/10] rxrpc: Fix lost driving of congestion management retransmission timeout David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:12 ` [PATCH net v3 07/10] rxrpc: Fix limit on packets to be transmitted in one go David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:12 ` [PATCH net v3 08/10] rxrpc: Fix detection of TLP probe response David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:12 ` [PATCH net v3 09/10] rxrpc: Fix counting of in-flight transmitted packets David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:12 ` [PATCH net v3 10/10] rxrpc: Fix RACK-TLP implementation David Howells
2026-11-27 10:13   ` netdev-bot+sashiko
2026-11-24 16:18 ` [PATCH net v3 00/10] rxrpc: RACK-TLP fixes netdev-bot+sinfo
2026-12-02  3:56 ` willemb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261124161302.4044422-5-dhowells@redhat.com \
    --to=dhowells@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jaltman@auristor.com \
    --cc=kuba@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.