From: netdev-bot+sashiko@kernel.org
To: mason@kernel.org
Cc: edumazet@kernel.org, ncardwell@google.com, kuniyu@google.com,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, willemb@google.com, josef@toxicpanda.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net v2 1/5] tcp: don't let __tcp_set_rto() return 0
Date: Wed, 18 Nov 2026 18:23:01 +0000 [thread overview]
Message-ID: <179502618115.3136.7194709885956735724@kernel.org> (raw)
In-Reply-To: <20261118155144.18393-2-mason@kernel.org>
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 of "tcp: don't let __tcp_set_rto() return 0"
gets the thin-stream caller wrong.
--
tcp: don't let __tcp_set_rto() return 0
This commit makes __tcp_set_rto() return at least 1 jiffy. Without that
floor, a route with a locked RTAX_RTO_MIN of 0 and an RTT sum under one
jiffy leaves icsk_rto at 0, and the exponential backoff in
tcp_retransmit_timer() can never get it above 0. Because the floor is in
__tcp_set_rto(), both tcp_set_rto() and tcp_ld_RTO_revert() get it.
> Do it in __tcp_set_rto() and not in tcp_set_rto(), since
> tcp_ld_RTO_revert() uses the same sum. The third caller, the linear
> timeouts of thin streams in tcp_retransmit_timer(), already clamps the
> result to tcp_rto_min().
[Severity: Low]
Does this describe the thin stream caller correctly for the configuration
this patch targets?
The trigger here is tcp_rto_min() returning 0 for a route with a locked
RTAX_RTO_MIN of 0. At this commit, tcp_rto_min() passes the route metric
through with no lower bound:
include/net/tcp.h:tcp_rto_min() {
...
if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN);
return rto_min;
}
Before this patch, the thin stream branch in tcp_retransmit_timer() was:
net/ipv4/tcp_timer.c:tcp_retransmit_timer() {
...
icsk->icsk_rto = clamp(__tcp_set_rto(tp),
tcp_rto_min(sk),
tcp_rto_max(sk));
...
}
This gives clamp(0, 0, rto_max) == 0 whenever (srtt_us >> 3) + rttvar_us
is below one jiffy. icsk_rto then stays at 0 for up to
TCP_THIN_LINEAR_RETRIES retransmissions. After that, the exponential
branch (icsk_rto << 1) keeps it at 0.
The code change fixes this path as well, because the floor is in
__tcp_set_rto(). Only the rationale looks wrong.
Could the commit message say that the thin stream path is also affected
and fixed by this change, instead of saying it is already protected?
The later commit "tcp: bound the rto_min of a route in tcp_rto_min()"
clamps tcp_rto_min() to at least 1. That makes the statement true once
the whole series is applied. However, this patch has its own Fixes: tag
and may be backported on its own.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118155144.18393-1-mason%40kernel.org
next prev parent reply other threads:[~2026-11-18 18:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 15:51 [PATCH net v2 0/5] tcp: avoid integer wraps in the RTT estimator and the RTO Chris Mason
2026-11-18 15:51 ` [PATCH net v2 1/5] tcp: don't let __tcp_set_rto() return 0 Chris Mason
2026-11-18 18:23 ` netdev-bot+sashiko [this message]
2026-11-18 15:51 ` [PATCH net v2 2/5] tcp: clamp RTT samples in tcp_rtt_estimator() Chris Mason
2026-11-18 15:51 ` [PATCH net v2 3/5] tcp: reject RTT samples from TSecr above 120 s Chris Mason
2026-11-18 16:35 ` Eric Dumazet
2026-11-18 18:23 ` netdev-bot+sashiko
2026-11-18 15:51 ` [PATCH net v2 4/5] tcp: clamp the samples in tcp_rcv_rtt_update() Chris Mason
2026-11-18 16:34 ` Eric Dumazet
2026-11-18 18:23 ` netdev-bot+sashiko
2026-11-18 15:51 ` [PATCH net v2 5/5] tcp: bound the rto_min of a route in tcp_rto_min() Chris Mason
2026-11-18 16:33 ` Eric Dumazet
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=179502618115.3136.7194709885956735724@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=josef@toxicpanda.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=mason@kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
/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