Use P4 switches with different pipeline

27 views
Skip to first unread message

Davide Scano

unread,
Jan 28, 2020, 2:56:37 AM1/28/20
to P4 brigade
Hi,

I tried to configure two switch in my network with different pipelines. More in detail I emulate the data plane using a docker container (mn-stratum)
that creates a simple network (using mininet) formed by two switch bmv2 with stratum. Thanks to the netcfg command provided by ONOS I assign the different pipelines configuration. In the fist switch I installed a custom pipeline (created by me) and in the second I tried to install p4-tutorial-pipeconf but the installation faild. More in detail miminet shows the error in the figure.

Form theoretical point of view I thougth that was possible configure different switches p4 with different pipelines configuration,but I didn't achieve this goal. Does ONOS support this feature? Someone have tried to configure diffrent swicthes with different pipelines using ONOS?
Schermata 2020-01-28 alle 08.33.30.png

Carmelo Cascone

unread,
Jan 28, 2020, 2:43:36 PM1/28/20
to Davide Scano, P4 brigade
Hi Davide,

ONOS supports deploying different pipeconfs to different switches.

What you’re seeing is the stratum_bmv2 instance associated to s2 that crashed.

Have you checked the complete stratum_bmv2 log for s2? Perhaps there’s an indication there of what’s wrong with the pipeline configuration you are pushing.

If you are deploying p4-tutorial-pipeconf to s2, be aware that’s an old tutorial. The pre-compiled bmv2.json and p4info files that are part of that pipeconf have been generate using an older version of p4c that works well with the version of BMv2 in the tutorial VM, but it might not be compatible with the more recent version of bmv2 used in mn-stratum.

You can try updating the compiler output for p4-tutorial-pipeconf using this docker image opennetworking/p4c:stable, which contains a pre-built version of p4c known to work well with mn-stratum and ONOS:

For an example of how to use the docker image, you can refer to this Makefile:

Similarly, make sure to build you P4 program using the same p4c docker image.

Hope it helps.
Carmelo

-- 
You received this message because you are subscribed to the Google Groups "P4 brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-p4+...@onosproject.org.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-p4/0b950a59-7ec0-44a1-9093-78cb5962fa07%40onosproject.org.
<Schermata 2020-01-28 alle 08.33.30.png>

Reply all
Reply to author
Forward
0 new messages