diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-07-05 08:50:12 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-05 22:52:25 +0200 |
commit | 1639b17c72fa7ad977ccd0ad6c673e3f7048723b (patch) | |
tree | dcb5097948742ffc5be049ae008120ec7a18c522 /tools/testing/selftests/bpf/progs/xdping_kern.c | |
parent | bc7430cc8bfb51577e466a8ca02ad87375a70bde (diff) | |
download | linux-1639b17c72fa7ad977ccd0ad6c673e3f7048723b.tar.gz linux-1639b17c72fa7ad977ccd0ad6c673e3f7048723b.tar.bz2 linux-1639b17c72fa7ad977ccd0ad6c673e3f7048723b.zip |
selftests/bpf: convert legacy BPF maps to BTF-defined ones
Convert selftests that were originally left out and new ones added
recently to consistently use BTF-defined maps.
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/xdping_kern.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/xdping_kern.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/testing/selftests/bpf/progs/xdping_kern.c b/tools/testing/selftests/bpf/progs/xdping_kern.c index 87393e7c667c..112a2857f4e2 100644 --- a/tools/testing/selftests/bpf/progs/xdping_kern.c +++ b/tools/testing/selftests/bpf/progs/xdping_kern.c @@ -17,12 +17,12 @@ #include "xdping.h" -struct bpf_map_def SEC("maps") ping_map = { - .type = BPF_MAP_TYPE_HASH, - .key_size = sizeof(__u32), - .value_size = sizeof(struct pinginfo), - .max_entries = 256, -}; +struct { + __uint(type, BPF_MAP_TYPE_HASH); + __uint(max_entries, 256); + __type(key, __u32); + __type(value, struct pinginfo); +} ping_map SEC(".maps"); static __always_inline void swap_src_dst_mac(void *data) { |