[SRU][N/O][PATCH 0/1] Fix build failure for BPF selftests
Magali Lemes
magali.lemes at canonical.com
Fri Mar 21 16:30:24 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2069407
[Impact]
BPF selftests fail to build on Noble and Oracular. This happens because of
commit 02b4e126e6 ("bpf: selftests: test_tunnel: Use vmlinux.h declarations"),
which relies on the definitions of `bpf_fou_encap` and
`bpf_fou_encap_type` used in test_tunnel_kern.c being on vmlinux.h.
Since we have CONFIG_NET_FOU=m instead of =y, these declarations
cannot be solved and the tests cannot be built.
[Fix]
Clean cherry-pick of d17f9b370df6 ("selftests/bpf: Fix compilation failure when
CONFIG_NET_FOU!=y")
[Test]
1) Install build dependencies:
apt install build-essential libelf-dev llvm clang lld libssl-dev docutils-common -y
2) Build the tests using the kernel source tree with the patch applied:
make -C tools/testing/selftests/ TARGETS=bpf SKIP_TARGETS= all KDIR=/usr/src/linux-headers-$(uname -r)/
[Where problems could occur]
Change is limited to BPF selftests, no problems should occur in the kernel
image or modules.
Artem Savkov (1):
selftests/bpf: Fix compilation failure when CONFIG_NET_FOU!=y
.../selftests/bpf/progs/test_tunnel_kern.c | 27 ++++++++++++++-----
1 file changed, 21 insertions(+), 6 deletions(-)
--
2.34.1
More information about the kernel-team
mailing list