diff options
author | Christy Lee <christylee@fb.com> | 2022-01-07 16:42:17 -0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-01-12 17:01:38 -0800 |
commit | 8d6fabf1654a8c26e4e081d0b934285d6d8868cb (patch) | |
tree | a9ba6d75c623a1e0d31dc0b395405dc2164c8e16 /tools/testing/selftests/bpf/prog_tests/global_data_init.c | |
parent | 924b1cd61148ddd32254c933c6440b3f74d40996 (diff) | |
download | lwn-8d6fabf1654a8c26e4e081d0b934285d6d8868cb.tar.gz lwn-8d6fabf1654a8c26e4e081d0b934285d6d8868cb.zip |
selftests/bpf: Stop using bpf_map__def() API
libbpf bpf_map__def() API is being deprecated, replace selftests/bpf's
usage with the appropriate getters and setters.
Signed-off-by: Christy Lee <christylee@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220108004218.355761-5-christylee@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/global_data_init.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/global_data_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/global_data_init.c b/tools/testing/selftests/bpf/prog_tests/global_data_init.c index 1db86eab101b..57331c606964 100644 --- a/tools/testing/selftests/bpf/prog_tests/global_data_init.c +++ b/tools/testing/selftests/bpf/prog_tests/global_data_init.c @@ -20,7 +20,7 @@ void test_global_data_init(void) if (CHECK_FAIL(!map || !bpf_map__is_internal(map))) goto out; - sz = bpf_map__def(map)->value_size; + sz = bpf_map__value_size(map); newval = malloc(sz); if (CHECK_FAIL(!newval)) goto out; |