From: Donald Hunter <donald.hunter@gmail.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: bpf@vger.kernel.org, linux-doc@vger.kernel.org,
Jonathan Corbet <corbet@lwn.net>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>
Subject: Re: [PATCH bpf-next v4 2/2] Add table of BPF program types to libbpf docs
Date: Fri, 23 Sep 2022 16:05:11 +0100 [thread overview]
Message-ID: <m2czbm872w.fsf@gmail.com> (raw)
In-Reply-To: <Yy2zBAIFGGBMe4k1@debian.me> (Bagas Sanjaya's message of "Fri, 23 Sep 2022 20:22:12 +0700")
Bagas Sanjaya <bagasdotme@gmail.com> writes:
> On Thu, Sep 22, 2022 at 12:52:57PM +0100, Donald Hunter wrote:
>> +..
>> + program_types.csv is generated from tools/lib/bpf/libbpf.c and is formatted like this:
>> + Program Type,Attach Type,ELF Section Name,Sleepable
>> + ``BPF_PROG_TYPE_SOCKET_FILTER``,,``socket``,
>> + ``BPF_PROG_TYPE_SK_REUSEPORT``,``BPF_SK_REUSEPORT_SELECT_OR_MIGRATE``,``sk_reuseport/migrate``,
>> + ``BPF_PROG_TYPE_SK_REUSEPORT``,``BPF_SK_REUSEPORT_SELECT``,``sk_reuseport``,
>> + ``BPF_PROG_TYPE_KPROBE``,,``kprobe+``,
>> + ``BPF_PROG_TYPE_KPROBE``,,``uprobe+``,
>> + ``BPF_PROG_TYPE_KPROBE``,,``uprobe.s+``,Yes
>
> The note above doesn't get rendered on htmldocs output, so I have applied
> the fixup:
It was intended to be a comment to the reader of program_types.rst that
this is the format of the .csv file that will be rendered. It was not
meant to be a note on the rendered page.
The rendered page will show the table that is produced by the csv-table
directive which is self explanatory.
>
> ---- >8 ----
>
> diff --git a/Documentation/bpf/libbpf/program_types.rst b/Documentation/bpf/libbpf/program_types.rst
> index b74fbf3363dd6c..3ce0ec94b399b4 100644
> --- a/Documentation/bpf/libbpf/program_types.rst
> +++ b/Documentation/bpf/libbpf/program_types.rst
> @@ -16,15 +16,17 @@ When ``extras`` are specified, they provide details of how to auto-attach the BP
> The format of ``extras`` depends on the program type, e.g. ``SEC("tracepoint/<category>/<name>")``
> for tracepoints or ``SEC("usdt/<path-to-binary>:<usdt_provider>:<usdt_name>")`` for USDT probes.
>
> -..
> - program_types.csv is generated from tools/lib/bpf/libbpf.c and is formatted like this:
> - Program Type,Attach Type,ELF Section Name,Sleepable
> - ``BPF_PROG_TYPE_SOCKET_FILTER``,,``socket``,
> - ``BPF_PROG_TYPE_SK_REUSEPORT``,``BPF_SK_REUSEPORT_SELECT_OR_MIGRATE``,``sk_reuseport/migrate``,
> - ``BPF_PROG_TYPE_SK_REUSEPORT``,``BPF_SK_REUSEPORT_SELECT``,``sk_reuseport``,
> - ``BPF_PROG_TYPE_KPROBE``,,``kprobe+``,
> - ``BPF_PROG_TYPE_KPROBE``,,``uprobe+``,
> - ``BPF_PROG_TYPE_KPROBE``,,``uprobe.s+``,Yes
> +.. note::
> + The table below is generated from ``tools/lib/bpf/libbpf.c`` and is
> + formatted like this (in CSV format)::
> +
> + Program Type,Attach Type,ELF Section Name,Sleepable
> + BPF_PROG_TYPE_SOCKET_FILTER,,socket,
> + BPF_PROG_TYPE_SK_REUSEPORT,BPF_SK_REUSEPORT_SELECT_OR_MIGRATE,sk_reuseport/migrate,
> + BPF_PROG_TYPE_SK_REUSEPORT,BPF_SK_REUSEPORT_SELECT,sk_reuseport,
> + BPF_PROG_TYPE_KPROBE,,kprobe+,
> + BPF_PROG_TYPE_KPROBE,,uprobe+,
> + BPF_PROG_TYPE_KPROBE,,uprobe.s+,Yes
>
> .. csv-table:: Program Types and Their ELF Section Names
> :file: program_types.csv
>
> Thanks.
next prev parent reply other threads:[~2022-09-23 15:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 11:52 [PATCH bpf-next v4 0/2] Add table of BPF program types to docs Donald Hunter
2022-09-22 11:52 ` [PATCH bpf-next v4 1/2] Add subdir support to Documentation makefile Donald Hunter
2022-09-22 13:24 ` Jonathan Corbet
2022-09-23 14:58 ` Donald Hunter
2022-09-30 9:57 ` Donald Hunter
2022-09-30 22:25 ` Andrii Nakryiko
2022-09-22 11:52 ` [PATCH bpf-next v4 2/2] Add table of BPF program types to libbpf docs Donald Hunter
2022-09-23 13:22 ` Bagas Sanjaya
2022-09-23 15:05 ` Donald Hunter [this message]
2022-09-26 1:33 ` Bagas Sanjaya
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=m2czbm872w.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
/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).