summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/sample_ret0.bpf.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:17:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:17:52 +0000
commit3afb00d3f86d3d924f88b56fa8285d4e9db85852 (patch)
tree95a985d3019522cea546b7d8df621369bc44fc6c /tools/testing/selftests/net/sample_ret0.bpf.c
parentAdding debian version 6.9.12-1. (diff)
downloadlinux-3afb00d3f86d3d924f88b56fa8285d4e9db85852.tar.xz
linux-3afb00d3f86d3d924f88b56fa8285d4e9db85852.zip
Merging upstream version 6.10.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/testing/selftests/net/sample_ret0.bpf.c')
-rw-r--r--tools/testing/selftests/net/sample_ret0.bpf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/sample_ret0.bpf.c b/tools/testing/selftests/net/sample_ret0.bpf.c
new file mode 100644
index 0000000000..1df5ca98bb
--- /dev/null
+++ b/tools/testing/selftests/net/sample_ret0.bpf.c
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
+
+#define SEC(name) __attribute__((section(name), used))
+
+/* Sample program which should always load for testing control paths. */
+SEC("xdp")
+int func()
+{
+ return 0;
+}