Skip to content

Commit

Permalink
bpf: selftests: Update clang requirement in README.rst for testing kf…
Browse files Browse the repository at this point in the history
…unc 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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
iamkafai authored and Alexei Starovoitov committed Mar 30, 2021
1 parent 5bdca94 commit 2ba4bad
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/testing/selftests/bpf/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,17 @@ types, which was introduced in `Clang 13`__. The older Clang versions will
either crash when compiling these tests, or generate an incorrect BTF.

__ https://reviews.llvm.org/D83289

Kernel function call test and Clang version
===========================================

Some selftests (e.g. kfunc_call and bpf_tcp_ca) require a LLVM support
to generate extern function in BTF. It was introduced in `Clang 13`__.

Without it, the error from compiling bpf selftests looks like:

.. code-block:: console
libbpf: failed to find BTF for extern 'tcp_slow_start' [25] section: -2
__ https://reviews.llvm.org/D93563

0 comments on commit 2ba4bad

Please sign in to comment.