mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Acked-by: David Vernet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
1 parent
27b53b7364
commit
d00d5b82f0
1 file changed
+7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user