Re: [PATCH v6 bpf-next 2/5] libbpf: Add "map_extra" as a per-map-type extra flag
From: Andrii Nakryiko <hidden>
Date: 2021-10-28 18:14:45
From: Andrii Nakryiko <hidden>
Date: 2021-10-28 18:14:45
On Wed, Oct 27, 2021 at 4:45 PM Joanne Koong [off-list ref] wrote:
This patch adds the libbpf infrastructure for supporting a per-map-type "map_extra" field, whose definition will be idiosyncratic depending on map type. For example, for the bloom filter map, the lower 4 bits of map_extra is used to denote the number of hash functions. Please note that until libbpf 1.0 is here, the "bpf_create_map_params" struct is used as a temporary means for propagating the map_extra field to the kernel. Signed-off-by: Joanne Koong <redacted> ---
LGTM. Acked-by: Andrii Nakryiko <andrii@kernel.org>
tools/lib/bpf/bpf.c | 27 ++++++++++++++++++++++- tools/lib/bpf/bpf_gen_internal.h | 2 +- tools/lib/bpf/gen_loader.c | 3 ++- tools/lib/bpf/libbpf.c | 38 +++++++++++++++++++++++++++----- tools/lib/bpf/libbpf.h | 3 +++ tools/lib/bpf/libbpf.map | 2 ++ tools/lib/bpf/libbpf_internal.h | 25 ++++++++++++++++++++- 7 files changed, 91 insertions(+), 9 deletions(-)
[...]