mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
selftests/bpf: add offload test based on netdevsim
Add a test of BPF offload control path interfaces based on just-added netdevsim driver. Perform various checks of both the stack and the expected driver behaviour. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
committed by
Daniel Borkmann
parent
31d3ad8329
commit
417ec26477
@@ -17,9 +17,10 @@ TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test
|
||||
|
||||
TEST_GEN_FILES = test_pkt_access.o test_xdp.o test_l4lb.o test_tcp_estats.o test_obj_id.o \
|
||||
test_pkt_md_access.o test_xdp_redirect.o test_xdp_meta.o sockmap_parse_prog.o \
|
||||
sockmap_verdict_prog.o dev_cgroup.o
|
||||
sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o
|
||||
|
||||
TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh
|
||||
TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh \
|
||||
test_offload.py
|
||||
|
||||
include ../lib.mk
|
||||
|
||||
|
||||
7
tools/testing/selftests/bpf/sample_ret0.c
Normal file
7
tools/testing/selftests/bpf/sample_ret0.c
Normal file
@@ -0,0 +1,7 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
|
||||
|
||||
/* Sample program which should always load for testing control paths. */
|
||||
int func()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
681
tools/testing/selftests/bpf/test_offload.py
Executable file
681
tools/testing/selftests/bpf/test_offload.py
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user