From: Christoph Hellwig <hch@infradead.org>
To: Dave Thaler <dthaler@microsoft.com>
Cc: bpf <bpf@vger.kernel.org>
Subject: Re: FW: ebpf-docs: draft of ISA doc updates in progress
Date: Mon, 19 Sep 2022 09:58:12 -0700 [thread overview]
Message-ID: <YyifpJR4uwZwvpkc@infradead.org> (raw)
In-Reply-To: <DM4PR21MB34401314FC9285A9F5A338E0A3479@DM4PR21MB3440.namprd21.prod.outlook.com>
Hi Dave,
there is a lot of good thing in here, but it is a bit hard to review,
mostly because it is a giant patch instead of a single well-documented
patch per logical thing to change.
A bunch of nitpicks below, mostly style or organizational:
> +The current Instruction Set Architecture (ISA) version, sometimes referred to in other documents
> +as a "CPU" version, is 3. This document also covers older versions of the ISA.
Hmm, I thought the versioning was a bit more complicated based on
the mailing list interactions and the call. Especially with things
like the full atomics not even supported by all gits.
> + **Note**
> +
> + *Linux implementation*: In the Linux kernel, the exit value for eBPF
> + programs is passed as a 32 bit value.
Is this Linux, a specific program type, or the ISA?
> + *Linux implementation*: In the Linux kernel, all program types only use
> + R1 which contains the "context", which is typically a structure containing all
> + the inputs needed.
I also think these Linux notes do not belong into the main instruction
set document, which tries to really just describe the ISA.
> - * the basic instruction encoding, which uses 64 bits to encode an instruction
> - * the wide instruction encoding, which appends a second 64-bit immediate value
> - (imm64) after the basic instruction for a total of 128 bits.
> +* the basic instruction encoding, which uses 64 bits to encode an instruction
> +* the wide instruction encoding, which appends a second 64-bit immediate (i.e.,
Btw, can you explain why you de-indent these? I picked the space before
the * because that seems to be what most Linux RST documents do.
> + For ISA versions prior to 3, Clang v7.0 and later can enable ``BPF_ALU`` support with
> + ``-Xclang -target-feature -Xclang +alu32``.
I also suspect the clang notes would be better off in a separate
document from the main ISA.
> -BPF_XOR | BPF_K | BPF_ALU means::
> + *Linux implementation*: In the Linux kernel, uint32_t is expressed as u32,
> + uint64_t is expressed as u64, etc. This document uses the standard C terminology
> + as the cross-platform specification.
I don't think this makes sense in the document. Instead we probably
need a "Conventions" section that defines the type and syntax we use.
next prev parent reply other threads:[~2022-09-19 16:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CY5PR21MB377000AC95B475C47B702293A3439@CY5PR21MB3770.namprd21.prod.outlook.com>
2022-09-13 8:12 ` FW: ebpf-docs: draft of ISA doc updates in progress Dave Thaler
2022-09-14 6:22 ` Shung-Hsi Yu
2022-09-14 9:35 ` Dave Thaler
2022-09-19 17:04 ` Christoph Hellwig
2022-09-20 19:12 ` Dave Thaler
2022-09-20 23:39 ` Alexei Starovoitov
2022-09-21 8:34 ` Rethink how to deal with division/modulo-on-zero (was Re: FW: ebpf-docs: draft of ISA doc updates in progress) Shung-Hsi Yu
2022-09-21 13:50 ` Alexei Starovoitov
2022-09-22 5:00 ` Shung-Hsi Yu
2022-09-23 23:15 ` Alexei Starovoitov
2022-09-21 14:41 ` Dave Thaler
2022-09-22 5:00 ` Shung-Hsi Yu
2022-09-21 17:53 ` FW: ebpf-docs: draft of ISA doc updates in progress Dave Thaler
2022-09-19 16:58 ` Christoph Hellwig [this message]
2022-09-20 19:37 ` Dave Thaler
2022-09-20 23:45 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YyifpJR4uwZwvpkc@infradead.org \
--to=hch@infradead.org \
--cc=bpf@vger.kernel.org \
--cc=dthaler@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox