Skip to content

Commit 64e39ee

Browse files
Jiong WangAlexei Starovoitov
authored andcommitted
selftests: bpf: relax sub-register mode compilation criteria
Sub-register mode compilation was enabled only when there are eBPF "v3" processor supports at both compilation time inside LLVM and runtime inside kernel. Given separation betwen build and test server could be often, this patch removes the runtime support criteria. Suggested-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent bd4aed0 commit 64e39ee

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎tools/testing/selftests/bpf/Makefile‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test
2828
BPF_OBJ_FILES = $(patsubst %.c,%.o, $(notdir $(wildcard progs/*.c)))
2929
TEST_GEN_FILES = $(BPF_OBJ_FILES)
3030

31-
# Also test sub-register code-gen if LLVM + kernel both has eBPF v3 processor
32-
# support which is the first version to contain both ALU32 and JMP32
33-
# instructions.
31+
# Also test sub-register code-gen if LLVM has eBPF v3 processor support which
32+
# contains both ALU32 and JMP32 instructions.
3433
SUBREG_CODEGEN := $(shell echo "int cal(int a) { return a > 0; }" | \
3534
$(CLANG) -target bpf -O2 -emit-llvm -S -x c - -o - | \
36-
$(LLC) -mattr=+alu32 -mcpu=probe 2>&1 | \
35+
$(LLC) -mattr=+alu32 -mcpu=v3 2>&1 | \
3736
grep 'if w')
3837
ifneq ($(SUBREG_CODEGEN),)
3938
TEST_GEN_FILES += $(patsubst %.o,alu32/%.o, $(BPF_OBJ_FILES))

0 commit comments

Comments
 (0)