xref: /openbmc/linux/Documentation/bpf/index.rst (revision 887069f4)
1=================
2BPF Documentation
3=================
4
5This directory contains documentation for the BPF (Berkeley Packet
6Filter) facility, with a focus on the extended BPF version (eBPF).
7
8This kernel side documentation is still work in progress. The main
9textual documentation is (for historical reasons) described in
10:ref:`networking-filter`, which describe both classical and extended
11BPF instruction-set.
12The Cilium project also maintains a `BPF and XDP Reference Guide`_
13that goes into great technical depth about the BPF Architecture.
14
15libbpf
16======
17
18Documentation/bpf/libbpf/libbpf.rst is a userspace library for loading and interacting with bpf programs.
19
20BPF Type Format (BTF)
21=====================
22
23.. toctree::
24   :maxdepth: 1
25
26   btf
27
28
29Frequently asked questions (FAQ)
30================================
31
32Two sets of Questions and Answers (Q&A) are maintained.
33
34.. toctree::
35   :maxdepth: 1
36
37   bpf_design_QA
38   bpf_devel_QA
39
40Syscall API
41===========
42
43The primary info for the bpf syscall is available in the `man-pages`_
44for `bpf(2)`_. For more information about the userspace API, see
45Documentation/userspace-api/ebpf/index.rst.
46
47Helper functions
48================
49
50* `bpf-helpers(7)`_ maintains a list of helpers available to eBPF programs.
51
52
53Program types
54=============
55
56.. toctree::
57   :maxdepth: 1
58
59   prog_cgroup_sockopt
60   prog_cgroup_sysctl
61   prog_flow_dissector
62   bpf_lsm
63   prog_sk_lookup
64
65
66Map types
67=========
68
69.. toctree::
70   :maxdepth: 1
71
72   map_cgroup_storage
73
74
75Testing and debugging BPF
76=========================
77
78.. toctree::
79   :maxdepth: 1
80
81   drgn
82   s390
83
84
85Other
86=====
87
88.. toctree::
89   :maxdepth: 1
90
91   ringbuf
92   llvm_reloc
93
94.. Links:
95.. _networking-filter: ../networking/filter.rst
96.. _man-pages: https://www.kernel.org/doc/man-pages/
97.. _bpf(2): https://man7.org/linux/man-pages/man2/bpf.2.html
98.. _bpf-helpers(7): https://man7.org/linux/man-pages/man7/bpf-helpers.7.html
99.. _BPF and XDP Reference Guide: https://docs.cilium.io/en/latest/bpf/
100