bpf, docs: Add note about type convention
Subsystems (2)
PATCH 1/1 bpf, docs: Add note about type convention
From: Dave Thaler <[email protected]>
Add note about type convention
--- Documentation/bpf/instruction-set.rst | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/bpf/instruction-set.rst +7 -0
@@ -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 ================================
@@ -123,6 +128,8 @@ the destination register is unchanged whereas for ``BPF_ALU`` the upper dst_reg = (u32) dst_reg + (u32) src_reg; +where '(u32)' indicates that the upper 32 bits are zeroed. + ``BPF_ADD | BPF_X | BPF_ALU64`` means:: dst_reg = dst_reg + src_reg
Signature · 1 line
2.33.4
Quoted 3 lines · On Wed, Jan 25, 2023 at 06:48:27PM +0000, [email protected] wrote:
From: Dave Thaler <[email protected]>
Add note about type convention
Could you please provide a slightly more descriptive commit summary?
Quoted 11 lines
Signed-off-by Dave Thaler <[email protected]>--- Documentation/bpf/instruction-set.rst | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/bpf/instruction-set.rst +0
-0
Documentation/bpf/instruction-set.rst eBPF Instruction Set Specification, v1.0 · line 14
Quoted 8 lines
Documentation/bpf/instruction-set.rst +5
-0@@ -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.
Can you use single quotes here to match the convention in the rest of the file?
Quoted 15 lines
Documentation/bpf/instruction-set.rst +2
-0Registers and calling convention ================================@@ -123,6 +128,8 @@ the destination register is unchanged whereas for ``BPF_ALU`` the upper dst_reg = (u32) dst_reg + (u32) src_reg; +where '(u32)' indicates that the upper 32 bits are zeroed. + ``BPF_ADD | BPF_X | BPF_ALU64`` means:: dst_reg = dst_reg + src_regSignature · 1 line
2.33.4
PATCH 1/1 bpf, docs: Add note about type convention
From: Dave Thaler <[email protected]>
Add explanation about use of "u64", "u32", etc. as the type convention used in BPF documentation.
---
V2 -> V3: updated commit message to respond to David Vernet
V1 -> V2: addressed comments from Alexei and Stanislav by using u64 instead of uint64_t
--- Documentation/bpf/instruction-set.rst | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/bpf/instruction-set.rst +7 -0
@@ -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 ================================
@@ -123,6 +128,8 @@ the destination register is unchanged whereas for ``BPF_ALU`` the upper dst_reg = (u32) dst_reg + (u32) src_reg; +where '(u32)' indicates that the upper 32 bits are zeroed. + ``BPF_ADD | BPF_X | BPF_ALU64`` means:: dst_reg = dst_reg + src_reg
Signature · 1 line
2.33.4
Quoted 6 lines · On Fri, Jan 27, 2023 at 01:47:06AM +0000, [email protected] wrote:
From: Dave Thaler <[email protected]>
Add explanation about use of "u64", "u32", etc. as the type convention used in BPF documentation.
Signed-off-by Dave Thaler <[email protected]>
Quoted 37 lines
---
V2 -> V3: updated commit message to respond to David VernetV1 -> V2: addressed comments from Alexei and Stanislav by using u64 instead of
uint64_t--- Documentation/bpf/instruction-set.rst | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/bpf/instruction-set.rst +7
-0@@ -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 ================================@@ -123,6 +128,8 @@ the destination register is unchanged whereas for ``BPF_ALU`` the upper dst_reg = (u32) dst_reg + (u32) src_reg; +where '(u32)' indicates that the upper 32 bits are zeroed. + ``BPF_ADD | BPF_X | BPF_ALU64`` means:: dst_reg = dst_reg + src_regSignature · 1 line
2.33.4
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Quoted 8 lines · On Fri, 27 Jan 2023 01:47:06 +0000 you wrote:
From: Dave Thaler <[email protected]>
Add explanation about use of "u64", "u32", etc. as the type convention used in BPF documentation.
Signed-off-by Dave Thaler <[email protected]>[...]
Here is the summary with links:
- bpf, docs: Add note about type convention
https://git.kernel.org/bpf/bpf-next/c/d00d5b82f073
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html