mirror of https://github.com/mkerrisk/man-pages
bpf-helpers.7: Add new man page for eBPF helper functions
eBPF sub-system on Linux can use "helper functions", functions implemented in the kernel that can be called from within a eBPF program injected by a user on Linux. The kernel already supports a long list of such helpers (sixty-seven at this time, new ones are under review). Therefore, it is proposed to create a new manual page, separate from bpf(2), to document those helpers for people willing to develop new eBPF programs. Additionally, in an effort to keep this documentation in synchronisation with what is implemented in the kernel, it is further proposed to keep the documentation itself in the kernel sources, as comments in file "include/uapi/linux/bpf.h", and to generate the man page from there. This patch adds the new man page, generated from kernel sources, to the man-pages repository. For each eBPF helper function, a description of the helper, of its arguments and of the return value is provided. The idea is that all future changes for this page should be redirected to the kernel file "include/uapi/linux/bpf.h", and the modified page generated from there. Generating the page itself is a two-step process. First, the documentation is extracted from include/uapi/linux/bpf.h, and converted to a RST (reStructuredText-formatted) page, with the relevant script from Linux sources: $ ./scripts/bpf_helpers_doc.py > /tmp/bpf-helpers.rst The second step consists in turning the RST document into the final man page, with rst2man: $ rst2man /tmp/bpf-helpers.rst > bpf-helpers.7 The bpf.h file was taken as at kernel 4.19 Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
dd63e15948
commit
53666f6c30