Re: [patch] bpf-helpers.7: Add new man page for eBPF helper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/30/2018 06:37 PM, Quentin Monnet wrote:
> 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 at kernel commit 081023a31129 (that should be
> in Linux 4.18).
> 
> Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
> Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
> Signed-off-by: Quentin Monnet <quentin.monnet@xxxxxxxxxxxxx>

Thanks for all your effort on this, Quentin!

Acked-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux