All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vernet <void@manifault.com>
To: Watson Ladd <watsonbladd@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Dave Thaler <dthaler@microsoft.com>,
	Christoph Hellwig <hch@infradead.org>,
	"bpf@ietf.org" <bpf@ietf.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [Bpf] Review of draft-thaler-bpf-isa-01
Date: Fri, 18 Aug 2023 14:59:37 -0500	[thread overview]
Message-ID: <20230818195937.GD14411@maniforge> (raw)
In-Reply-To: <20230814161759.GF542801@maniforge>

On Mon, Aug 14, 2023 at 11:17:59AM -0500, David Vernet wrote:
> On Fri, Aug 11, 2023 at 02:36:04PM -0700, Watson Ladd wrote:
> > Dear David,
> 
> Hi Watson,

Hi everyone,

Watson and I discussed this today in more detail over a call. I think
we're now on the same page, and I want to update the lists with where we
landed so others can weigh in. The TL;DR is that the ISA document as it
exists today is trying to toe the line between being two different types
of ISA documents:

1. An ARM/x86-esque ISA document that exists somewhat in isolation, and
   just defines the encodings and high-level semantics of instructions.
   For example, if you look at the ARM A64 Instruction Set Architecture
   for Armv8 and Armv8-A document, it literally just jumps straight into
   encodings and high-level semantics of the instructions. There's
   literally zero information about the ARM memory model, execution
   environment, etc. All of that is captured in separate architecture
   documents.

2. The RISC-V ISA model, which goes into significantly more detail on
   the architecture of RISC-V, and formalizes not just the instructions,
   but the execution and memory models, memory consistency model, etc.

I am (and I believe Watson is as well following our discussion) of the
opinion that our ISA document belongs squarely in the first category,
and shouldn't try to also fit into the second. We're defining the
instruction encodings, and describing their semantics at a high level
without much formality. This is intentional -- our WG charter specifies
many more documents that cover all of these details (some of which will
likely be contentious and require a lot of thought and discussion) in
the proper scopes. For example, our planned documents include but are
not limited to:

- [I] an architecture and framework document

- one or more documents that recommend conventions and guidelines
  for producing portable BPF program binaries

- [PS] cross-platform map types allowing native data structure access
  from BPF programs

- [PS] cross-platform helper functions, e.g., for manipulation of maps

- [PS] cross-platform BPF program types that define the higher level
  execution environment for BPF programs

With all that said, I think our ISA document would improve a lot with
the following changes:

1. Removing all the ABI-specific stuff from the ISA document.  For
   example, calling conventions need to go. This was discussed at IETF
   117, so should hopefully be non-controversial. I'll send a patch
   later that moves this to a separate abi.rst document that we can then
   fold into Will's work.

2. This wasn't discussed at IETF 117, but also removing extraneous
   verbiage such as the "Helper functions" and "Maps" paragraphs, and
   maybe more such as "Platform Variables". These blurbs are useful for
   giving some context on the actual instructions in the ISA, but
   they're insufficient on their own to be of practical use.

So the TL;DR is: let's make the ISA document just an ISA document.
We're in it for the long haul, and the time to properly introduce,
define, and explain all of these concepts is when we write the documents
that are meant to capture all of that information.

Watson -- please let me know if I've misrepresented anything. It would
be great to get others' thoughts as well.

Thanks,
David

WARNING: multiple messages have this Message-ID (diff)
From: David Vernet <void@manifault.com>
To: Watson Ladd <watsonbladd@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Dave Thaler <dthaler@microsoft.com>,
	Christoph Hellwig <hch@infradead.org>,
	"bpf@ietf.org" <bpf@ietf.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [Bpf] Review of draft-thaler-bpf-isa-01
Date: Fri, 18 Aug 2023 14:59:37 -0500	[thread overview]
Message-ID: <20230818195937.GD14411@maniforge> (raw)
Message-ID: <20230818195937.iL0Hx3iwtflfxji02Hcv05ahig59PjrUlanyGKOlJ8o@z> (raw)
In-Reply-To: <20230814161759.GF542801@maniforge>

On Mon, Aug 14, 2023 at 11:17:59AM -0500, David Vernet wrote:
> On Fri, Aug 11, 2023 at 02:36:04PM -0700, Watson Ladd wrote:
> > Dear David,
> 
> Hi Watson,

Hi everyone,

Watson and I discussed this today in more detail over a call. I think
we're now on the same page, and I want to update the lists with where we
landed so others can weigh in. The TL;DR is that the ISA document as it
exists today is trying to toe the line between being two different types
of ISA documents:

1. An ARM/x86-esque ISA document that exists somewhat in isolation, and
   just defines the encodings and high-level semantics of instructions.
   For example, if you look at the ARM A64 Instruction Set Architecture
   for Armv8 and Armv8-A document, it literally just jumps straight into
   encodings and high-level semantics of the instructions. There's
   literally zero information about the ARM memory model, execution
   environment, etc. All of that is captured in separate architecture
   documents.

2. The RISC-V ISA model, which goes into significantly more detail on
   the architecture of RISC-V, and formalizes not just the instructions,
   but the execution and memory models, memory consistency model, etc.

