summaryrefslogtreecommitdiff
path: root/samples/bpf/xdp_monitor.bpf.c
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2021-08-21 03:20:01 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-08-25 00:48:41 +0300
commit3f19956010d26906e84baec4cd9c48bd8808de96 (patch)
treebc6df1aed393fcea88c6ead58372b611799384e5 /samples/bpf/xdp_monitor.bpf.c
parent384b6b3bbf0d3b60ca118459a91b7b8ce1dcd6bd (diff)
downloadlinux-3f19956010d26906e84baec4cd9c48bd8808de96.tar.xz
samples: bpf: Convert xdp_monitor_kern.o to XDP samples helper
We already moved all the functionality it provided in XDP samples helper userspace and kernel BPF object, so just delete the unneeded code. We also add generation of BPF skeleton and compilation using clang -target bpf for files ending with .bpf.c suffix (to denote that they use vmlinux.h). Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210821002010.845777-14-memxor@gmail.com
Diffstat (limited to 'samples/bpf/xdp_monitor.bpf.c')
-rw-r--r--samples/bpf/xdp_monitor.bpf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/samples/bpf/xdp_monitor.bpf.c b/samples/bpf/xdp_monitor.bpf.c
new file mode 100644
index 000000000000..cfb41e2205f4
--- /dev/null
+++ b/samples/bpf/xdp_monitor.bpf.c
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright(c) 2017-2018 Jesper Dangaard Brouer, Red Hat Inc.
+ *
+ * XDP monitor tool, based on tracepoints
+ */
+#include "xdp_sample.bpf.h"
+
+char _license[] SEC("license") = "GPL";