BPF List
 help / color / mirror / Atom feed
From: David Vernet <void@manifault.com>
To: dthaler1968=40googlemail.com@dmarc.ietf.org,
	alexei.starovoitov@gmail.com, hch@infradead.org
Cc: bpf@ietf.org, bpf@vger.kernel.org
Subject: Re: [Bpf] BPF ISA conformance groups
Date: Thu, 7 Dec 2023 15:51:52 -0600	[thread overview]
Message-ID: <20231207215152.GA168514@maniforge> (raw)
In-Reply-To: <072101da2558$fe5f5020$fb1df060$@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3674 bytes --]

On Sat, Dec 02, 2023 at 11:51:50AM -0800, dthaler1968=40googlemail.com@dmarc.ietf.org wrote:
> >From David Vernet's WG summary:
> > After this update, the discussion moved to a topic for the BPF ISA
> document that has yet to be resolved:
> > ISA RFC compliance. Dave pointed out that we still need to specify which
> instructions in the ISA are
> > MUST, SHOULD, etc, to ensure interoperability.  Several different options
> were presented, including
> >  having individual-instruction granularity, following the clang CPU
> versioning convention, and grouping
> > instructions by logical functionality.
> >
> > We did not obtain consensus at the conference on which was the best way
> forward. Some of the points raised include the following:
> >
> > - Following the clang CPU versioning labels is somewhat arbitrary. It
> >   may not be appropriate to standardize around grouping that is a result
> >   of largely organic historical artifacts.
> > - If we decide to do logical grouping, there is a danger of
> >   bikeshedding. Looking at anecdotes from industry, some vendors such as
> >   Netronome elected to not support particular instructions for
> >   performance reasons.
> 
> My sense of the feedback in general was to group instructions by logical
> functionality, and only create separate
> conformance groups where there is some legitimate technical reason that a
> runtime might not want to support
> a given set of instructions.  Based on discussion during the meeting, here's
> a strawman set of conformance
> groups to kick off discussion.  I've tried to use short (like 6 characters
> or fewer) names for ease of display in
> document tables, and potentially in command line options to tools that might
> want to use them.
> 
> A given runtime platform would be compliant to some set of the following
> conformance groups:
> 
> 1. "basic": all instructions not covered by another group below.
> 2. "atomic": all Atomic operations.  I think Christoph argued for this one
> in the meeting.
> 3. "divide": all division and modulo operations.  Alexei said in the meeting
> that he'd heard demand for this one.
> 4. "legacy": all legacy packet access instructions (deprecated).
> 5. "map": 64-bit immediate instructions that deal with map fds or map
> indices.
> 6. "code": 64-bit immediate instruction that has a "code pointer" type.
> 7. "func": program-local functions.

I thought for a while about whether this should be part of the basic
conformance group, and talked through it with Jakub Kicinski. I do think
it makes sense to keep it separate like this. For e.g. devices with
Harvard architectures, it could get quite non-trivial for the verifier
to determine whether accesses to arguments stored in special register
are safe. Definitely not impossible, and overall very useful to support
this, but in order to ease vendor adoption it's probably best to keep
this separate.

> Things that I *think* don't need a separate conformance group (can just be
> in "basic") include:
> a. Call helper function by address or BTF ID.  A runtime that doesn't
> support these simply won't expose any
>     such helper functions to BPF programs.
> b. Platform variable instructions (dst = var_addr(imm)).  A runtime that
> doesn't support this simply won't
>     expose any platform variables to BPF programs.
> 
> Comments? (Let the bikeshedding begin...)

This list seems logical to me, though I do want to think a bit more
about the maps one. Alexei, Christoph, anyone else? Now is the time to
get aligned so we can get this to WG last call in plenty of time for
IETF 119.

Thanks,
David

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: David Vernet <void@manifault.com>
To: dthaler1968=40googlemail.com@dmarc.ietf.org,
	alexei.starovoitov@gmail.com, hch@infradead.org
Cc: bpf@ietf.org, bpf@vger.kernel.org
Subject: Re: [Bpf] BPF ISA conformance groups
Date: Thu, 7 Dec 2023 15:51:52 -0600	[thread overview]
Message-ID: <20231207215152.GA168514@maniforge> (raw)
Message-ID: <20231207215152.rReC4vLNVlKEksWF82x_ncLTWQ7nZx9Y4QQU_MGejGQ@z> (raw)
In-Reply-To: <072101da2558$fe5f5020$fb1df060$@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3674 bytes --]

On Sat, Dec 02, 2023 at 11:51:50AM -0800, dthaler1968=40googlemail.com@dmarc.ietf.org wrote:
> >From David Vernet's WG summary:
> > After this update, the discussion moved to a topic for the BPF ISA
> document that has yet to be resolved:
> > ISA RFC compliance. Dave pointed out that we still need to specify which
> instructions in the ISA are
> > MUST, SHOULD, etc, to ensure interoperability.  Several different options
> were presented, including
> >  having individual-instruction granularity, following the clang CPU
> versioning convention, and grouping
> > instructions by logical functionality.
> >
> > We did not obtain consensus at the conference on which was the best way
> forward. Some of the points raised include the following:
> >
> > - Following the clang CPU versioning labels is somewhat arbitrary. It
> >   may not be appropriate to standardize around grouping that is a result
> >   of largely organic historical artifacts.
> > - If we decide to do logical grouping, there is a danger of
> >   bikeshedding. Looking at anecdotes from industry, some vendors such as
> >   Netronome elected to not support particular instructions for
> >   performance reasons.
> 
> My sense of the feedback in general was to group instructions by logical
> functionality, and only create separate
> conformance groups where there is some legitimate technical reason that a
> runtime might not want to support
> a given set of instructions.  Based on discussion during the meeting, here's
> a strawman set of conformance
> groups to kick off discussion.  I've tried to use short (like 6 characters
> or fewer) names for ease of display in
> document tables, and potentially in command line options to tools that might
> want to use them.
> 
> A given runtime platform would be compliant to some set of the following
> conformance groups:
> 
> 1. "basic": all instructions not covered by another group below.
> 2. "atomic": all Atomic operations.  I think Christoph argued for this one
> in the meeting.
> 3. "divide": all division and modulo operations.  Alexei said in the meeting
> that he'd heard demand for this one.
> 4. "legacy": all legacy packet access instructions (deprecated).
> 5. "map": 64-bit immediate instructions that deal with map fds or map
> indices.
> 6. "code": 64-bit immediate instruction that has a "code pointer" type.
> 7. "func": program-local functions.

