[pox-dev] Small improvement in spanning_tree module

Murphy McCauley murphy.mccauley at gmail.com
Sun Feb 24 15:29:36 PST 2013


For those following along at home, this is being discussed at:
https://github.com/noxrepo/pox/issues/52

-- Murphy

On Feb 24, 2013, at 3:10 PM, Alex Silva wrote:

> 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




More information about the pox-dev mailing list