selftests: move bpf-offload test from bpf to net
We're building more python tests on the netdev side, and some of the classes from the venerable BPF offload tests can be reused. Acked-by: Stanislav Fomichev <sdf@google.com> Acked-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20240409031549.3531084-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -102,7 +102,6 @@ TEST_PROGS := test_kmod.sh \
|
||||
test_xdp_redirect_multi.sh \
|
||||
test_xdp_meta.sh \
|
||||
test_xdp_veth.sh \
|
||||
test_offload.py \
|
||||
test_sock_addr.sh \
|
||||
test_tunnel.sh \
|
||||
test_lwt_seg6local.sh \
|
||||
|
||||
@@ -84,6 +84,8 @@ TEST_GEN_FILES += sctp_hello
|
||||
TEST_GEN_FILES += csum
|
||||
TEST_GEN_FILES += nat6to4.o
|
||||
TEST_GEN_FILES += xdp_dummy.o
|
||||
TEST_GEN_FILES += sample_ret0.bpf.o
|
||||
TEST_GEN_FILES += sample_map_ret0.bpf.o
|
||||
TEST_GEN_FILES += ip_local_port_range
|
||||
TEST_GEN_FILES += bind_wildcard
|
||||
TEST_PROGS += test_vxlan_mdb.sh
|
||||
@@ -93,6 +95,7 @@ TEST_PROGS += test_bridge_backup_port.sh
|
||||
TEST_PROGS += fdb_flush.sh
|
||||
TEST_PROGS += fq_band_pktlimit.sh
|
||||
TEST_PROGS += vlan_hw_filter.sh
|
||||
TEST_PROGS += bpf_offload.py
|
||||
|
||||
TEST_FILES := settings
|
||||
TEST_FILES += in_netns.sh lib.sh net_helper.sh setup_loopback.sh setup_veth.sh
|
||||
@@ -142,7 +145,10 @@ endif
|
||||
|
||||
CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH))
|
||||
|
||||
$(OUTPUT)/nat6to4.o $(OUTPUT)/xdp_dummy.o: $(OUTPUT)/%.o : %.c $(BPFOBJ) | $(MAKE_DIRS)
|
||||
BPF_PROG_OBJS := $(OUTPUT)/nat6to4.o $(OUTPUT)/xdp_dummy.o \
|
||||
$(OUTPUT)/sample_map_ret0.bpf.o $(OUTPUT)/sample_ret0.bpf.o
|
||||
|
||||
$(BPF_PROG_OBJS): $(OUTPUT)/%.o : %.c $(BPFOBJ) | $(MAKE_DIRS)
|
||||
$(CLANG) -O2 --target=bpf -c $< $(CCINCLUDE) $(CLANG_SYS_INCLUDES) -o $@
|
||||
|
||||
$(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \
|
||||
|
||||
Reference in New Issue
Block a user