aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/global_data.c
diff options
context:
space:
mode:
authorChristy Lee <christylee@fb.com>2022-01-07 16:42:17 -0800
committerAndrii Nakryiko <andrii@kernel.org>2022-01-12 17:01:38 -0800
commit8d6fabf1654a8c26e4e081d0b934285d6d8868cb (patch)
treea9ba6d75c623a1e0d31dc0b395405dc2164c8e16 /tools/testing/selftests/bpf/prog_tests/global_data.c
parentperf: Stop using bpf_map__def() API (diff)
downloadlinux-8d6fabf1654a8c26e4e081d0b934285d6d8868cb.tar.gz
linux-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.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/global_data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/global_data.c b/tools/testing/selftests/bpf/prog_tests/global_data.c
index 9da131b32e13..917165e04427 100644
--- a/tools/testing/selftests/bpf/prog_tests/global_data.c
+++ b/tools/testing/selftests/bpf/prog_tests/global_data.c
@@ -121,7 +121,7 @@ static void test_global_data_rdonly(struct bpf_object *obj, __u32 duration)
if (CHECK_FAIL(map_fd < 0))
return;
- buff = malloc(bpf_map__def(map)->value_size);
+ buff = malloc(bpf_map__value_size(map));
if (buff)
err = bpf_map_update_elem(map_fd, &zero, buff, 0);
free(buff);