[P4-dev] Switch.p4 compilation

Frédéric LOUI frederic.loui at renater.fr
Fri Feb 1 05:12:51 EST 2019


Hi !

I’m fairly new to p4 language so sorry if I could not find the complete answer using my Google-fu skills …

I studied various tutorial and manage to have the examples working.
As an exercise, I would like to study switch.p4 reference program.

As a first step I’d like to compile and run switch.p4 reference here: https://github.com/p4lang/switch

The problem is that in my environment I installed:

* p4c able to compile p4_14 and p4_16
* p4c-bm2-ss for simple_switch target

In switch.p4 it is referenced that I should use:p4c-bmv2 that can be found here: https://github.com/p4lang/p4c-bm <https://github.com/p4lang/p4c-bm>
In some thread I saw that p4-bmv2 is the official.  Compiler for p4_14.

So my question: can I use the more versatile p4c instead of p4-bmv2 in order to compile switch.p4 ?
Or should I try to user p4c-bm-ss ? (Not sure if simple_switch target can be use the full fledge switch.p4 reference though :-) ) 

In that case, I’ll consider to install also p4c-bmv2 via https://github.com/p4lang/p4c-bm <https://github.com/p4lang/p4c-bm>

Last question:

Is p4c-bm (for p4_14 program) can coexist in the same machine as p4c or should I take some precaution while installing both on the same machine ?

Again sorry if these are « simple » question. If the issue has been discussed many times before I’d like to get a referent link or doc.


Thanks for your help !

All the best
--  Frederic




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190201/e812ef25/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3592 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190201/e812ef25/attachment.p7s>


More information about the P4-dev mailing list