]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: bpf: Add TCP_BPF_DELACK_MAX setsockopt
authorMartin KaFai Lau <kafai@fb.com>
Thu, 20 Aug 2020 19:00:21 +0000 (12:00 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 24 Aug 2020 21:34:59 +0000 (14:34 -0700)
commit729ca17d168a952ac68a66f4af09522bcbc2d5d9
treef09853ff821ef7331b9efdfce55e56d98f28e7ee
parent2b84faa555d0d6598dbc279a4d2869bf9b6153c5
tcp: bpf: Add TCP_BPF_DELACK_MAX setsockopt

This change is mostly from an internal patch and adapts it from sysctl
config to the bpf_setsockopt setup.

The bpf_prog can set the max delay ack by using
bpf_setsockopt(TCP_BPF_DELACK_MAX).  This max delay ack can be communicated
to its peer through bpf header option.  The receiving peer can then use
this max delay ack and set a potentially lower rto by using
bpf_setsockopt(TCP_BPF_RTO_MIN) which will be introduced
in the next patch.

Another later selftest patch will also use it like the above to show
how to write and parse bpf tcp header option.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200820190021.2884000-1-kafai@fb.com
include/net/inet_connection_sock.h
include/uapi/linux/bpf.h
net/core/filter.c
net/ipv4/tcp.c
net/ipv4/tcp_output.c
tools/include/uapi/linux/bpf.h