All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Chris Mason <mason@kernel.org>, edumazet@kernel.org
Cc: ncardwell@google.com, kuniyu@google.com, davem@davemloft.net,
	kuba@kernel.org, horms@kernel.org, willemb@google.com,
	josef@toxicpanda.com, netdev@vger.kernel.org,
	netdev-bot+sashiko@kernel.org
Subject: Re: [PATCH net v2 4/5] tcp: clamp the samples in tcp_rcv_rtt_update()
Date: Thu, 19 Nov 2026 13:19:40 +0100	[thread overview]
Message-ID: <bfbb9944-a2e2-4a8d-b6d4-a99cf444e683@redhat.com> (raw)
In-Reply-To: <37e80ec6-d2f6-4683-9d6f-4e9c959564c5@slotsi13m47>

On 11/18/26 19:48, Chris Mason wrote:
> On Wed, 18 Nov 2026 18:23:03 +0000, netdev-bot+sashiko@kernel.org wrote:
>> [Severity: High]
>> Can a long window-fill time still wrap before it gets to this clamp?
> 
> tcp_stamp_us_delta() narrows the delta to u32 first, so from 4295 s
> on the clamp sees what is left of it. Your 4300 s example is right.
> 
> It takes a flow that needs more than 71 minutes to fill one receive
> window, so I don't think it's as bad as High, but the changelog says the
> patch covers both callers and for this one that isn't true yet.
> 
>> Would it be better to clamp the 64-bit delta in tcp_rcv_rtt_measure()
>> before it is narrowed to u32?
> 
> Yes, so I can spin a v3 with this change, or make a follow up, I'll defer to
> netdev maintainers:
> 
> -	delta_us = tcp_stamp_us_delta(tp->tcp_mstamp, tp->rcv_rtt_est.time);
> +	/* Clamp the delta before it is narrowed to u32. */
> +	delta_us = min_t(u64, tp->tcp_mstamp - tp->rcv_rtt_est.time,
> +			 TCP_RTT_MAX_US);
I think a follow-up is the preferred option  here.

/P


  reply	other threads:[~2026-11-19 12:19 UTC|newest]

Thread overview: 15+ 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
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 18:48     ` Chris Mason
2026-11-19 12:19       ` Paolo Abeni [this message]
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
2026-11-19 14:00 ` [PATCH net v2 0/5] tcp: avoid integer wraps in the RTT estimator and the RTO patchwork-bot+netdevbpf

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=bfbb9944-a2e2-4a8d-b6d4-a99cf444e683@redhat.com \
    --to=pabeni@redhat.com \
    --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-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --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 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.