linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Quentin Monnet <quentin.monnet@netronome.com>, ast@kernel.org
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
	linux-doc@vger.kernel.org, linux-man@vger.kernel.org
Subject: Re: [PATCH bpf-next v4 00/10] bpf: document eBPF helpers and add a script to generate man page
Date: Fri, 27 Apr 2018 11:08:34 +0200	[thread overview]
Message-ID: <37a883ea-a714-6a6e-58df-d67fa9aa106c@iogearbox.net> (raw)
In-Reply-To: <20180425171701.11048-1-quentin.monnet@netronome.com>

On 04/25/2018 07:16 PM, Quentin Monnet wrote:
> eBPF helper functions can be called from within eBPF programs to perform
> a variety of tasks that would be otherwise hard or impossible to do with
> eBPF itself. There is a growing number of such helper functions in the
> kernel, but documentation is scarce. The main user space header file
> does contain a short commented description of most helpers, but it is
> somewhat outdated and not complete. It is more a "cheat sheet" than a
> real documentation accessible to new eBPF developers.
> 
> This commit attempts to improve the situation by replacing the existing
> overview for the helpers with a more developed description. Furthermore,
> a Python script is added to generate a manual page for eBPF helpers. The
> workflow is the following, and requires the rst2man utility:
> 
>     $ ./scripts/bpf_helpers_doc.py \
>             --filename include/uapi/linux/bpf.h > /tmp/bpf-helpers.rst
>     $ rst2man /tmp/bpf-helpers.rst > /tmp/bpf-helpers.7
>     $ man /tmp/bpf-helpers.7
> 
> The objective is to keep all documentation related to the helpers in a
> single place, and to be able to generate from here a manual page that
> could be packaged in the man-pages repository and shipped with most
> distributions.
> 
> Additionally, parsing the prototypes of the helper functions could
> hopefully be reused, with a different Printer object, to generate
> header files needed in some eBPF-related projects.
> 
> Regarding the description of each helper, it comprises several items:
> 
> - The function prototype.
> - A description of the function and of its arguments (except for a
>   couple of cases, when there are no arguments and the return value
>   makes the function usage really obvious).
> - A description of return values (if not void).
> 
> Additional items such as the list of compatible eBPF program and map
> types for each helper, Linux kernel version that introduced the helper,
> GPL-only restriction, and commit hash could be added in the future, but
> it was decided on the mailing list to leave them aside for now.
> 
> For several helpers, descriptions are inspired (at times, nearly copied)
> from the commit logs introducing them in the kernel--Many thanks to
> their respective authors! Some sentences were also adapted from comments
> from the reviews, thanks to the reviewers as well. Descriptions were
> completed as much as possible, the objective being to have something easily
> accessible even for people just starting with eBPF. There is probably a bit
> more work to do in this direction for some helpers.
[...]

Applied yesterday night to bpf-next (and now in net-next), thanks Quentin!
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2018-04-27  9:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 17:16 [PATCH bpf-next v4 00/10] bpf: document eBPF helpers and add a script to generate man page Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 01/10] bpf: add script and prepare bpf.h for new helpers documentation Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 02/10] bpf: add documentation for eBPF helpers (01-11) Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 03/10] bpf: add documentation for eBPF helpers (12-22) Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 04/10] bpf: add documentation for eBPF helpers (23-32) Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 05/10] bpf: add documentation for eBPF helpers (33-41) Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 06/10] bpf: add documentation for eBPF helpers (42-50) Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 07/10] bpf: add documentation for eBPF helpers (51-57) Quentin Monnet
2018-04-25 17:16 ` [PATCH bpf-next v4 08/10] bpf: add documentation for eBPF helpers (58-64) Quentin Monnet
2018-04-25 17:17 ` [PATCH bpf-next v4 09/10] bpf: add documentation for eBPF helpers (65-66) Quentin Monnet
2018-04-25 17:17 ` [PATCH bpf-next v4 10/10] bpf: update bpf.h uapi header for tools Quentin Monnet
2018-04-27  9:08 ` Daniel Borkmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37a883ea-a714-6a6e-58df-d67fa9aa106c@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=quentin.monnet@netronome.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).