[P4-design] Example P4_14 and P4_16 programs for resubmit with 4 cases

Andy Fingerhut (jafinger) jafinger at cisco.com
Mon Apr 22 18:27:59 EDT 2019


After the 2019-Apr-22 LDWG meeting, I added another disadvantage to the example programs that add annotations like @resubmit or @field_list to user-defined metadata – changing those annotations causes the data plane behavior of the program to change.

Here is the text of the new disadvantage, which points out that there are existing annotations in the P4_16 language spec that also change the possible behaviors of the data plane when the annotations change.  I am not trying to say that because these annotations exist, we should rush head-long into adding more such annotations.  I am only trying to be fair in pointing out that such an annotation is not a brand new thing in the language (or an architecture).

+ Changing `@resubmit` annotations on the user-defined metadata fields changes
  the run time behavior of the program. There are other annotations that can do
  this, too (e.g. removing `@defaultonly` and `@tableonly` annotations increases
  the set of possible configurations that the control plane can make in data
  plane tables, thus increasing the set of data plane behaviors possible. Also
  `@atomic`). However, these should be introduced into the language and/or
  architectures with great care.

https://github.com/jafingerhut/p4-guide/blob/master/v1model-special-ops/README-resubmit-examples.md


Andy


From: P4-design <p4-design-bounces at lists.p4.org> on behalf of "Andy Fingerhut (jafinger) via P4-design" <p4-design at lists.p4.org>
Reply-To: "Andy Fingerhut (jafinger)" <jafinger at cisco.com>
Date: Monday, April 15, 2019 at 8:28 AM
To: Mihai Budiu via P4-design <p4-design at lists.p4.org>
Subject: Re: [P4-design] Example P4_14 and P4_16 programs for resubmit with 4 cases

I have updated the example programs from what I sent out earlier, and added bullet point lists of what I consider to be the advantages and disadvantages of each approach.

https://github.com/jafingerhut/p4-guide/blob/master/v1model-special-ops/README-resubmit-examples.md

The original P4_14 version is still there, and the 3 imagined P4_16 ones (each with different modifications to v1model) are all intended to behave exactly the same as the original P4_14 version, i.e. they all preserve only the user-defined metadata fields requested, and no others, and they all preserve only the values that the metadata fields have at the end of executing the ingress control, _not_ at the time the resubmit call is executed (the same as the P4_14 program does).

The document linked above also has a link to Mihai’s slides with his 3 different proposals, and explains how my example programs correspond to his proposals.

Andy

From: P4-design <p4-design-bounces at lists.p4.org> on behalf of "Andy Fingerhut (jafinger) via P4-design" <p4-design at lists.p4.org>
Reply-To: "Andy Fingerhut (jafinger)" <jafinger at cisco.com>
Date: Tuesday, April 9, 2019 at 2:52 AM
To: Mihai Budiu via P4-design <p4-design at lists.p4.org>
Subject: [P4-design] Example P4_14 and P4_16 programs for resubmit with 4 cases

They are just toy programs, but the first P4_14 one and the fanciful, imagined, last P4_16 version should process packets identically, given a proper implementation of the imagined new language constructs used in that last version.

https://github.com/jafingerhut/p4-guide/blob/master/v1model-special-ops/README-resubmit-examples.md


Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-design_lists.p4.org/attachments/20190422/d69698c6/attachment.html>


More information about the P4-design mailing list