tcp: bpf: Add TCP_BPF_RTO_MIN for bpf_setsockopt
authorMartin KaFai Lau <kafai@fb.com>
Thu, 20 Aug 2020 19:00:27 +0000 (12:00 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 24 Aug 2020 21:35:00 +0000 (14:35 -0700)
commitca584ba070864c606f3a54faaafe774726d5b4a1
treeb3288fe9d41eb22da482f526b897e561afab3bdc
parent2b8ee4f05d4f6a6c427ad30dd6c1bb49eb2efd3b
tcp: bpf: Add TCP_BPF_RTO_MIN for bpf_setsockopt

This patch adds bpf_setsockopt(TCP_BPF_RTO_MIN) to allow bpf prog
to set the min rto of a connection.  It could be used together
with the earlier patch which has added bpf_setsockopt(TCP_BPF_DELACK_MAX).

A later selftest patch will communicate the max delay ack in a
bpf tcp header option and then the receiving side can use
bpf_setsockopt(TCP_BPF_RTO_MIN) to set a shorter rto.

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/20200820190027.2884170-1-kafai@fb.com
include/net/inet_connection_sock.h
include/net/tcp.h
include/uapi/linux/bpf.h
net/core/filter.c
net/ipv4/tcp.c
tools/include/uapi/linux/bpf.h