Lines Matching refs:id
237 u32 id; member
543 int id; in bpf_find_btf_id() local
563 idr_for_each_entry(&btf_idr, btf, id) { in bpf_find_btf_id()
584 u32 id, u32 *res_id) in btf_type_skip_modifiers() argument
586 const struct btf_type *t = btf_type_by_id(btf, id); in btf_type_skip_modifiers()
589 id = t->type; in btf_type_skip_modifiers()
594 *res_id = id; in btf_type_skip_modifiers()
600 u32 id, u32 *res_id) in btf_type_resolve_ptr() argument
604 t = btf_type_skip_modifiers(btf, id, NULL); in btf_type_resolve_ptr()
612 u32 id, u32 *res_id) in btf_type_resolve_func_ptr() argument
616 ptype = btf_type_resolve_ptr(btf, id, res_id); in btf_type_resolve_func_ptr()
852 u32 id, int_data; in btf_member_is_reg_int() local
855 id = m->type; in btf_member_is_reg_int()
856 t = btf_type_id_size(btf, &id, NULL); in btf_member_is_reg_int()
886 u32 id) in btf_type_skip_qualifiers() argument
888 const struct btf_type *t = btf_type_by_id(btf, id); in btf_type_skip_qualifiers()
920 u32 id = show->state.type_id; in btf_show_name() local
940 id = m->type; in btf_show_name()
950 t = btf_type_by_id(show->btf, id); in btf_show_name()
984 id = t->type; in btf_show_name()
994 id = array->type; in btf_show_name()
1000 id = t->type; in btf_show_name()
1003 id = 0; in btf_show_name()
1006 if (!id) in btf_show_name()
1008 t = btf_type_skip_qualifiers(show->btf, id); in btf_show_name()
1592 int id; in btf_alloc_id() local
1596 id = idr_alloc_cyclic(&btf_idr, btf, 1, INT_MAX, GFP_ATOMIC); in btf_alloc_id()
1597 if (id > 0) in btf_alloc_id()
1598 btf->id = id; in btf_alloc_id()
1602 if (WARN_ON_ONCE(!id)) in btf_alloc_id()
1605 return id > 0 ? 0 : id; in btf_alloc_id()
1622 idr_remove(&btf_idr, btf->id); in btf_free_id()
1844 u32 i, size, nelems = 1, id = 0; in __btf_resolve_size() local
1868 id = type->type; in __btf_resolve_size()
1901 if (type_id && id) in __btf_resolve_size()
1902 *type_id = id; in __btf_resolve_size()
3455 s32 id; in btf_parse_kptrs() local
3461 id = bpf_find_btf_id(__btf_name_by_offset(btf, t->name_off), BTF_INFO_KIND(t->info), in btf_parse_kptrs()
3463 if (id < 0) { in btf_parse_kptrs()
3464 ret = id; in btf_parse_kptrs()
3481 dtor_btf_id = btf_find_dtor_kfunc(kernel_btf, id); in btf_parse_kptrs()
3515 tab->off[i].kptr.btf_id = id; in btf_parse_kptrs()
5770 u32 id; in btf_struct_walk() local
5791 stype = btf_type_skip_modifiers(btf, mtype->type, &id); in btf_struct_walk()
5793 *next_btf_id = id; in btf_struct_walk()
5825 u32 id; in btf_struct_access() local
5828 err = btf_struct_walk(log, btf, t, off, size, &id, &tmp_flag); in btf_struct_access()
5835 *next_btf_id = id; in btf_struct_access()
5845 t = btf_type_by_id(btf, id); in btf_struct_access()
5877 const struct btf *btf, u32 id, int off, in btf_struct_ids_match() argument
5886 if (off == 0 && btf_types_are_same(btf, id, need_btf, need_type_id)) in btf_struct_ids_match()
5895 type = btf_type_by_id(btf, id); in btf_struct_ids_match()
5898 err = btf_struct_walk(log, btf, type, off, 1, &id, &flag); in btf_struct_ids_match()
5907 if (!btf_types_are_same(btf, id, need_btf, need_type_id)) { in btf_struct_ids_match()
6786 reg->id = ++env->id_gen; in btf_prepare_func_args()
6891 seq_printf(m, "btf_id:\t%u\n", btf->id); in bpf_btf_show_fdinfo()
6986 info.id = btf->id; in btf_get_info_by_fd()
7026 int btf_get_fd_by_id(u32 id) in btf_get_fd_by_id() argument
7032 btf = idr_find(&btf_idr, id); in btf_get_fd_by_id()
7049 return btf->id; in btf_obj_id()
7069 bool btf_id_set_contains(const struct btf_id_set *set, u32 id) in btf_id_set_contains() argument
7071 return bsearch(&id, set->ids, set->cnt, sizeof(u32), btf_id_cmp_func) != NULL; in btf_id_set_contains()
7074 static void *btf_id_set8_contains(const struct btf_id_set8 *set, u32 id) in btf_id_set8_contains() argument
7076 return bsearch(&id, set->pairs, set->cnt, sizeof(set->pairs[0]), btf_id_cmp_func); in btf_id_set8_contains()
7423 u32 *id; in __btf_kfunc_id_set_contains() local
7432 id = btf_id_set8_contains(set, kfunc_btf_id); in __btf_kfunc_id_set_contains()
7433 if (!id) in __btf_kfunc_id_set_contains()
7436 return id + 1; in __btf_kfunc_id_set_contains()
7699 u32 id; member
7738 bpf_log(log, "%d", cc->cands[j].id); in __print_cand_cache()
7891 cands->cands[cands->cnt].id = i; in bpf_core_add_cands()
7907 int id; in bpf_core_find_cands() local
7962 idr_for_each_entry(&btf_idr, mod_btf, id) { in bpf_core_find_cands()
8023 btf_kind_str[cc->kind], cc->name, cc->cands[i].id); in bpf_core_apply()
8025 cands.cands[i].id = cc->cands[i].id; in bpf_core_apply()