From: netdev-bot+sashiko@kernel.org
To: dhowells@redhat.com
Cc: netdev@vger.kernel.org, marc.dionne@auristor.com,
kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, horms@kernel.org,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
jaltman@auristor.com, stable@vger.kernel.org
Subject: Re: [PATCH net v3 04/10] rxrpc: Fix ack parsing to mark reneged ACKs as lost for RACK-TLP
Date: Fri, 27 Nov 2026 10:13:32 +0000 [thread overview]
Message-ID: <179577441282.3135.1227787769894655291@kernel.org> (raw)
In-Reply-To: <20261124161302.4044422-5-dhowells@redhat.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 1 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [High] The fix only finds reneged ACKs in txqueues that
rxrpc_input_soft_ack_tq() is actually called on.
- [Medium] Every ACK->NAK flip in the previously reported range now
counts as definite loss and is retransmitted at once, with no…
- [Low] The commit message overstates the bug.
--
rxrpc: Fix ack parsing to mark reneged ACKs as lost for RACK-TLP
This patch passes the ACK->NAK flip mask (a_to_n) from
rxrpc_input_soft_ack_tq() into rxrpc_input_rack(). rxrpc_input_rack() now
calls rxrpc_rack_mark_lost() on each reneged packet before it processes
the new ACKs. The aim is for RACK-TLP to pick up packets that the peer
discarded after soft-ACKing them.
Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020201258.290827-1-dhowells%40redhat.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.
[Severity: Low]
Is this description accurate?
Before this patch, rxrpc_input_soft_ack_tq() already stored the new bitmap
in tq->segment_acked before RACK ran. After that, rxrpc_input_ack() calls
rxrpc_rack_detect_loss_and_arm_timer().
rxrpc_rack_detect_loss() takes its candidates from rxrpc_tq_nacks(), which
is ~segment_acked masked to nr_reported_acks. A reneged packet inside the
reported range is therefore included:
unsigned long nacks = rxrpc_tq_nacks(tq);
...
nacks &= ~tq->segment_lost | tq->segment_retransmitted;
rxrpc_rack_update() cleared segment_lost when the packet was first
soft-ACK'd, and segment_xmit_ts still holds the real send time. So
rxrpc_rack_sent_after() returns true for every reneged packet except two
kinds:
- the RACK.segment itself
- retransmitted packets whose RACK update was skipped
All the others were marked lost once xmit_ts + rack_rtt + reo_wnd had
passed, or the reorder timer was armed for them.
The real gap looks narrower than the message says. The patch also changes
the policy: reneged packets are now marked lost immediately and
unconditionally, with no reordering window.
Since this is Cc'd to stable, could the commit message say what was
actually being missed, and why skipping the reorder window is intended?
> diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
> index bda6e7d77013e..9b02e36264aa4 100644
> --- a/net/rxrpc/input.c
> +++ b/net/rxrpc/input.c
[ ... ]
> @@ -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);
[Severity: High]
Can reneged packets in a txqueue past the end of a shorter SACK table still
be missed?
rxrpc_input_soft_acks() only calls rxrpc_input_soft_ack_tq() for txqueues
that the current nr_acks covers. It calls it once at each full 64-slot
boundary, and once for the tail only when nr != 0:
if (nr) {
unsigned int nr_reported = seq & RXRPC_TXQ_MASK;
extracted >>= RXRPC_NR_TXQUEUE - nr_reported;
...
rxrpc_input_soft_ack_tq(call, summary, tq, extracted, nr_reported,
Consider this sequence:
- an earlier ACK soft-ACKs packets in txqueue N+1
- the peer discards them
- the peer sends an ACK with the same firstPacket whose table ends
inside txqueue N, or exactly on its boundary
In that case txqueue N+1 is never visited. At runtime, only
rxrpc_input_soft_ack_tq() writes tq->segment_acked and
tq->nr_reported_acks. So the stale ACK bits stay set, a_to_n is never
computed for that txqueue, and the new path in rxrpc_input_rack() never
runs for it.
The existing fallbacks work from the same stale bits, so they skip these
packets too:
rxrpc_tq_nacks():
unsigned long nacks = ~tq->segment_acked;
rxrpc_rack_mark_losses_on_rto():
unsigned long unacked = ~tq->segment_acked;
As far as I can tell, nothing marks these packets lost until a later ACK's
table reaches that txqueue again, for example after a TLP probe.
This also differs from the case where the table shrinks inside a single
txqueue. There, the tail shift zeroes the dropped slots and they get
marked lost immediately.
The comment in rxrpc_input_soft_acks() says the peer is permitted to drop
soft-acked packets and that the nack count can go down, so this case is
expected.
With the in_flight tracking at the end of this series, these packets are
also removed from tx_in_flight when first soft-ACK'd. If nothing else is in
flight, the tx_in_flight > 0 RTO rearm in rxrpc_input_call_event() won't
fire, so no timer may be left to drive recovery.
>
> 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 87084cea88b1a..c4276534f5398 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);
[Severity: Medium]
Could this mark packets lost that the peer never actually reneged on?
rxrpc_input_soft_ack_tq() computes a_to_n from any flip within
old_reported:
flipped = (tq->segment_acked ^ extracted_acks) & old_reported;
if (flipped) {
n_to_a = ~tq->segment_acked & flipped; /* Old NAK -> ACK */
a_to_n = tq->segment_acked & flipped; /* Old ACK -> NAK */
Two cases seem to produce flips that are not reneging.
First, rxrpc_is_ack_valid() accepts an ACK whose firstPacket is unchanged
and whose previousPacket has regressed, as long as it stays within
base + tx_winsize:
if (after(prev_pkt, base + call->tx_winsize))
return false;
return true;
So a stale ACK that was reordered in the network is fully processed.
Packets that a newer ACK had soft-ACK'd then show up in a_to_n.
Second, for the tail txqueue, rxrpc_input_soft_acks() does:
extracted >>= RXRPC_NR_TXQUEUE - nr_reported;
This zeroes every bit at or above the new nr_reported, but old_reported
still covers the old, larger nr_reported_acks. When a later ACK has a
shorter SACK table, each slot that drops off the end counts as an a_to_n
flip.
Before this patch, in-range flips went through the RACK reorder window
(rack_rtt + reo_wnd). Slots beyond the new nr_reported were masked out by
rxrpc_tq_nacks() and left to the RTO.
Now rxrpc_rack_mark_lost() is called on all of them, which increments
tx_nr_lost and sets segment_xmit_ts to UINT_MAX. rxrpc_input_call_event()
then calls rxrpc_resend(), unless a newer ACK in the same batch reverses
the flip.
This conflicts with the comment above rxrpc_input_soft_acks(), which says
packets beyond the end of the ACK list are left to the timer because the
peer may not have processed them yet.
Is the extra retransmission on reordered or shortened ACKs intended?
> + }
> +
> while (new_acks) {
> unsigned int ix = __ffs(new_acks);
>
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124161302.4044422-1-dhowells%40redhat.com
next prev parent reply other threads:[~2026-11-27 10:13 UTC|newest]
Thread overview: 21+ 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 ` [PATCH net v3 04/10] rxrpc: Fix ack parsing to mark reneged ACKs as lost for RACK-TLP David Howells
2026-11-27 10:13 ` netdev-bot+sashiko [this message]
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
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=179577441282.3135.1227787769894655291@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox