From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"Jose E . Marchesi" <jose.marchesi@oracle.com>,
<kernel-team@fb.com>
Subject: [PATCH bpf-next 10/10] docs/bpf: Update documentation for BTF_KIND_TYPE_TAG support
Date: Tue, 9 Nov 2021 21:20:33 -0800 [thread overview]
Message-ID: <20211110052033.372886-1-yhs@fb.com> (raw)
In-Reply-To: <20211110051940.367472-1-yhs@fb.com>
Add BTF_KIND_TYPE_TAG documentation in btf.rst.
Signed-off-by: Yonghong Song <yhs@fb.com>
---
Documentation/bpf/btf.rst | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Documentation/bpf/btf.rst b/Documentation/bpf/btf.rst
index 9ad4218a751f..d0ec40d00c28 100644
--- a/Documentation/bpf/btf.rst
+++ b/Documentation/bpf/btf.rst
@@ -86,6 +86,7 @@ sequentially and type id is assigned to each recognized type starting from id
#define BTF_KIND_DATASEC 15 /* Section */
#define BTF_KIND_FLOAT 16 /* Floating point */
#define BTF_KIND_DECL_TAG 17 /* Decl Tag */
+ #define BTF_KIND_TYPE_TAG 18 /* Type Tag */
Note that the type section encodes debug info, not just pure types.
``BTF_KIND_FUNC`` is not a type, and it represents a defined subprogram.
@@ -107,7 +108,7 @@ Each type contains the following common data::
* "size" tells the size of the type it is describing.
*
* "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
- * FUNC, FUNC_PROTO and DECL_TAG.
+ * FUNC, FUNC_PROTO, DECL_TAG and TYPE_TAG.
* "type" is a type_id referring to another type.
*/
union {
@@ -492,6 +493,16 @@ the attribute is applied to a ``struct``/``union`` member or
a ``func`` argument, and ``btf_decl_tag.component_idx`` should be a
valid index (starting from 0) pointing to a member or an argument.
+2.2.17 BTF_KIND_TYPE_TAG
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+``struct btf_type`` encoding requirement:
+ * ``name_off``: offset to a non-empty string
+ * ``info.kind_flag``: 0
+ * ``info.kind``: BTF_KIND_TYPE_TAG
+ * ``info.vlen``: 0
+ * ``type``: the type with ``btf_type_tag`` attribute
+
3. BTF Kernel API
*****************
--
2.30.2
next prev parent reply other threads:[~2021-11-10 5:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 5:19 [PATCH bpf-next 00/10] Support BTF_KIND_TYPE_TAG for btf_type_tag attributes Yonghong Song
2021-11-10 5:19 ` [PATCH bpf-next 01/10] bpf: " Yonghong Song
2021-11-11 18:27 ` Andrii Nakryiko
2021-11-11 19:11 ` Yonghong Song
2021-11-10 5:19 ` [PATCH bpf-next 02/10] libbpf: Support BTF_KIND_TYPE_TAG Yonghong Song
2021-11-11 18:41 ` Andrii Nakryiko
2021-11-11 19:13 ` Yonghong Song
2021-11-10 5:19 ` [PATCH bpf-next 03/10] bpftool: " Yonghong Song
2021-11-11 18:43 ` Andrii Nakryiko
2021-11-10 5:20 ` [PATCH bpf-next 04/10] selftests/bpf: Test libbpf API function btf__add_type_tag() Yonghong Song
2021-11-11 18:44 ` Andrii Nakryiko
2021-11-10 5:20 ` [PATCH bpf-next 05/10] selftests/bpf: Add BTF_KIND_TYPE_TAG unit tests Yonghong Song
2021-11-11 18:45 ` Andrii Nakryiko
2021-11-10 5:20 ` [PATCH bpf-next 06/10] selftests/bpf: Test BTF_KIND_DECL_TAG for deduplication Yonghong Song
2021-11-11 18:49 ` Andrii Nakryiko
2021-11-11 19:13 ` Yonghong Song
2021-11-10 5:20 ` [PATCH bpf-next 07/10] selftests/bpf: Rename progs/tag.c to progs/btf_decl_tag.c Yonghong Song
2021-11-11 18:51 ` Andrii Nakryiko
2021-11-10 5:20 ` [PATCH bpf-next 08/10] selftests/bpf: Add a C test for btf_type_tag Yonghong Song
2021-11-11 18:55 ` Andrii Nakryiko
2021-11-11 19:19 ` Yonghong Song
2021-11-10 5:20 ` [PATCH bpf-next 09/10] selftests/bpf: Clarify llvm dependency with btf_tag selftest Yonghong Song
2021-11-11 18:56 ` Andrii Nakryiko
2021-11-10 5:20 ` Yonghong Song [this message]
2021-11-11 18:56 ` [PATCH bpf-next 10/10] docs/bpf: Update documentation for BTF_KIND_TYPE_TAG support Andrii Nakryiko
2021-11-10 5:28 ` [PATCH bpf-next 00/10] Support BTF_KIND_TYPE_TAG for btf_type_tag attributes Alexei Starovoitov
2021-11-10 6:26 ` Yonghong Song
2021-11-10 16:40 ` Alexei Starovoitov
2021-11-10 17:04 ` Yonghong Song
2021-11-11 1:47 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211110052033.372886-1-yhs@fb.com \
--to=yhs@fb.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jose.marchesi@oracle.com \
--cc=kernel-team@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.