Home
last modified time | relevance | path

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

/linux-6.6.21/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_prog_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_prog_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 serial_test_xdp_link() local
19 __u32 prog_info_len = sizeof(prog_info); in serial_test_xdp_link()
31 memset(&prog_info, 0, sizeof(prog_info)); in serial_test_xdp_link()
32 err = bpf_prog_get_info_by_fd(prog_fd1, &prog_info, &prog_info_len); in serial_test_xdp_link()
35 id1 = prog_info.id; in serial_test_xdp_link()
37 memset(&prog_info, 0, sizeof(prog_info)); in serial_test_xdp_link()
38 err = bpf_prog_get_info_by_fd(prog_fd2, &prog_info, &prog_info_len); in serial_test_xdp_link()
41 id2 = prog_info.id; in serial_test_xdp_link()
Dtp_attach_query.c13 struct bpf_prog_info prog_info; in serial_test_tp_attach_query() local
48 bzero(&prog_info, sizeof(prog_info)); in serial_test_tp_attach_query()
49 prog_info.jited_prog_len = 0; in serial_test_tp_attach_query()
50 prog_info.xlated_prog_len = 0; in serial_test_tp_attach_query()
51 prog_info.nr_map_ids = 0; in serial_test_tp_attach_query()
52 info_len = sizeof(prog_info); in serial_test_tp_attach_query()
53 err = bpf_prog_get_info_by_fd(prog_fd[i], &prog_info, in serial_test_tp_attach_query()
58 saved_prog_ids[i] = prog_info.id; in serial_test_tp_attach_query()
Dbpf_obj_id.c191 struct bpf_prog_info prog_info = {}; in serial_test_bpf_obj_id() local
195 info_len = sizeof(prog_info); in serial_test_bpf_obj_id()
219 prog_info.nr_map_ids = 1; in serial_test_bpf_obj_id()
220 err = bpf_prog_get_info_by_fd(prog_fd, &prog_info, &info_len); in serial_test_bpf_obj_id()
225 bzero(&prog_info, sizeof(prog_info)); in serial_test_bpf_obj_id()
226 info_len = sizeof(prog_info); in serial_test_bpf_obj_id()
229 prog_info.map_ids = prog_infos[i].map_ids; in serial_test_bpf_obj_id()
230 prog_info.nr_map_ids = 2; in serial_test_bpf_obj_id()
231 err = bpf_prog_get_info_by_fd(prog_fd, &prog_info, &info_len); in serial_test_bpf_obj_id()
235 memcmp(&prog_info, &prog_infos[i], info_len) || in serial_test_bpf_obj_id()
[all …]
Dtc_helpers.h9 struct bpf_prog_info prog_info = {}; in id_from_prog_fd() local
10 __u32 prog_info_len = sizeof(prog_info); in id_from_prog_fd()
13 err = bpf_obj_get_info_by_fd(fd, &prog_info, &prog_info_len); in id_from_prog_fd()
17 ASSERT_NEQ(prog_info.id, 0, "prog_info.id"); in id_from_prog_fd()
18 return prog_info.id; in id_from_prog_fd()
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()
Dunpriv_bpf_disabled.c233 struct bpf_prog_info prog_info = {}; in test_unpriv_bpf_disabled() local
234 __u32 prog_info_len = sizeof(prog_info); in test_unpriv_bpf_disabled()
276 ASSERT_OK(bpf_prog_get_info_by_fd(prog_fd, &prog_info, &prog_info_len), in test_unpriv_bpf_disabled()
278 prog_id = prog_info.id; in test_unpriv_bpf_disabled()
Dfexit_bpf2bpf.c65 struct bpf_prog_info prog_info = {}; in test_fexit_bpf2bpf_common() local
81 info_len = sizeof(prog_info); in test_fexit_bpf2bpf_common()
82 err = bpf_prog_get_info_by_fd(tgt_fd, &prog_info, &info_len); in test_fexit_bpf2bpf_common()
86 tgt_prog_id = prog_info.id; in test_fexit_bpf2bpf_common()
Dctx_rewrite.c730 struct prog_info { struct
739 struct prog_info *pinfo, in match_program() argument
803 struct prog_info pinfo = {}; in run_one_testcase()
/linux-6.6.21/tools/testing/selftests/bpf/
Dxdp_synproxy.c274 struct bpf_prog_info prog_info; in syncookie_open_bpf_maps() local
290 prog_info = (struct bpf_prog_info) { in syncookie_open_bpf_maps()
294 info_len = sizeof(prog_info); in syncookie_open_bpf_maps()
296 err = bpf_prog_get_info_by_fd(prog_fd, &prog_info, &info_len); in syncookie_open_bpf_maps()
303 if (prog_info.nr_map_ids < 2) { in syncookie_open_bpf_maps()
305 prog_info.nr_map_ids); in syncookie_open_bpf_maps()
310 for (i = 0; i < prog_info.nr_map_ids; i++) { in syncookie_open_bpf_maps()
Dtest_bpftool_synctypes.py530 prog_info = ProgFileExtractor()
531 source_prog_attach_types = set(prog_info.get_attach_types().values())
533 help_prog_attach_types = prog_info.get_prog_attach_help()
534 help_prog_options = prog_info.get_options()
535 prog_info.close()
/linux-6.6.21/samples/bpf/
Dxdp_fwd_user.c53 struct bpf_prog_info prog_info = {}; in do_detach() local
71 info_len = sizeof(prog_info); in do_detach()
79 err = bpf_prog_get_info_by_fd(prog_fd, &prog_info, &info_len); in do_detach()
88 if (strcmp(prog_info.name, prog_name)) { in do_detach()
/linux-6.6.21/tools/bpf/bpftool/
Dlink.c402 struct bpf_prog_info prog_info; in show_link_close_json() local
416 err = get_prog_info(info->prog_id, &prog_info); in show_link_close_json()
420 prog_type_str = libbpf_bpf_prog_type_str(prog_info.type); in show_link_close_json()
425 jsonw_uint_field(json_wtr, "prog_type", prog_info.type); in show_link_close_json()
740 struct bpf_prog_info prog_info; in show_link_close_plain() local
752 err = get_prog_info(info->prog_id, &prog_info); in show_link_close_plain()
756 prog_type_str = libbpf_bpf_prog_type_str(prog_info.type); in show_link_close_plain()
761 printf("\n\tprog_type %u ", prog_info.type); in show_link_close_plain()
Dprog.c221 struct bpf_prog_info prog_info; in find_metadata() local
232 memset(&prog_info, 0, sizeof(prog_info)); in find_metadata()
233 prog_info_len = sizeof(prog_info); in find_metadata()
234 ret = bpf_prog_get_info_by_fd(prog_fd, &prog_info, &prog_info_len); in find_metadata()
238 if (!prog_info.nr_map_ids) in find_metadata()
241 map_ids = calloc(prog_info.nr_map_ids, sizeof(__u32)); in find_metadata()
245 nr_maps = prog_info.nr_map_ids; in find_metadata()
246 memset(&prog_info, 0, sizeof(prog_info)); in find_metadata()
247 prog_info.nr_map_ids = nr_maps; in find_metadata()
248 prog_info.map_ids = ptr_to_u64(map_ids); in find_metadata()
[all …]
Dcommon.c336 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd, in get_prog_full_name() argument
339 const char *prog_name = prog_info->name; in get_prog_full_name()
347 strlen(prog_info->name) < BPF_OBJ_NAME_LEN - 1) in get_prog_full_name()
350 if (!prog_info->btf_id || prog_info->nr_func_info == 0) in get_prog_full_name()
354 info.func_info_rec_size = prog_info->func_info_rec_size; in get_prog_full_name()
Dbtf.c837 struct bpf_prog_info prog_info; in build_btf_tables() local
838 __u32 prog_len = sizeof(prog_info); in build_btf_tables()
843 err = build_btf_type_table(btf_prog_table, BPF_OBJ_PROG, &prog_info, in build_btf_tables()
Dmain.h137 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd,
/linux-6.6.21/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()
/linux-6.6.21/tools/lib/bpf/
Dlibbpf.c6055 void **prog_info, __u32 *prog_rec_cnt, in adjust_prog_btf_ext_info() argument
6092 new_prog_info = realloc(*prog_info, new_sz); in adjust_prog_btf_ext_info()
6095 *prog_info = new_prog_info; in adjust_prog_btf_ext_info()