Re: [Bpf] Review of draft-thaler-bpf-isa-01

Watson Ladd <watsonbladd@gmail.com> Tue, 25 July 2023 18:37 UTC

Return-Path: <watsonbladd@gmail.com>
X-Original-To: bpf@ietfa.amsl.com
Delivered-To: bpf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A3B77C14CE5F for <bpf@ietfa.amsl.com>; Tue, 25 Jul 2023 11:37:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.098
X-Spam-Level:
X-Spam-Status: No, score=-7.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7XNFJ_fb_2Kn for <bpf@ietfa.amsl.com>; Tue, 25 Jul 2023 11:37:00 -0700 (PDT)
Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 309F5C15109A for <bpf@ietf.org>; Tue, 25 Jul 2023 11:37:00 -0700 (PDT)
Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-565a8d9d832so3692229eaf.1 for <bpf@ietf.org>; Tue, 25 Jul 2023 11:37:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690310219; x=1690915019; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JeelAk+UG0Z+0Z6zA+f8GznerG9M7rwYV5RDidhYjkk=; b=g5zeOHCl+JxQX2YiRSpINPt1lO8AEXC19Y8vuLftI87MpjEB+0izBEJhKmb//srMUI KYGCwVwSQddkNF1oUj7TMQM6aIKPiyDpDdnTOatvtGadNgSklJVrUSsCxY7zQsZDZDLH wfiiUD4K7ux/rWO+nRnILwopOXccsoZsZv2OoP+P8X68qF/wFesw4wRPGsDXAaYcRDGJ bMIu+7AvFOt603+XGzZSBE1co/MA4iSt/HOu0CYbrVT+m4khMwPLTtyBZcYlIfPZ5Iu+ b7ej1FjLpEw6lf3P8qfdbuGVj7Yqo7q03PKJ+C2WSZMbvPN98JoNpgsWxR8RWXymY5Et z09Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690310219; x=1690915019; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JeelAk+UG0Z+0Z6zA+f8GznerG9M7rwYV5RDidhYjkk=; b=DnL5OeBOtWUhjwTKYCImB9lfmTeWRX4y/Ag9kKMlIFbGDzk7ZuXQ/8uUZ+FvHVYe/j zqgABWviFrfRXr3ZkOp+ul+p/e19EQylgaNT7zKyYd7y0m96kqI8U1l/mq6qVhlSWVoQ 8rZV6bxoHeJ80W0bM1Cl2McPDEqpEYGQOTr54xIYXLXyVyr9O+EGoLpsJicJOcqbCFAQ RJitttIJAGkb3dfRQy9vvU3O40NpZ1uauZ+97Ekgg4Jf4kCHSvAVXQvV1Y8qJpB9v9Zl V63ozD+Cce7kVqJeny+OZE1RS2moDlQtPYmLXy4ocfnQaxjS7PZcMDYcKc6xRbrKGIkM CteA==
X-Gm-Message-State: ABy/qLY3ds10HxOs5aXI4YrB99aZbHI2IcU0JADmfxTNhkZBQpMqkAJP RMuSAFoM2aC6UT5qUKfByjF00fGrJa2y1sSvBy8=
X-Google-Smtp-Source: APBJJlG2KOMCEuu7ue8fjkBhAf5I25AceKARm8COrbZIfzcrYLb8Drhk/6vemvi6s/oQSNb50nCPeJgP+HU/gB8e2yI=
X-Received: by 2002:a4a:dfbc:0:b0:566:f951:d12 with SMTP id k28-20020a4adfbc000000b00566f9510d12mr158049ook.1.1690310219400; Tue, 25 Jul 2023 11:36:59 -0700 (PDT)
MIME-Version: 1.0
References: <CACsn0ckZO+b5bRgMZhOvx+Jn-sa0g8cBD+ug1CJEdtYxSm_hgA@mail.gmail.com> <PH7PR21MB3878D8DCEF24A5F8E52BA59DA303A@PH7PR21MB3878.namprd21.prod.outlook.com> <CAADnVQJ1fKXcsTXdCijwQzf0OVF0md-ATN5RbB3g10geyofNzA@mail.gmail.com>
In-Reply-To: <CAADnVQJ1fKXcsTXdCijwQzf0OVF0md-ATN5RbB3g10geyofNzA@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
Date: Tue, 25 Jul 2023 11:36:48 -0700
Message-ID: <CACsn0cmf22zEN9AduiRiFnQ7XhY1ABRL=SwAwmmFgxJvVZAOsg@mail.gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Dave Thaler <dthaler@microsoft.com>, "bpf@ietf.org" <bpf@ietf.org>, bpf <bpf@vger.kernel.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/bpf/iW-VpcP7VZp9i7RRLCTEZYoWL3M>
Subject: Re: [Bpf] Review of draft-thaler-bpf-isa-01
X-BeenThere: bpf@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Discussion of BPF/eBPF standardization efforts within the IETF <bpf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/bpf>, <mailto:bpf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/bpf/>
List-Post: <mailto:bpf@ietf.org>
List-Help: <mailto:bpf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/bpf>, <mailto:bpf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Jul 2023 18:37:04 -0000

On Tue, Jul 25, 2023 at 9:15 AM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Tue, Jul 25, 2023 at 7:03 AM Dave Thaler <dthaler@microsoft.com> wrote:
> >
> > I am forwarding the email below (after converting HTML to plain text)
> > to the mailto:bpf@vger.kernel.org list so replies can go to both lists.
> >
> > Please use this one for any replies.
> >
> > Thanks,
> > Dave
> >
> > > From: Bpf <bpf-bounces@ietf.org> On Behalf Of Watson Ladd
> > > Sent: Monday, July 24, 2023 10:05 PM
> > > To: bpf@ietf.org
> > > Subject: [Bpf] Review of draft-thaler-bpf-isa-01
> > >
> > > Dear BPF wg,
> > >
> > > I took a look at the draft and think it has some issues, unsurprisingly at this stage. One is
> > > the specification seems to use an underspecified C pseudo code for operations vs
> > > defining them mathematically.
>
> Hi Watson,
>
> This is not "underspecified C" pseudo code.
> This is assembly syntax parsed and emitted by GCC, LLVM, gas, Linux Kernel, etc.

I don't see a reference to any description of that in section 4.1.
It's possible I've overlooked this, and if people think this style of
definition is good enough that works for me. But I found table 4
pretty scanty on what exactly happens.
>
> > > The good news is I think this is very fixable although tedious.
> > >
> > > The other thornier issues are memory model etc. But the overall structure seems good
> > > and the document overall makes sense.
>
> What do you mean by "memory model" ?
> Do you see a reference to it ? Please be specific.

No, and that's the problem. Section 5.2 talks about atomic operations.
I'd expect that to be paired with a description of barriers so that
these work, or a big warning about when you need to use them. For
clarity I'm pretty unfamiliar with bpf as a technology, and it's
possible that with more knowledge this would make sense. On looking
back on that I don't even know if the memory space is flat, or
segmented: can I access maps through a value set to dst+offset, or
must I always used index? I'm just very confused.

Sincerely,
Watson

-- 
Astra mortemque praestare gradatim