aboutsummaryrefslogtreecommitdiffstats
path: root/test/bpf/dummy.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/bpf/dummy.c')
-rw-r--r--test/bpf/dummy.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/bpf/dummy.c b/test/bpf/dummy.c
new file mode 100644
index 00000000..5851469e
--- /dev/null
+++ b/test/bpf/dummy.c
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation
+ */
+
+/*
+ * eBPF program sample.
+ * does nothing always return success.
+ * used to measure BPF infrastructure overhead.
+ * To compile:
+ * clang -O2 -target bpf -c dummy.c
+ */
+
+#include <stdint.h>
+#include <stddef.h>
+
+uint64_t
+entry(void *arg)
+{
+ return 1;
+}