-
Notifications
You must be signed in to change notification settings - Fork 94
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
Formalize annotated name parsing in DASH. #473
Conversation
Hi @r12f I appreciate this work, but it might be a step in the wrong direction. I am wondering if we really ought to deprecate the P4 entity naming convention e.g. "@name(x|y)" entirely and follow-through on #276 where we agreed that long-term, we should not use a naming convention at all, instead use explicit annotations e.g. "@Sai[a=b,x=y]". @marian-pritsak took initial steps towards this in #358. See https://github.com/sonic-net/DASH/blob/main/dash-pipeline/bmv2/README.md#p4-annotations-for-sai-code-generation also. That being said, if this is just cleanup and uniformization, I see no objections to it, but it is kind of perpetuating a convention we'd rather abandon. Please take a look at the conversation tail above and let us know what you think! |
Hi @chrispsommers , yes. I totally agree with you! This is just a clean up work in case things get even worse and we should definitely move the annotation to use @Sai instead. And thanks for sharing the docs! Once this is done, I will try to make the work to move these annotations to @Sai as the next step. |
OK, with that in mind, I am in favor of this. Thanks for considering taking the annotations in the right direction when time allows. We all appreciate the energy you are bringing to this project! |
np at all! and I also really appreciated reviewing this PR in the weekend too! |
I cannot believe myself used almost half of day just trying to sort the naming out..... XD |
6f2bd11
to
9f158c3
Compare
Use a normalized way to parse the annotated name in p4 files.
This change will not change any generated files as shown below.