diff options
author | Andrii Nakryiko | 2019-07-05 17:50:12 +0200 |
---|---|---|
committer | Daniel Borkmann | 2019-07-05 22:52:25 +0200 |
commit | 1639b17c72fa7ad977ccd0ad6c673e3f7048723b (patch) | |
tree | dcb5097948742ffc5be049ae008120ec7a18c522 /tools/testing/selftests/bpf/test_queue_stack_map.h | |
parent | selftests/bpf: convert selftests using BTF-defined maps to new syntax (diff) | |
download | kernel-qcow2-linux-1639b17c72fa7ad977ccd0ad6c673e3f7048723b.tar.gz kernel-qcow2-linux-1639b17c72fa7ad977ccd0ad6c673e3f7048723b.tar.xz kernel-qcow2-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/test_queue_stack_map.h')
-rw-r--r-- | tools/testing/selftests/bpf/test_queue_stack_map.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/testing/selftests/bpf/test_queue_stack_map.h b/tools/testing/selftests/bpf/test_queue_stack_map.h index 295b9b3bc5c7..0e014d3b2b36 100644 --- a/tools/testing/selftests/bpf/test_queue_stack_map.h +++ b/tools/testing/selftests/bpf/test_queue_stack_map.h @@ -10,21 +10,21 @@ int _version SEC("version") = 1; -struct bpf_map_def __attribute__ ((section("maps"), used)) map_in = { - .type = MAP_TYPE, - .key_size = 0, - .value_size = sizeof(__u32), - .max_entries = 32, - .map_flags = 0, -}; - -struct bpf_map_def __attribute__ ((section("maps"), used)) map_out = { - .type = MAP_TYPE, - .key_size = 0, - .value_size = sizeof(__u32), - .max_entries = 32, - .map_flags = 0, -}; +struct { + __uint(type, MAP_TYPE); + __uint(max_entries, 32); + __uint(map_flags, 0); + __uint(key_size, 0); + __uint(value_size, sizeof(__u32)); +} map_in SEC(".maps"); + +struct { + __uint(type, MAP_TYPE); + __uint(max_entries, 32); + __uint(map_flags, 0); + __uint(key_size, 0); + __uint(value_size, sizeof(__u32)); +} map_out SEC(".maps"); SEC("test") int _test(struct __sk_buff *skb) |