Skip to content

Commit

Permalink
docs/bpf: Update documentation for BTF_KIND_DECL_TAG typedef support
Browse files Browse the repository at this point in the history
Add BTF_KIND_DECL_TAG typedef support in btf.rst.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211021195649.4020514-1-yhs@fb.com
  • Loading branch information
Yonghong Song authored and Alexei Starovoitov committed Oct 23, 2021
1 parent 8c18ea2 commit 5a86713
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Documentation/bpf/btf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ No additional type data follow ``btf_type``.
* ``info.kind_flag``: 0
* ``info.kind``: BTF_KIND_DECL_TAG
* ``info.vlen``: 0
* ``type``: ``struct``, ``union``, ``func`` or ``var``
* ``type``: ``struct``, ``union``, ``func``, ``var`` or ``typedef``

``btf_type`` is followed by ``struct btf_decl_tag``.::

Expand All @@ -483,8 +483,8 @@ No additional type data follow ``btf_type``.
};

The ``name_off`` encodes btf_decl_tag attribute string.
The ``type`` should be ``struct``, ``union``, ``func`` or ``var``.
For ``var`` type, ``btf_decl_tag.component_idx`` must be ``-1``.
The ``type`` should be ``struct``, ``union``, ``func``, ``var`` or ``typedef``.
For ``var`` or ``typedef`` type, ``btf_decl_tag.component_idx`` must be ``-1``.
For the other three types, if the btf_decl_tag attribute is
applied to the ``struct``, ``union`` or ``func`` itself,
``btf_decl_tag.component_idx`` must be ``-1``. Otherwise,
Expand Down

0 comments on commit 5a86713

Please sign in to comment.