From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>,
<martin.lau@kernel.org>
Cc: <andrii@kernel.org>, <kernel-team@meta.com>
Subject: [PATCH RFC bpf-next 0/3] Revamp bpf_attr and make it easier to evolve
Date: Wed, 24 May 2023 14:02:40 -0700 [thread overview]
Message-ID: <20230524210243.605832-1-andrii@kernel.org> (raw)
RFC patch set revamping anonymous substructs of union bpf_attr, which would
allow nicer and more coherent evolution of bpf() syscall arguments, especially
for commands like BPF_MAP_CREATE and BPF_PROG_LOAD. See patch #1 for
justification and more details. Patch #2 demonstrates how straightforward it
is to switch to new-style substricts in kernel code (and keep in mind that
this is optional until we need some new field for a given command, so we can
do it completely asynchronously from landing bpf_attr changes themselves).
Patch #3 shows also similar libbpf changes, except for libbpf single patches
switches over entire libbpf code base to new-style substructs (except
skel_internal.h, due to concerns that users might be reliant on outdated
system-wide linux/bpf.h UAPI header).
Andrii Nakryiko (3):
bpf: revamp bpf_attr and name each command's field and substruct
bpf: use new named bpf_attr substructs for few commands
libbpf: use new bpf_xxx_attr structs for bpf() commands
include/uapi/linux/bpf.h | 235 +++++++++++++++++----
kernel/bpf/syscall.c | 77 ++++---
tools/include/uapi/linux/bpf.h | 235 +++++++++++++++++----
tools/lib/bpf/bpf.c | 355 ++++++++++++++++----------------
tools/lib/bpf/gen_loader.c | 78 +++----
tools/lib/bpf/libbpf.c | 4 +-
tools/lib/bpf/libbpf_internal.h | 2 +-
7 files changed, 641 insertions(+), 345 deletions(-)
--
2.34.1
next reply other threads:[~2023-05-24 21:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 21:02 Andrii Nakryiko [this message]
2023-05-24 21:02 ` [PATCH RFC bpf-next 1/3] bpf: revamp bpf_attr and name each command's field and substruct Andrii Nakryiko
2023-05-25 3:18 ` Alexei Starovoitov
2023-05-25 17:19 ` Andrii Nakryiko
2023-05-25 21:51 ` Daniel Borkmann
2023-05-25 23:39 ` Andrii Nakryiko
2023-05-30 17:41 ` Alexei Starovoitov
2023-05-30 18:26 ` Andrii Nakryiko
2023-05-24 21:02 ` [PATCH RFC bpf-next 2/3] bpf: use new named bpf_attr substructs for few commands Andrii Nakryiko
2023-05-24 21:02 ` [PATCH RFC bpf-next 3/3] libbpf: use new bpf_xxx_attr structs for bpf() commands 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=20230524210243.605832-1-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@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).