From: Ankit Jain <ankit-aj.jain@broadcom.com>
To: kuba@kernel.org
Cc: netdev@vger.kernel.org, edumazet@google.com,
ncardwell@google.com, kuniyu@google.com, davem@davemloft.net,
dsahern@kernel.org, pabeni@redhat.com, horms@kernel.org,
quic_stranche@quicinc.com, quic_subashab@quicinc.com,
linux-kernel@vger.kernel.org, karen.badiryan@broadcom.com,
ajay.kaher@broadcom.com, alexey.makhalov@broadcom.com,
vamsi-krishna.brahmajosyula@broadcom.com, yin.ding@broadcom.com,
tapas.kundu@broadcom.com
Subject: Re: [PATCH net] tcp: do not shrink window clamp when SO_RCVBUF is locked
Date: Tue, 28 Apr 2026 09:21:10 +0000 [thread overview]
Message-ID: <20260428092110.2280-1-ankit-aj.jain@broadcom.com> (raw)
In-Reply-To: <20260427131111.168ed0dc@kernel.org>
Hi Jakub,
Thank you for pointing this out.
I checked the logic again, I placed the SOCK_RCVBUF_LOCK check on
the outer if-statement. This successfully prevented
tcp_set_window_clamp() from crushing the window (fixing the
Java SWS bug), but it accidentally bypassed the tp->rcvq_space.space
bounds check as well. Because of this, the receive queue tracking got
out of sync when the test hit a negative window.
For v2, I will move the lock check inside the block so it only bypasses
tcp_set_window_clamp(), ensuring the rcvq_space.space limits still
execute as expected.
I will test the refined logic against my reproducer and the
tcp_rcv_neg_window.pkt script locally, and I will post the v2 series
in a new thread after the 24-hour cooldown.
Thanks,
Ankit
next prev parent reply other threads:[~2026-04-28 9:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 15:27 [PATCH net] tcp: do not shrink window clamp when SO_RCVBUF is locked Ankit Jain
2026-04-27 15:38 ` Eric Dumazet
2026-04-27 20:11 ` Jakub Kicinski
2026-04-28 9:21 ` Ankit Jain [this message]
2026-04-28 8:47 ` Ankit Jain
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=20260428092110.2280-1-ankit-aj.jain@broadcom.com \
--to=ankit-aj.jain@broadcom.com \
--cc=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=karen.badiryan@broadcom.com \
--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 \
--cc=quic_stranche@quicinc.com \
--cc=quic_subashab@quicinc.com \
--cc=tapas.kundu@broadcom.com \
--cc=vamsi-krishna.brahmajosyula@broadcom.com \
--cc=yin.ding@broadcom.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