-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, tables and actions were given an integer id by the compiler. This happened sequentially based on how the compiler traversed nested controller chains. The only way for an external user to associate a table with it's id was to look at x4c generated code. This commit changes table and action identifiers to strings. Table ids are dot delemited. The first element of the id is the top level controller in the program. Subsequent elements are the names of controllers instantiated from the current controller. The final id element is the name of the table. For example if a controller named `ingress` instantiates a controller named `router` which has a table named `router_v6` then the id for that table is `ingress.router.router_v6`. Actions simply take on their name in the P4 program. There is no qualification on action names. Afaict there is no meaningful reference to an action in the absence of a table. Thus tables provide a natural namespace for actions (or rather the controler in which the table is defined) and while action names must be unique in that context, there is no need for a program-unique action id. It's possible I'm overlooking something and we may need to revisit this later.
- Loading branch information
1 parent
724c7d6
commit c53f861
Showing
7 changed files
with
76 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters