summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/sample_ret0.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-12-01 15:09:00 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2017-12-03 00:27:58 +0100
commit417ec26477a5c19abc72dd0298f48ebe5d2db43a (patch)
tree551c0b0691e293981b2aa90a96743bc7a48bb315 /tools/testing/selftests/bpf/sample_ret0.c
parent31d3ad832948c75139b0e5b653912f7898a1d5d5 (diff)
downloadop-kernel-dev-417ec26477a5c19abc72dd0298f48ebe5d2db43a.zip
op-kernel-dev-417ec26477a5c19abc72dd0298f48ebe5d2db43a.tar.gz
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>
Diffstat (limited to 'tools/testing/selftests/bpf/sample_ret0.c')
-rw-r--r--tools/testing/selftests/bpf/sample_ret0.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/sample_ret0.c b/tools/testing/selftests/bpf/sample_ret0.c
new file mode 100644
index 0000000..fec9975
--- /dev/null
+++ b/tools/testing/selftests/bpf/sample_ret0.c
@@ -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;
+}
OpenPOWER on IntegriCloud