Home
last modified time | relevance | path

Searched refs:info_len (Results 1 – 20 of 20) sorted by relevance

/tools/testing/selftests/bpf/prog_tests/
Dbpf_obj_id.c28 __u32 i, next_id, info_len, nr_id_found, duration = 0; in test_bpf_obj_id() local
80 info_len = sizeof(struct bpf_map_info) * 2; in test_bpf_obj_id()
81 bzero(&map_infos[i], info_len); in test_bpf_obj_id()
83 &info_len); in test_bpf_obj_id()
90 info_len != sizeof(struct bpf_map_info) || in test_bpf_obj_id()
96 info_len, sizeof(struct bpf_map_info), in test_bpf_obj_id()
105 info_len = sizeof(struct bpf_prog_info) * 2; in test_bpf_obj_id()
106 bzero(&prog_infos[i], info_len); in test_bpf_obj_id()
122 &info_len); in test_bpf_obj_id()
127 info_len != sizeof(struct bpf_prog_info) || in test_bpf_obj_id()
[all …]
Denable_stats.c10 __u32 info_len = sizeof(info); in test_enable_stats() local
30 memset(&info, 0, info_len); in test_enable_stats()
31 err = bpf_obj_get_info_by_fd(prog_fd, &info, &info_len); in test_enable_stats()
Dflow_dissector_reattach.c60 __u32 info_len = sizeof(info); in query_prog_id() local
63 err = bpf_obj_get_info_by_fd(prog, &info, &info_len); in query_prog_id()
64 if (CHECK_FAIL(err || info_len != sizeof(info))) { in query_prog_id()
479 __u32 info_len, link_id; in test_link_get_info() local
499 info_len = sizeof(info); in test_link_get_info()
500 err = bpf_obj_get_info_by_fd(link, &info, &info_len); in test_link_get_info()
505 CHECK_FAIL(info_len != sizeof(info)); in test_link_get_info()
523 info_len = sizeof(info); in test_link_get_info()
524 err = bpf_obj_get_info_by_fd(link, &info, &info_len); in test_link_get_info()
529 CHECK_FAIL(info_len != sizeof(info)); in test_link_get_info()
[all …]
Dtp_attach_query.c8 __u32 duration = 0, info_len, saved_prog_ids[num_progs]; in test_tp_attach_query() local
47 info_len = sizeof(prog_info); in test_tp_attach_query()
48 err = bpf_obj_get_info_by_fd(prog_fd[i], &prog_info, &info_len); in test_tp_attach_query()
Dbtf_map_in_map.c13 __u32 info_len = sizeof(info); in bpf_map_id() local
16 memset(&info, 0, info_len); in bpf_map_id()
17 err = bpf_obj_get_info_by_fd(bpf_map__fd(map), &info, &info_len); in bpf_map_id()
Dbtf.c3799 uint32_t info_len; in test_big_btf_info() local
3833 info_len = sizeof(info_garbage); in test_big_btf_info()
3837 err = bpf_obj_get_info_by_fd(btf_fd, info, &info_len); in test_big_btf_info()
3850 err = bpf_obj_get_info_by_fd(btf_fd, info, &info_len); in test_big_btf_info()
3851 if (CHECK(err || info_len != sizeof(*info), in test_big_btf_info()
3853 err, errno, info_len, sizeof(*info))) { in test_big_btf_info()
3882 uint32_t info_len; in test_btf_id() local
3915 info_len = sizeof(info[0]); in test_btf_id()
3916 err = bpf_obj_get_info_by_fd(btf_fd[0], &info[0], &info_len); in test_btf_id()
3929 err = bpf_obj_get_info_by_fd(btf_fd[1], &info[1], &info_len); in test_btf_id()
[all …]
/tools/bpf/bpftool/
Dstruct_ops.c133 struct bpf_map_info *info, __u32 info_len) in get_next_struct_ops_map() argument
156 err = bpf_obj_get_info_by_fd(fd, info, &info_len); in get_next_struct_ops_map()
193 __u32 info_len; in do_search() local
196 info = map_info_alloc(&info_len); in do_search()
204 while ((err = get_next_struct_ops_map(name, &fd, info, info_len)) == 1) { in do_search()
243 __u32 info_len; in do_one_id() local
261 info = map_info_alloc(&info_len); in do_one_id()
267 if (bpf_obj_get_info_by_fd(fd, info, &info_len)) { in do_one_id()
485 __u32 info_len = sizeof(info); in do_register() local
532 &info_len)) in do_register()
Dcgroup.c54 __u32 info_len = sizeof(info); in show_bpf_prog() local
61 if (bpf_obj_get_info_by_fd(prog_fd, &info, &info_len)) { in show_bpf_prog()
Dmain.h191 int map_parse_fd_and_info(int *argc, char ***argv, void *info, __u32 *info_len);
Dcommon.c943 int map_parse_fd_and_info(int *argc, char ***argv, void *info, __u32 *info_len) in map_parse_fd_and_info() argument
952 err = bpf_obj_get_info_by_fd(fd, info, info_len); in map_parse_fd_and_info()
/tools/testing/selftests/bpf/
Dtesting_helpers.c70 __u32 info_len = sizeof(*info); in link_info_prog_id() local
74 err = bpf_obj_get_info_by_fd(bpf_link__fd(link), info, &info_len); in link_info_prog_id()
Dtest_skb_cgroup_id_user.c83 __u32 info_len = sizeof(info); in get_map_fd_by_prog_id() local
97 if (bpf_obj_get_info_by_fd(prog_fd, &info, &info_len)) { in get_map_fd_by_prog_id()
Dtest_tcp_check_syncookie_user.c84 __u32 info_len = sizeof(info); in get_map_fd_by_prog_id() local
98 if (bpf_obj_get_info_by_fd(prog_fd, &info, &info_len)) { in get_map_fd_by_prog_id()
/tools/lib/bpf/
Dbpf.c196 __u64 info_len = (__u64)actual_rec_size * cnt; in alloc_zero_tailing_info() local
200 info = malloc(info_len); in alloc_zero_tailing_info()
833 int bpf_obj_get_info_by_fd(int bpf_fd, void *info, __u32 *info_len) in bpf_obj_get_info_by_fd() argument
840 attr.info.info_len = *info_len; in bpf_obj_get_info_by_fd()
845 *info_len = attr.info.info_len; in bpf_obj_get_info_by_fd()
Dbpf.h233 LIBBPF_API int bpf_obj_get_info_by_fd(int bpf_fd, void *info, __u32 *info_len);
Dlibbpf.h684 __u32 info_len; member
Dlibbpf.c10513 __u32 info_len = sizeof(info); in bpf_program__get_prog_info_linear() local
10522 err = bpf_obj_get_info_by_fd(fd, &info, &info_len); in bpf_program__get_prog_info_linear()
10537 if (info_len < desc->array_offset + sizeof(__u32) || in bpf_program__get_prog_info_linear()
10538 info_len < desc->count_offset + sizeof(__u32) || in bpf_program__get_prog_info_linear()
10539 (desc->size_offset > 0 && info_len < desc->size_offset)) in bpf_program__get_prog_info_linear()
10585 err = bpf_obj_get_info_by_fd(fd, &info_linear->info, &info_len); in bpf_program__get_prog_info_linear()
10615 info_linear->info_len = sizeof(struct bpf_prog_info); in bpf_program__get_prog_info_linear()
/tools/perf/util/
Dheader.c2892 u32 info_len, data_len; in process_bpf_prog_info() local
2896 if (do_read_u32(ff, &info_len)) in process_bpf_prog_info()
2901 if (info_len > sizeof(struct bpf_prog_info)) { in process_bpf_prog_info()
2910 info_linear->info_len = sizeof(struct bpf_prog_info); in process_bpf_prog_info()
2914 if (__do_read(ff, &info_linear->info, info_len)) in process_bpf_prog_info()
2916 if (info_len < sizeof(struct bpf_prog_info)) in process_bpf_prog_info()
2917 memset(((void *)(&info_linear->info)) + info_len, 0, in process_bpf_prog_info()
2918 sizeof(struct bpf_prog_info) - info_len); in process_bpf_prog_info()
Dbpf-event.c202 if (info_linear->info_len < offsetof(struct bpf_prog_info, prog_tags)) { in perf_event__synthesize_one_bpf_prog()
/tools/include/uapi/linux/
Dbpf.h616 __u32 info_len; member