I thought for a while about whether this should be part of the basic
conformance group, and talked through it with Jakub Kicinski. I do think
it makes sense to keep it separate like this. For e.g. devices with
Harvard architectures, it could get quite non-trivial for the verifier
to determine whether accesses to arguments stored in special register
are safe. Definitely not impossible, and overall very useful to support
this, but in order to ease vendor adoption it's probably best to keep
this separate.

> Things that I *think* don't need a separate conformance group (can just be
> in "basic") include:
> a. Call helper function by address or BTF ID.  A runtime that doesn't
> support these simply won't expose any
>     such helper functions to BPF programs.
> b. Platform variable instructions (dst = var_addr(imm)).  A runtime that
> doesn't support this simply won't
>     expose any platform variables to BPF programs.
> 
> Comments? (Let the bikeshedding begin...)

This list seems logical to me, though I do want to think a bit more
about the maps one. Alexei, Christoph, anyone else? Now is the time to
get aligned so we can get this to WG last call in plenty of time for
IETF 119.

Thanks,
David

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 76 bytes --]

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

  parent reply	other threads:[~2023-12-07 21:51 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 20:18 IETF 118 BPF WG summary David Vernet
2023-11-27 20:18 ` [Bpf] " David Vernet
2023-11-28  9:43 ` Michael Richardson
2023-11-28  9:43   ` Michael Richardson
2023-12-02 19:51 ` BPF ISA conformance groups dthaler1968
2023-12-02 19:51   ` [Bpf] " dthaler1968=40googlemail.com
2023-12-07 21:51   ` David Vernet [this message]
2023-12-07 21:51     ` David Vernet
2023-12-10  3:10     ` Alexei Starovoitov
2023-12-10  3:10       ` Alexei Starovoitov
2023-12-10 21:13       ` Watson Ladd
2023-12-10 21:13         ` Watson Ladd
2023-12-12 21:45       ` David Vernet
2023-12-12 21:45         ` David Vernet
2023-12-12 22:01         ` dthaler1968
2023-12-12 22:01           ` dthaler1968=40googlemail.com
2023-12-12 22:55           ` Alexei Starovoitov
2023-12-12 22:55             ` Alexei Starovoitov
2023-12-12 23:35             ` David Vernet
2023-12-12 23:35               ` David Vernet
2023-12-13  1:32               ` Alexei Starovoitov
2023-12-13  1:32                 ` Alexei Starovoitov
2023-12-13 18:56                 ` David Vernet
2023-12-13 18:56                   ` David Vernet
2023-12-14  0:12                   ` Alexei Starovoitov
2023-12-14  0:12                     ` Alexei Starovoitov
2023-12-14 17:44                     ` David Vernet
2023-12-14 17:44                       ` David Vernet
2023-12-15  5:29                       ` Christoph Hellwig
2023-12-15  5:29                         ` Christoph Hellwig
2023-12-19  1:15                         ` Alexei Starovoitov
2023-12-19  1:15                           ` Alexei Starovoitov
2023-12-19 18:10                           ` dthaler1968
2023-12-19 18:10                             ` dthaler1968=40googlemail.com
2023-12-20  3:28                             ` Alexei Starovoitov
2023-12-20  3:28                               ` Alexei Starovoitov
2023-12-21  7:00                               ` Christoph Hellwig
2023-12-21  7:00                                 ` Christoph Hellwig
2024-01-05 22:07                                 ` David Vernet
2024-01-05 22:07                                   ` David Vernet
2024-01-08 16:00                                   ` Christoph Hellwig
2024-01-08 21:51                                     ` Alexei Starovoitov
2024-01-08 21:51                                       ` Alexei Starovoitov
2024-01-09 11:35                                       ` Jose E. Marchesi
2024-01-09 11:35                                         ` Jose E. Marchesi
2024-01-23 21:39                                         ` David Vernet
2024-01-23 21:39                                           ` David Vernet
2024-01-23 23:29                                           ` dthaler1968
2024-01-23 23:29                                             ` dthaler1968=40googlemail.com
2024-01-25  2:55                                             ` Alexei Starovoitov
2024-01-25  2:55                                               ` Alexei Starovoitov
2024-01-09 15:26                                       ` Christoph Hellwig
2023-12-19 18:15                 ` dthaler1968
2023-12-19 18:15                   ` dthaler1968=40googlemail.com
2023-12-13 16:59         ` Christoph Hellwig
2023-12-13 16:59           ` Christoph Hellwig

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=20231207215152.GA168514@maniforge \
    --to=void@manifault.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@ietf.org \
    --cc=bpf@vger.kernel.org \
    --cc=dthaler1968=40googlemail.com@dmarc.ietf.org \
    --cc=hch@infradead.org \
    /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