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

'Toerless Eckert' <tte@cs.fau.de> Thu, 18 May 2023 19:16 UTC

Return-Path: <eckert@i4.informatik.uni-erlangen.de>
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 20AEBC14CEFA for <coin@ietfa.amsl.com>; Thu, 18 May 2023 12:16:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.949
X-Spam-Level:
X-Spam-Status: No, score=-3.949 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
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 4nuKQebm40b1 for <coin@ietfa.amsl.com>; Thu, 18 May 2023 12:16:04 -0700 (PDT)
Received: from faui40.informatik.uni-erlangen.de (faui40.informatik.uni-erlangen.de [131.188.34.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 DDFA1C151B01 for <coin@irtf.org>; Thu, 18 May 2023 12:15:02 -0700 (PDT)
Received: from faui48e.informatik.uni-erlangen.de (faui48e.informatik.uni-erlangen.de [131.188.34.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTPS id 4QMfmw2sctznkWg; Thu, 18 May 2023 21:14:56 +0200 (CEST)
Received: by faui48e.informatik.uni-erlangen.de (Postfix, from userid 10463) id 4QMfmw2F0XzkvvX; Thu, 18 May 2023 21:14:56 +0200 (CEST)
Date: Thu, 18 May 2023 21:14:56 +0200
From: 'Toerless Eckert' <tte@cs.fau.de>
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>
Message-ID: <ZGZ5MEal+NPtfDvg@faui48e.informatik.uni-erlangen.de>
References: <00c501d988ea$bbd16f50$33744df0$@mnkcg.com> <095d01d98914$0bba99f0$232fcdd0$@mojatatu.com> <ZGWFQRGI0hmc3g5O@faui48e.informatik.uni-erlangen.de> <001101d989a0$4e180530$ea480f90$@mojatatu.com> <BY3PR13MB47877D31EC3B4511C8095D329A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <CAFvDQ9ogV5f-Nh9faKxANXV=ORHJVQQPjUH5qAAJb9uvP0KGMA@mail.gmail.com> <BY3PR13MB47876236862ABECD69BF97679A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <CAFvDQ9q2_5-msxeHYgbZfy3RJB6he3kEQheRe=1qfEdUwP3HxQ@mail.gmail.com> <BY3PR13MB47879D6486069FDA49D6252C9A7F9@BY3PR13MB4787.namprd13.prod.outlook.com> <009f01d989b5$3f0a5d30$bd1f1790$@mnkcg.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <009f01d989b5$3f0a5d30$bd1f1790$@mnkcg.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/coin/YCd71nXxbmJur56Uh3LQXvSZlu0>
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: Thu, 18 May 2023 19:16:09 -0000

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