A good (altough small) improvement on spanning tree module would be
blocking flood on all switch ports as soon as it connects.

The module, after calculating the tree,  already unblocks ports that
belongs the tree or are connected to hosts.

My sugestion is to put the code below somewhere in the _reset function
which handles "ConnectionUp" events.

def _reset (event):

  # Configure all switch ports to NO_FLOOD

  for p in event.connection.ports.itervalues():
    if p.port_no < of.OFPP_MAX:
      pm = of.ofp_port_mod( port_no=p.port_no,
                               hw_addr=p.hw_addr,
                               config = of.OFPPC_NO_FLOOD,
                               mask = of.OFPPC_NO_FLOOD )


Best Regards,
Alex Silva

Reply via email to