I am (and I believe Watson is as well following our discussion) of the
opinion that our ISA document belongs squarely in the first category,
and shouldn't try to also fit into the second. We're defining the
instruction encodings, and describing their semantics at a high level
without much formality. This is intentional -- our WG charter specifies
many more documents that cover all of these details (some of which will
likely be contentious and require a lot of thought and discussion) in
the proper scopes. For example, our planned documents include but are
not limited to:

- [I] an architecture and framework document

- one or more documents that recommend conventions and guidelines
  for producing portable BPF program binaries

- [PS] cross-platform map types allowing native data structure access
  from BPF programs

- [PS] cross-platform helper functions, e.g., for manipulation of maps

- [PS] cross-platform BPF program types that define the higher level
  execution environment for BPF programs

With all that said, I think our ISA document would improve a lot with
the following changes:

1. Removing all the ABI-specific stuff from the ISA document.  For
   example, calling conventions need to go. This was discussed at IETF
   117, so should hopefully be non-controversial. I'll send a patch
   later that moves this to a separate abi.rst document that we can then
   fold into Will's work.

2. This wasn't discussed at IETF 117, but also removing extraneous
   verbiage such as the "Helper functions" and "Maps" paragraphs, and
   maybe more such as "Platform Variables". These blurbs are useful for
   giving some context on the actual instructions in the ISA, but
   they're insufficient on their own to be of practical use.

So the TL;DR is: let's make the ISA document just an ISA document.
We're in it for the long haul, and the time to properly introduce,
define, and explain all of these concepts is when we write the documents
that are meant to capture all of that information.

Watson -- please let me know if I've misrepresented anything. It would
be great to get others' thoughts as well.

Thanks,
David

-- 
Bpf mailing list
Bpf@ietf.org
https://www.ietf.org/mailman/listinfo/bpf

  reply	other threads:[~2023-08-18 19:59 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACsn0ckZO+b5bRgMZhOvx+Jn-sa0g8cBD+ug1CJEdtYxSm_hgA@mail.gmail.com>
2023-07-25 14:00 ` [Bpf] Review of draft-thaler-bpf-isa-01 Dave Thaler
2023-07-25 14:03 ` Dave Thaler
2023-07-25 14:03   ` Dave Thaler
2023-07-25 16:15   ` Alexei Starovoitov
2023-07-25 16:15     ` Alexei Starovoitov
2023-07-25 18:36     ` Watson Ladd
2023-07-25 18:36       ` Watson Ladd
2023-07-26 19:16       ` Will Hawkins
2023-07-26 19:16         ` Will Hawkins
2023-07-28  1:05         ` Alexei Starovoitov
2023-07-28  1:05           ` Alexei Starovoitov
2023-07-28 23:32           ` Will Hawkins
2023-07-28 23:32             ` Will Hawkins
2023-07-29  0:04             ` Alexei Starovoitov
2023-07-29  0:04               ` Alexei Starovoitov
2023-07-29  0:18               ` Will Hawkins
2023-07-29  0:18                 ` Will Hawkins
2023-07-29  0:35                 ` Alexei Starovoitov
2023-07-29  0:35                   ` Alexei Starovoitov
2023-07-29  0:46                   ` Will Hawkins
2023-07-29  0:46                     ` Will Hawkins
2023-07-29  0:52                     ` Alexei Starovoitov
2023-07-29  0:52                       ` Alexei Starovoitov
2023-07-29  1:07                       ` Will Hawkins
2023-07-29  1:07                         ` Will Hawkins
2023-07-29  2:31                         ` Alexei Starovoitov
2023-07-29  2:31                           ` Alexei Starovoitov
2023-07-29  3:13                           ` Will Hawkins
2023-07-29  3:13                             ` Will Hawkins
2023-07-29  4:52                             ` Alexei Starovoitov
2023-07-29  4:52                               ` Alexei Starovoitov
2023-08-02  1:55                               ` Dave Thaler
2023-08-02  1:55                                 ` Dave Thaler
2023-08-02  2:29                                 ` Alexei Starovoitov
2023-08-02  2:29                                   ` Alexei Starovoitov
2023-08-02 12:05                                   ` Dave Thaler
2023-08-02 12:05                                     ` Dave Thaler
2023-08-02 12:15                                     ` Dave Thaler
2023-08-02 12:15                                       ` Dave Thaler
2023-07-28  0:55       ` Alexei Starovoitov
2023-07-28  0:55         ` Alexei Starovoitov
2023-08-02  2:33         ` Watson Ladd
2023-08-02  2:33           ` Watson Ladd
2023-08-02  2:55           ` Alexei Starovoitov
2023-08-02  2:55             ` Alexei Starovoitov
2023-08-11 17:21           ` David Vernet
2023-08-11 17:21             ` David Vernet
2023-08-11 21:36             ` Watson Ladd
2023-08-11 21:36               ` Watson Ladd
2023-08-11 21:41               ` Will Hawkins
2023-08-11 21:41                 ` Will Hawkins
2023-08-14 16:17               ` David Vernet
2023-08-14 16:17                 ` David Vernet
2023-08-18 19:59                 ` David Vernet [this message]
2023-08-18 19:59                   ` David Vernet

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=20230818195937.GD14411@maniforge \
    --to=void@manifault.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@ietf.org \
    --cc=bpf@vger.kernel.org \
    --cc=dthaler@microsoft.com \
    --cc=hch@infradead.org \
    --cc=watsonbladd@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.