From: Simon Baatz <gmbnomis@gmail.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Simon Baatz via B4 Relay <devnull+gmbnomis.gmail.com@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
David Ahern <dsahern@kernel.org>, Jon Maloy <jmaloy@redhat.com>,
Jason Xing <kerneljasonxing@gmail.com>,
mfreemon@cloudflare.com, Shuah Khan <shuah@kernel.org>,
Christian Ebner <c.ebner@proxmox.com>,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH RFC net-next 1/4] tcp: implement RFC 7323 window retraction receiver requirements
Date: Thu, 26 Feb 2026 02:10:25 +0100 [thread overview]
Message-ID: <aZ-dgdUFe0a7F6YE@gandalf.schnuecks.de> (raw)
In-Reply-To: <20260225223325.34468327@elisabeth>
On Wed, Feb 25, 2026 at 10:33:34PM +0100, Stefano Brivio wrote:
> On Tue, 24 Feb 2026 19:07:45 +0100
> Simon Baatz <gmbnomis@gmail.com> wrote:
>
> > Hi Stefano,
> >
> > On Mon, Feb 23, 2026 at 11:26:40PM +0100, Stefano Brivio wrote:
> > > Hi Simon,
> > >
> > > It all makes sense to me at a quick look, I have just some nits and one
> > > more substantial worry, below:
> > >
> > > On Fri, 20 Feb 2026 00:55:14 +0100
> > > Simon Baatz via B4 Relay <devnull+gmbnomis.gmail.com@kernel.org> wrote:
> > >
> > > > From: Simon Baatz <gmbnomis@gmail.com>
> > > >
> > > > By default, the Linux TCP implementation does not shrink the
> > > > advertised window (RFC 7323 calls this "window retraction") with the
> > > > following exceptions:
> > > >
> > > > - When an incoming segment cannot be added due to the receive buffer
> > > > running out of memory. Since commit 8c670bdfa58e ("tcp: correct
> > > > handling of extreme memory squeeze") a zero window will be
> > > > advertised in this case. It turns out that reaching the required
> > > > "memory pressure" is very easy when window scaling is in use. In the
> > > > simplest case, sending a sufficient number of segments smaller than
> > > > the scale factor to a receiver that does not read data is enough.
> > > >
> > > > Since commit 1d2fbaad7cd8 ("tcp: stronger sk_rcvbuf checks") this
> > > > happens much earlier than before, leading to regressions (the test
> > > > suite of the Valkey project does not pass because of a TCP
> > > > connection that is no longer bi-directional).
> > >
> > > Ouch. By the way, that same commit helped us unveil an issue (at least
> > > in the sense of RFC 9293, 3.8.6) we fixed in passt:
> > >
> > > https://passt.top/passt/commit/?id=8d2f8c4d0fb58d6b2011e614bc7d7ff9dab406b3
> >
> > This looks concerning: It seems as if just filling the advertised
> > window triggered the out of memory condition(?).
>
> Right, even if it's not so much a general "out of memory" condition:
> it's just that the socket might simply refuse to queue more data at
> that point (we run out of window space, rather than memory).
>
> Together with commit e2142825c120 ("net: tcp: send zero-window ACK when
> no memory"), we will even get zero-window updates in that case. Jon
> raised the issue here:
>
> https://lore.kernel.org/r/20240406182107.261472-3-jmaloy@redhat.com/
>
> but it was not really fixed. Anyway:
Didn't that result in 8c670bdfa58e ("tcp: correct handling of extreme
memory squeeze")?
> [...]
--
Simon Baatz <gmbnomis@gmail.com>
next prev parent reply other threads:[~2026-02-26 1:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 23:55 [PATCH RFC net-next 0/4] tcp: RFC 7323-compliant window retraction handling Simon Baatz via B4 Relay
2026-02-19 23:55 ` [PATCH RFC net-next 1/4] tcp: implement RFC 7323 window retraction receiver requirements Simon Baatz via B4 Relay
2026-02-23 22:26 ` Stefano Brivio
2026-02-24 18:07 ` Simon Baatz
2026-02-25 21:33 ` Stefano Brivio
2026-02-26 1:10 ` Simon Baatz [this message]
2026-02-26 4:49 ` Stefano Brivio
2026-02-19 23:55 ` [PATCH RFC net-next 2/4] selftests/net: packetdrill: add tcp_rcv_wnd_shrink_nomem.pkt Simon Baatz via B4 Relay
2026-02-19 23:55 ` [PATCH RFC net-next 3/4] selftests/net: packetdrill: add tcp_rcv_wnd_shrink_allowed.pkt Simon Baatz via B4 Relay
2026-02-19 23:55 ` [PATCH RFC net-next 4/4] selftests/net: packetdrill: add tcp_rcv_toobig_back_to_back.pkt Simon Baatz via B4 Relay
2026-02-20 8:58 ` [PATCH RFC net-next 0/4] tcp: RFC 7323-compliant window retraction handling Eric Dumazet
2026-02-23 0:07 ` Simon Baatz
2026-02-24 9:22 ` 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=aZ-dgdUFe0a7F6YE@gandalf.schnuecks.de \
--to=gmbnomis@gmail.com \
--cc=c.ebner@proxmox.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devnull+gmbnomis.gmail.com@kernel.org \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jmaloy@redhat.com \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mfreemon@cloudflare.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbrivio@redhat.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.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