[P4-dev] Start with separate configuration files

Antonin Bas antonin at barefootnetworks.com
Tue Oct 24 15:39:51 EDT 2017


According to this issue (https://github.com/p4lang/p4app/issues/39), p4app
cannot be used to create a topology of switches running different P4
However, it is pretty easy to do this when writing your own mininet Python
topology script. Just use the P4Switch class (
and when adding switches (like here:
provide the appropriate json_path for each switch. For example:

switch1 = self.addSwitch('s1', sw_path = <path to bmv2 simple_switch
binary>, json_path = dataplane1.json, thrift_port = 9091)
switch2 = self.addSwitch('s2', sw_path = <path to bmv2 simple_switch
binary>, json_path = dataplane2.json, thrift_port = 9092)

The different JSON files must be generated from the different P4 programs
using the compiler.

On Tue, Oct 24, 2017 at 9:23 AM, Roshan <sedar at oasis.uclouvain.be> wrote:

> Hi,
> How do start switches to have different p4 sources? I am working on
> p4-bmv2 and just want to start (trying P4-mininet) switches with different
> P4 configurations.
> Thanks!
> Cheers,
> R-
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20171024/7374d2cb/attachment-0002.html>

More information about the P4-dev mailing list