* libbpf v0.2 released
@ 2020-10-28 17:47 Andrii Nakryiko
0 siblings, 0 replies; only message in thread
From: Andrii Nakryiko @ 2020-10-28 17:47 UTC (permalink / raw)
To: bpf; +Cc: Andrii Nakryiko
Hi all,
I've just cut v0.2 libbpf release on Github ([0]). I figured it would
be a good refresher on what went into libbpf for this release cycle. I
apologize if I missed something important in the summary, though. And
if you see any problem with this release, please report ASAP.
## New features/APIs:
- full support for BPF-to-BPF function calls, no more need for
`__always_inline`;
- support for multiple BPF programs with the same section name;
- support for accessing in-kernel per-CPU variables;
- support for type and enum value CO-RE relocations;
- libbpf will auto-adjust CO-RE direct memory loads to adjust to
32-bit host architecture;
- BPF_PROG_BIND_MAP support, .rodata will be bound automatically if
kernel supports it;
- new APIs for programmatic generation of BTF;
- support for big-endian and little-endian endianness in BTF;
- perf buffer API additions allowing better integration with polling
libraries (`perf_buffer__buffer_cnt()`, `perf_buffer__buffer_fd()`,
`perf_buffer__consume_buffer()`);
- `bpf_prog_test_run_opts()` API;
- `bpf_program__attach_freplace()` API.
## New BPF program types supported:
- sleepable fentry/fexit/fmod_ret/lsm BPF program.
## BPF-side changes:
- libbpf will automatically fall back to `bpf_probe_read[_str]()` if
`bpf_probe_read_{kernel, user}[_str]()` are not supported on older
kernels, so it's always safe to use `bpf_probe_read_{kernel,
user}[_str]()` in your application and not worry about kernel version
compatibility;
- `bpf_d_path()` helper;
- `bpf_per_cpu_ptr()` and `bpf_this_cpu_ptr()` helpers for working
with per-CPU kernel variables;
- `bpf_copy_from_user()` helper;
- `bpf_load_hdr_opt()`, `bpf_store_hdr_opt()`,
`bpf_reserve_hdr_opt()` helpers;
- `bpf_skb_cgroup_classid()` helper;
- `bpf_redirect_neigh()` and `bpf_redirect_peer()` helpers;
- `bpf_seq_printf_btf()` and `bpf_snprintf_btf()` helpers;
- `__noinline` convenience macro;
- `bpf_tail_call_static()` wrapper.
## Deprecations:
- BPF program's "title" terminology is deprecated, please use
clearer "section_name". New API `bpf_program__section_name()` added;
- `btf_ext__reloc_line_info()` and `btf_ext__reloc_func_info()`
(used by BCC) are deprecated.
[0] https://github.com/libbpf/libbpf/releases/tag/v0.2
-- Andrii
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-29 1:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 17:47 libbpf v0.2 released 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).