diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-07-05 08:50:11 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-05 22:52:25 +0200 |
commit | bc7430cc8bfb51577e466a8ca02ad87375a70bde (patch) | |
tree | c56b050f3bb07c491da3f0fa082e651dbfe6d993 /tools/testing/selftests/bpf/progs/test_tcp_estats.c | |
parent | 00acd00814527a1856c92beda17475205bddaba6 (diff) |
selftests/bpf: convert selftests using BTF-defined maps to new syntax
Convert all the existing selftests that are already using BTF-defined
maps to use new syntax (with no static data initialization).
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/test_tcp_estats.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_tcp_estats.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_tcp_estats.c b/tools/testing/selftests/bpf/progs/test_tcp_estats.c index df98f7e32832..c8c595da38d4 100644 --- a/tools/testing/selftests/bpf/progs/test_tcp_estats.c +++ b/tools/testing/selftests/bpf/progs/test_tcp_estats.c @@ -149,14 +149,11 @@ struct tcp_estats_basic_event { }; struct { - __u32 type; - __u32 max_entries; - __u32 *key; - struct tcp_estats_basic_event *value; -} ev_record_map SEC(".maps") = { - .type = BPF_MAP_TYPE_HASH, - .max_entries = 1024, -}; + __uint(type, BPF_MAP_TYPE_HASH); + __uint(max_entries, 1024); + __type(key, __u32); + __type(value, struct tcp_estats_basic_event); +} ev_record_map SEC(".maps"); struct dummy_tracepoint_args { unsigned long long pad; |