On Wed, Nov 24, 2021 at 11:32 AM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote: > > Add new OPTS-based bpf_map_create() API. Schedule deprecation of 6 (!) > existing non-extensible variants. Clean up both internal libbpf use of > to-be-deprecated APIs as well as selftests/bpf. > > Thankfully, as opposed to bpf_prog_load() and few other *_opts structs > refactorings, this one is very straightforward and doesn't require any macro > magic. > > Third patch also ensures that when libbpf 0.7 development starts we won't be > getting deprecation warning for using our own xsk_* APIs. Without that it's > hard to simulate libbpf 0.7 and ensure that there are no upcoming > deprecation warnings. > > v1->v2: > - fix one instance of bpf_map_create() passing unnecessary opts (CI). This was in test_maps.c, should have mentioned that. > > Andrii Nakryiko (4): > libbpf: unify low-level map creation APIs w/ new bpf_map_create() > libbpf: use bpf_map_create() consistently internally > libbpf: prevent deprecation warnings in xsk.c > selftests/bpf: migrate selftests to bpf_map_create() > > tools/lib/bpf/bpf.c | 140 ++++++++---------- > tools/lib/bpf/bpf.h | 33 ++++- > tools/lib/bpf/bpf_gen_internal.h | 5 +- > tools/lib/bpf/gen_loader.c | 46 ++---- > tools/lib/bpf/libbpf.c | 63 +++----- > tools/lib/bpf/libbpf.map | 1 + > tools/lib/bpf/libbpf_internal.h | 21 --- > tools/lib/bpf/libbpf_probes.c | 30 ++-- > tools/lib/bpf/skel_internal.h | 3 +- > tools/lib/bpf/xsk.c | 18 +-- > .../bpf/map_tests/array_map_batch_ops.c | 13 +- > .../bpf/map_tests/htab_map_batch_ops.c | 13 +- > .../bpf/map_tests/lpm_trie_map_batch_ops.c | 15 +- > .../selftests/bpf/map_tests/sk_storage_map.c | 50 +++---- > .../bpf/prog_tests/bloom_filter_map.c | 36 ++--- > .../selftests/bpf/prog_tests/bpf_iter.c | 8 +- > tools/testing/selftests/bpf/prog_tests/btf.c | 51 +++---- > .../bpf/prog_tests/cgroup_attach_multi.c | 12 +- > .../selftests/bpf/prog_tests/pinning.c | 4 +- > .../selftests/bpf/prog_tests/ringbuf_multi.c | 4 +- > .../bpf/prog_tests/select_reuseport.c | 21 +-- > .../selftests/bpf/prog_tests/sockmap_basic.c | 4 +- > .../selftests/bpf/prog_tests/sockmap_ktls.c | 2 +- > .../selftests/bpf/prog_tests/sockmap_listen.c | 4 +- > .../selftests/bpf/prog_tests/test_bpffs.c | 2 +- > .../selftests/bpf/test_cgroup_storage.c | 8 +- > tools/testing/selftests/bpf/test_lpm_map.c | 27 ++-- > tools/testing/selftests/bpf/test_lru_map.c | 16 +- > tools/testing/selftests/bpf/test_maps.c | 110 +++++++------- > tools/testing/selftests/bpf/test_tag.c | 5 +- > tools/testing/selftests/bpf/test_verifier.c | 52 +++---- > 31 files changed, 357 insertions(+), 460 deletions(-) > > -- > 2.30.2 >