Lines Matching refs:t
203 int btf_find_spin_lock(const struct btf *btf, const struct btf_type *t);
204 int btf_find_timer(const struct btf *btf, const struct btf_type *t);
205 struct btf_record *btf_parse_fields(const struct btf *btf, const struct btf_type *t,
209 bool btf_type_is_void(const struct btf_type *t);
220 const char *btf_type_str(const struct btf_type *t);
232 static inline bool btf_type_is_ptr(const struct btf_type *t) in btf_type_is_ptr() argument
234 return BTF_INFO_KIND(t->info) == BTF_KIND_PTR; in btf_type_is_ptr()
237 static inline bool btf_type_is_int(const struct btf_type *t) in btf_type_is_int() argument
239 return BTF_INFO_KIND(t->info) == BTF_KIND_INT; in btf_type_is_int()
242 static inline bool btf_type_is_small_int(const struct btf_type *t) in btf_type_is_small_int() argument
244 return btf_type_is_int(t) && t->size <= sizeof(u64); in btf_type_is_small_int()
247 static inline u8 btf_int_encoding(const struct btf_type *t) in btf_int_encoding() argument
249 return BTF_INT_ENCODING(*(u32 *)(t + 1)); in btf_int_encoding()
252 static inline bool btf_type_is_signed_int(const struct btf_type *t) in btf_type_is_signed_int() argument
254 return btf_type_is_int(t) && (btf_int_encoding(t) & BTF_INT_SIGNED); in btf_type_is_signed_int()
257 static inline bool btf_type_is_enum(const struct btf_type *t) in btf_type_is_enum() argument
259 return BTF_INFO_KIND(t->info) == BTF_KIND_ENUM; in btf_type_is_enum()
262 static inline bool btf_is_any_enum(const struct btf_type *t) in btf_is_any_enum() argument
264 return BTF_INFO_KIND(t->info) == BTF_KIND_ENUM || in btf_is_any_enum()
265 BTF_INFO_KIND(t->info) == BTF_KIND_ENUM64; in btf_is_any_enum()
280 static inline u16 btf_kind(const struct btf_type *t) in btf_kind() argument
282 return BTF_INFO_KIND(t->info); in btf_kind()
285 static inline bool btf_is_enum(const struct btf_type *t) in btf_is_enum() argument
287 return btf_kind(t) == BTF_KIND_ENUM; in btf_is_enum()
290 static inline bool btf_is_enum64(const struct btf_type *t) in btf_is_enum64() argument
292 return btf_kind(t) == BTF_KIND_ENUM64; in btf_is_enum64()
300 static inline bool btf_is_composite(const struct btf_type *t) in btf_is_composite() argument
302 u16 kind = btf_kind(t); in btf_is_composite()
307 static inline bool btf_is_array(const struct btf_type *t) in btf_is_array() argument
309 return btf_kind(t) == BTF_KIND_ARRAY; in btf_is_array()
312 static inline bool btf_is_int(const struct btf_type *t) in btf_is_int() argument
314 return btf_kind(t) == BTF_KIND_INT; in btf_is_int()
317 static inline bool btf_is_ptr(const struct btf_type *t) in btf_is_ptr() argument
319 return btf_kind(t) == BTF_KIND_PTR; in btf_is_ptr()
322 static inline u8 btf_int_offset(const struct btf_type *t) in btf_int_offset() argument
324 return BTF_INT_OFFSET(*(u32 *)(t + 1)); in btf_int_offset()
327 static inline bool btf_type_is_scalar(const struct btf_type *t) in btf_type_is_scalar() argument
329 return btf_type_is_int(t) || btf_type_is_enum(t); in btf_type_is_scalar()
332 static inline bool btf_type_is_typedef(const struct btf_type *t) in btf_type_is_typedef() argument
334 return BTF_INFO_KIND(t->info) == BTF_KIND_TYPEDEF; in btf_type_is_typedef()
337 static inline bool btf_type_is_volatile(const struct btf_type *t) in btf_type_is_volatile() argument
339 return BTF_INFO_KIND(t->info) == BTF_KIND_VOLATILE; in btf_type_is_volatile()
342 static inline bool btf_type_is_func(const struct btf_type *t) in btf_type_is_func() argument
344 return BTF_INFO_KIND(t->info) == BTF_KIND_FUNC; in btf_type_is_func()
347 static inline bool btf_type_is_func_proto(const struct btf_type *t) in btf_type_is_func_proto() argument
349 return BTF_INFO_KIND(t->info) == BTF_KIND_FUNC_PROTO; in btf_type_is_func_proto()
352 static inline bool btf_type_is_var(const struct btf_type *t) in btf_type_is_var() argument
354 return BTF_INFO_KIND(t->info) == BTF_KIND_VAR; in btf_type_is_var()
357 static inline bool btf_type_is_type_tag(const struct btf_type *t) in btf_type_is_type_tag() argument
359 return BTF_INFO_KIND(t->info) == BTF_KIND_TYPE_TAG; in btf_type_is_type_tag()
365 static inline bool btf_type_is_struct(const struct btf_type *t) in btf_type_is_struct() argument
367 u8 kind = BTF_INFO_KIND(t->info); in btf_type_is_struct()
372 static inline bool __btf_type_is_struct(const struct btf_type *t) in __btf_type_is_struct() argument
374 return BTF_INFO_KIND(t->info) == BTF_KIND_STRUCT; in __btf_type_is_struct()
377 static inline bool btf_type_is_array(const struct btf_type *t) in btf_type_is_array() argument
379 return BTF_INFO_KIND(t->info) == BTF_KIND_ARRAY; in btf_type_is_array()
382 static inline u16 btf_type_vlen(const struct btf_type *t) in btf_type_vlen() argument
384 return BTF_INFO_VLEN(t->info); in btf_type_vlen()
387 static inline u16 btf_vlen(const struct btf_type *t) in btf_vlen() argument
389 return btf_type_vlen(t); in btf_vlen()
392 static inline u16 btf_func_linkage(const struct btf_type *t) in btf_func_linkage() argument
394 return BTF_INFO_VLEN(t->info); in btf_func_linkage()
397 static inline bool btf_type_kflag(const struct btf_type *t) in btf_type_kflag() argument
399 return BTF_INFO_KFLAG(t->info); in btf_type_kflag()
416 static inline struct btf_member *btf_members(const struct btf_type *t) in btf_members() argument
418 return (struct btf_member *)(t + 1); in btf_members()
421 static inline u32 btf_member_bit_offset(const struct btf_type *t, u32 member_idx) in btf_member_bit_offset() argument
423 const struct btf_member *m = btf_members(t) + member_idx; in btf_member_bit_offset()
425 return __btf_member_bit_offset(t, m); in btf_member_bit_offset()
428 static inline u32 btf_member_bitfield_size(const struct btf_type *t, u32 member_idx) in btf_member_bitfield_size() argument
430 const struct btf_member *m = btf_members(t) + member_idx; in btf_member_bitfield_size()
432 return __btf_member_bitfield_size(t, m); in btf_member_bitfield_size()
435 static inline const struct btf_member *btf_type_member(const struct btf_type *t) in btf_type_member() argument
437 return (const struct btf_member *)(t + 1); in btf_type_member()
440 static inline struct btf_array *btf_array(const struct btf_type *t) in btf_array() argument
442 return (struct btf_array *)(t + 1); in btf_array()
445 static inline struct btf_enum *btf_enum(const struct btf_type *t) in btf_enum() argument
447 return (struct btf_enum *)(t + 1); in btf_enum()
450 static inline struct btf_enum64 *btf_enum64(const struct btf_type *t) in btf_enum64() argument
452 return (struct btf_enum64 *)(t + 1); in btf_enum64()
456 const struct btf_type *t) in btf_type_var_secinfo() argument
458 return (const struct btf_var_secinfo *)(t + 1); in btf_type_var_secinfo()
461 static inline struct btf_param *btf_params(const struct btf_type *t) in btf_params() argument
463 return (struct btf_param *)(t + 1); in btf_params()
504 const struct btf_type *t, enum bpf_prog_type prog_type,
546 const struct btf_type *t, enum bpf_prog_type prog_type, in btf_get_prog_ctx_type() argument
562 static inline bool btf_type_is_struct_ptr(struct btf *btf, const struct btf_type *t) in btf_type_is_struct_ptr() argument
564 if (!btf_type_is_ptr(t)) in btf_type_is_struct_ptr()
567 t = btf_type_skip_modifiers(btf, t->type, NULL); in btf_type_is_struct_ptr()
569 return btf_type_is_struct(t); in btf_type_is_struct_ptr()