|
|
Log in / Subscribe / Register

libbpf v0.4 release

From:  Andrii Nakryiko <andrii.nakryiko-AT-gmail.com>
To:  bpf <bpf-AT-vger.kernel.org>
Subject:  libbpf v0.4 release
Date:  Mon, 24 May 2021 23:30:36 -0700
Message-ID:  <CAEf4BzZSLHhESr6aKPNf97UoAYFWvahQRpAC1dkRy5FUfj_wJA@mail.gmail.com>
Cc:  Kernel Team <kernel-team-AT-fb.com>
Archive-link:  Article

libbpf v0.4 was just released ([0]). Short description of changes that
went into this release is provided below. Thanks a lot to 30
contributors that sent patches for new features, APIs, BPF helpers,
and, of course, bug fixes. And thank you to everyone who took part in
online discussions, asked questions, raised issues, made proposals,
and reviewed the code!

## New features/APIs:
  - BPF static linker APIs;
  - TC-BPF APIs;
  - subprogram address relocation support (e.e., for use with
`bpf_for_each_map_elem()`);
  - support for extern kernel functions (a.k.a. BPF unstable helpers);
  - ksym externs support for kernel modules;
  - `BTF_KIND_FLOAT` support;
  - various AF_XDP (`xsk.{c, h}`) improvements and fixes;
  - `btf__add_type()` API to copy/append BTF types generically;
  - `bpf_object__set_kernel_version()` setter;
  - `bpf_map__inner_map()` getter;
  - `__hidden` attribute for global sub-program forces static BPF
verifier verification;
  - static BPF maps and entry-point BPF programs are explicitly rejected.

## New BPF helpers:
  - `bpf_for_each_map_elem()` helper;
  - `bpf_snprintf()` helper and `BPF_SNPRINTF()` macro;
  - `bpf_check_mtu()` helper;
  - `NULL` and `KERNEL_VERSION` macros are provided by `bpf_helpers.h`;
  - user-space `BPF_CORE_READ_USER()` macro variants;
  - non-CO-RE `BPF_PROBE_READ()` and `BPF_PROBE_READ_USER()` macros.

## Bug fixes:
  - libbpf will ignore non-function pointer members in `struct_ops`;
  - Makefile fixes for install target;
  - use SOCK_CLOEXEC for netlink sockets;
  - btf_dump fixes for pointer to array of struct;
  - fixes for some of xxx_opts structs to work better with debug
compilation modes;
  - ringbuf APIs fixes and improvements for extreme cases of never
ending consumption of records;
  - `BPF_CORE_READ_BITFIELD()` macro fixes.


  [0] https://github.com/libbpf/libbpf/releases/tag/v0.4.0


-- Andrii


Copyright © 2021, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds