mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
10b19aeac1
commit
d1361840f8
6 changed files with 29 additions and 1 deletions
|
@ -197,6 +197,7 @@ struct proto_ops {
|
|||
int offset, size_t size, int flags);
|
||||
int (*sendmsg_locked)(struct sock *sk, struct msghdr *msg,
|
||||
size_t size);
|
||||
int (*set_rcvlowat)(struct sock *sk, int val);
|
||||
};
|
||||
|
||||
#define DECLARE_SOCKADDR(type, dst, src) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue