According to OpenFlow Spec 1.3.5, OFPT_PORT_STATUS messages with the reason value OFPPR_MODIFY should be sent the BOTH port state and config have changed. On the other hand, OVS does not send OFPT_PORT_STATUS messages when the port config has changed and only sends when the port state has changed. But, other switch implementation, e.g. Lagopus, sends messages when the both port state and config have changed. Therefore, simple_switch_stp_13.py will overproduce the topology recalculation events and will fail to recalculate the topology.
This patch checks the port state in OFPT_PORT_STATUS messages and ignores the message if the port state is not changed. Reported-by: Hong Panha <[email protected]> Signed-off-by: IWASE Yusuke <[email protected]> --- ryu/lib/stplib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ryu/lib/stplib.py b/ryu/lib/stplib.py index de3cced..beb68e1 100644 --- a/ryu/lib/stplib.py +++ b/ryu/lib/stplib.py @@ -297,6 +297,11 @@ class Stp(app_manager.RyuApp): bridge.port_delete(port.port_no) else: assert reason is dp.ofproto.OFPPR_MODIFY + if bridge.dp.ports[port.port_no].state == port.state: + # Do nothing + self.logger.debug('[port=%d] Link status not changed.', + port.port_no, extra=dpid_str) + return if link_down_flg: self.logger.info('[port=%d] Link down.', port.port_no, extra=dpid_str) -- 2.7.4 ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
