All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>
Cc: "andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 3/3] libbpf: auto-generate list of BPF helper definitions
Date: Sat, 5 Oct 2019 17:10:38 +0000	[thread overview]
Message-ID: <b0df96f6-dc41-8baf-baa3-e98da94c54b7@fb.com> (raw)
In-Reply-To: <20191005075921.3310139-4-andriin@fb.com>

On 10/5/19 12:59 AM, Andrii Nakryiko wrote:
> Get rid of list of BPF helpers in bpf_helpers.h (irony...) and
> auto-generate it into bpf_helpers_defs.h, which is now included from
> bpf_helpers.h.
> 
> Suggested-by: Alexei Starovoitov<ast@fb.com>
> Signed-off-by: Andrii Nakryiko<andriin@fb.com>
> ---
>   tools/lib/bpf/Makefile           |    8 +-
>   tools/lib/bpf/bpf_helpers.h      |  264 +--
>   tools/lib/bpf/bpf_helpers_defs.h | 2677 ++++++++++++++++++++++++++++++
>   3 files changed, 2685 insertions(+), 264 deletions(-)
>   create mode 100644 tools/lib/bpf/bpf_helpers_defs.h

Approach looks good to me.
imo that's better than messing with macros.

Using bpf_helpers_doc.py as part of build will help man pages too.
I think we were sloppy documenting helpers, since only Quentin
was running that script regularly.

Only question is what is the reason to commit generated .h into git?

  reply	other threads:[~2019-10-05 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-05  7:59 [PATCH bpf-next 0/3] Auto-generate list of BPF helpers Andrii Nakryiko
2019-10-05  7:59 ` [PATCH bpf-next 1/3] uapi/bpf: fix helper docs Andrii Nakryiko
2019-10-05  7:59 ` [PATCH bpf-next 2/3] scripts/bpf: teach bpf_helpers_doc.py to dump BPF helper definitions Andrii Nakryiko
2019-10-05  7:59 ` [PATCH bpf-next 3/3] libbpf: auto-generate list of " Andrii Nakryiko
2019-10-05 17:10   ` Alexei Starovoitov [this message]
2019-10-05 18:24     ` Andrii Nakryiko
2019-10-06  1:01       ` Alexei Starovoitov
2019-10-06  2:29         ` Andrii Nakryiko

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=b0df96f6-dc41-8baf-baa3-e98da94c54b7@fb.com \
    --to=ast@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.