diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-02-15 02:12:18 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-02-17 02:32:46 +0300 |
commit | c5a237a4db21ca7a28518c994def39d7bd62a0d1 (patch) | |
tree | ee9417fd32124f8804f8f11ee7f1ac988891dfbc /tools/testing/selftests/bpf/test_skb_cgroup_id_user.c | |
parent | c0ca277bb8bc43152d2b2fa60b47a1e1d609da45 (diff) | |
download | linux-c5a237a4db21ca7a28518c994def39d7bd62a0d1.tar.xz |
selftests/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd()
Use the new type-safe wrappers around bpf_obj_get_info_by_fd().
Fix a prog/map mixup in prog_holds_map().
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230214231221.249277-6-iii@linux.ibm.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_skb_cgroup_id_user.c')
-rw-r--r-- | tools/testing/selftests/bpf/test_skb_cgroup_id_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_skb_cgroup_id_user.c b/tools/testing/selftests/bpf/test_skb_cgroup_id_user.c index 3256de30f563..ed518d075d1d 100644 --- a/tools/testing/selftests/bpf/test_skb_cgroup_id_user.c +++ b/tools/testing/selftests/bpf/test_skb_cgroup_id_user.c @@ -93,7 +93,7 @@ int get_map_fd_by_prog_id(int prog_id) info.nr_map_ids = 1; info.map_ids = (__u64) (unsigned long) map_ids; - if (bpf_obj_get_info_by_fd(prog_fd, &info, &info_len)) { + if (bpf_prog_get_info_by_fd(prog_fd, &info, &info_len)) { log_err("Failed to get info by prog fd %d", prog_fd); goto err; } |