Skip to content

Commit 2ba4bad

Browse files
iamkafaiAlexei Starovoitov
authored andcommitted
bpf: selftests: Update clang requirement in README.rst for testing kfunc call
This patch updates the README.rst to specify the clang requirement to compile the bpf selftests that call kernel function. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20210330054156.2933804-1-kafai@fb.com
1 parent 5bdca94 commit 2ba4bad

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tools/testing/selftests/bpf/README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,17 @@ types, which was introduced in `Clang 13`__. The older Clang versions will
179179
either crash when compiling these tests, or generate an incorrect BTF.
180180

181181
__ https://reviews.llvm.org/D83289
182+
183+
Kernel function call test and Clang version
184+
===========================================
185+
186+
Some selftests (e.g. kfunc_call and bpf_tcp_ca) require a LLVM support
187+
to generate extern function in BTF. It was introduced in `Clang 13`__.
188+
189+
Without it, the error from compiling bpf selftests looks like:
190+
191+
.. code-block:: console
192+
193+
libbpf: failed to find BTF for extern 'tcp_slow_start' [25] section: -2
194+
195+
__ https://reviews.llvm.org/D93563

0 commit comments

Comments
 (0)