Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: bpf: Remove unused bpf_map_def_legacy struct

samples/bpf no longer use bpf_map_def_legacy and instead use the
libbpf's bpf_map_def or new BTF-defined MAP format. This commit removes
unused bpf_map_def_legacy struct from selftests/bpf/bpf_legacy.h.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200707184855.30968-5-danieltimlee@gmail.com

authored by

Daniel T. Lee and committed by
Daniel Borkmann
5cfd607b cc7f641d

-14
-14
tools/testing/selftests/bpf/bpf_legacy.h
··· 2 2 #ifndef __BPF_LEGACY__ 3 3 #define __BPF_LEGACY__ 4 4 5 - /* 6 - * legacy bpf_map_def with extra fields supported only by bpf_load(), do not 7 - * use outside of samples/bpf 8 - */ 9 - struct bpf_map_def_legacy { 10 - unsigned int type; 11 - unsigned int key_size; 12 - unsigned int value_size; 13 - unsigned int max_entries; 14 - unsigned int map_flags; 15 - unsigned int inner_map_idx; 16 - unsigned int numa_node; 17 - }; 18 - 19 5 #define BPF_ANNOTATE_KV_PAIR(name, type_key, type_val) \ 20 6 struct ____btf_map_##name { \ 21 7 type_key key; \