mirror-linux/net
Eric Dumazet 21b29e74ff 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: d1361840f8 ("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>
2025-10-06 13:08:48 -07:00
..
6lowpan net: replace ND_PRINTK with dynamic debug 2025-07-10 15:27:32 -07:00
9p
802
8021q net: s/dev_close_many/netif_close_many/ 2025-07-18 17:27:47 -07:00
appletalk Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-24 11:10:46 -07:00
atm net: atm: fix memory leak in atm_register_sysfs when device_register fail 2025-09-04 09:53:44 +02:00
ax25 ax25: properly unshare skbs in ax25_kiss_rcv() 2025-09-03 17:06:30 -07:00
batman-adv batman-adv: remove includes for extern declarations 2025-09-05 15:11:02 +02:00
bluetooth Bluetooth: Avoid a couple dozen -Wflex-array-member-not-at-end warnings 2025-09-27 11:37:43 -04:00
bpf Merge branch 'bpf-next/xdp_pull_data' into 'bpf-next/master' 2025-09-23 16:23:58 -07:00
bridge net: bridge: Install FDB for bridge MAC on VLAN 0 2025-09-23 17:10:49 -07:00
caif caif: Replace memset(0) + strscpy() with strscpy_pad() 2025-08-12 14:08:56 -07:00
can can: annotate mtu accesses with READ_ONCE() 2025-09-23 10:04:58 +02:00
ceph net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00
core page_pool: Fix PP_MAGIC_MASK to avoid crashing on some 32-bit arches 2025-10-06 12:14:04 -07:00
dcb Revert "Documentation: net: add flow control guide and document ethtool API" 2025-10-01 09:48:21 +02:00
devlink net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
dns_resolver
dsa net: s/dev_close_many/netif_close_many/ 2025-07-18 17:27:47 -07:00
ethernet ethernet: Extend device_get_mac_address() to use NVMEM 2025-09-15 18:34:08 -07:00
ethtool Revert "Documentation: net: add flow control guide and document ethtool API" 2025-10-01 09:48:21 +02:00
handshake net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING' 2025-07-08 15:31:44 +02:00
hsr Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-09-11 17:40:13 -07:00
ieee802154
ife
ipv4 tcp: take care of zero tp->window_clamp in tcp_set_rcvlowat() 2025-10-06 13:08:48 -07:00
ipv6 net: psp: don't assume reply skbs will have a socket 2025-10-03 10:23:50 -07:00
iucv net: add sk_drops_read(), sk_drops_inc() and sk_drops_reset() helpers 2025-08-28 13:14:50 +02:00
kcm net: kcm: Fix race condition in kcm_unattach() 2025-08-13 18:18:33 -07:00
key Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-24 11:10:46 -07:00
l2tp l2tp: do not use sock_hold() in pppol2tp_session_get_sock() 2025-08-27 17:16:13 -07:00
l3mdev
lapb
llc net: make sk->sk_rcvtimeo lockless 2025-06-23 17:05:12 -07:00
mac80211 wifi: mac80211: fix Rx packet handling when pubsta information is not available 2025-09-19 11:59:34 +02:00
mac802154
mctp net: mctp: fix typo in comment 2025-09-08 17:47:57 -07:00
mpls net: s/dev_get_flags/netif_get_flags/ 2025-07-18 17:27:47 -07:00
mptcp mptcp: minor move_skbs_to_msk() cleanup 2025-09-29 18:23:36 -07:00
ncsi
netfilter netfilter: nf_conntrack: do not skip entries in /proc/net/nf_conntrack 2025-09-24 11:50:28 +02:00
netlabel audit: add record for multiple task security contexts 2025-08-30 10:15:30 -04:00
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-09-11 17:40:13 -07:00
netrom
nfc net: nfc: nci: Add parameter validation for packet data 2025-09-30 10:27:14 +02:00
nsh
openvswitch net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
packet net: af_packet: Use hrtimer to do the retire operation 2025-09-11 18:40:06 -07:00
phonet net: add sk_drops_read(), sk_drops_inc() and sk_drops_reset() helpers 2025-08-28 13:14:50 +02:00
psample
psp net: psp: don't assume reply skbs will have a socket 2025-10-03 10:23:50 -07:00
qrtr
rds net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00
rfkill net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
rose net: rose: fix a typo in rose_clear_routes() 2025-08-27 17:27:52 -07:00
rxrpc net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00
sched net_sched: act: remove tcfa_qstats 2025-09-02 15:52:24 -07:00
sctp net/sctp: fix a null dereference in sctp_disposition sctp_sf_do_5_1D_ce() 2025-10-06 11:07:20 -07:00
shaper
smc dibs: Move event handling to dibs layer 2025-09-23 11:13:22 +02:00
strparser net: make sk->sk_rcvtimeo lockless 2025-06-23 17:05:12 -07:00
sunrpc SUNRPC: call xs_sock_process_cmsg for all cmsg 2025-09-06 16:51:26 -04:00
switchdev
tipc net: doc: Fix typos in docs 2025-10-03 10:24:14 -07:00
tls tls: Avoid -Wflex-array-member-not-at-end warning 2025-09-24 16:23:02 -07:00
unix Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
vmw_vsock net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00
wireless wifi: cfg80211: fix width unit in cfg80211_radio_chandef_valid() 2025-09-23 09:50:02 +02:00
x25 net/x25: Remove unused x25_terminate_link() 2025-07-14 17:19:13 -07:00
xdp xsk: wrap generic metadata handling onto separate function 2025-09-26 13:51:45 -07:00
xfrm ipsec-next-2025-09-26 2025-09-26 14:44:50 -07:00
Kconfig dibs: Create drivers/dibs 2025-09-23 11:13:21 +02:00
Kconfig.debug
Makefile psp: base PSP device support 2025-09-18 12:32:06 +02:00
compat.c
devres.c
socket.c Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
sysctl_net.c