diff options
author | Nikita V. Shirokov <tehnerd@tehnerd.com> | 2020-10-09 07:03:25 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-10-09 17:12:03 +0200 |
commit | eca43ee6c46db92dd850ce659316b0680d70e137 (patch) | |
tree | e5c85ee2588c031f26a63176495f45654168f3c5 /net | |
parent | c3f01fdcedf9459b2a27b22287414ab3a0d5d818 (diff) |
bpf: Add tcp_notsent_lowat bpf setsockopt
Adding support for TCP_NOTSENT_LOWAT sockoption (https://lwn.net/Articles/560082/)
in tcp bpf programs.
Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20201009070325.226855-1-tehnerd@tehnerd.com
Diffstat (limited to 'net')
-rw-r--r-- | net/core/filter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 05df73780dd3..5da44b11e1ec 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -4827,6 +4827,10 @@ static int _bpf_setsockopt(struct sock *sk, int level, int optname, else icsk->icsk_user_timeout = val; break; + case TCP_NOTSENT_LOWAT: + tp->notsent_lowat = val; + sk->sk_write_space(sk); + break; default: ret = -EINVAL; } |