bpf: tcp: Put some tcp cong functions in allowlist for bpf-tcp-cc
authorMartin KaFai Lau <kafai@fb.com>
Thu, 25 Mar 2021 01:52:01 +0000 (18:52 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 27 Mar 2021 03:41:51 +0000 (20:41 -0700)
commite78aea8b2170be1b88c96a4d138422986a737336
tree8ca1dcd976e7195a9031c1614963384cfd08e4e5
parentd22f6ad18709e93622b6115ec9a5e42ed96b5d82
bpf: tcp: Put some tcp cong functions in allowlist for bpf-tcp-cc

This patch puts some tcp cong helper functions, tcp_slow_start()
and tcp_cong_avoid_ai(), into the allowlist for the bpf-tcp-cc
program.

A few tcp cc implementation functions are also put into the
allowlist.  A potential use case is the bpf-tcp-cc implementation
may only want to override a subset of a tcp_congestion_ops.  For others,
the bpf-tcp-cc can directly call the kernel counter parts instead of
re-implementing (or copy-and-pasting) them to the bpf program.

They will only be available to the bpf-tcp-cc typed program.
The allowlist functions are not bounded to a fixed ABI contract.
When any of them has changed, the bpf-tcp-cc program has to be changed
like any in-tree/out-of-tree kernel tcp-cc implementations do also.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210325015201.1546345-1-kafai@fb.com
net/ipv4/bpf_tcp_ca.c