[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191006032008.2571427-1-andriin@fb.com>
Date: Sat, 5 Oct 2019 20:20:05 -0700
From: Andrii Nakryiko <andriin@...com>
To: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>, <ast@...com>,
<daniel@...earbox.net>
CC: <andrii.nakryiko@...il.com>, <kernel-team@...com>,
Andrii Nakryiko <andriin@...com>
Subject: [PATCH v2 bpf-next 0/3] Auto-generate list of BPF helpers
This patch set adds ability to auto-generate list of BPF helper definitions.
It relies on existing scripts/bpf_helpers_doc.py and include/uapi/linux/bpf.h
having a well-defined set of comments. bpf_helper_defs.h contains all BPF
helper signatures which stay in sync with latest bpf.h UAPI. This
auto-generated header is included from bpf_helpers.h, while all previously
hand-written BPF helper definitions are simultaneously removed in patch #3.
The end result is less manually maintained and redundant boilerplate code,
while also more consistent and well-documented set of BPF helpers. Generated
helper definitions are completely independent from a specific bpf.h on
a target system, because it doesn't use BPF_FUNC_xxx enums.
v1->v2:
- add bpf_helper_defs.h to .gitignore and `make clean` (Alexei);
Andrii Nakryiko (3):
uapi/bpf: fix helper docs
scripts/bpf: teach bpf_helpers_doc.py to dump BPF helper definitions
libbpf: auto-generate list of BPF helper definitions
include/uapi/linux/bpf.h | 32 ++--
scripts/bpf_helpers_doc.py | 155 ++++++++++++++++++-
tools/include/uapi/linux/bpf.h | 32 ++--
tools/lib/bpf/.gitignore | 1 +
tools/lib/bpf/Makefile | 10 +-
tools/lib/bpf/bpf_helpers.h | 264 +--------------------------------
6 files changed, 196 insertions(+), 298 deletions(-)
--
2.17.1
Powered by blists - more mailing lists