diff options
author | Dave Thaler <dthaler@microsoft.com> | 2023-01-27 02:47:06 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-02-08 18:25:26 +0100 |
commit | d00d5b82f0734205c718aa1acf7cc9b183fd6751 (patch) | |
tree | 01ee5772f74eb35daa5e4de7a1e2a9722879a26c /Documentation/bpf | |
parent | bpf/docs: Update design QA to be consistent with kfunc lifecycle docs (diff) | |
download | linux-d00d5b82f0734205c718aa1acf7cc9b183fd6751.tar.xz linux-d00d5b82f0734205c718aa1acf7cc9b183fd6751.zip |
bpf, docs: Add note about type convention
Add explanation about use of "u64", "u32", etc. as
the type convention used in BPF documentation.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Acked-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20230127014706.1005-1-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'Documentation/bpf')
-rw-r--r-- | Documentation/bpf/instruction-set.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst index c1c17ee60ecb..af515de5fc38 100644 --- a/Documentation/bpf/instruction-set.rst +++ b/Documentation/bpf/instruction-set.rst @@ -7,6 +7,11 @@ eBPF Instruction Set Specification, v1.0 This document specifies version 1.0 of the eBPF instruction set. +Documentation conventions +========================= + +For brevity, this document uses the type notion "u64", "u32", etc. +to mean an unsigned integer whose width is the specified number of bits. Registers and calling convention ================================ @@ -164,6 +169,8 @@ the destination register is unchanged whereas for ``BPF_ALU`` the upper dst = (u32) ((u32) dst + (u32) src) +where '(u32)' indicates that the upper 32 bits are zeroed. + ``BPF_ADD | BPF_X | BPF_ALU64`` means:: dst = dst + src |