Home
last modified time | relevance | path

Searched refs:type_id (Results 1 – 25 of 76) sorted by relevance

1234

/linux/tools/bpf/bpftool/Documentation/
H A Dbpftool-btf.rst107 [1] PTR '(anon)' type_id=2
109 'pad' type_id=3 bits_offset=0
110 'sock' type_id=4 bits_offset=64
112 [4] PTR '(anon)' type_id=5
162 [1] PTR '(anon)' type_id=2
164 'a' type_id=3 bits_offset=0
165 'b' type_id=4 bits_offset=0
168 'const_int_field' type_id=5 bits_offset=0
169 'bitfield_field' type_id=3 bits_offset=32 bitfield_size=4
170 'arr_field' type_id
[all...]
/linux/tools/bpf/bpftool/
H A Dbtf_dumper.c24 static int btf_dumper_do_type(const struct btf_dumper *d, __u32 type_id,
80 func_type = btf__type_by_id(prog_btf, finfo.type_id); in dump_prog_id_as_func_ptr()
135 static int btf_dumper_modifier(const struct btf_dumper *d, __u32 type_id, in btf_dumper_modifier() argument
140 actual_type_id = btf__resolve_type(d->btf, type_id); in btf_dumper_modifier()
247 static int btf_dumper_array(const struct btf_dumper *d, __u32 type_id, in btf_dumper_array() argument
250 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_array()
465 static int btf_dumper_struct(const struct btf_dumper *d, __u32 type_id, in btf_dumper_struct() argument
475 t = btf__type_by_id(d->btf, type_id); in btf_dumper_struct()
513 static int btf_dumper_var(const struct btf_dumper *d, __u32 type_id, in btf_dumper_var() argument
516 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_var()
527 btf_dumper_datasec(const struct btf_dumper * d,__u32 type_id,const void * data) btf_dumper_datasec() argument
555 btf_dumper_do_type(const struct btf_dumper * d,__u32 type_id,__u8 bit_offset,const void * data) btf_dumper_do_type() argument
598 btf_dumper_type(const struct btf_dumper * d,__u32 type_id,const void * data) btf_dumper_type() argument
619 __btf_dumper_type_only(const struct btf * btf,__u32 type_id,char * func_sig,int pos,int size) __btf_dumper_type_only() argument
747 btf_dumper_type_only(const struct btf * btf,__u32 type_id,char * func_sig,int size) btf_dumper_type_only() argument
[all...]
H A Dgen.c2103 static void btfgen_mark_member(struct btfgen_info *info, int type_id, int idx) in btfgen_new_info()
2105 const struct btf_type *t = btf__type_by_id(info->marked_btf, type_id); in btfgen_new_info()
2112 btfgen_mark_type(struct btfgen_info *info, unsigned int type_id, bool follow_pointers)
2114 const struct btf_type *btf_type = btf__type_by_id(info->src_btf, type_id); in btfgen_mark_member()
2121 if (type_id == 0)
2125 cloned_type = (struct btf_type *) btf__type_by_id(info->marked_btf, type_id); in btfgen_mark_type()
2180 p_err("unsupported kind: %s (%u)", btf_kind_str(btf_type), type_id); in btfgen_mark_type()
2193 unsigned int type_id = targ_spec->root_type_id; in btfgen_mark_type()
2197 btf_type = btf__type_by_id(btf, type_id); in btfgen_record_field_relo()
2198 err = btfgen_mark_type(info, type_id, fals in btfgen_record_field_relo()
2113 btfgen_mark_member(struct btfgen_info * info,int type_id,int idx) btfgen_mark_member() argument
2122 btfgen_mark_type(struct btfgen_info * info,unsigned int type_id,bool follow_pointers) btfgen_mark_type() argument
2203 unsigned int type_id = targ_spec->root_type_id; btfgen_record_field_relo() local
2259 btfgen_mark_type_match(struct btfgen_info * info,__u32 type_id,bool behind_ptr) btfgen_mark_type_match() argument
2603 __u32 *type_id; btfgen_get_btf() local
[all...]
/linux/net/ipv4/
H A Dbpf_tcp_ca.c23 s32 type_id; in bpf_tcp_ca_init() local
25 type_id = btf_find_by_name_kind(btf, "sock", BTF_KIND_STRUCT); in bpf_tcp_ca_init()
26 if (type_id < 0) in bpf_tcp_ca_init()
28 sock_id = type_id; in bpf_tcp_ca_init()
30 type_id = btf_find_by_name_kind(btf, "tcp_sock", BTF_KIND_STRUCT); in bpf_tcp_ca_init()
31 if (type_id < 0) in bpf_tcp_ca_init()
33 tcp_sock_id = type_id; in bpf_tcp_ca_init()
36 type_id = btf_find_by_name_kind(btf, "tcp_congestion_ops", BTF_KIND_STRUCT); in bpf_tcp_ca_init()
37 if (type_id < 0) in bpf_tcp_ca_init()
39 tcp_congestion_ops_type = btf_type_by_id(btf, type_id); in bpf_tcp_ca_init()
[all...]
/linux/tools/lib/bpf/
H A Dbtf.c644 static int btf_validate_str(const struct btf *btf, __u32 str_off, const char *what, __u32 type_id) in btf_validate_type()
650 pr_warn("btf: type [%u]: invalid %s (string offset %u)\n", type_id, what, str_off); in btf_validate_type()
845 struct btf_type *btf_type_by_id(const struct btf *btf, __u32 type_id) in determine_ptr_size()
847 if (type_id == 0) in determine_ptr_size()
849 if (type_id < btf->start_id) in btf_ptr_sz()
850 return btf_type_by_id(btf->base_btf, type_id); in btf_ptr_sz()
851 return btf->types_data + btf->type_offs[type_id - btf->start_id]; in btf_ptr_sz()
854 const struct btf_type *btf__type_by_id(const struct btf *btf, __u32 type_id) in btf_ptr_sz()
856 if (type_id >= btf->start_id + btf->nr_types)
858 return btf_type_by_id((struct btf *)btf, type_id);
615 btf_validate_str(const struct btf * btf,__u32 str_off,const char * what,__u32 type_id) btf_validate_str() argument
789 btf_type_by_id(const struct btf * btf,__u32 type_id) btf_type_by_id() argument
798 btf__type_by_id(const struct btf * btf,__u32 type_id) btf__type_by_id() argument
931 btf__resolve_size(const struct btf * btf,__u32 type_id) btf__resolve_size() argument
1041 btf__resolve_type(const struct btf * btf,__u32 type_id) btf__resolve_type() argument
2293 __u32 *type_id, *str_off; btf__add_btf() local
2643 btf__add_field(struct btf * btf,const char * name,int type_id,__u32 bit_offset,__u32 bit_size) btf__add_field() argument
3090 btf__add_func_param(struct btf * btf,const char * name,int type_id) btf__add_func_param() argument
3146 btf__add_var(struct btf * btf,const char * name,int linkage,int type_id) btf__add_var() argument
4016 btf_dedup_table_add(struct btf_dedup * d,long hash,__u32 type_id) btf_dedup_table_add() argument
4573 int type_id; btf_dedup_prep() local
4638 btf_dedup_prim_type(struct btf_dedup * d,__u32 type_id) btf_dedup_prim_type() argument
4738 is_type_mapped(struct btf_dedup * d,uint32_t type_id) is_type_mapped() argument
4748 resolve_type_id(struct btf_dedup * d,__u32 type_id) resolve_type_id() argument
4759 resolve_fwd_id(struct btf_dedup * d,uint32_t type_id) resolve_fwd_id() argument
5278 btf_dedup_struct_type(struct btf_dedup * d,__u32 type_id) btf_dedup_struct_type() argument
5374 btf_dedup_ref_type(struct btf_dedup * d,__u32 type_id) btf_dedup_ref_type() argument
5523 __u32 type_id; btf_dedup_fill_unique_names_map() local
5553 btf_dedup_resolve_fwd(struct btf_dedup * d,struct hashmap * names_map,__u32 type_id) btf_dedup_resolve_fwd() argument
5710 btf_dedup_remap_type_id(__u32 * type_id,void * ctx) btf_dedup_remap_type_id() argument
5741 __u32 *type_id; btf_dedup_remap_types() local
6253 btf_permute_remap_type_id(__u32 * type_id,void * ctx) btf_permute_remap_type_id() argument
6333 __u32 *type_id; btf__permute() local
[all...]
H A Drelo_core.c32 static s64 btf__resolve_size(const struct btf *btf, u32 type_id) in btf__resolve_size() argument
37 t = btf_type_by_id(btf, type_id); in btf__resolve_size()
81 t = btf_type_by_id(btf, acc->type_id); in is_flex_arr()
279 spec->root_type_id = relo->type_id; in bpf_core_parse_spec()
306 t = skip_mods_and_typedefs(btf, relo->type_id, &id); in bpf_core_parse_spec()
312 acc->type_id = id; in bpf_core_parse_spec()
359 acc->type_id = id; in bpf_core_parse_spec()
378 spec->spec[spec->len].type_id = id; in bpf_core_parse_spec()
388 prog_name, relo->type_id, spec_str, i, id, btf_kind_str(t)); in bpf_core_parse_spec()
501 local_id = local_acc->type_id; in bpf_core_match_member()
[all …]
H A Dlibbpf_internal.h247 struct btf_type *btf_type_by_id(const struct btf *btf, __u32 type_id);
540 __u32 type_id;
558 i->type_id = bswap_32(i->type_id); in bpf_line_info_bswap()
572 i->type_id = bswap_32(i->type_id);
602 typedef int (*type_id_visit_fn)(__u32 *type_id, void *ctx);
535 __u32 type_id; global() member
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbtf_dump.c664 __s32 type_id; in test_btf_dump_struct_data()
678 type_id = btf__find_by_name(btf, name); in test_btf_dump_struct_data()
679 if (!ASSERT_GE(type_id, 0, "find type id")) in test_btf_dump_struct_data()
681 type_sz = btf__resolve_size(btf, type_id); in test_btf_dump_struct_data()
683 ret = btf_dump__dump_type_data(d, type_id, ptr, ptr_sz, &opts); in test_btf_dump_struct_data()
964 __s32 type_id; in test_btf_dump_string_data()
1034 type_id = btf__find_by_name(btf, "file_operations"); in test_btf_dump_datasec_data()
1035 if (ASSERT_GT(type_id, 0, "find type id")) { in test_btf_dump_datasec_data()
1036 type_sz = btf__resolve_size(btf, type_id); in test_btf_dump_datasec_data()
1039 ret = btf_dump__dump_type_data(d, type_id, fop in test_btf_dump_datasec_data()
345 __s32 type_id; btf_dump_data() local
645 __s32 type_id; test_btf_dump_struct_data() local
1005 __s32 type_id; test_btf_datasec() local
[all...]
H A Dresolve_btfids.c147 __resolve_symbol(struct btf *btf, int type_id) in BTF_ID()
153 type = btf__type_by_id(btf, type_id); in BTF_ID()
167 test_symbols[i].id = type_id; in BTF_ID()
177 kfunc_symbols[i].id = type_id; in BTF_ID()
186 int type_id; in resolve_symbols() local
188 for (type_id = 1; type_id < nr; type_id++) { in resolve_symbols()
189 if (__resolve_symbol(btf, type_id)) in resolve_symbols()
H A Dbtf_module.c13 __s32 type_id; in test_btf_module() local
28 type_id = btf__find_by_name(module_btf, symbol_name); in test_btf_module()
29 ASSERT_GT(type_id, 0, "func not found"); in test_btf_module()
H A Dbtf_tag.c58 __s32 type_id; in load_btfs() local
73 type_id = btf__find_by_name_kind(*vmlinux_btf, "user", BTF_KIND_TYPE_TAG); in load_btfs()
74 if (type_id <= 0) { in load_btfs()
90 type_id = btf__find_by_name_kind(*module_btf, "user", BTF_KIND_TYPE_TAG); in load_btfs()
91 if (type_id <= 0) { in load_btfs()
H A Dsnprintf_btf.c71 static long run(struct snprintf_btf_void *skel, __u32 type_id) in run() argument
76 skel->bss->type_id = type_id; in run()
H A Dtracing_multi.c82 __u32 nr, type_id, cnt = 0; in get_ids() local
117 for (type_id = 1; type_id < nr && cnt < funcs_cnt; type_id++) { in get_ids()
122 type = btf__type_by_id(btf, type_id); in get_ids()
150 ids[idx] = type_id; in get_ids()
672 __u32 nr, type_id; in serial_test_tracing_multi_bench_attach()
682 for (type_id = 1; type_id < nr && !found; type_id in serial_test_tracing_multi_bench_attach()
678 __u32 nr, type_id; serial_test_tracing_multi_bench_attach() local
[all...]
H A Dcore_reloc_raw.c24 .type_id = enum_id, in load_core_relo_insns()
101 { .insn_off = 0, .type_id = 3 }, in test_early_core_relo()
102 { .insn_off = 3, .type_id = 4 }, in test_early_core_relo()
250 .type_id = 4, in test_bad_local_id()
256 .type_id = 100500, /* !!! this type id does not exist */ in test_bad_local_id()
/linux/drivers/platform/x86/lenovo/
H A Dwmi-other.c973 u8 type_id; member
987 return lwmi_attr_id(attr->device_id, attr->feature_id, mode, attr->type_id); in tunable_attr_01_id()
993 .type_id = LWMI_TYPE_ID_NONE,
999 .type_id = LWMI_TYPE_ID_CROSSLOAD,
1005 .type_id = LWMI_TYPE_ID_NONE,
1011 .type_id = LWMI_TYPE_ID_CROSSLOAD,
1017 .type_id = LWMI_TYPE_ID_NONE,
1023 .type_id = LWMI_TYPE_ID_CROSSLOAD,
1029 .type_id = LWMI_TYPE_ID_NONE,
1035 .type_id
[all...]
/linux/tools/testing/selftests/bpf/progs/
H A Dsnprintf_btf_void.c5 __u32 type_id; variable
16 .type_id = type_id, in dump_type()
/linux/kernel/bpf/
H A Dbtf.c68 * type_id:
70 * Each btf_type object is identified by a type_id. The type_id
72 * the BTF type section. The first one has type_id 1. The second
73 * one has type_id 2...etc. Hence, an earlier btf_type has
74 * a smaller type_id.
77 * type_id (i.e. the "type" in the "struct btf_type").
86 * by specifying type_id:
88 * [1] CONST (anon) type_id=2
89 * [2] PTR (anon) type_id
187 BTF_TYPE_ID_VALID(type_id) global() argument
291 u32 type_id; global() member
432 u32 type_id; global() member
960 btf_type_by_id(const struct btf * btf,u32 type_id) btf_type_by_id() argument
1441 btf_show_start_type(struct btf_show * show,const struct btf_type * t,u32 type_id,void * data) btf_show_start_type() argument
1459 btf_show_start_aggr_type(struct btf_show * show,const struct btf_type * t,u32 type_id,void * data) btf_show_start_aggr_type() argument
1507 btf_show_start_array_type(struct btf_show * show,const struct btf_type * t,u32 type_id,u16 array_encoding,void * data) btf_show_start_array_type() argument
1525 btf_show_start_struct_type(struct btf_show * show,const struct btf_type * t,u32 type_id,void * data) btf_show_start_struct_type() argument
1994 env_type_is_resolved(const struct btf_verifier_env * env,u32 type_id) env_type_is_resolved() argument
2004 env_stack_push(struct btf_verifier_env * env,const struct btf_type * t,u32 type_id) env_stack_push() argument
2043 u32 type_id = env->stack[--(env->top_stack)].type_id; env_stack_pop_resolved() local
2080 __btf_resolve_size(const struct btf * btf,const struct btf_type * type,u32 * type_size,const struct btf_type ** elem_type,u32 * elem_id,u32 * total_nelems,u32 * type_id) __btf_resolve_size() argument
2154 btf_resolved_type_id(const struct btf * btf,u32 type_id) btf_resolved_type_id() argument
2164 btf_type_id_resolve(const struct btf * btf,u32 * type_id) btf_type_id_resolve() argument
2170 btf_resolved_type_size(const struct btf * btf,u32 type_id) btf_resolved_type_size() argument
2179 btf_type_id_size(const struct btf * btf,u32 * type_id,u32 * ret_size) btf_type_id_size() argument
2271 btf_df_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offsets,struct btf_show * show) btf_df_show() argument
2557 btf_int_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_int_show() argument
2906 btf_modifier_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_modifier_show() argument
2925 btf_var_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_var_show() argument
2942 btf_ptr_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_ptr_show() argument
3181 __btf_array_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) __btf_array_show() argument
3234 btf_array_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_array_show() argument
3468 u32 type_id; global() member
4390 __btf_struct_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) __btf_struct_show() argument
4437 btf_struct_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_struct_show() argument
4605 btf_enum_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_enum_show() argument
4708 btf_enum64_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_enum64_show() argument
5032 u32 var_type_id = vsi->type, type_id, type_size = 0; btf_datasec_resolve() local
5070 btf_datasec_show(const struct btf * btf,const struct btf_type * t,u32 type_id,void * data,u8 bits_offset,struct btf_show * show) btf_datasec_show() argument
5486 btf_resolve_valid(struct btf_verifier_env * env,const struct btf_type * t,u32 type_id) btf_resolve_valid() argument
5526 btf_resolve(struct btf_verifier_env * env,const struct btf_type * t,u32 type_id) btf_resolve() argument
5562 u32 type_id, i; btf_check_all_types() local
7870 u32 kern_type_id, type_id; btf_get_ptr_to_btf_id() local
7985 btf_scan_type_tags(struct bpf_verifier_env * env,const struct btf * btf,u32 type_id,u32 * tags) btf_scan_type_tags() argument
8283 btf_type_show(const struct btf * btf,u32 type_id,void * obj,struct btf_show * show) btf_type_show() argument
8301 btf_type_seq_show_flags(const struct btf * btf,u32 type_id,void * obj,struct seq_file * m,u64 flags) btf_type_seq_show_flags() argument
8315 btf_type_seq_show(const struct btf * btf,u32 type_id,void * obj,struct seq_file * m) btf_type_seq_show() argument
8351 btf_type_snprintf_show(const struct btf * btf,u32 type_id,void * obj,char * buf,int len,u64 flags) btf_type_snprintf_show() argument
8372 btf_type_name_to_buf(const struct btf * btf,u32 type_id,char * buf,int len) btf_type_name_to_buf() argument
10016 bpf_struct_ops_find(struct btf * btf,u32 type_id) bpf_struct_ops_find() argument
[all...]
/linux/drivers/net/ethernet/microchip/lan966x/
H A Dlan966x_vcap_ag_api.c2190 .type_id = 0,
2195 .type_id = 1,
2200 .type_id = 0,
2205 .type_id = 1,
2210 .type_id = 2,
2215 .type_id = 0,
2220 .type_id = 1,
2225 .type_id = 2,
2233 .type_id = 0,
2238 .type_id = 1,
[all …]
/linux/include/linux/
H A Dbtf.h172 /* Figure out the size of a type_id. If type_id is a modifier
176 * In describing "const void *", type_id is "const" and "const"
179 * If type_id is a simple "int", then return type will be "int".
182 * @type_id: Find out the size of type_id. The type_id of the return
183 * type is set to *type_id.
187 * NULL is returned if type_id itself does not have size info
190 * *type_id an
545 bpf_struct_ops_find(struct btf * btf,u32 type_id) bpf_struct_ops_find() argument
617 btf_type_by_id(const struct btf * btf,u32 type_id) btf_type_by_id() argument
[all...]
/linux/io_uring/
H A Dbpf-ops.c126 s32 type_id; in bpf_io_init()
128 type_id = btf_find_by_name_kind(btf, name, BTF_KIND_STRUCT); in bpf_io_init()
129 if (type_id < 0) in bpf_io_init()
131 return btf_type_by_id(btf, type_id); in bpf_io_init()
112 s32 type_id; io_lookup_struct_type() local
/linux/drivers/net/ethernet/microchip/vcap/
H A Dvcap_model_kunit.c2692 .type_id = 0,
2697 .type_id = 0,
2702 .type_id = 2,
2707 .type_id = 2,
2712 .type_id = 3,
2720 .type_id = 0,
2725 .type_id = 3,
2730 .type_id = 4,
2735 .type_id = 5,
2740 .type_id = 6,
[all …]
/linux/drivers/hid/bpf/
H A Dhid_bpf_struct_ops.c99 s32 type_id; in hid_bpf_ops_btf_struct_access() local
109 type_id = btf_find_by_name_kind(reg->btf, write_range->struct_name, in hid_bpf_ops_btf_struct_access()
111 if (type_id < 0) in hid_bpf_ops_btf_struct_access()
114 state = btf_type_by_id(reg->btf, type_id); in hid_bpf_ops_btf_struct_access()
/linux/drivers/net/ethernet/microchip/sparx5/
H A Dsparx5_vcap_ag_api.c2290 .type_id = 0,
2295 .type_id = 2,
2303 .type_id = 0,
2308 .type_id = 3,
2313 .type_id = 4,
2318 .type_id = 5,
2323 .type_id = 6,
2328 .type_id = 1,
2336 .type_id = 0,
2344 .type_id = 0,
[all …]
/linux/drivers/net/ethernet/microchip/sparx5/lan969x/
H A Dlan969x_vcap_ag_api.c2289 .type_id = 0,
2294 .type_id = 2,
2302 .type_id = 0,
2307 .type_id = 3,
2312 .type_id = 4,
2317 .type_id = 5,
2322 .type_id = 6,
2327 .type_id = 1,
2335 .type_id = 0,
2343 .type_id = 0,
[all …]
/linux/net/netfilter/
H A Dnf_bpf_link.c276 s32 type_id; in nf_ptr_to_btf_id() local
282 type_id = btf_find_by_name_kind(btf, name, BTF_KIND_STRUCT); in nf_ptr_to_btf_id()
283 if (WARN_ON_ONCE(type_id < 0)) in nf_ptr_to_btf_id()
287 info->btf_id = type_id; in nf_ptr_to_btf_id()

1234