samples/bpf: replace legacy map with the BTF-defined map
authorDaniel T. Lee <danieltimlee@gmail.com>
Sun, 15 Jan 2023 07:16:09 +0000 (16:16 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 15 Jan 2023 21:32:45 +0000 (13:32 -0800)
commita1f93c8fb0a836b6c891e51729f6cb98a1da47ba
treea37d83ff9e419de041007e34eb30ce24fc86a6e5
parent58e975d014e1e31bd1586be7d2be6d61bd3e3ada
samples/bpf: replace legacy map with the BTF-defined map

With libbpf 1.0 release, support for legacy BPF map declaration syntax
had been dropped. If you run a program using legacy BPF in the latest
libbpf, the following error will be output.

    libbpf: map 'lwt_len_hist_map' (legacy): legacy map definitions are deprecated, use BTF-defined maps instead
    libbpf: Use of BPF_ANNOTATE_KV_PAIR is deprecated, use BTF-defined maps in .maps section instead

This commit replaces legacy map with the BTF-defined map.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Link: https://lore.kernel.org/r/20230115071613.125791-7-danieltimlee@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/lwt_len_hist_kern.c
samples/bpf/test_cgrp2_tc_kern.c