[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAVpQUAcJZ76Q87zTSBuBTS733-h2jC0qNN5rh2F7hoaFaOMLA@mail.gmail.com>
Date: Sun, 5 Oct 2025 16:16:55 -0700
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Neal Cardwell <ncardwell@...gle.com>, Willem de Bruijn <willemb@...gle.com>, netdev@...r.kernel.org,
eric.dumazet@...il.com
Subject: Re: [PATCH net] tcp: take care of zero tp->window_clamp in tcp_set_rcvlowat()
On Fri, Oct 3, 2025 at 11:41 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> Some applications (like selftests/net/tcp_mmap.c) call SO_RCVLOWAT
> on their listener, before accept().
>
> This has an unfortunate effect on wscale selection in
> tcp_select_initial_window() during 3WHS.
>
> For instance, tcp_mmap was negotiating wscale 4, regardless
> of tcp_rmem[2] and sysctl_rmem_max.
>
> Do not change tp->window_clamp if it is zero
> or bigger than our computed value.
>
> Zero value is special, it allows tcp_select_initial_window()
> to enable autotuning.
>
> Note that SO_RCVLOWAT use on listener is probably not wise,
> because tp->scaling_ratio has a default value, possibly wrong.
>
> Fixes: d1361840f8c5 ("tcp: fix SO_RCVLOWAT and RCVBUF autotuning")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@...gle.com>
Thanks!
Powered by blists - more mailing lists