From: Simon Baatz <gmbnomis@gmail.com>
To: Wesley Atwell <atwellwea@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
David Ahern <dsahern@kernel.org>, Simon Horman <horms@kernel.org>,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/3] selftests: packetdrill: cover scaled rwnd quantization slack
Date: Wed, 25 Mar 2026 08:53:32 +0100 [thread overview]
Message-ID: <acOUfG2NwQOzq9zR@gandalf.schnuecks.de> (raw)
In-Reply-To: <20260324205301.1361608-4-atwellwea@gmail.com>
Hi Wesley,
On Tue, Mar 24, 2026 at 02:53:01PM -0600, Wesley Atwell wrote:
> Add a packetdrill reproducer for the free_space-limited scaled
> no-shrink quantization case.
>
> Grow rcv_ssthresh with in-order data, then queue tiny OOO skbs so
> receive memory drives raw free_space just below rcv_ssthresh without
> advancing rcv_nxt. The final ACK reaches the case where raw free_space
> sits just above 84 scaled units while rcv_ssthresh stays slightly
> larger.
While this may be the intended behavior, this test case does not
actually demonstrate this:
After the second in-order packet rcv_nxt == rcv_wup == 11024 and
rcv_wnd is 84*1024 (with your patch). Even if __tcp_select_window()
returns smaller values as more and more OOO packets get queued, the
externally visible advertised window can't go below 84, as the
advertised window can't shrink (as you point out in your cover
letter).
> Old code rounds that final free_space value up and advertises 85. With
> the fix, the ACK stays at 84.
The old code is consistent as well, it simply uses 85 throughout:
...
+0 < P. 19024:19025(1) ack 1 win 257
* > . 1:1(0) ack 11024 win 85
// The last tiny OOO skb pushes raw free_space just below rcv_ssthresh
// without crossing the next lower scaled unit.
+0 < P. 20024:20025(1) ack 1 win 257
* > . 1:1(0) ack 11024 win 85
So, like the v1 version, this test demonstrates that the offered
window differs when constrained by rcv_ssthresh (old: 83, 85, 85,
... ; new: 82, 84, 84, ...). But as this window cannot
shrink, OOO packets will not cause the peer-visible window to change
in this scenario (for either the old or the new code).
- Simon
--
Simon Baatz <gmbnomis@gmail.com>
next prev parent reply other threads:[~2026-03-25 7:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 20:52 [PATCH net-next v3 0/3] tcp: fix scaled no-shrink " Wesley Atwell
2026-03-24 20:52 ` [PATCH net-next v3 1/3] selftests: packetdrill: stop pinning rwnd in tcp_ooo_rcv_mss Wesley Atwell
2026-03-24 20:53 ` [PATCH net-next v3 2/3] tcp: keep scaled no-shrink window representable Wesley Atwell
2026-03-24 20:53 ` [PATCH net-next v3 3/3] selftests: packetdrill: cover scaled rwnd quantization slack Wesley Atwell
2026-03-25 7:53 ` Simon Baatz [this message]
2026-03-25 7:58 ` [PATCH net-next v3 0/3] tcp: fix scaled no-shrink " Simon Baatz
2026-03-25 15:14 ` Eric Dumazet
2026-03-25 17:17 ` Wesley Atwell
2026-03-25 17:28 ` 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=acOUfG2NwQOzq9zR@gandalf.schnuecks.de \
--to=gmbnomis@gmail.com \
--cc=atwellwea@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.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
all inboxes | Powered by JetHome®