Skip to content
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

Open
technobilly opened this issue Jun 2, 2017 · 7 comments
Open

Will "switch" be rewritten as canonical p4_16? #96

technobilly opened this issue Jun 2, 2017 · 7 comments

Comments

@technobilly
Copy link

Would love to have this entire project available in p4_16, thanks.

@jafingerhut
Copy link
Contributor

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.

@technobilly
Copy link
Author

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

@technobilly technobilly changed the title Will "switch" be translated into p4_16? Will "switch" be rewritten as canonical p4_16? Jun 2, 2017
@vgurevich
Copy link

vgurevich commented Jun 3, 2017 via email

@technobilly
Copy link
Author

Vladimir, thanks for replying. Perhaps when I learn more I'll be able to contribute.

@fruffy
Copy link

fruffy commented Jul 20, 2020

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?

@jafingerhut
Copy link
Contributor

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.

@fruffy
Copy link

fruffy commented Jul 20, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants