linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail.com>
To: bpf@vger.kernel.org, linux-doc@vger.kernel.org,
	Jonathan Corbet <corbet@lwn.net>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Donald Hunter <donald.hunter@gmail.com>
Subject: [PATCH bpf-next v4 0/2] Add table of BPF program types to docs
Date: Thu, 22 Sep 2022 12:52:55 +0100	[thread overview]
Message-ID: <20220922115257.99815-1-donald.hunter@gmail.com> (raw)

Extend the libbpf documentation with a table of program types, attach
points and ELF section names. The table uses data from program_types.csv
which is generated from tools/lib/bpf/libbpf.c during the documentation
build.

Patch 1 adds subdir support to Documentation/Makefile and changes
userspace-api/media to use this instead of being a special case.

Patch 2 adds the program_types documentation with a new makefile in
the libbpf doc directory to generate program_types.csv, using
scripts/gen-bpf-progtypes.sh

The generator is now in scripts/gen-bpf-progtypes.sh so that it can be
exported to the libbpf git repository along with the libbpf docs. The
libbpf repository will need to be updated to sync and use
scripts/gen-btf-progtypes.sh after this patch lands.

I plan to look at adding info about the format of section "extras" for
each program type as a follow-on.

v3 -> v4:
Fix typo reported by Jesper Brouer
Move the generator from the Makefile to a separate script

v2 -> v3:
Put program_types after API docs in TOC as suggested by Andrii Nakryiko
Fix formatting as reported by Andrii Nakryiko
Include USDT extras example as suggested by Andrii Nakryiko
Include sample of program_types.csv as suggested by Andrii Nakryiko

v1 -> v2:
Automate the generation of program_types.csv as suggested by
Andrii Nakryiko.

Donald Hunter (2):
  Add subdir support to Documentation makefile
  Add table of BPF program types to libbpf docs

 Documentation/Makefile                     | 16 ++++++++--
 Documentation/bpf/libbpf/.gitignore        |  1 +
 Documentation/bpf/libbpf/Makefile          | 29 ++++++++++++++++++
 Documentation/bpf/libbpf/index.rst         |  3 ++
 Documentation/bpf/libbpf/program_types.rst | 32 ++++++++++++++++++++
 Documentation/bpf/programs.rst             |  3 ++
 Documentation/userspace-api/media/Makefile |  2 ++
 scripts/gen-bpf-progtypes.sh               | 34 ++++++++++++++++++++++
 8 files changed, 118 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/bpf/libbpf/.gitignore
 create mode 100644 Documentation/bpf/libbpf/Makefile
 create mode 100644 Documentation/bpf/libbpf/program_types.rst
 create mode 100755 scripts/gen-bpf-progtypes.sh

-- 
2.35.1


             reply	other threads:[~2022-09-22 11:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 11:52 Donald Hunter [this message]
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
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=20220922115257.99815-1-donald.hunter@gmail.com \
    --to=donald.hunter@gmail.com \
    --cc=andrii.nakryiko@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).