]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Test an incomplete BPF CC
authorJörn-Thorben Hinz <jthinz@mailbox.tu-berlin.de>
Wed, 22 Jun 2022 19:12:26 +0000 (21:12 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 23 Jun 2022 16:49:57 +0000 (09:49 -0700)
commit59f7bc9a5e4fb7ef169c9323039d202a51a33ad4
treedb73228f689f24814d6955f295e150e0ce1e2213
parent2f7398bee17d49838023a8506e7e0bacf59849c6
selftests/bpf: Test an incomplete BPF CC

Test whether a TCP CC implemented in BPF providing neither cong_avoid()
nor cong_control() is correctly rejected. This check solely depends on
tcp_register_congestion_control() now, which is invoked during
bpf_map__attach_struct_ops().

Signed-off-by: Jörn-Thorben Hinz <jthinz@mailbox.tu-berlin.de>
Link: https://lore.kernel.org/r/20220622191227.898118-5-jthinz@mailbox.tu-berlin.de
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
tools/testing/selftests/bpf/progs/tcp_ca_incompl_cong_ops.c [new file with mode: 0644]