diff mbox series

[1/9] bpf, docs: Add note about type convention

Message ID 20221004224745.1430-1-dthaler1968@googlemail.com (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series [1/9] bpf, docs: Add note about type convention | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch
bpf/vmtest-bpf-next-PR pending PR summary
bpf/vmtest-bpf-next-VM_Test-1 pending Logs for build for s390x with gcc
bpf/vmtest-bpf-next-VM_Test-4 success Logs for llvm-toolchain
bpf/vmtest-bpf-next-VM_Test-5 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-2 success Logs for build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-3 success Logs for build for x86_64 with llvm-16
bpf/vmtest-bpf-PR fail merge-conflict

Commit Message

Dave Thaler Oct. 4, 2022, 10:47 p.m. UTC
From: Dave Thaler <dthaler@microsoft.com>

Add note about type convention

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---
 Documentation/bpf/instruction-set.rst | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Dave Thaler Oct. 17, 2022, 8:42 p.m. UTC | #1
Just checking if there is any more feedback on this patch set,
as I've seen no comments since this set was posted on October 4th
which addresses comments received on the previous submission.

Let me know if I'm missing some step I should be doing as I'm new
to this submission process.

Thanks!
Dave

> -----Original Message-----
> From: dthaler1968@googlemail.com <dthaler1968@googlemail.com>
> Sent: Tuesday, October 4, 2022 3:48 PM
> To: bpf@vger.kernel.org
> Cc: Dave Thaler <dthaler@microsoft.com>
> Subject: [PATCH 1/9] bpf, docs: Add note about type convention
> 
> From: Dave Thaler <dthaler@microsoft.com>
> 
> Add note about type convention
> 
> Signed-off-by: Dave Thaler <dthaler@microsoft.com>
> ---
>  Documentation/bpf/instruction-set.rst | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/bpf/instruction-set.rst
> b/Documentation/bpf/instruction-set.rst
> index 4997d2088..6847a4cbf 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
>  ================================
> @@ -116,6 +121,8 @@ BPF_END   0xd0   byte swap operations (see `Byte swap
> instructions`_ below)
> 
>    dst_reg = (u32) dst_reg + (u32) src_reg;
> 
> +where '(u32)' indicates truncation to 32 bits.
> +
>  ``BPF_ADD | BPF_X | BPF_ALU64`` means::
> 
>    dst_reg = dst_reg + src_reg
> --
> 2.33.4
Alexei Starovoitov Oct. 17, 2022, 9:41 p.m. UTC | #2
On Mon, Oct 17, 2022 at 08:42:13PM +0000, Dave Thaler wrote:
> Just checking if there is any more feedback on this patch set,
> as I've seen no comments since this set was posted on October 4th
> which addresses comments received on the previous submission.

The was an issue found by build bot...

> Let me know if I'm missing some step I should be doing as I'm new
> to this submission process.

I'm still not excited about 'appendix'. How about moving it into separate file?
instruction-set-opcodes.rst ?

If folks really want to use it in automated way that table needs to be uniform
and shouldn't be interleaved with normal text.
That's why a separate file with just that table seems a better fit.
Dave Thaler Oct. 17, 2022, 11:16 p.m. UTC | #3
> -----Original Message-----
> From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Sent: Monday, October 17, 2022 2:41 PM
> To: Dave Thaler <dthaler@microsoft.com>
> Cc: bpf@vger.kernel.org; dthaler1968@googlemail.com
> Subject: Re: [PATCH 1/9] bpf, docs: Add note about type convention
> 
> On Mon, Oct 17, 2022 at 08:42:13PM +0000, Dave Thaler wrote:
> > Just checking if there is any more feedback on this patch set, as I've
> > seen no comments since this set was posted on October 4th which
> > addresses comments received on the previous submission.
> 
> The was an issue found by build bot...
> 
> > Let me know if I'm missing some step I should be doing as I'm new to
> > this submission process.
> 
> I'm still not excited about 'appendix'. How about moving it into separate file?
> instruction-set-opcodes.rst ?
> 
> If folks really want to use it in automated way that table needs to be uniform
> and shouldn't be interleaved with normal text.
> That's why a separate file with just that table seems a better fit.

I can move it to a separate file, but that appendix is added in patch 5/9 of this set.
Any comments on patches 1-4 or are they all good now?

Dave
Alexei Starovoitov Oct. 17, 2022, 11:43 p.m. UTC | #4
On Mon, Oct 17, 2022 at 4:16 PM Dave Thaler <dthaler@microsoft.com> wrote:
>
> > -----Original Message-----
> > From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> > Sent: Monday, October 17, 2022 2:41 PM
> > To: Dave Thaler <dthaler@microsoft.com>
> > Cc: bpf@vger.kernel.org; dthaler1968@googlemail.com
> > Subject: Re: [PATCH 1/9] bpf, docs: Add note about type convention
> >
> > On Mon, Oct 17, 2022 at 08:42:13PM +0000, Dave Thaler wrote:
> > > Just checking if there is any more feedback on this patch set, as I've
> > > seen no comments since this set was posted on October 4th which
> > > addresses comments received on the previous submission.
> >
> > The was an issue found by build bot...
> >
> > > Let me know if I'm missing some step I should be doing as I'm new to
> > > this submission process.
> >
> > I'm still not excited about 'appendix'. How about moving it into separate file?
> > instruction-set-opcodes.rst ?
> >
> > If folks really want to use it in automated way that table needs to be uniform
> > and shouldn't be interleaved with normal text.
> > That's why a separate file with just that table seems a better fit.
>
> I can move it to a separate file, but that appendix is added in patch 5/9 of this set.
> Any comments on patches 1-4 or are they all good now?

Don't know. Since they're not in patchwork anymore no one
is looking at them. Just resend.
Dave Thaler Oct. 19, 2022, 6:40 p.m. UTC | #5
Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
[...]
> > Any comments on patches 1-4 or are they all good now?
> 
> Don't know. Since they're not in patchwork anymore no one is looking at
> them. Just resend.

Resent patches 1-4.

Dave
diff mbox series

Patch

diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
index 4997d2088..6847a4cbf 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
 ================================
@@ -116,6 +121,8 @@  BPF_END   0xd0   byte swap operations (see `Byte swap instructions`_ below)
 
   dst_reg = (u32) dst_reg + (u32) src_reg;
 
+where '(u32)' indicates truncation to 32 bits.
+
 ``BPF_ADD | BPF_X | BPF_ALU64`` means::
 
   dst_reg = dst_reg + src_reg