From: Shashank Mohan Jain <jain.sm@gmail.com>
To: Eric Dumazet <edumazet@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Cc: Kuniyuki Iwashima <kuniyu@google.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] tcp: keep the route window metric when SO_RCVBUF is set before connect
Date: Mon, 12 Oct 2026 10:28:02 +0530 [thread overview]
Message-ID: <20261012045802.47339-1-jain.sm@gmail.com> (raw)
In-Reply-To: <CAL4Wiio1bAsM_Z2LEQz9r0-ehHoWpzTneWy49hd2FGeoVVEQhQ@mail.gmail.com>
On Sun, Oct 11, 2026, Eric Dumazet <edumazet@kernel.org> wrote:
> Note that we ask to not top post on netdev@ mailing list.
Understood, replying inline from here on.
> 1) "TCP_WINDOW_CLAMP 4096" only holds until the first data segment.
> ... What the patch really restores is the SYN/SYN-ACK window and the
> window scale. Please say so.
Agreed, presenting the clamp as persistent was wrong. v2 says the patch
restores the window and window scale advertised in the SYN / SYN-ACK,
and notes that since a2cbb1603943 ("tcp: Update window clamping
condition") tcp_measure_rcv_mss() recomputes window_clamp from sk_rcvbuf
once the scaling ratio changes, independent of this change.
> 2) "no window scaling" is not accurate: we still send the option,
> with a shift of 0.
Right; changed to "wscale 0 (the window scale option is still sent,
with a shift of 0)".
> 3) This also fixes TCP_WINDOW_CLAMP being overwritten by a later
> SO_RCVBUF on a not yet connected socket or a listener. ... worth
> mentioning.
Done - v2 leads with the SO_RCVBUF-before-connect / listener case as the
common one, with the route metric as a second effect.
> A packetdrill test covering the SYN window and wscale would be nice.
I'll add a packetdrill test for the SYN window and wscale, with and
without SO_RCVBUF set before connect, in v2.
> It seems to be a net-next candidate ...
Will repost as [PATCH net-next].
Reposted as v2:
https://lore.kernel.org/all/20261011111606.14753-1-jain.sm@gmail.com/
Thanks for the review.
Shashank
next prev parent reply other threads:[~2026-10-12 4:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 5:20 Shashank Mohan Jain
2026-10-11 5:24 ` netdev-bot+sinfo
2026-10-11 5:26 ` shashank Jain
2026-10-11 8:15 ` Eric Dumazet
2026-10-12 4:58 ` Shashank Mohan Jain [this message]
2026-10-12 5:33 ` netdev-bot+sashiko
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=20261012045802.47339-1-jain.sm@gmail.com \
--to=jain.sm@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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®