[PATCH RFC bpf-next 0/3] Revamp bpf_attr and make it easier to evolve

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux