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 18Libbpf is a userspace library for loading and interacting with bpf programs. 19 20.. toctree:: 21 :maxdepth: 1 22 23 libbpf/libbpf 24 libbpf/libbpf_api 25 libbpf/libbpf_build 26 libbpf/libbpf_naming_convention 27 28BPF Type Format (BTF) 29===================== 30 31.. toctree:: 32 :maxdepth: 1 33 34 btf 35 36 37Frequently asked questions (FAQ) 38================================ 39 40Two sets of Questions and Answers (Q&A) are maintained. 41 42.. toctree:: 43 :maxdepth: 1 44 45 bpf_design_QA 46 bpf_devel_QA 47 48Syscall API 49=========== 50 51The primary info for the bpf syscall is available in the `man-pages`_ 52for `bpf(2)`_. For more information about the userspace API, see 53Documentation/userspace-api/ebpf/index.rst. 54 55Helper functions 56================ 57 58* `bpf-helpers(7)`_ maintains a list of helpers available to eBPF programs. 59 60 61Program types 62============= 63 64.. toctree:: 65 :maxdepth: 1 66 67 prog_cgroup_sockopt 68 prog_cgroup_sysctl 69 prog_flow_dissector 70 bpf_lsm 71 prog_sk_lookup 72 73 74Map types 75========= 76 77.. toctree:: 78 :maxdepth: 1 79 80 map_cgroup_storage 81 82 83Testing and debugging BPF 84========================= 85 86.. toctree:: 87 :maxdepth: 1 88 89 drgn 90 s390 91 92 93Other 94===== 95 96.. toctree:: 97 :maxdepth: 1 98 99 ringbuf 100 llvm_reloc 101 102.. Links: 103.. _networking-filter: ../networking/filter.rst 104.. _man-pages: https://www.kernel.org/doc/man-pages/ 105.. _bpf(2): https://man7.org/linux/man-pages/man2/bpf.2.html 106.. _bpf-helpers(7): https://man7.org/linux/man-pages/man7/bpf-helpers.7.html 107.. _BPF and XDP Reference Guide: https://docs.cilium.io/en/latest/bpf/ 108