diff options
author | Prankur gupta <prankgup@fb.com> | 2020-12-03 00:31:51 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-12-04 04:23:24 +0300 |
commit | cb81110997d1f5097f29dd8e49d32a1fc55cbf86 (patch) | |
tree | 9e4266c79d35395cbccd79f7eb7cf4c27eaef2b9 /include | |
parent | 2faa7328f53b36b2b171501154bba3fd66d8f5da (diff) | |
download | linux-cb81110997d1f5097f29dd8e49d32a1fc55cbf86.tar.xz |
bpf: Adds support for setting window clamp
Adds a new bpf_setsockopt for TCP sockets, TCP_BPF_WINDOW_CLAMP,
which sets the maximum receiver window size. It will be useful for
limiting receiver window based on RTT.
Signed-off-by: Prankur gupta <prankgup@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201202213152.435886-2-prankgup@fb.com
Diffstat (limited to 'include')
-rw-r--r-- | include/net/tcp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 4aba0f069b05..347a76f176b4 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -406,6 +406,7 @@ void tcp_syn_ack_timeout(const struct request_sock *req); int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, int flags, int *addr_len); int tcp_set_rcvlowat(struct sock *sk, int val); +int tcp_set_window_clamp(struct sock *sk, int val); void tcp_data_ready(struct sock *sk); #ifdef CONFIG_MMU int tcp_mmap(struct file *file, struct socket *sock, |