-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data plane writable per table entry state v1 #1239
base: main
Are you sure you want to change the base?
Data plane writable per table entry state v1 #1239
Conversation
I have labeled this PR as experimental, meaning it is not intended for review to be merged into any P4.org specification at this time. I created this as a PR to the language spec for one purpose only: for review by others interested in this experimental feature, and for anyone who may want to implement or write test cases for this experimental feature. The experimental feature is intended to address this p4c issue: #1177 The keyword I chose to go with an explicit keyword for data-plane-writable action parameters, as opposed to just saying "any directionless parameter modified in the action body", in this PR for two reasons:
|
…rawio file I think that the embedded drawio format file inside the .png file may cause problems for Madoko or TeX when processing it.
Control plane API notes. Comments/questions/corrections welcome in follow-up comments on this PR, and Andy will try to reflect those by editing this comment in the future. BEFORE the addition of actions with parameters declared
... it is required that the list of parameters provides the initial value for all directionless action parameters. After that, some control plane APIs, such as TDI and P4Runtime API, allow modifying the values of these directionless action parameters from the control plane. Typically, the expectation is that such a modify action occurs "atomically" relative to data packet processing, i.e. every data packet processed sees either all of the old directionless action parameter values, or all of the new directionless action parameters. AFTER the addition of actions with parameter declared It also makes sense to consider the possibility of defining a control plane API that can modify the values of all directionless and Given the complexity of implementing such behavior, and given that modifying One might also consider the possibility of control plane table entry modify actions that can modify directionless action parameters, but leave the All targets should be able to support deleting table entries, either from the control plane, or via the new PNA capability of defining the table property |
I'm sorry, the 5pm ET meetings have conflicted with another, so I haven't been able to participate yet. As a sanity check to make sure I understand: the state associated with an For example, consider the following code:
Assuming
|
AI for Andy: Mention something in this PR about atomicity of action execution, and options for increasing performance but perhaps reducing safety by reducing the "size" of the block of code that is atomic. Add link to PNA issue comment that talks about acquire/release per-table-entry lock explicitly here. Some may suggest the existing |
Yes. At least, I cannot think of any exceptions to the definition of this feature I have in mind that would allow any other possible result. That is, assuming further that each of the two times that the control |
Notes from 2023-Apr-07 meeting discussing this PR:
action(in bit<8> x) (data bit<16> y, state bit<24> z) { where x is existing data-plane-supplied The intent of the two sets of parentheses is to be more like construction of parsers and controls, which have a similar capability that separate construction time parameters, vs. run-time-varying parameters.
|
Notes from 2023-Apr-14 meeting on this topic: AI Mario will check whether compiler developers at AMD can make Friday Apr 21 meeting, and also Mihai Budiu, to discuss high level questions on experimental implementation approach, e.g. implement on the main branch OK? (hopefully yes) Changes to IR needed that Mihai would recommend? etc. AI Andy: Update this PR with generalization suggested by Nate Foster for calling actions with rmw parameters explicitly. Basically in that case rmw parameters are treated like inout parameters. Control plane API discussion notes:
|
A few notes from 2023-Apr-21 meeting on this topic: Q: Why not use A: Mainly because that would be a backwards-incompatible change. Direction Thus by defining a new keyword qualifier like Q: Is it reasonable for such an experimental change to p4c to be merged into the main branch "soon" (e.g. this year), and even if the feature remains experimental for a year or two after that time, the feature is present in the main branch of the p4c repository? A: Yes, that should be fine, as long as it does not change the meaning of P4 programs that do not use this new feature. There was some question of whether there should be a command line option to enable (or disable?) this experimental feature, and/or a warning message whenever a new |
@mariobaldi Just a reminder if you could check on any expected time frame in which the prototype of this feature might be implemented in p4c |
The AMD Pensando compiler team expects to start working on the feature at the beginning of 2024. |
No description provided.