Tiezhu Yang
c821d80bb8
bpf, docs: BPF_FROM_BE exists as alias for BPF_TO_BE
...
According to include/uapi/linux/bpf.h:
#define BPF_FROM_LE BPF_TO_LE
#define BPF_FROM_BE BPF_TO_BE
BPF_FROM_BE exists as alias for BPF_TO_BE instead of BPF_TO_LE.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Link: https://lore.kernel.org/bpf/1651139754-4838-3-git-send-email-yangtiezhu@loongson.cn
2022-04-28 17:20:48 +02:00
Tiezhu Yang
67b97e5842
bpf, docs: Remove duplicated word "instructions"
...
The word "instructions" is duplicated, remove it.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Link: https://lore.kernel.org/bpf/1651139754-4838-2-git-send-email-yangtiezhu@loongson.cn
2022-04-28 17:20:48 +02:00
Grant Seltzer
e8c5e1a0f7
libbpf: Improve libbpf API documentation link position
...
This puts the link for libbpf API documentation into the sidebar
for much easier navigation.
You can preview this change at:
https://libbpf-test.readthedocs.io/en/latest/
Note that the link is hardcoded to the production version, so you
can see that it self references itself here for now:
https://libbpf-test.readthedocs.io/en/latest/api.html
This will need to make its way into the libbpf mirror, before being
deployed to libbpf.readthedocs.org
Signed-off-by: Grant Seltzer <grantseltzer@gmail.com >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Link: https://lore.kernel.org/bpf/20220422031050.303984-1-grantseltzer@gmail.com
2022-04-22 16:21:56 +02:00
Jakub Kicinski
8df0136376
docs: netdev: move the netdev-FAQ to the process pages
...
The documentation for the tip tree is really in quite a similar
spirit to the netdev-FAQ. Move the netdev-FAQ to the process docs
as well.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com >
Signed-off-by: Paolo Abeni <pabeni@redhat.com >
2022-03-31 10:49:39 +02:00
Toke Høiland-Jørgensen
1a7551f150
Documentation/bpf: Add documentation for BPF_PROG_RUN
...
This adds documentation for the BPF_PROG_RUN command; a short overview of
the command itself, and a more verbose description of the "live packet"
mode for XDP introduced in the previous commit.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Acked-by: Martin KaFai Lau <kafai@fb.com >
Link: https://lore.kernel.org/bpf/20220309105346.100053-3-toke@redhat.com
2022-03-09 14:19:22 -08:00
Wan Jiabing
43429ea74a
bpf, docs: Add a missing colon in verifier.rst
...
Add a missing colon to fix the document style.
Fixes: 88691e9e1e ("bpf, docs: Split general purpose eBPF documentation out of filter.rst")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Link: https://lore.kernel.org/bpf/20220228080416.1689327-1-wanjiabing@vivo.com
2022-02-28 18:20:35 +01:00
Christoph Hellwig
594d323485
bpf, docs: Better document the atomic instructions
...
Use proper tables and RST markup to document the atomic instructions
in a structured way.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220131183638.3934982-6-hch@lst.de
2022-02-03 09:29:37 -08:00
Christoph Hellwig
5ca15b8a93
bpf, docs: Better document the extended instruction format
...
In addition to the normal 64-bit instruction encoding, eBPF also has
a single instruction that uses a second 64-bit bits for a second
immediate value. Instead of only documenting this format deep down
in the document mention it in the instruction encoding section.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220131183638.3934982-5-hch@lst.de
2022-02-03 09:29:37 -08:00
Christoph Hellwig
1517533627
bpf, docs: Better document the legacy packet access instruction
...
Use consistent terminology and structured RST elements to better document
these two oddball instructions.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220131183638.3934982-4-hch@lst.de
2022-02-03 09:29:31 -08:00
Christoph Hellwig
63d8c242b9
bpf, docs: Better document the regular load and store instructions
...
Add a separate section and a little intro blurb for the regular load and
store instructions.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220131183638.3934982-3-hch@lst.de
2022-02-03 09:23:09 -08:00
Christoph Hellwig
dd33fb571f
bpf, docs: Document the byte swapping instructions
...
Add a section to document the byte swapping instructions.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220131183638.3934982-2-hch@lst.de
2022-02-03 09:23:09 -08:00
Yonghong Song
b72903847a
docs/bpf: clarify how btf_type_tag gets encoded in the type chain
...
Clarify where the BTF_KIND_TYPE_TAG gets encoded in the type chain,
so applications and kernel can properly parse them.
Signed-off-by: Yonghong Song <yhs@fb.com >
Link: https://lore.kernel.org/r/20220127154627.665163-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
2022-01-27 12:03:47 -08:00
Andrii Nakryiko
96c85308ee
docs/bpf: update BPF map definition example
...
Use BTF-defined map definition in the documentation example.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org >
Link: https://lore.kernel.org/r/20220120060529.1890907-5-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
2022-01-20 21:19:05 -08:00
Christoph Hellwig
58d8a3fc4a
bpf, docs: Fully document the JMP mode modifiers
...
Add a description for all the modifiers.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220103183556.41040-7-hch@lst.de
2022-01-05 13:11:26 -08:00
Christoph Hellwig
9e533e22b5
bpf, docs: Fully document the JMP opcodes
...
Add pseudo-code to document all the different BPF_JMP / BPF_JMP64
opcodes.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220103183556.41040-6-hch@lst.de
2022-01-05 13:11:26 -08:00
Christoph Hellwig
03c517ee9e
bpf, docs: Fully document the ALU opcodes
...
Add pseudo-code to document all the different BPF_ALU / BPF_ALU64
opcodes.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220103183556.41040-5-hch@lst.de
2022-01-05 13:11:26 -08:00
Christoph Hellwig
894cda554c
bpf, docs: Document the opcode classes
...
Add a description for each opcode class.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220103183556.41040-4-hch@lst.de
2022-01-05 13:11:26 -08:00
Christoph Hellwig
be3193cded
bpf, docs: Add subsections for ALU and JMP instructions
...
Add a little more stucture to the ALU/JMP documentation with sections and
improve the example text.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220103183556.41040-3-hch@lst.de
2022-01-05 13:11:26 -08:00
Christoph Hellwig
62e4683849
bpf, docs: Add a setion to explain the basic instruction encoding
...
The eBPF instruction set document does not currently document the basic
instruction encoding. Add a section to do that.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20220103183556.41040-2-hch@lst.de
2022-01-05 13:11:26 -08:00
Christoph Hellwig
63d000c3dc
bpf, docs: Move the packet access instructions last in instruction-set.rst
...
The packet access instructions are a convoluted leftover from classic
BPF. Move them last past the much more important atomic operations,
and improve the rendering of the code example.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20211223101906.977624-5-hch@lst.de
2021-12-30 16:34:03 -08:00
Christoph Hellwig
5e4dd19f00
bpf, docs: Generate nicer tables for instruction encodings
...
Use RST tables that are nicely readable both in plain ascii as well as
in html to render the instruction encodings, and add a few subheadings
to better structure the text.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20211223101906.977624-4-hch@lst.de
2021-12-30 16:33:57 -08:00
Christoph Hellwig
41db511a3a
bpf, docs: Split the comparism to classic BPF from instruction-set.rst
...
Split the introductory that explain eBPF vs classic BPF and how it maps
to hardware from the instruction set specification into a standalone
document. This duplicates a little bit of information but gives us a
useful reference for the eBPF instrution set that is not encumbered by
classic BPF.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20211223101906.977624-3-hch@lst.de
2021-12-30 16:31:44 -08:00
Christoph Hellwig
fa86aa77d4
bpf, docs: Fix verifier references
...
Use normal RST file reference instead of linkage copied from the old filter.rst
document that does not actually work when using HTML output.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20211223101906.977624-2-hch@lst.de
2021-12-30 16:31:44 -08:00
Christoph Hellwig
88691e9e1e
bpf, docs: Split general purpose eBPF documentation out of filter.rst
...
filter.rst starts out documenting the classic BPF and then spills into
introducing and documentating eBPF. Move the eBPF documentation into
rwo new files under Documentation/bpf/ for the instruction set and
the verifier and link to the BPF documentation from filter.rst.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Acked-by: Song Liu <songliubraving@fb.com >
Link: https://lore.kernel.org/bpf/20211119163215.971383-6-hch@lst.de
2021-11-30 10:52:11 -08:00
Christoph Hellwig
bc84e959e5
bpf, docs: Move handling of maps to Documentation/bpf/maps.rst
...
Move the general maps documentation into the maps.rst file from the
overall networking filter documentation and add a link instead.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Acked-by: Song Liu <songliubraving@fb.com >
Link: https://lore.kernel.org/bpf/20211119163215.971383-5-hch@lst.de
2021-11-30 10:52:11 -08:00