FROMGIT: tcp: Update window clamping condition
This patch is based on the discussions between Neal Cardwell and Eric Dumazet in the link https://lore.kernel.org/netdev/20240726204105.1466841-1-quic_subashab@quicinc.com/ It was correctly pointed out that tp->window_clamp would not be updated in cases where net.ipv4.tcp_moderate_rcvbuf=0 or if (copied <= tp->rcvq_space.space). While it is expected for most setups to leave the sysctl enabled, the latter condition may not end up hitting depending on the TCP receive queue size and the pattern of arriving data. The updated check should be hit only on initial MSS update from TCP_MIN_MSS to measured MSS value and subsequently if there was an update to a larger value. Bug: 359923259 Fixes: 05f76b2d ("tcp: Adjust clamping window for applications specifying SO_RCVBUF") Change-Id: Id61e93bdfc7bc3a60898551b63c4a751e899871e Signed-off-by:Sean Tranchetti <quic_stranche@quicinc.com> Acked-by:
Neal Cardwell <ncardwell@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net> (cherry picked from commit a2cbb160 https: //git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main) Signed-off-by:
Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
Loading
Please sign in to comment