You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Links:
TNA defines the DirectRegister extern to do this: https://github.com/barefootnetworks/Open-Tofino/blob/master/share/p4c/p4include/tofino1_base.p4#L621-L636 along with a few other related externs such as DirectRegisterAction.
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.
The text was updated successfully, but these errors were encountered: