summaryrefslogtreecommitdiff
path: root/kernel/bpf/preload/iterators/README
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2020-08-18 21:27:57 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-08-20 16:02:36 +0200
commitf0fdfefb2d4da5b76c3f810be0edb2ab90360224 (patch)
tree453bb56dfa2c9e377bf1086ddf76670f5a4a56e2 /kernel/bpf/preload/iterators/README
parent005142b8a1f0f32d33fbe04b728464c1b7acfa0e (diff)
bpf: Add BPF program and map iterators as built-in BPF programs.
The program and map iterators work similar to seq_file-s. Once the program is pinned in bpffs it can be read with "cat" tool to print human readable output. In this case about BPF programs and maps. For example: $ cat /sys/fs/bpf/progs.debug id name attached 5 dump_bpf_map bpf_iter_bpf_map 6 dump_bpf_prog bpf_iter_bpf_prog $ cat /sys/fs/bpf/maps.debug id name max_entries 3 iterator.rodata 1 To avoid kernel build dependency on clang 10 separate bpf skeleton generation into manual "make" step and instead check-in generated .skel.h into git. Unlike 'bpftool prog show' in-kernel BTF name is used (when available) to print full name of BPF program instead of 16-byte truncated name. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200819042759.51280-3-alexei.starovoitov@gmail.com
Diffstat (limited to 'kernel/bpf/preload/iterators/README')
-rw-r--r--kernel/bpf/preload/iterators/README4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/bpf/preload/iterators/README b/kernel/bpf/preload/iterators/README
new file mode 100644
index 000000000000..7fd6d39a9ad2
--- /dev/null
+++ b/kernel/bpf/preload/iterators/README
@@ -0,0 +1,4 @@
+WARNING:
+If you change "iterators.bpf.c" do "make -j" in this directory to rebuild "iterators.skel.h".
+Make sure to have clang 10 installed.
+See Documentation/bpf/bpf_devel_QA.rst