summaryrefslogtreecommitdiffstats
path: root/Documentation/bpf/instruction-set.rst (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bpf, docs: Move Clang notes to a separate fileDave Thaler2022-09-301-6/+0
| | | | | | | | Move Clang notes to a separate file. Signed-off-by: Dave Thaler <dthaler@microsoft.com> Link: https://lore.kernel.org/r/20220927185958.14995-3-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
* bpf, docs: Linux byteswap noteDave Thaler2022-09-301-4/+0
| | | | | | | | Add Linux byteswap note. Signed-off-by: Dave Thaler <dthaler@microsoft.com> Link: https://lore.kernel.org/r/20220927185958.14995-2-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
* bpf, docs: Move legacy packet instructions to a separate fileDave Thaler2022-09-301-35/+3
| | | | | | | | Move legacy packet instructions to a separate file. Signed-off-by: Dave Thaler <dthaler@microsoft.com> Link: https://lore.kernel.org/r/20220927185958.14995-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
* bpf, docs: Fix the code formatting in instruction-setShahab Vahedi2022-06-241-1/+1
| | | | | | | | | | | A minor typo fix to include "| BPF_LD" into its previous code phrase: ``BPF_IND`` | BPF_LD --> ``BPF_IND | BPF_LD`` Signed-off-by: Shahab Vahedi <shahab@synopsys.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/b6120b31-3d1d-bf2d-2f2a-aa768d91257b@synopsys.com
* bpf, docs: Fix typo "BFP_ALU" to "BPF_ALU"Kosuke Fujimoto2022-06-091-1/+1
| | | | | | | | "BFP" should be "BPF" Signed-off-by: Kosuke Fujimoto <fujimotokosuke0@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220609083937.245749-1-fujimotoksouke0@gmail.com
* bpf, docs: Fix typo "respetively" to "respectively"Tiezhu Yang2022-04-281-1/+1
| | | | | | | | "respetively" should be "respectively". Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/1651139754-4838-4-git-send-email-yangtiezhu@loongson.cn
* bpf, docs: BPF_FROM_BE exists as alias for BPF_TO_BETiezhu Yang2022-04-281-1/+1
| | | | | | | | | | | | | 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
* bpf, docs: Remove duplicated word "instructions"Tiezhu Yang2022-04-281-1/+1
| | | | | | | | 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
* bpf, docs: Better document the atomic instructionsChristoph Hellwig2022-02-031-27/+49
| | | | | | | | | 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
* bpf, docs: Better document the extended instruction formatChristoph Hellwig2022-02-031-7/+19
| | | | | | | | | | | 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
* bpf, docs: Better document the legacy packet access instructionChristoph Hellwig2022-02-031-22/+32
| | | | | | | | | 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
* bpf, docs: Better document the regular load and store instructionsChristoph Hellwig2022-02-031-5/+12
| | | | | | | | | 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
* bpf, docs: Document the byte swapping instructionsChristoph Hellwig2022-02-031-4/+40
| | | | | | | | 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
* bpf, docs: Fully document the JMP mode modifiersChristoph Hellwig2022-01-051-6/+6
| | | | | | | | 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
* bpf, docs: Fully document the JMP opcodesChristoph Hellwig2022-01-051-17/+17
| | | | | | | | | 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
* bpf, docs: Fully document the ALU opcodesChristoph Hellwig2022-01-051-15/+15
| | | | | | | | | 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
* bpf, docs: Document the opcode classesChristoph Hellwig2022-01-051-12/+12
| | | | | | | | 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
* bpf, docs: Add subsections for ALU and JMP instructionsChristoph Hellwig2022-01-051-20/+32
| | | | | | | | | 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
* bpf, docs: Add a setion to explain the basic instruction encodingChristoph Hellwig2022-01-051-1/+15
| | | | | | | | | 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
* bpf, docs: Move the packet access instructions last in instruction-set.rstChristoph Hellwig2021-12-311-28/+27
| | | | | | | | | | 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
* bpf, docs: Generate nicer tables for instruction encodingsChristoph Hellwig2021-12-311-63/+95
| | | | | | | | | | 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
* bpf, docs: Split the comparism to classic BPF from instruction-set.rstChristoph Hellwig2021-12-311-311/+69
| | | | | | | | | | | | 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
* bpf, docs: Fix verifier referencesChristoph Hellwig2021-12-311-5/+2
| | | | | | | | | 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
* bpf, docs: Split general purpose eBPF documentation out of filter.rstChristoph Hellwig2021-11-301-0/+467
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