libbpf: Unify low-level map creation APIs w/ new bpf_map_create()
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 24 Nov 2021 19:32:30 +0000 (11:32 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 25 Nov 2021 22:35:46 +0000 (23:35 +0100)
commit992c4225419a38663d6239bc2f525b4ac0429188
tree79400371e8ce6ff3de4e70f99d55c88f7ef2f19a
parente4f7ac90c2b09766e4acf771908987391c836413
libbpf: Unify low-level map creation APIs w/ new bpf_map_create()

Mark the entire zoo of low-level map creation APIs for deprecation in
libbpf 0.7 ([0]) and introduce a new bpf_map_create() API that is
OPTS-based (and thus future-proof) and matches the BPF_MAP_CREATE
command name.

While at it, ensure that gen_loader sends map_extra field. Also remove
now unneeded btf_key_type_id/btf_value_type_id logic that libbpf is
doing anyways.

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

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124193233.3115996-2-andrii@kernel.org
tools/lib/bpf/bpf.c
tools/lib/bpf/bpf.h
tools/lib/bpf/bpf_gen_internal.h
tools/lib/bpf/gen_loader.c
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.map
tools/lib/bpf/libbpf_internal.h