Skip to content

Commit 417ec26

Browse files
Jakub Kicinskiborkmann
authored andcommitted
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 <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 31d3ad8 commit 417ec26

File tree

3 files changed

+691
-2
lines changed

3 files changed

+691
-2
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test
1717

1818
TEST_GEN_FILES = test_pkt_access.o test_xdp.o test_l4lb.o test_tcp_estats.o test_obj_id.o \
1919
test_pkt_md_access.o test_xdp_redirect.o test_xdp_meta.o sockmap_parse_prog.o \
20-
sockmap_verdict_prog.o dev_cgroup.o
20+
sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o
2121

22-
TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh
22+
TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh \
23+
test_offload.py
2324

2425
include ../lib.mk
2526

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
2+
3+
/* Sample program which should always load for testing control paths. */
4+
int func()
5+
{
6+
return 0;
7+
}

0 commit comments

Comments
 (0)