linux-stable/tools/testing
Yonghong Song ee77f3d602 selftests/bpf: Fix compilation failure for prog vrf_socket_lookup
When building the latest kernel/selftest with clang17 compiler:

    make LLVM=1 -j                                  <== for kernel
    make -C tools/testing/selftests/bpf LLVM=1 -j   <== for selftest

I hit the following compilation error:

  [...]
  In file included from progs/vrf_socket_lookup.c:3:
  In file included from /usr/include/linux/ip.h:21:
  In file included from /usr/include/asm/byteorder.h:5:
  In file included from /usr/include/linux/byteorder/little_endian.h:13:
  /usr/include/linux/swab.h:136:8: error: unknown type name '__always_inline'
    136 | static __always_inline unsigned long __swab(const unsigned long y)
        |        ^
  /usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline'
    171 | static __always_inline __u16 __swab16p(const __u16 *p)
        |        ^
  /usr/include/linux/swab.h:171:29: error: expected ';' after top level declarator
    171 | static __always_inline __u16 __swab16p(const __u16 *p)
        |                             ^
  [...]

Basically, with header files in my local host which is based on 5.12 kernel,
__always_inline is not defined and this caused compilation failure.

Since __always_inline is defined in bpf_helpers.h, let us move bpf_helpers.h
to an early position which fixed the problem.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230622061921.816772-1-yhs@fb.com
2023-06-22 11:51:05 +02:00
..
crypto/chacha20-s390
cxl tools/testing/cxl: Use DEFINE_STATIC_SRCU() 2023-05-13 00:16:40 -07:00
fault-injection
ktest ktest: Restore stty setting at first in dodie 2023-02-20 11:52:27 -05:00
kunit kunit: tool: Add support for SH under QEMU 2023-04-05 12:51:16 -06:00
memblock mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
nvdimm Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
radix-tree maple_tree: add a test case to check maple_alloc 2023-04-18 16:29:56 -07:00
scatterlist
selftests selftests/bpf: Fix compilation failure for prog vrf_socket_lookup 2023-06-22 11:51:05 +02:00
vsock vsock/test: update expected return values 2023-04-04 12:46:24 +02:00