-
Notifications
You must be signed in to change notification settings - Fork 73
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
Will "switch" be rewritten as canonical p4_16? #96
Comments
You can use the latest version of the P4 compiler in the p4lang/p4c Github repo to auto-translate any P4-14 program to P4-16 for you, although there are a few features not yet supported in such auto-translated versions. A command to do this auto-translation, and the output file I obtained a few weeks ago, can be found here: https://github.com/jafingerhut/p4lang-tests/tree/master/v1.0.3/switch-2017-03-07/out1 I believe there are people working on writing a P4-16 version of switch.p4 by hand, but I don't know the expected date such a thing might be published. |
Andy, Thanks for responding. I was aware of the translation option and figured someone would have tried that. I just wondered if a new switch.p4 would ever be written on P4_16 "natively." Meanwhile I'll check out the one you posted, that is handy! - chris |
Hello @technobilly ,
I am sure it will be done at some point, but it takes time and effort.
Since this is a free community project, I would encourage you to start the
effort. All the materials (i.e. the original P4_14 code, the new compiler,
the language tutorial and the language spec) are available, not to mention
the available advice and good vibes from the community. I am sure, others
will happily join.
Happy hacking,
Vladimir
|
Vladimir, thanks for replying. Perhaps when I learn more I'll be able to contribute. |
So at this point, there is still no canonical version of switch.p4 in P4-16, right? Is fabric.p4 meant to be an alternative? |
There is no public version of switch.p4 written in P4_16 that I know of, nor has the P4_14 version been updated in years. I think it is best to treat it as a development snapshot at a semi-early point in time of its development, one that is likely to have at least a few bugs. fabric.p4 that you linked is public, distributed under an open source license, and more actively developed. I don't think the feature set is the same as switch.p4, but I believe that it was never intended to be a feature-by-feature replacement for switch.p4. |
Thanks! |
Would love to have this entire project available in p4_16, thanks.
The text was updated successfully, but these errors were encountered: