Home
last modified time | relevance | path

Searched refs:prog_info (Results 1 – 14 of 14) sorted by relevance

/Linux-v5.15/tools/testing/selftests/bpf/prog_tests/
Dmetadata.c18 struct bpf_prog_info prog_info = {}; in prog_holds_map() local
32 prog_info_len = sizeof(prog_info); in prog_holds_map()
33 ret = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &prog_info_len); in prog_holds_map()
37 map_ids = calloc(prog_info.nr_map_ids, sizeof(__u32)); in prog_holds_map()
41 nr_maps = prog_info.nr_map_ids; in prog_holds_map()
42 memset(&prog_info, 0, sizeof(prog_info)); in prog_holds_map()
43 prog_info.nr_map_ids = nr_maps; in prog_holds_map()
44 prog_info.map_ids = ptr_to_u64(map_ids); in prog_holds_map()
45 prog_info_len = sizeof(prog_info); in prog_holds_map()
47 ret = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &prog_info_len); in prog_holds_map()
[all …]
Dxdp_link.c15 struct bpf_prog_info prog_info; in test_xdp_link() local
18 __u32 prog_info_len = sizeof(prog_info); in test_xdp_link()
30 memset(&prog_info, 0, sizeof(prog_info)); in test_xdp_link()
31 err = bpf_obj_get_info_by_fd(prog_fd1, &prog_info, &prog_info_len); in test_xdp_link()
34 id1 = prog_info.id; in test_xdp_link()
36 memset(&prog_info, 0, sizeof(prog_info)); in test_xdp_link()
37 err = bpf_obj_get_info_by_fd(prog_fd2, &prog_info, &prog_info_len); in test_xdp_link()
40 id2 = prog_info.id; in test_xdp_link()
Dtp_attach_query.c13 struct bpf_prog_info prog_info; in test_tp_attach_query() local
43 bzero(&prog_info, sizeof(prog_info)); in test_tp_attach_query()
44 prog_info.jited_prog_len = 0; in test_tp_attach_query()
45 prog_info.xlated_prog_len = 0; in test_tp_attach_query()
46 prog_info.nr_map_ids = 0; in test_tp_attach_query()
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()
52 saved_prog_ids[i] = prog_info.id; in test_tp_attach_query()
Dbpf_obj_id.c191 struct bpf_prog_info prog_info = {}; in test_bpf_obj_id() local
195 info_len = sizeof(prog_info); in test_bpf_obj_id()
219 prog_info.nr_map_ids = 1; in test_bpf_obj_id()
220 err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len); in test_bpf_obj_id()
225 bzero(&prog_info, sizeof(prog_info)); in test_bpf_obj_id()
226 info_len = sizeof(prog_info); in test_bpf_obj_id()
229 prog_info.map_ids = prog_infos[i].map_ids; in test_bpf_obj_id()
230 prog_info.nr_map_ids = 2; in test_bpf_obj_id()
231 err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len); in test_bpf_obj_id()
235 memcmp(&prog_info, &prog_infos[i], info_len) || in test_bpf_obj_id()
[all …]
Drecursion.c8 struct bpf_prog_info prog_info = {}; in test_recursion() local
9 __u32 prog_info_len = sizeof(prog_info); in test_recursion()
35 &prog_info, &prog_info_len); in test_recursion()
38 ASSERT_EQ(prog_info.recursion_misses, 2, "recursion_misses"); in test_recursion()
Dfexit_bpf2bpf.c62 struct bpf_prog_info prog_info = {}; in test_fexit_bpf2bpf_common() local
76 info_len = sizeof(prog_info); in test_fexit_bpf2bpf_common()
77 err = bpf_obj_get_info_by_fd(tgt_fd, &prog_info, &info_len); in test_fexit_bpf2bpf_common()
81 tgt_prog_id = prog_info.id; in test_fexit_bpf2bpf_common()
/Linux-v5.15/tools/bpf/bpftool/
Dlink.c115 struct bpf_prog_info prog_info; in show_link_close_json() local
128 err = get_prog_info(info->prog_id, &prog_info); in show_link_close_json()
132 if (prog_info.type < prog_type_name_size) in show_link_close_json()
134 prog_type_name[prog_info.type]); in show_link_close_json()
137 prog_info.type); in show_link_close_json()
209 struct bpf_prog_info prog_info; in show_link_close_plain() local
220 err = get_prog_info(info->prog_id, &prog_info); in show_link_close_plain()
224 if (prog_info.type < prog_type_name_size) in show_link_close_plain()
226 prog_type_name[prog_info.type]); in show_link_close_plain()
228 printf("\n\tprog_type %u ", prog_info.type); in show_link_close_plain()
Dprog.c163 struct bpf_prog_info prog_info; in find_metadata() local
174 memset(&prog_info, 0, sizeof(prog_info)); in find_metadata()
175 prog_info_len = sizeof(prog_info); in find_metadata()
176 ret = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &prog_info_len); in find_metadata()
180 if (!prog_info.nr_map_ids) in find_metadata()
183 map_ids = calloc(prog_info.nr_map_ids, sizeof(__u32)); in find_metadata()
187 nr_maps = prog_info.nr_map_ids; in find_metadata()
188 memset(&prog_info, 0, sizeof(prog_info)); in find_metadata()
189 prog_info.nr_map_ids = nr_maps; in find_metadata()
190 prog_info.map_ids = ptr_to_u64(map_ids); in find_metadata()
[all …]
Dbtf_dumper.c35 struct bpf_prog_info_linear *prog_info = NULL; in dump_prog_id_as_func_ptr() local
58 prog_info = bpf_program__get_prog_info_linear(prog_fd, in dump_prog_id_as_func_ptr()
61 if (IS_ERR(prog_info)) { in dump_prog_id_as_func_ptr()
62 prog_info = NULL; in dump_prog_id_as_func_ptr()
65 info = &prog_info->info; in dump_prog_id_as_func_ptr()
95 free(prog_info); in dump_prog_id_as_func_ptr()
Dbtf.c755 struct bpf_prog_info prog_info; in build_btf_tables() local
756 __u32 prog_len = sizeof(prog_info); in build_btf_tables()
761 err = build_btf_type_table(btf_prog_table, BPF_OBJ_PROG, &prog_info, in build_btf_tables()
/Linux-v5.15/tools/testing/selftests/bpf/
Dtest_bpftool_synctypes.py489 prog_info = ProgFileExtractor()
490 prog_types = set(prog_info.get_prog_types().keys())
508 source_prog_attach_types = set(prog_info.get_attach_types().values())
510 help_prog_attach_types = prog_info.get_prog_attach_help()
511 help_prog_options = prog_info.get_options()
512 prog_info.close()
/Linux-v5.15/tools/lib/bpf/
Dxsk.c615 struct bpf_prog_info prog_info = {}; in xsk_lookup_bpf_maps() local
620 err = bpf_obj_get_info_by_fd(ctx->prog_fd, &prog_info, &prog_len); in xsk_lookup_bpf_maps()
624 num_maps = prog_info.nr_map_ids; in xsk_lookup_bpf_maps()
626 map_ids = calloc(prog_info.nr_map_ids, sizeof(*map_ids)); in xsk_lookup_bpf_maps()
630 memset(&prog_info, 0, prog_len); in xsk_lookup_bpf_maps()
631 prog_info.nr_map_ids = num_maps; in xsk_lookup_bpf_maps()
632 prog_info.map_ids = (__u64)(unsigned long)map_ids; in xsk_lookup_bpf_maps()
634 err = bpf_obj_get_info_by_fd(ctx->prog_fd, &prog_info, &prog_len); in xsk_lookup_bpf_maps()
640 for (i = 0; i < prog_info.nr_map_ids; i++) { in xsk_lookup_bpf_maps()
Dlibbpf.c5355 void **prog_info, __u32 *prog_rec_cnt, in adjust_prog_btf_ext_info() argument
5393 new_prog_info = realloc(*prog_info, new_sz); in adjust_prog_btf_ext_info()
5396 *prog_info = new_prog_info; in adjust_prog_btf_ext_info()
/Linux-v5.15/include/uapi/linux/
Dcec-funcs.h372 __u8 prog_info, in cec_msg_timer_status() argument
381 (prog_info ? 0x10 : 0) | in cec_msg_timer_status()
382 (prog_info ? prog_info : prog_error); in cec_msg_timer_status()
383 if (prog_info == CEC_OP_PROG_INFO_NOT_ENOUGH_SPACE || in cec_msg_timer_status()
384 prog_info == CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE || in cec_msg_timer_status()
395 __u8 *prog_info, in cec_ops_timer_status() argument
403 *prog_info = msg->msg[2] & 0xf; in cec_ops_timer_status()
406 *prog_info = 0; in cec_ops_timer_status()
409 if (*prog_info == CEC_OP_PROG_INFO_NOT_ENOUGH_SPACE || in cec_ops_timer_status()
410 *prog_info == CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE || in cec_ops_timer_status()