Skip to content

Commit

Permalink
selftests/bpf: add offload test based on netdevsim
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Jakub Kicinski authored and borkmann committed Dec 2, 2017
1 parent 31d3ad8 commit 417ec26
Show file tree
Hide file tree
Showing 3 changed files with 691 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/testing/selftests/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions tools/testing/selftests/bpf/sample_ret0.c
Original file line number Diff line number Diff line change
@@ -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;
}
Loading

0 comments on commit 417ec26

Please sign in to comment.