diff options
author | Eric Dumazet <edumazet@google.com> | 2025-10-03 18:41:19 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-10-06 13:08:48 -0700 |
commit | 21b29e74ffe5a6c851c235bb80bf5ee26292c67b (patch) | |
tree | acaf3c0e18ef261259cdc2f3893c5dc798ceab91 /tools/docs/parse-headers.py | |
parent | 95920c2ed02bde551ab654e9749c2ca7bc3100e0 (diff) |
tcp: take care of zero tp->window_clamp in tcp_set_rcvlowat()
Some applications (like selftests/net/tcp_mmap.c) call SO_RCVLOWAT
on their listener, before accept().
This has an unfortunate effect on wscale selection in
tcp_select_initial_window() during 3WHS.
For instance, tcp_mmap was negotiating wscale 4, regardless
of tcp_rmem[2] and sysctl_rmem_max.
Do not change tp->window_clamp if it is zero
or bigger than our computed value.
Zero value is special, it allows tcp_select_initial_window()
to enable autotuning.
Note that SO_RCVLOWAT use on listener is probably not wise,
because tp->scaling_ratio has a default value, possibly wrong.
Fixes: d1361840f8c5 ("tcp: fix SO_RCVLOWAT and RCVBUF autotuning")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Link: https://patch.msgid.link/20251003184119.2526655-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/docs/parse-headers.py')
0 files changed, 0 insertions, 0 deletions