summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/xdp_dummy.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@netronome.com>2019-02-11 13:01:20 +0100
committerAlexei Starovoitov <ast@kernel.org>2019-02-12 05:31:38 +0100
commitbd4aed0ee73ca873bef3cb3ec746dd796f03df28 (patch)
tree1dcd4de735f8ca3dbf672dc5d48d064ea1dea5dc /tools/testing/selftests/bpf/progs/xdp_dummy.c
parentselftests: bpf: extend sub-register mode compilation to all bpf object files (diff)
downloadlinux-bd4aed0ee73ca873bef3cb3ec746dd796f03df28.tar.xz
linux-bd4aed0ee73ca873bef3cb3ec746dd796f03df28.zip
selftests: bpf: centre kernel bpf objects under new subdir "progs"
At the moment, all kernel bpf objects are listed under BPF_OBJ_FILES. Listing them manually sometimes causing patch conflict when people are adding new testcases simultaneously. It is better to centre all the related source files under a subdir "progs", then auto-generate the object file list. Suggested-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/xdp_dummy.c')
-rw-r--r--tools/testing/selftests/bpf/progs/xdp_dummy.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/xdp_dummy.c b/tools/testing/selftests/bpf/progs/xdp_dummy.c
new file mode 100644
index 000000000000..43b0ef1001ed
--- /dev/null
+++ b/tools/testing/selftests/bpf/progs/xdp_dummy.c
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#define KBUILD_MODNAME "xdp_dummy"
+#include <linux/bpf.h>
+#include "bpf_helpers.h"
+
+SEC("xdp_dummy")
+int xdp_dummy_prog(struct xdp_md *ctx)
+{
+ return XDP_PASS;
+}
+
+char _license[] SEC("license") = "GPL";