summaryrefslogtreecommitdiff
path: root/samples/bpf/map_perf_test_kern.c
diff options
context:
space:
mode:
authorDaniel T. Lee <danieltimlee@gmail.com>2022-12-24 16:15:23 +0900
committerAndrii Nakryiko <andrii@kernel.org>2022-12-29 14:22:34 -0800
commit8a4dd0bcbdfd5bdaa5d1a5b390f44a45b60e8aa9 (patch)
tree7a4cadebc961a0529052ee6445978c08c8e7336c /samples/bpf/map_perf_test_kern.c
parent1d0c5f6f3d1387ec9c3a379fb232c078f5838d55 (diff)
samples/bpf: Use vmlinux.h instead of implicit headers in syscall tracing program
This commit applies vmlinux.h to syscall tracing program. This change allows the bpf program to refer to the internal structure as a single "vmlinux.h" instead of including each header referenced by the bpf program. Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20221224071527.2292-3-danieltimlee@gmail.com
Diffstat (limited to 'samples/bpf/map_perf_test_kern.c')
-rw-r--r--samples/bpf/map_perf_test_kern.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/samples/bpf/map_perf_test_kern.c b/samples/bpf/map_perf_test_kern.c
index 874e2f7e3d5d..0c7885057ffe 100644
--- a/samples/bpf/map_perf_test_kern.c
+++ b/samples/bpf/map_perf_test_kern.c
@@ -4,10 +4,9 @@
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*/
-#include <linux/skbuff.h>
-#include <linux/netdevice.h>
+#include "vmlinux.h"
+#include <errno.h>
#include <linux/version.h>
-#include <uapi/linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>