[ovs-discuss] Incorrect Spanning tree status

Vasu Dasari vdasari at gmail.com
Mon Feb 17 23:58:58 UTC 2014


Hi,

I have a 3 node network and I have enabled spanning tree on all the 3
nodes. You can think of them getting connected as a triangle. Once all the
configuration is done and STP has settled, I do not see the right STP state
values when I dump the port states using ovs-ofctl's "dump-ports-desc"

I am attaching a mininet script I used to setup this network.

Essentially following commands are executed on any port.

ovs-vsctl set Bridge bos0 stp_enable=true
ovs-vsctl set Bridge bos0 other_config:stp-priority=0x7800
ovs-ofctl mod-port bos0 bos0-eth1 stp
ovs-vsctl set Port bs0-eth1 other_config:stp-path-cost=10
ovs-ofctl mod-port bos0 bos0-eth1 up

I see that all ports are setting down to a STP state as per protocol. I had
enabled logs in ofproto_port_set_state() to see STP state transitions. So,
I expected to see the STP state to be reflected in the following command.

vdasari at mininet:~$ sudo ovs-ofctl dump-ports-desc bos0
OFPST_PORT_DESC reply (xid=0x2):
 1(bos0-eth1): addr:76:41:b5:8c:58:87
     config:     0

*state:      0      *current:    10GB-FD COPPER
     speed: 10000 Mbps now, 0 Mbps max
 2(bos0-eth2): addr:06:ca:ba:ad:11:bc
     config:     0

*state:      0     *current:    10GB-FD COPPER
     speed: 10000 Mbps now, 0 Mbps max
 LOCAL(bos0): addr:66:4b:66:9b:1a:4b
     config:     0

*state:      0     *speed: 0 Mbps now, 0 Mbps max

The port state should have been "forwarding" or "blocking".

On debugging this issue further, I found that, ofproto's STP state bits are
getting updated correctly because of following call stack:

#0  ofproto_port_set_state (port=0x82395c0, state=OFPUTIL_PS_STP_FORWARD)
    at ../ofproto/ofproto.c:2267
#1  0x0806d659 in update_stp_port_state (ofport=0x82395b8)
    at ../ofproto/ofproto-dpif.c:1866
#2  0x0806da37 in stp_run (ofproto=0x822c628) at
../ofproto/ofproto-dpif.c:1969
#3  0x0806c1ba in run (ofproto_=0x822c630) at ../ofproto/ofproto-dpif.c:1286
#4  0x0805d51f in ofproto_run (p=0x822c630) at ../ofproto/ofproto.c:1429
#5  0x08050ece in bridge_run__ () at ../vswitchd/bridge.c:2275
#6  0x08051032 in bridge_run () at ../vswitchd/bridge.c:2326
#7  0x08055a99 in main (argc=4, argv=0xbffff224) at
../vswitchd/ovs-vswitchd.c:118

but the same STP state is getting overwritten by following call stack, at a
later point in time:

#0  ofport_modified (port=0x822c290, pp=0xbfffefb4) at
../ofproto/ofproto.c:2244
#1  0x0805f887 in update_port (ofproto=0x821f090, name=0x8200958
"atl0-eth2")
    at ../ofproto/ofproto.c:2423
#2  0x0805d867 in ofproto_run (p=0x821f090) at ../ofproto/ofproto.c:1495
#3  0x08050ece in bridge_run__ () at ../vswitchd/bridge.c:2275
#4  0x08051032 in bridge_run () at ../vswitchd/bridge.c:2326
#5  0x08055a99 in main (argc=4, argv=0xbffff224) at
../vswitchd/ovs-vswitchd.c:118

This is the reason why, I am seeing the "state to be 0".

I could have gone further, but I am stuck understanding the "seq_read()"
logic in ofproto_run(). Not sure why and how is it supposed to be used.

I am using Ubuntu 13.10, kernel: 3.11.0-15-generic, OVS: 2.1.90.  Any
pointers in isolating or fixing this issue would be helpful.

Thanks,
-Vasu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20140217/8136c779/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3nodes.py
Type: text/x-python-script
Size: 1970 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20140217/8136c779/attachment-0002.bin>


More information about the discuss mailing list