mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 05/10] rxrpc: Fix RTT processing for a presumed lost packet getting ACK'd
Date: Fri, 27 Nov 2026 10:13:34 +0000	[thread overview]
Message-ID: <179577441465.3135.4498965455896872277@kernel.org> (raw)
In-Reply-To: <20261124161302.4044422-6-dhowells@redhat.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message for "rxrpc: Fix RTT processing for a presumed
  lost packet getting ACK'd" understates the impact of the bug.

--

rxrpc: Fix RTT processing for a presumed lost packet getting ACK'd

This patch makes rxrpc_rack_update() return early when the ACK'd segment
has had its segment_xmit_ts[] reset to UINT_MAX by rxrpc_rack_mark_lost().
Without this check, rxrpc_get_xmit_ts() returns KTIME_MAX and the RTT is
calculated from that value.

> With RACK-TLP, under some circumstances a packet that is presumed lost has
> its xmit timestamp reset when it is marked lost.  However, if an ACK then
> turns up anyway, rxrpc_rack_update() sees a bad RTT calculation because the
> xmit_ts is calculated as being KTIME_MAX.

[Severity: Low]
The code change looks correct. Could the commit message say more about
what the bad calculation leads to? A single bad RTT sample is only part of
the effect.

Before this fix, take a segment that was never retransmitted. Its xmit_ts
is KTIME_MAX, so rtt = acks_latest_ts - KTIME_MAX is a large negative
value. Both update branches at the end of rxrpc_rack_update() then fire:

net/rxrpc/input_rack.c:rxrpc_rack_update() {
    ...
	if (ktime_after(xmit_ts, call->rack_rtt_ts)) {
		call->rack_rtt	  = rtt;
		call->rack_rtt_ts = xmit_ts;
	}

	if (rxrpc_rack_sent_after(xmit_ts, seq, call->rack_xmit_ts, call->rack_end_seq)) {
		call->rack_rtt = rtt;
		call->rack_xmit_ts = xmit_ts;
    ...
}

This leaves call->rack_rtt_ts and call->rack_xmit_ts at KTIME_MAX and
call->rack_rtt negative. These fields are only written here and are never
reset. No real xmit_ts can be after KTIME_MAX, so the state stays this way
for the rest of the call.

After that, rxrpc_rack_detect_loss() computes lost_after from the negative
rack_rtt. Also, rxrpc_rack_sent_after(call->rack_xmit_ts, ...) is true for
every segment:

net/rxrpc/input_rack.c:rxrpc_rack_detect_loss() {
    ...
			if (rxrpc_rack_sent_after(call->rack_xmit_ts, call->rack_end_seq,
						  xmit_ts, seq)) {
				remaining = ktime_sub(ktime_add(xmit_ts, lost_after), now);
				if (remaining <= 0) {
					rxrpc_rack_mark_lost(call, tq, ix);
    ...
}

So remaining is always <= 0. On every later ACK, each segment that was
reported but not ACK'd is marked lost straight away, with no reordering
tolerance. This includes segments that were already retransmitted, and
the result is spurious retransmissions.

rxrpc_rack_mark_losses_on_rto() is affected too. With the corrupted
rack_rtt, deadline = now - lost_after can overflow, so loss marking on RTO
is also wrong.

Would it be worth describing this lasting loss-detection breakage in the
commit message?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124161302.4044422-1-dhowells%40redhat.com

  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
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 [this message]
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=179577441465.3135.4498965455896872277@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

all inboxes | Powered by JetHome®