/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/ |
A D | metadata.c | 18 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 …]
|
A D | xdp_link.c | 15 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()
|
A D | tp_attach_query.c | 13 struct bpf_prog_info prog_info; in serial_test_tp_attach_query() local 43 bzero(&prog_info, sizeof(prog_info)); in serial_test_tp_attach_query() 44 prog_info.jited_prog_len = 0; in serial_test_tp_attach_query() 45 prog_info.xlated_prog_len = 0; in serial_test_tp_attach_query() 46 prog_info.nr_map_ids = 0; in serial_test_tp_attach_query() 47 info_len = sizeof(prog_info); in serial_test_tp_attach_query() 48 err = bpf_prog_get_info_by_fd(prog_fd[i], &prog_info, in serial_test_tp_attach_query() 53 saved_prog_ids[i] = prog_info.id; in serial_test_tp_attach_query()
|
A D | bpf_obj_id.c | 191 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() 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() 235 memcmp(&prog_info, &prog_infos[i], info_len) || in serial_test_bpf_obj_id() 236 *(int *)(long)prog_info.map_ids != saved_map_id, in serial_test_bpf_obj_id() 240 memcmp(&prog_info, &prog_infos[i], info_len), in serial_test_bpf_obj_id() [all …]
|
A D | recursion.c | 8 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()
|
A D | unpriv_bpf_disabled.c | 229 struct bpf_prog_info prog_info = {}; in test_unpriv_bpf_disabled() local 230 __u32 prog_info_len = sizeof(prog_info); in test_unpriv_bpf_disabled() 272 ASSERT_OK(bpf_prog_get_info_by_fd(prog_fd, &prog_info, &prog_info_len), in test_unpriv_bpf_disabled() 274 prog_id = prog_info.id; in test_unpriv_bpf_disabled()
|
A D | fexit_bpf2bpf.c | 65 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()
|
/linux-6.3-rc2/tools/bpf/bpftool/ |
A D | link.c | 157 struct bpf_prog_info prog_info; in show_link_close_json() local 171 err = get_prog_info(info->prog_id, &prog_info); in show_link_close_json() 175 prog_type_str = libbpf_bpf_prog_type_str(prog_info.type); in show_link_close_json() 180 jsonw_uint_field(json_wtr, "prog_type", prog_info.type); in show_link_close_json() 268 struct bpf_prog_info prog_info; in show_link_close_plain() local 280 err = get_prog_info(info->prog_id, &prog_info); in show_link_close_plain() 284 prog_type_str = libbpf_bpf_prog_type_str(prog_info.type); in show_link_close_plain() 289 printf("\n\tprog_type %u ", prog_info.type); in show_link_close_plain()
|
A D | prog.c | 221 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() 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() 249 prog_info_len = sizeof(prog_info); in find_metadata() [all …]
|
A D | common.c | 333 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd, in get_prog_full_name() argument 336 const char *prog_name = prog_info->name; in get_prog_full_name() 344 strlen(prog_info->name) < BPF_OBJ_NAME_LEN - 1) in get_prog_full_name() 347 if (!prog_info->btf_id || prog_info->nr_func_info == 0) in get_prog_full_name() 351 info.func_info_rec_size = prog_info->func_info_rec_size; in get_prog_full_name()
|
A D | btf.c | 837 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()
|
A D | main.h | 137 void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd,
|
/linux-6.3-rc2/tools/testing/selftests/bpf/ |
A D | xdp_synproxy.c | 274 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()
|
A D | test_bpftool_synctypes.py | 530 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.3-rc2/samples/bpf/ |
A D | xdp_fwd_user.c | 53 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.3-rc2/include/uapi/linux/ |
A D | cec-funcs.h | 372 __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.3-rc2/tools/lib/bpf/ |
A D | libbpf.c | 5918 void **prog_info, __u32 *prog_rec_cnt, in adjust_prog_btf_ext_info() argument 5955 new_prog_info = realloc(*prog_info, new_sz); in adjust_prog_btf_ext_info() 5958 *prog_info = new_prog_info; in adjust_prog_btf_ext_info()
|