bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC bpf-next 0/3] Revamp bpf_attr and make it easier to evolve
@ 2023-05-24 21:02 Andrii Nakryiko
  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
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Andrii Nakryiko @ 2023-05-24 21:02 UTC (permalink / raw)
  To: bpf, ast, daniel, martin.lau; +Cc: andrii, kernel-team

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-05-30 18:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 21:02 [PATCH RFC bpf-next 0/3] Revamp bpf_attr and make it easier to evolve Andrii Nakryiko
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

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).