Re: [PATCH net] tcp: update window_clamp when SO_RCVBUF is set

Eric Dumazet
2026-04-08T18:14:02Z

On Wed, Apr 8, 2026 at 11:11 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 7 Apr 2026 17:14:38 -0700 Jakub Kicinski wrote:
> > Commit under Fixes moved recomputing the window clamp to
> > tcp_measure_rcv_mss() (when scaling_ratio changes).
> > I suspect it missed the fact that we don't recompute the clamp
> > when rcvbuf is set. Until scaling_ratio changes we are
> > stuck with the old window clamp which may be based on
> > the small initial buffer. scaling_ratio may never change.
> >
> > Inspired by Eric's recent commit d1361840f8c5 ("tcp: fix
> > SO_RCVLOWAT and RCVBUF autotuning") plumb the user action
> > thru to TCP and have it update the clamp.
> >
> > A smaller fix would be to just have tcp_rcvbuf_grow()
> > adjust the clamp even if SOCK_RCVBUF_LOCK is set.
> > But IIUC this is what we were trying to get away from
> > in the first place.
>
> Hi Eric, any thoughts?
> I always assume you are displeased if you don't reply within 8 hours :)
>

Not at all, I simply missed this patch. Too many emails to triage.

I will take a look asap.

> I should say that everyone has obviously discouraged the team that run
> into this from using SO_RCVBUF. I'm fascinated by how they decided that
> it helps since it clearly doesn't work. AI sure makes it easy for
> people to "try things". Sigh.