Home
last modified time | relevance | path

Searched refs:btf_decl_tag (Results 1 – 16 of 16) sorted by relevance

/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dbpf_misc.h61 #define __msg(msg) __attribute__((btf_decl_tag("comment:test_expect_msg=" msg)))
62 #define __failure __attribute__((btf_decl_tag("comment:test_expect_failure")))
63 #define __success __attribute__((btf_decl_tag("comment:test_expect_success")))
64 #define __description(desc) __attribute__((btf_decl_tag("comment:test_description=" desc)))
65 #define __msg_unpriv(msg) __attribute__((btf_decl_tag("comment:test_expect_msg_unpriv=" msg)))
66 #define __failure_unpriv __attribute__((btf_decl_tag("comment:test_expect_failure_unpriv")))
67 #define __success_unpriv __attribute__((btf_decl_tag("comment:test_expect_success_unpriv")))
68 #define __log_level(lvl) __attribute__((btf_decl_tag("comment:test_log_level="#lvl)))
69 #define __flag(flag) __attribute__((btf_decl_tag("comment:test_prog_flags="#flag)))
70 #define __retval(val) __attribute__((btf_decl_tag("comment:test_retval="#val)))
[all …]
Dtest_btf_decl_tag.c7 #if __has_attribute(btf_decl_tag)
8 #define __tag1 __attribute__((btf_decl_tag("tag1")))
9 #define __tag2 __attribute__((btf_decl_tag("tag2")))
/linux-6.6.21/tools/lib/bpf/
Dbtf.h565 struct btf_decl_tag;
566 static inline struct btf_decl_tag *btf_decl_tag(const struct btf_type *t) in btf_decl_tag() function
568 return (struct btf_decl_tag *)(t + 1); in btf_decl_tag()
Dbtf.c322 return base_size + sizeof(struct btf_decl_tag); in btf_type_size()
405 btf_decl_tag(t)->component_idx = bswap_32(btf_decl_tag(t)->component_idx); in btf_bswap_type_rest()
2630 sz = sizeof(struct btf_type) + sizeof(struct btf_decl_tag); in btf__add_decl_tag()
2642 btf_decl_tag(t)->component_idx = component_idx; in btf__add_decl_tag()
/linux-6.6.21/tools/testing/selftests/bpf/
Dbpf_experimental.h9 #define __contains(name, node) __attribute__((btf_decl_tag("contains:" #name ":" #node)))
Dbtf_helpers.c204 t->type, btf_decl_tag(t)->component_idx); in fprintf_btf_type_raw()
Dtest_loader.c196 if (t->type != func_id || btf_decl_tag(t)->component_idx != -1) in parse_test_spec()
DREADME.rst256 The btf_tag selftest requires LLVM support to recognize the btf_decl_tag and
/linux-6.6.21/include/uapi/linux/
Dbtf.h186 struct btf_decl_tag { struct
/linux-6.6.21/tools/include/uapi/linux/
Dbtf.h186 struct btf_decl_tag { struct
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Dbtf_write.c288 ASSERT_EQ(btf_decl_tag(t)->component_idx, -1, "tag_component_idx"); in gen_btf()
298 ASSERT_EQ(btf_decl_tag(t)->component_idx, 1, "tag_component_idx"); in gen_btf()
Dbtf.c7984 return base_size + sizeof(struct btf_decl_tag); in btf_type_size()
/linux-6.6.21/Documentation/bpf/
Dbtf.rst489 ``btf_type`` is followed by ``struct btf_decl_tag``.::
491 struct btf_decl_tag {
495 The ``name_off`` encodes btf_decl_tag attribute string.
497 For ``var`` or ``typedef`` type, ``btf_decl_tag.component_idx`` must be ``-1``.
498 For the other three types, if the btf_decl_tag attribute is
500 ``btf_decl_tag.component_idx`` must be ``-1``. Otherwise,
502 a ``func`` argument, and ``btf_decl_tag.component_idx`` should be a
/linux-6.6.21/tools/bpf/bpftool/
Dbtf.c396 const struct btf_decl_tag *tag = (const void *)(t + 1); in dump_btf_type()
/linux-6.6.21/kernel/bpf/
Dbtf.c729 static const struct btf_decl_tag *btf_type_decl_tag(const struct btf_type *t) in btf_type_decl_tag()
731 return (const struct btf_decl_tag *)(t + 1); in btf_type_decl_tag()
4700 const struct btf_decl_tag *tag; in btf_decl_tag_check_meta()
/linux-6.6.21/lib/
DKconfig.debug394 btf_decl_tag) or not. Currently only clang compiler implements