New upstream version 18.08
[deb_dpdk.git] / test / bpf / dummy.c
diff --git a/test/bpf/dummy.c b/test/bpf/dummy.c
new file mode 100644 (file)
index 0000000..5851469
--- /dev/null
@@ -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;
+}