diff options
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c b/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c index 38e10c9fd996..2e233613d1fc 100644 --- a/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c +++ b/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c @@ -15,24 +15,18 @@ #include "test_tcpbpf.h" struct { - __u32 type; - __u32 max_entries; - __u32 *key; - struct tcpbpf_globals *value; -} global_map SEC(".maps") = { - .type = BPF_MAP_TYPE_ARRAY, - .max_entries = 4, -}; + __uint(type, BPF_MAP_TYPE_ARRAY); + __uint(max_entries, 4); + __type(key, __u32); + __type(value, struct tcpbpf_globals); +} global_map SEC(".maps"); struct { - __u32 type; - __u32 max_entries; - __u32 *key; - int *value; -} sockopt_results SEC(".maps") = { - .type = BPF_MAP_TYPE_ARRAY, - .max_entries = 2, -}; + __uint(type, BPF_MAP_TYPE_ARRAY); + __uint(max_entries, 2); + __type(key, __u32); + __type(value, int); +} sockopt_results SEC(".maps"); static inline void update_event_map(int event) { |