[P4-dev] connect own target with openflow to ryu

Tanja Ulmen tanja.ulmen at rwth-aachen.de
Tue Nov 29 13:51:18 EST 2016


Hi Pierce,

thank you, it works now.

Regards,
Tanja

Am 29.11.2016 um 00:42 schrieb Pierce McEntagart:
> Hi Tanja,
>
> Yes it's possible to use the mininet script with your own target but 
> you need to change it a little.
>
> The openflow_l2.py script has a function called "setup_bd" which is 
> relevant only for the switch.p4 based behavioral-model. For your 
> target, you can delete this function and the lines that call it.
>
> The thrift server running on port 9090 should be for the autogenerated 
> PD-API. This needs to be started in the main.c you wrote for your 
> target. See here:
>
> https://github.com/p4lang/p4factory/blob/master/targets/switch/main.c#L477
>
> Your "p4factory/targets/simple_router/run_add_demo_entries.bash" 
> should add table entries via this server.
>
> Please let me know if you have any other issues,
>
> Thanks,
>
> Pierce
>
> On Mon, Nov 28, 2016 at 5:46 AM, Tanja Ulmen 
> <tanja.ulmen at rwth-aachen.de <mailto:tanja.ulmen at rwth-aachen.de>> wrote:
>
>     Hi,
>
>     I have created an own target with the p4factory and it is running
>     with a mininet script. Now my question is: is there a way to
>     connect my own target with openflow to a ryu controller?
>
>     I already added the p4ofagent, and I tried to use the
>     openflow_l2.py mininet script with my own behavioral-model instead
>     of the one of the switch.p4. The script tries to connect to some
>     thrift server on port 9090 that I don't have. I have tried to
>     understand how the switch.p4 is working, but I don't really get
>     it. If I understand it correctly, in the switch.p4 this thrift
>     server on 9090 is started by the switchapi and itis used to add
>     some auto-generated tables? Until now I add the tables to my
>     switch with a file similar to
>     "p4factory/targets/simple_router/run_add_demo_entries.bash".
>
>     It would be nice if I could use openflow with my own target.
>     I hope you can help me :).
>
>     Best regards,
>     Tanja
>
>     _______________________________________________
>     P4-dev mailing list
>     P4-dev at lists.p4.org <mailto:P4-dev at lists.p4.org>
>     http://lists.p4.org/mailman/listinfo/p4-dev_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/20161129/08124168/attachment-0002.html>


More information about the P4-dev mailing list