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

3 views
Skip to first unread message

hem...@mnkcg.com

unread,
May 18, 2023, 7:38:43 PM5/18/23
to Haoyu Song, Hesham ElBakoury, p4-arch, p4-dev-...@lists.p4.org, eha...@mojatatu.com, Toerless Eckert, Bernier, Daniel, Marie-Jose Montpetit, coin

Still, not quite. A switching asic running at 16 Tbs or higher cannot maintain state nor do such switching asics support crypto. But a nic running at 800 Gbps can maintain state and, also supports crypto. So, P4-16 does not define stateful tables nor crypto and PNA does. Roughly four years back congestion control, HULA was written in P4. For the second time, even before P4 neither switching asic nor nic exposed knobs for queueing or traffic shaping. I have cced to p4 mailers.

 

Hemant

 

 

From: Haoyu Song <haoyu...@futurewei.com>
Sent: Thursday, May 18, 2023 7:18 PM
To: hem...@mnkcg.com; 'Hesham ElBakoury' <helba...@gmail.com>
Cc: eha...@mojatatu.com; 'Toerless Eckert' <t...@cs.fau.de>; 'Bernier, Daniel' <daniel....@bell.ca>; 'Marie-Jose Montpetit' <ma...@mjmontpetit.com>; 'coin' <co...@irtf.org>; 'coinrg-chairs' <coinrg...@ietf.org>
Subject: RE: [Coin] Fwd: The Future of P4, Revisited

 

I think we need a language to describe the dataplane behavior independent of architecture. We’d like to use the same language to describe the “extern functions” instead of treating them as black boxes.  Also, queue management, congestion control, scheduling etc. are all important dataplane functions. If a language can’t do this or that, it’s handicapped. Just claiming it is very extensible is not enough. We need to wait until it has been actually extended to be capable of doing what we want it to do now.  It’s yet to see if P4 can live up to this goal.

 

Haoyu

 

From: hem...@mnkcg.com <hem...@mnkcg.com>
Sent: Thursday, May 18, 2023 2:15 PM
To: Haoyu Song <haoyu...@futurewei.com>; 'Hesham ElBakoury' <helba...@gmail.com>
Cc: eha...@mojatatu.com; 'Toerless Eckert' <t...@cs.fau.de>; 'Bernier, Daniel' <daniel....@bell.ca>; 'Marie-Jose Montpetit' <ma...@mjmontpetit.com>; 'coin' <co...@irtf.org>; 'coinrg-chairs' <coinrg...@ietf.org>
Subject: RE: [Coin] Fwd: The Future of P4, Revisited

 

No. P4 is designed as a core language which is extensible to any architecture. The architecture defines a model file in which you add architectural externs and functions to.

 

Traffic management, even before P4, is not exposed to user for switching asics. Anyway, one asic supports WRED, but another supports HQF. How you program each is very different.

 

Hemant

 

 

From: Coin <coin-b...@irtf.org> On Behalf Of Haoyu Song
Sent: Thursday, May 18, 2023 3:25 PM
To: hem...@mnkcg.com; 'Hesham ElBakoury' <helba...@gmail.com>
Cc: eha...@mojatatu.com; 'Toerless Eckert' <t...@cs.fau.de>; 'Bernier, Daniel' <daniel....@bell.ca>; 'Marie-Jose Montpetit' <ma...@mjmontpetit.com>; 'coin' <co...@irtf.org>; 'coinrg-chairs' <coinrg...@ietf.org>
Subject: Re: [Coin] Fwd: The Future of P4, Revisited

 

Hi Hemant,

 

If P4 is to be used as a generic language for dataplane function specification, the language itself needs to be updated and made free of architectural assumptions. As Toerless said, using C can be much more succinct in describing a function and it’s free of any architectural assumptions. Then why P4?

 

There are proposals for more powerful dataplane architectures and P4 can be improved to support the new architecture and therefore becomes more expressive. But some fundamental assumptions remain (e.g., parser, deparser, MAT,…). These seem too restrictive for general usage.  Moreover, P4 is still lack of support for traffic management description which is a critical part of dataplane functions…

 

Haoyu

 

From: hem...@mnkcg.com <hem...@mnkcg.com>
Sent: Thursday, May 18, 2023 11:19 AM
To: Haoyu Song <haoyu...@futurewei.com>; 'Hesham ElBakoury' <helba...@gmail.com>
Cc: eha...@mojatatu.com; 'Toerless Eckert' <t...@cs.fau.de>; 'Bernier, Daniel' <daniel....@bell.ca>; 'Marie-Jose Montpetit' <ma...@mjmontpetit.com>; 'coin' <co...@irtf.org>; 'coinrg-chairs' <coinrg...@ietf.org>
Subject: RE: [Coin] Fwd: The Future of P4, Revisited

 

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.

 

Hemant

 

From: Haoyu Song <haoyu...@futurewei.com>
Sent: Thursday, May 18, 2023 1:56 PM
To: Hesham ElBakoury <helba...@gmail.com>
Cc: eha...@mojatatu.com; Toerless Eckert <t...@cs.fau.de>; hemant=40mnk...@dmarc.ietf.org <hem...@mnkcg.com>; Bernier, Daniel <daniel....@bell.ca>; Marie-Jose Montpetit <ma...@mjmontpetit.com>; coin <co...@irtf.org>; coinrg-chairs <coinrg...@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-b...@irtf.org> On Behalf Of Hesham ElBakoury
Sent: Thursday, May 18, 2023 10:42 AM
To: Haoyu Song <haoyu...@futurewei.com>
Cc: eha...@mojatatu.com; Toerless Eckert <t...@cs.fau.de>; hemant=40mnk...@dmarc.ietf.org; Bernier, Daniel <daniel....@bell.ca>; Marie-Jose Montpetit <ma...@mjmontpetit.com>; coin <co...@irtf.org>; coinrg-chairs <coinrg...@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...@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 <helba...@gmail.com>
Sent: Thursday, May 18, 2023 10:00 AM
To: Haoyu Song <haoyu...@futurewei.com>
Cc: eha...@mojatatu.com; Toerless Eckert <t...@cs.fau.de>; hemant=40mnk...@dmarc.ietf.org; Bernier, Daniel <daniel....@bell.ca>; Marie-Jose Montpetit <ma...@mjmontpetit.com>; coin <co...@irtf.org>; coinrg-chairs <coinrg...@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...@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.

Reply all
Reply to author
Forward
0 new messages