Skip to content
Snippets Groups Projects
Commit 3f6e138d authored by Stefan Agner's avatar Stefan Agner Committed by Alexei Starovoitov
Browse files

bpf: fix build error with clang


Building the newly introduced BPF_PROG_TYPE_SK_REUSEPORT leads to
a compile time error when building with clang:
net/core/filter.o: In function `sk_reuseport_convert_ctx_access':
  ../net/core/filter.c:7284: undefined reference to `__compiletime_assert_7284'

It seems that clang has issues resolving hweight_long at compile
time. Since SK_FL_PROTO_MASK is a constant, we can use the interface
for known constant arguments which works fine with clang.

Fixes: 2dbb9b9e ("bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT")
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 15c480ef
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment