p4lang / project-ideas

Ideas for P4 Projects.
Apache License 2.0
2 stars 0 forks source link

Define a way to express read-modify-write data in a per-table-entry fashion #5

Open jafingerhut opened 1 week ago

jafingerhut commented 1 week ago

Links:

Mario Baldi has proposed what I would consider a more natural-to-write technique whereby P4 actions have a new "direction" on some of its parameters, such that it enables P4 writers to assign values to those action parameters within the body of the action, and the new values assigned will be "written back" to the data associated with that table entry when the action is finished executing, which logically must complete before the next packet that matches the same entry begins executing that action, which should always see the data as updated by the previous packet matching that entry.

TODO: It would be good to link here to some practical public examples that use these.

TODO: Link to Mario's public presentation to PNA work group here.

TOOD: Is it straightforward to write a P4 compiler that transforms Mario's style of P4 code into code that works with TNA's externs? If yes, then that would be nice for the Tofino P4 compiler to implement.