aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
diff options
context:
space:
mode:
authorHengqi Chen <[email protected]>2021-10-03 16:58:44 +0000
committerAndrii Nakryiko <[email protected]>2021-10-06 19:34:02 +0000
commit6f2b219b62a4376ca2da15c503de79d0650c8155 (patch)
treed6b57e0ba51373477c58bea70ec99e43e553913e /tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
parentlibbpf: Deprecate bpf_{map,program}__{prev,next} APIs since v0.7 (diff)
downloadkernel-6f2b219b62a4376ca2da15c503de79d0650c8155.tar.gz
kernel-6f2b219b62a4376ca2da15c503de79d0650c8155.zip
selftests/bpf: Switch to new bpf_object__next_{map,program} APIs
Replace deprecated bpf_{map,program}__next APIs with newly added bpf_object__next_{map,program} APIs, so that no compilation warnings emit. Signed-off-by: Hengqi Chen <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_rtt.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/tcp_rtt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
index d207e968e6b1..265b4fe33ec3 100644
--- a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
+++ b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
@@ -109,7 +109,7 @@ static int run_test(int cgroup_fd, int server_fd)
return -1;
}
- map = bpf_map__next(NULL, obj);
+ map = bpf_object__next_map(obj, NULL);
map_fd = bpf_map__fd(map);
err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0);