tcp: fix SO_RCVLOWAT and RCVBUF autotuning
Applications might use SO_RCVLOWAT on TCP socket hoping to receive one [E]POLLIN event only when a given amount of bytes are ready in socket receive queue. Problem is that receive autotuning is not aware of this constraint, meaning sk_rcvbuf might be too small to allow all bytes to be stored. Add a new (struct proto_ops)->set_rcvlowat method so that a protocol can override the default setsockopt(SO_RCVLOWAT) behavior. Signed-off-by:Eric Dumazet <edumazet@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/linux/net.h 1 addition, 0 deletionsinclude/linux/net.h
- include/net/tcp.h 1 addition, 0 deletionsinclude/net/tcp.h
- net/core/sock.c 4 additions, 1 deletionnet/core/sock.c
- net/ipv4/af_inet.c 1 addition, 0 deletionsnet/ipv4/af_inet.c
- net/ipv4/tcp.c 21 additions, 0 deletionsnet/ipv4/tcp.c
- net/ipv6/af_inet6.c 1 addition, 0 deletionsnet/ipv6/af_inet6.c
Loading
Please register or sign in to comment