Re: [Coin] Fwd: The Future of P4, Revisited

Hesham ElBakoury <helbakoury@gmail.com> Sat, 20 May 2023 01:40 UTC

Return-Path: <helbakoury@gmail.com>
X-Original-To: coin@ietfa.amsl.com
Delivered-To: coin@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ABD00C151070 for <coin@ietfa.amsl.com>; Fri, 19 May 2023 18:40:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.094
X-Spam-Level:
X-Spam-Status: No, score=-2.094 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable 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 BzQBCZ-w6Vyx for <coin@ietfa.amsl.com>; Fri, 19 May 2023 18:40:35 -0700 (PDT)
Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (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 99510C14CE4A for <coin@irtf.org>; Fri, 19 May 2023 18:40:35 -0700 (PDT)
Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-53482b44007so1453167a12.2 for <coin@irtf.org>; Fri, 19 May 2023 18:40:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684546835; x=1687138835; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=i4uiNXl6fO7ojQIZBOL4Q3n2EOf6AjcoUA4qtDwz62c=; b=Hxm/ZlTe9oPY+f3yUvaaZ1iso35H8qBpVhmvNuKRCzP3ReH+VIDBSqOO2QgLP0Lk+F u97hSI+WXnMzDzWHFpx0I9I2F39vuEssdypRwJ2vFSzNl/wyysvToY2/l3HPE0juEz+o izJtjfgEV/JZsFHUhIsSNQWoo11FYfQgfhS2DnkFKPDz0pK622DtDzxt4GXwepy8lTyT pEd+j0m9gArUPSDNc1YFVIcUNu36fJ7DSF4rZnxSMcwlKr3aOw6RDN57vkFYDUBMJZqK gkJJIhzfLR3yf1icwirMtll23gwmV0rkk6+ybktjJEfO6Qc2DBZbdkI2Pk9C6j2DnQMS mzww==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684546835; x=1687138835; h=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=i4uiNXl6fO7ojQIZBOL4Q3n2EOf6AjcoUA4qtDwz62c=; b=gB5kxxUrCkCLHlXjqBKPKz7Xr6B2NvqoPDMjMZlzJjB+hPJUUjM+qwn9VVcfrI/IQv DQtjB5s6+C4VHDsJNkhU0Kg/g5X/AFWuv0Yr1VRvtsyrvang1Bxr0qFjmMkKlRSWz3Va yrlf5hiye4LnzyoWZx0qPYRLHqrDhyxwJh0YgnRTBFVLLnJ+9ceo/i9B9djufHVuEcoR vVJocfI2nBJSDK1QVPdG/zkwJBjqsFTerRqPSNja0/DxUYdrnFEy7FoM3p79bANVtVSJ 5cXrfWVUgPa+ZM1GXSr7SsvAVjfEnyW6rRIwehG0d6k0tbLFAKxXYOaxsPyhXfZIV8BO 1Abg==
X-Gm-Message-State: AC+VfDxzb7CNdGD6DmdQfnMkXfYRgcZoXqTjNaAGa+V/5piSLhdNkKII 4QNDYVpPPfLEIA6NPcCC4yNZwkJJQZLXwnuOx8A=
X-Google-Smtp-Source: ACHHUZ5O528NqtK0YO+yUqOxv7zWH9QzXJwqQdNdoqPYsD0LlGDEKtX80iuzg4Y7Po3XNPpZtCcCMDhqv7aHQ9Mzr6s=
X-Received: by 2002:a17:90a:f68a:b0:253:70b7:18d1 with SMTP id cl10-20020a17090af68a00b0025370b718d1mr3810707pjb.34.1684546834523; Fri, 19 May 2023 18:40:34 -0700 (PDT)
MIME-Version: 1.0
References: <ZGZ5MEal+NPtfDvg@faui48e.informatik.uni-erlangen.de> <BY3PR13MB47871414A1B9BB37A197C3A99A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <000801d989cb$39f6c3e0$ade44ba0$@mnkcg.com> <ZGbBWIPaH8d2lgiQ@faui48e.informatik.uni-erlangen.de> <006d01d989ef$d7d04540$8770cfc0$@mnkcg.com> <BY3PR13MB4787D6D30F2F1F6B20F2507B9A7C9@BY3PR13MB4787.namprd13.prod.outlook.com> <ZGekyuneBRDRxobA@faui48e.informatik.uni-erlangen.de> <00de01d98a78$88895330$999bf990$@mnkcg.com> <ZGe707xWgAA+hTwi@faui48e.informatik.uni-erlangen.de> <014b01d98a81$ea47f960$bed7ec20$@mnkcg.com> <ZGfMQiXNgDQGaToO@faui48e.informatik.uni-erlangen.de> <022e01d98aa8$27f92b00$77eb8100$@mnkcg.com>
In-Reply-To: <022e01d98aa8$27f92b00$77eb8100$@mnkcg.com>
From: Hesham ElBakoury <helbakoury@gmail.com>
Date: Fri, 19 May 2023 18:40:23 -0700
Message-ID: <CAFvDQ9qtwCrffV54VLvTs677q-0C2TCu2uYFo148xTFGr+g4Fw@mail.gmail.com>
To: hemant@mnkcg.com
Cc: Toerless Eckert <tte@cs.fau.de>, Haoyu Song <haoyu.song@futurewei.com>, ehalep@mojatatu.com, "Bernier, Daniel" <daniel.bernier@bell.ca>, Marie-Jose Montpetit <marie@mjmontpetit.com>, coin <coin@irtf.org>, coinrg-chairs <coinrg-chairs@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ade92005fc161f39"
Archived-At: <https://mailarchive.ietf.org/arch/msg/coin/wNGKSaG0AwAdh-uw8KVNUpJqFmU>
Subject: Re: [Coin] Fwd: The Future of P4, Revisited
X-BeenThere: coin@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "COIN: Computing in the Network" <coin.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/coin>, <mailto:coin-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/coin/>
List-Post: <mailto:coin@irtf.org>
List-Help: <mailto:coin-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/coin>, <mailto:coin-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sat, 20 May 2023 01:40:39 -0000

I think for less than Tbps we can use VPP hardware in Octean with Hermant
compiler.

Hesham

On Fri, May 19, 2023, 4:18 PM <hemant@mnkcg.com> wrote:

> DPDK uses HQF and since VPP uses DPDK for packet i/o, VPP also supports
> HQF. Programming HQF running on an asic is very complex to program.
>
> I am personally not going to use the Tofino - any asic feature development
> feature development works too slow for me.
> Vpp code I referred to is not ugly for me - cache alignment is in vpp
> infra which developers of new plugins just use via api. Reading P4 or C
> code is no different to me. With Octeon, I am not at the mercy of an asic
> vendor because Octeon lets me use DPDK or VPP to program whatever I want.
>
> Cisco has a large swath of P4-16 code running on their CiscoONE asic.
> Mellanox has P4 support. Intel FPGA is P4-programmable.
>
> Hemant
>
> -----Original Message-----
> From: 'Toerless Eckert' <tte@cs.fau.de>
> Sent: Friday, May 19, 2023 3:22 PMogra
> mTo: hemant@mnkcg.com
> Cc: 'Haoyu Song' <haoyu.song@futurewei.com>; 'Hesham ElBakoury' <
> helbakoury@gmail.com>; ehalep@mojatatu.com; 'Bernier, Daniel' <
> daniel.bernier@bell.ca>; 'Marie-Jose Montpetit' <marie@mjmontpetit.com>;
> 'coin' <coin@irtf.org>; 'coinrg-chairs' <coinrg-chairs@ietf.org>
> Subject: Re: [Coin] Fwd: The Future of P4, Revisited
>
> On Fri, May 19, 2023 at 02:44:15PM -0400, hemant@mnkcg.com wrote:
> > I wrote parsing TCP options in P4 using varbits in P4 parser for
> > bmv2. Se
> >
> > https://github.com/p4lang/p4c/blob/main/testdata/p4_16_samples/checksu
> > m-l4-bmv2.p4
> Sure, a lot has been done and is possible with VPP. And if you want to
> propse something data plane to IETF and want to claim that it will work for
> cost effective data center switches then you should do a Tofio PoC.
> At least that's one of he reason why i want some of my IETF work to have
> Tofino PoC. But thats independent of what the best specification language
> is. Aka: For something like these TCP header options, CPU C code would be a
> lot easie to read, right?
>
> > in line below.
>
> > Hemant: VPP has a simple rule: fit code in instructions cache and tables
> in data cache and vpp will rock and roll. Use of buffer pools and
> cache-aligned data is common code for x86, ARM, or risc-v.
>
> Sure. That also results in a lot of code uglyness starting from breaking
> processing into the right size chunks to have a good amount of packets to
> form vectors from, and the figure out which CPU can best work with which
> vector length, etc. pp.
>
> > Hemant: I know about PIFO. It cannot track bandwidth across all flows
> like HQF can. This is why I did discard PIFO.
>
> I was suggestingo PIFO as a core building block. I am not quite sure about
> the minimum necessary framework around it. I am not quite sure about the
> details of mapping HQF to PIFO, but it is claimed to be possible, e.g.:
> https://www.kom.tu-darmstadt.de/papers/GRK+21-2.pdf
> "the PIFO queuing concept supports hierarchical queueing, which are
> drained from the root"
>
> There are some queuing concepts not suported by PIFO, so definitely worth
> to better understand those and their relevance.
>
> But i do agree, that HQF is the bread-and-butter queuing requirement for
> all the edge interface deployment casees today, because it is pretty much
> what the industry has standardized on so far - and every advanced TM chip
> has pretty much HQF and unfortunately often also only HQF.
>
> How do we make more researchers interested in TM ? It is architecturally
> still so much unexplored than any of the other compute aspects in
> forwarding planes, even though it did have becauseof PIFO since 2016 some
> good influx of work...
>
> Cheers
>     Toerless
>
> > Hemant
> >
> >
> > Cheers
> >     Toerless
> >
> > >
> > > Hemant
> > >
> > > -----Original Message-----
> > > From: 'Toerless Eckert' <tte@cs.fau.de>
> > > Sent: Friday, May 19, 2023 12:33 PM
> > > To: Haoyu Song <haoyu.song@futurewei.com>
> > > Cc: hemant@mnkcg.com; 'Hesham ElBakoury' <helbakoury@gmail.com>;
> > > ehalep@mojatatu.com; 'Bernier, Daniel' <daniel.bernier@bell.ca>;
> > > 'Marie-Jose Montpetit' <marie@mjmontpetit.com>; 'coin'
> > > <coin@irtf.org>; 'coinrg-chairs' <coinrg-chairs@ietf.org>
> > > Subject: Re: [Coin] Fwd: The Future of P4, Revisited
> > >
> > > Right.
> > >
> > > For high speed router/switch (>= 100gbps/interface) validation:
> > >   P4 implementations on Tofino are great as proof of concept - if it
> can be done.
> > >   If P4 implementation on Tofino does not work, other proof points
> > > are needed,
> > >
> > > For medium speed "software forwarding" validation:
> > >   P4 creates too many limitations. All CPU have float, and/or SMDI,
> and/or
> > >   more flexible memory access options and likely several other aspects
> not
> > >   easily utilized by P4.
> > >
> > > For generic specification:
> > >   IMHO above limitations are at the core of why P4 is insufficient.
> > >   I very much like several structural aspects of P4, they would be
> great
> > >   starting points for general purpose spec. Such as header parsing
> specs
> > >   (need to be extended for variable length though).
> > >   Aka: Anything we can use from P4 which is more/better declarative
> than
> > >   C/C++ is IMHO useful. Just lets not introduce constraints:
> Validation on
> > >   different type of forwarding platforms is different from a single
> > >   specification.
> > >   And we are also missing good DSL spec options for TM i fear...
> > >
> > > Cheers
> > >     Toerless
> > >
> > > On Fri, May 19, 2023 at 04:02:57PM +0000, Haoyu Song wrote:
> > > > I think the discussion is off the point. We are discussing whether
> or not P4 is suitable for a standard specification language for general
> dataplane processing and forwarding applications. To fulfill that purpose,
> it needs to be target/architecture independent; it needs to be concise and
> expressive to cover various dataplane functions which may not be
> conceivable today (e.g., in-network computing applications).
> > > > Unfortunately, I don't think P4 can meet these requirements now
> > > > (imagine all the pseudo code in RFCs are translated to P4). Of
> > > > course, it can be limited to just support certain functions, e.g.,
> > > > to document the header formats and parsing process (but here I
> > > > don't see the advantage of P4 either)
> > > >
> > > > Haoyu
> > > >
> > > > -----Original Message-----
> > > > From: hemant@mnkcg.com <hemant@mnkcg.com>
> > > > Sent: Thursday, May 18, 2023 6:19 PM
> > > > To: 'Toerless Eckert' <tte@cs.fau.de>
> > > > Cc: Haoyu Song <haoyu.song@futurewei.com>; 'Hesham ElBakoury'
> > > > <helbakoury@gmail.com>; ehalep@mojatatu.com; 'Bernier, Daniel'
> > > > <daniel.bernier@bell.ca>; 'Marie-Jose Montpetit'
> > > > <marie@mjmontpetit.com>; 'coin' <coin@irtf.org>; 'coinrg-chairs'
> > > > <coinrg-chairs@ietf.org>
> > > > Subject: RE: [Coin] Fwd: The Future of P4, Revisited
> > > >
> > > > Toerless,
> > > >
> > > > Only externs defined in core.p4 are in a library. Externs defined in
> an architecture include file, e.g., v1model.p4 are implemented in
> target-specific back end and are extensions. An example of a target extern
> is vpp accelerator in Octeon 10. Neither P4-16 spec nor PNA support
> floating point and neither does my compiler. Floating point in used be
> AI/ML. The float point numbers would have to be converted to integer.
> Google's Tensor chip also converts float to integer for ML.
> > > >
> > > > If you want to work with the linux kernel, see the ebpf architecture
> include file,
> https://github.com/p4lang/p4c/blob/main/p4include/ebpf_model.p4. Doesn't
> the file have externs which have totally abstracted linux kernel data
> structs and functions?
> > > >
> > > > Hemant
> > > >
> > > > -----Original Message-----
> > > > From: Coin <coin-bounces@irtf.org> On Behalf Of 'Toerless Eckert'
> > > > Sent: Thursday, May 18, 2023 8:23 PM
> > > > To: hemant@mnkcg.com
> > > > Cc: 'Haoyu Song' <haoyu.song@futurewei.com>; 'Hesham ElBakoury'
> > > > <helbakoury@gmail.com>; ehalep@mojatatu.com; 'Bernier, Daniel'
> > > > <daniel.bernier@bell.ca>; 'Marie-Jose Montpetit'
> > > > <marie@mjmontpetit.com>; 'coin' <coin@irtf.org>; 'coinrg-chairs'
> > > > <coinrg-chairs@ietf.org>
> > > > Subject: Re: [Coin] Fwd: The Future of P4, Revisited
> > > >
> > > > Hemant,
> > > >
> > > > Externs and functions are not an extension to the language.
> > > > They are really just libraries.
> > > >
> > > > Syntactic changes/extensions such as for parsing/deparsing, new
> types, such as float/double - those would be language extensions.
> > > >
> > > > This makes the use of P4 cumbersome on any platform that can do more
> than the worst-case-chip against which the P4 language is designed (aka:
> Tofino).
> > > >
> > > > For example on your OCTEON P4 compiler: The ARM A72 does support
> floating point numbers. If you implemented support for them via the
> mechanisms supported by P4, the way i understood it, you could still not
> write simple P4 programs for OCTEON then like:
> > > >
> > > >     float a, b, c
> > > >     a = b * c / 3.2;
> > > >
> > > > You may have a set of externs/functions through which you could do
> this, but it would look a lot more ugly.
> > > >
> > > > Right ? If not, pls. explain - i would be happy!
> > > >
> > > > And Haoyu's argument was that when we want to suggest to use P4 as
> the reference specification or base forwarding programming in the linux
> kernel, then this need to hide stuff outside of P4 written externs and
> functions does limit P4's useful as a complete specification and reference
> code language.
> > > >
> > > > Cheers
> > > >     Toerless
> > > >
> > > > On Thu, May 18, 2023 at 04:56:31PM -0400, hemant@mnkcg.com wrote:
> > > > > Why do you care for internal behavior of checksum when the P4 api
> is able to provide data to compute checksum.
> > > > >
> > > > > https://github.com/p4lang/p4c/blob/main/p4include/v1model.p4#L50
> > > > > 5
> > > > >
> > > > > Hemant
> > > > >
> > > > > -----Original Message-----
> > > > > From: Coin <coin-bounces@irtf.org> On Behalf Of Haoyu Song
> > > > > Sent: Thursday, May 18, 2023 3:30 PM
> > > > > To: 'Toerless Eckert' <tte@cs.fau.de>; hemant@mnkcg.com
> > > > > Cc: 'Hesham ElBakoury' <helbakoury@gmail.com>;
> > > > > ehalep@mojatatu.com; 'Bernier, Daniel' <daniel.bernier@bell.ca>;
> 'Marie-Jose Montpetit'
> > > > > <marie@mjmontpetit.com>; 'coin' <coin@irtf.org>; 'coinrg-chairs'
> > > > > <coinrg-chairs@ietf.org>
> > > > > Subject: Re: [Coin] Fwd: The Future of P4, Revisited
> > > > >
> > > > > Toerless,
> > > > >
> > > > > This is exactly the problem: you can't use the core language to
> describe an arbitrary dataplane function.
> > > > > "Extern" can be a blackbox but what need is the spec for what's in
> the blackbox.
> > > > >
> > > > > For P4 spec: " Extern objects are architecture-specific constructs
> that can be manipulated by P4 programs through well-defined APIs, but whose
> internal behavior is hard-wired (e.g., checksum units) and hence not
> programmable using P4"
> > > > >
> > > > > Haoyu
> > > > >
> > > > > -----Original Message-----
> > > > > From: 'Toerless Eckert' <tte@cs.fau.de>
> > > > > Sent: Thursday, May 18, 2023 12:15 PM
> > > > > To: hemant@mnkcg.com
> > > > > Cc: Haoyu Song <haoyu.song@futurewei.com>; 'Hesham ElBakoury'
> > > > > <helbakoury@gmail.com>; ehalep@mojatatu.com; 'Bernier, Daniel'
> > > > > <daniel.bernier@bell.ca>; 'Marie-Jose Montpetit'
> > > > > <marie@mjmontpetit.com>; 'coin' <coin@irtf.org>; 'coinrg-chairs'
> > > > > <coinrg-chairs@ietf.org>
> > > > > Subject: Re: [Coin] Fwd: The Future of P4, Revisited
> > > > >
> > > > > On Thu, May 18, 2023 at 02:19:12PM -0400, hemant@mnkcg.com wrote:
> > > > > > A specific P4 architecture, e.g., PNA, may override the base P4
> spec. PNA supports writing table entry by data plane. Using registers in P4
> is a bit clunky but state can be maintained. Anyone is welcome to present a
> better solution to the P4 forums.
> > > > >
> > > > > So far, my limited experience has been, that the language itself
> has rather evolved over its series of spec to further reduce the base
> language functionality and move any improvemenets into implementation
> extensions ("extern") calls, so that no possible hardware would not be able
> to not support any base language feature.
> > > > >
> > > > > This is a good strategy to gain more acceptance in the industry,
> > > > > but not to get to the easiest to use forwarding plane behavioral
> > > > > definition language
> > > > >
> > > > > For exmple, i would need axtual syntactical language extensions to
> define a good way to parse andd deparsing variable length header fields.
> This can not just be done with extern calls.
> > > > >
> > > > > Has P4 adopted the approach to have optional language feature
> extensions ?
> > > > > Sorry. Did not have time to follow the spec evolution in detail.
> > > > >
> > > > > Cheers
> > > > >     Toerless
> > > > > > Hemant
> > > > > >
> > > > > >
> > > > > >
> > > > > > From: Haoyu Song <haoyu.song@futurewei.com>
> > > > > > Sent: Thursday, May 18, 2023 1:56 PM
> > > > > > To: Hesham ElBakoury <helbakoury@gmail.com>
> > > > > > Cc: ehalep@mojatatu.com; Toerless Eckert <tte@cs.fau.de>;
> > > > > > hemant=40mnkcg.com@dmarc.ietf.org <hemant@mnkcg.com>; Bernier,
> > > > > > Daniel <daniel.bernier@bell.ca>; Marie-Jose Montpetit
> > > > > > <marie@mjmontpetit.com>; coin <coin@irtf.org>; coinrg-chairs
> > > > > > <coinrg-chairs@ietf.org>
> > > > > > Subject: RE: [Coin] Fwd: The Future of P4, Revisited
> > > > > >
> > > > > >
> > > > > >
> > > > > > Hi Hesham,
> > > > > >
> > > > > >
> > > > > >
> > > > > > Please see P4 spec section 6.5.2 for the current “stateful”
> support.
> > > > > > So far the “table” element, which is the most important
> > > > > > construct for a P4 program,  is not stateful (i.e., dataplane
> > > > > > writable)
> > > > > >
> > > > > > I think it’s a direction to extend P4 for better stateful
> support (part of my recent research). At least now it’s unnatural and
> difficult to describe many stateful functions.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Haoyu
> > > > > >
> > > > > >
> > > > > >
> > > > > > From: Coin <coin-bounces@irtf.org
> > > > > > <mailto:coin-bounces@irtf.org>
> > > > > > > On Behalf Of Hesham ElBakoury
> > > > > > Sent: Thursday, May 18, 2023 10:42 AM
> > > > > > To: Haoyu Song <haoyu.song@futurewei.com
> > > > > > <mailto:haoyu.song@futurewei.com> >
> > > > > > Cc: ehalep@mojatatu.com <mailto:ehalep@mojatatu.com> ;
> > > > > > Toerless Eckert <tte@cs.fau.de <mailto:tte@cs.fau.de> >;
> > > > > > hemant=40mnkcg.com@dmarc.ietf.org
> > > > > > <mailto:hemant=40mnkcg.com@dmarc.ietf.org> ; Bernier, Daniel
> > > > > > <daniel.bernier@bell.ca <mailto:daniel.bernier@bell.ca> >;
> > > > > > Marie-Jose Montpetit <marie@mjmontpetit.com
> > > > > > <mailto:marie@mjmontpetit.com> >; coin <coin@irtf.org
> > > > > > <mailto:coin@irtf.org> >; coinrg-chairs
> > > > > > <coinrg-chairs@ietf.org <mailto:coinrg-chairs@ietf.org> >
> > > > > > Subject: Re: [Coin] Fwd: The Future of P4, Revisited
> > > > > >
> > > > > >
> > > > > >
> > > > > > Hi Haoyu,
> > > > > >
> > > > > > Actually, P4 supports dataplane-modifiable tables -- see PNA.
> > > > > >
> > > > > >
> > > > > >
> > > > > > More generally, the *language* is fully extensible. You can have
> whatever architecture and state externs you want. So one needs to be
> careful to separate language (non) limitations from target limitations.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Hesham
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, May 18, 2023, 10:15 AM Haoyu Song <
> haoyu.song@futurewei.com <mailto:haoyu.song@futurewei.com> > wrote:
> > > > > >
> > > > > > Hi Hesham,
> > > > > >
> > > > > >
> > > > > >
> > > > > > I said “it’s very limited”. P4 table is only readable (i.e., not
> writable) by dataplane, so it basically eliminates any dataplane stateful
> function that need to use tables. The stateful function can only use
> register arrays but unfortunately registers are local to a pipeline stage
> so the state update logic must be very simple and can be finish in a single
> stage. What you said “event” must be something very simple. Use case such
> as stateful load balancer can’t be implemented by P4.
> > > > > >
> > > > > >
> > > > > >
> > > > > > There are some works addressing the issue. FlowBlaze is the most
> recent one, which needs a new chip architecture but it is still limited to
> simple stateful functions which can be realized in a single pipeline stage.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Haoyu
> > > > > >
> > > > > >
> > > > > >
> > > > > > From: Hesham ElBakoury <helbakoury@gmail.com
> > > > > > <mailto:helbakoury@gmail.com> >
> > > > > > Sent: Thursday, May 18, 2023 10:00 AM
> > > > > > To: Haoyu Song <haoyu.song@futurewei.com
> > > > > > <mailto:haoyu.song@futurewei.com> >
> > > > > > Cc: ehalep@mojatatu.com <mailto:ehalep@mojatatu.com> ;
> > > > > > Toerless Eckert <tte@cs.fau.de <mailto:tte@cs.fau.de> >;
> > > > > > hemant=40mnkcg.com@dmarc.ietf.org
> > > > > > <mailto:40mnkcg.com@dmarc.ietf.org>
> > > > > > ; Bernier, Daniel <daniel.bernier@bell.ca
> > > > > > <mailto:daniel.bernier@bell.ca> >; Marie-Jose Montpetit
> > > > > > <marie@mjmontpetit.com <mailto:marie@mjmontpetit.com> >; coin
> > > > > > <coin@irtf.org <mailto:coin@irtf.org> >; coinrg-chairs
> > > > > > <coinrg-chairs@ietf.org <mailto:coinrg-chairs@ietf.org> >
> > > > > > Subject: Re: [Coin] Fwd: The Future of P4, Revisited
> > > > > >
> > > > > >
> > > > > >
> > > > > > Hi Haoyu,
> > > > > >
> > > > > > You say: "P4 has very limited support for stateful processing"
> > > > > >
> > > > > >
> > > > > >
> > > > > > I am not sure I can agree with your characterization of P4.
> Perhaps can you elaborate on this.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Hesham
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, May 18, 2023, 9:19 AM Haoyu Song <
> haoyu.song@futurewei.com <mailto:haoyu.song@futurewei.com> > wrote:
> > > > > >
> > > > > > Interesting discussion. See my comments below  [HS]
> > > > > >
> > > > > > Haoyu
> > > > > >
> > > > > > > For example, in the multicast drafts i write, we use
> > > > > > > C-pseudocode to specify behavior, but we do attempt to
> implemnt on Tofino in P4.
> > > > > > > Should we really use P4 code for the RFC specs... ? (much
> > > > > > > longer than C Pseudocode). Aka: quite selfish (but IETF
> relevant ;-) reason to highlight this point.
> > > > > >
> > > > > > [EH]: This is an area I'm very interested in. Having a
> standardized and formal language to describe protocols and behavior can
> bring a lot of functionality and benefits to the IETF.
> > > > > > My initial thinking is that having such a blueprint, the IETF
> could generate tools to create a reference implementation that can be used
> for interoperability purposes therefore decreasing time to test and
> implement protocols and therefore RFC publications.
> > > > > >
> > > > > > [HS] P4 can only describe dataplane behaviors, so any control
> plane stuff is out of scope. For dataplane, if it's used to describe header
> format, it's not better than the "struct" in C. The language uses the
> match-action table abstraction with an implication of pipeline
> implementation which may make it cumbersome or even impossible to describe
> the  behavior (e.g.,  P4 has very limited support for stateful processing).
> In general, I don't think P4 at its current form can undertake the role for
> formal protocol specification.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > ---
> > > > > tte@cs.fau.de
> > > > > --
> > > > > Coin mailing list
> > > > > Coin@irtf.org
> > > > > https://www.irtf.org/mailman/listinfo/coin
> > > >
> > > >
> > > >
> > > > --
> > > > ---
> > > > tte@cs.fau.de
> > > >
> > > > --
> > > > Coin mailing list
> > > > Coin@irtf.org
> > > > https://www.irtf.org/mailman/listinfo/coin
> > > > --
> > > > Coin mailing list
> > > > Coin@irtf.org
> > > > https://www.irtf.org/mailman/listinfo/coin
> > >
> > > --
> > > ---
> > > tte@cs.fau.de
> >
> >
> >
> > --
> > ---
> > tte@cs.fau.de
>
>
>
> --
> ---
> tte@cs.fau.de
>