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