-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sai-gen] Move default value from template to SAI generation script.
Currently, the default value of each SAI attribute is specified in saiapi.h.j2 template, using if-else. This can be simplified by directly using the default value from the type info in SAI generation script. This change also makes adding more SAI types easier in the future, for both existing types or new types (just like new enums today, we only need to register it to type registry, then everything else will be taken care of).
- Loading branch information
Showing
2 changed files
with
25 additions
and
39 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