[stratum-dev] [onos-dev] How to make one bmv2 switch send a packet_in to multiple controllers at the same time?
chenyichientw at gmail.com
Sun Apr 26 08:26:14 UTC 2020
Thank you for your reply. I will look into it!
Carmelo Cascone <carmelo at opennetworking.org> 於 2020年4月23日 週四 上午4:10寫道：
> Hopefully this is not too late.
> From the P4Runtime spec (section 5):
> 5. Master-Slave Arbitration and Controller Replication
> *Streaming of notifications (e.g. digests) and packet I/O: The same
> streaming channel will be used for streaming notifications, as well as for
> packet-in and packet-out messages. Note that unless specified otherwise by
> the role definitions, only the master controller can participate in packet
> I/O. This feature is explained in more details in the Packet I/O section.*
> In other words, the spec doesn’t limit the possibility of sending
> packet-ins to multiple controllers, but you would have to define a “role”
> for that (see section 5.2. Role Config). However, none of the existing
> P4Runtime implementations that I’m aware of support any role other than the
> default one.
> If you want to prototype this capability, your best option is to look at
> stratum_bmv2, specifically this part of p4_service.cc:
> I might be wrong, but I think the P4Runtime southbound in ONOS doesn't
> enforce any mastership check on packet-ins, i.e., any switch could be
> sending paket-in messages to any controller instance, including slaves.
> On Apr 12, 2020, at 7:37 AM, chenyichientw at gmail.com wrote:
> Hi all,
> I am using ONOS 1.13 with P4Runtime and onos.py to create a cluster. I
> wonder how can I change ONOS code so that one bmv2 switch sends a packet_in
> message to two different controllers at the same time? I understand that
> the standard is a switch can have only one master controller. But, I am
> studying the case for a switch to have multiple controllers. I have already
> spent a lot of time tracing the code. I found that the doPacketIn() method
> inside P4RuntimeClientImpl.java is processed by the controller. However, it
> seems that at the time doPacketIn() is called, it is too late to make the
> switch sending the control message to a second (another) controller. So, I
> am wondering when and where the switch code sends a control message to its
> controller. I would like to change the code. Which java classes, methods,
> or maybe bmv2 code should I look into? Can anyone help?
> You received this message because you are subscribed to the Google Groups
> "ONOS Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to onos-dev+unsubscribe at onosproject.org.
> To view this discussion on the web visit
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the stratum-dev