Jörn-Thorben Hinz 9f0265e921 bpf: Require only one of cong_avoid() and cong_control() from a TCP CC
Remove the check for required and optional functions in a struct
tcp_congestion_ops from bpf_tcp_ca.c. Rely on
tcp_register_congestion_control() to reject a BPF CC that does not
implement all required functions, as it will do for a non-BPF CC.

When a CC implements tcp_congestion_ops.cong_control(), the alternate
cong_avoid() is not in use in the TCP stack. Previously, a BPF CC was
still forced to implement cong_avoid() as a no-op since it was
non-optional in bpf_tcp_ca.c.

Signed-off-by: Jörn-Thorben Hinz <jthinz@mailbox.tu-berlin.de>
Reviewed-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/r/20220622191227.898118-3-jthinz@mailbox.tu-berlin.de
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2022-06-23 09:49:57 -07:00
..
2021-06-30 15:51:09 -07:00
2022-04-12 14:56:33 -07:00
2021-05-17 15:29:35 -07:00
2022-04-30 15:12:58 +01:00
2021-10-13 09:41:37 -07:00
2021-06-30 15:51:09 -07:00
2021-10-13 09:41:37 -07:00
2022-06-09 21:52:55 -07:00
2022-04-12 14:56:33 -07:00
2021-05-17 15:29:35 -07:00
2022-06-09 21:52:55 -07:00
2021-05-17 15:29:35 -07:00
2022-06-20 14:05:52 +02:00