linux-stable/tools
Andrii Nakryiko 0ed08d6725 libbpf: Add OPTS-based bpf_btf_load() API
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: https://github.com/libbpf/libbpf/issues/419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211209193840.1248570-3-andrii@kernel.org
2021-12-10 15:29:17 -08:00
..
accounting
arch Merge remote-tracking branch 'torvalds/master' into perf/core 2021-11-06 15:49:33 -03:00
bootconfig bootconfig: Cleanup dummy headers in tools/bootconfig 2021-10-10 22:16:02 -04:00
bpf bpftool: Add debug mode for gen_loader. 2021-12-05 11:40:32 -08:00
build bpf, mips: Fix build errors about __NR_bpf undeclared 2021-11-26 22:11:25 +01:00
cgroup
counter tools/counter: Create Counter tools 2021-10-17 10:54:16 +01:00
debugging
edid
firewire
firmware
gpio
hv
iio
include bpf: Pass a set of bpf_core_relo-s to prog_load command. 2021-12-02 11:18:35 -08:00
io_uring
kvm/kvm_stat KVM: kvm_stat: do not show halt_wait_ns 2021-10-18 14:07:18 -04:00
laptop
leds
lib libbpf: Add OPTS-based bpf_btf_load() API 2021-12-10 15:29:17 -08:00
memory-model
objtool Tracing updates for 5.16: 2021-11-01 20:05:19 -07:00
pci
pcmcia
perf perf/bpf_counter: Use bpf_map_create instead of bpf_create_map 2021-12-08 11:55:45 -08:00
power
rcu tools/rcu: Add an extract-stall script 2021-09-16 10:31:26 -07:00
scripts tools, build: Add RISC-V to HOSTARCH parsing 2021-11-01 17:08:21 +01:00
spi
testing selftests/bpf: Fix a compilation warning 2021-12-08 23:05:26 -08:00
thermal/tmon
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2021-10-25 22:27:19 -04:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio
vm tools/vm/page-types.c: print file offset in hexadecimal 2021-11-06 13:30:40 -07:00
wmi
Makefile tools/lib/lockdep: drop liblockdep 2021-11-12 11:07:17 -08:00