Home
last modified time | relevance | path

Searched refs:btf_array (Results 1 – 13 of 13) sorted by relevance

/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Dbtf_write.c86 ASSERT_EQ(btf_array(t)->index_type, 1, "array_index_type"); in test_btf_write()
87 ASSERT_EQ(btf_array(t)->type, 2, "array_elem_type"); in test_btf_write()
88 ASSERT_EQ(btf_array(t)->nelems, 10, "array_nelems"); in test_btf_write()
Dcore_reloc.c390 } else if (btf_is_array(t) && (t = btf__type_by_id(local_btf, btf_array(t)->type)) && in setup_type_id_case_local()
Dbtf.c6618 return base_size + sizeof(struct btf_array); in btf_type_size()
/Linux-v5.10/tools/lib/bpf/
Dbtf.h303 static inline struct btf_array *btf_array(const struct btf_type *t) in btf_array() function
305 return (struct btf_array *)(t + 1); in btf_array()
Dbtf.c275 return base_size + sizeof(struct btf_array); in btf_type_size()
302 struct btf_array *a; in btf_bswap_type_rest()
327 a = btf_array(t); in btf_bswap_type_rest()
541 const struct btf_array *array; in btf__resolve_size()
569 array = btf_array(t); in btf__resolve_size()
608 return btf__align_of(btf, btf_array(t)->type); in btf__align_of()
1691 struct btf_array *a; in btf__add_array()
1700 sz = sizeof(struct btf_type) + sizeof(struct btf_array); in btf__add_array()
1709 a = btf_array(t); in btf__add_array()
3435 const struct btf_array *info = btf_array(t); in btf_hash_array()
[all …]
Dbtf_dump.c295 const struct btf_array *a = btf_array(t); in btf_dump_mark_referenced()
465 return btf_dump_order_type(d, btf_array(t)->type, through_ptr); in btf_dump_order_type()
709 btf_dump_emit_type(d, btf_array(t)->type, cont_id); in btf_dump_emit_type()
1128 id = btf_array(t)->type; in btf_dump_emit_type_decl()
1292 const struct btf_array *a = btf_array(t); in btf_dump_emit_type_chain()
Dlibbpf.c1935 const struct btf_array *arr_info; in get_map_field_int()
1955 arr_info = btf_array(arr_t); in get_map_field_int()
2134 if (!btf_is_array(t) || btf_array(t)->nelems) { in parse_btf_map_def()
2139 t = skip_mods_and_typedefs(obj->btf, btf_array(t)->type, in parse_btf_map_def()
3038 if (btf_array(t)->nelems == 0) in find_kcfg_type()
3040 if (find_kcfg_type(btf, btf_array(t)->type, NULL) != KCFG_CHAR) in find_kcfg_type()
4343 const struct btf_array *arr) in is_flex_arr()
4553 const struct btf_array *a = btf_array(t); in bpf_core_parse_spec()
4736 local_id = btf_array(local_type)->type; in bpf_core_fields_are_compat()
4737 targ_id = btf_array(targ_type)->type; in bpf_core_fields_are_compat()
[all …]
/Linux-v5.10/tools/bpf/bpftool/
Dbtf_dumper.c175 static bool is_str_array(const struct btf *btf, const struct btf_array *arr, in is_str_array()
215 struct btf_array *arr = (struct btf_array *)(t + 1); in btf_dumper_array()
585 const struct btf_array *array; in __btf_dumper_type_only()
614 array = (struct btf_array *)(t + 1); in __btf_dumper_type_only()
Dbtf.c149 const struct btf_array *arr = (const void *)(t + 1); in dump_btf_type()
/Linux-v5.10/tools/include/uapi/linux/
Dbtf.h104 struct btf_array { struct
/Linux-v5.10/include/uapi/linux/
Dbtf.h104 struct btf_array { struct
/Linux-v5.10/Documentation/bpf/
Dbtf.rst195 ``btf_type`` is followed by one ``struct btf_array``::
197 struct btf_array {
203 The ``struct btf_array`` encoding:
213 The ``struct btf_array`` allows chaining through element type to represent
218 * [2]: array, ``btf_array.type = [1]``, ``btf_array.nelems = 6``
219 * [3]: array, ``btf_array.type = [2]``, ``btf_array.nelems = 5``
222 one-dimensional array, e.g., for ``a[5][6]``, the ``btf_array.nelems`` is
/Linux-v5.10/kernel/bpf/
Dbtf.c581 static const struct btf_array *btf_type_array(const struct btf_type *t) in btf_type_array()
583 return (const struct btf_array *)(t + 1); in btf_type_array()
778 const struct btf_array *array; in btf_show_name()
1645 const struct btf_array *array = NULL; in __btf_resolve_size()
2578 const struct btf_array *array = btf_type_array(t); in btf_array_check_meta()
2630 const struct btf_array *array = btf_type_array(v->t); in btf_array_resolve()
2695 const struct btf_array *array = btf_type_array(t); in btf_array_log()
2705 const struct btf_array *array = btf_type_array(t); in __btf_array_show()
3842 const struct btf_array *array = btf_type_array(t); in btf_resolve_valid()
4624 struct btf_array *array_elem; in btf_struct_walk()
[all …]