vswitchd: Remove port from datapath if it becomes non-operational
authorAnsis Atteka <aatteka@nicira.com>
Sat, 7 Apr 2012 00:52:56 +0000 (17:52 -0700)
committerAnsis Atteka <aatteka@nicira.com>
Mon, 9 Apr 2012 18:01:23 +0000 (11:01 -0700)
commite0908c95064556f065c5d565f216bd77f3b1c963
treefe2a57f9b9dd794f2b288579dc6eeb9f0ff5b856
parentc59ae2ea5bc31a3620c0b2105f59442013e72ad7
vswitchd: Remove port from datapath if it becomes non-operational

If kernel module rejects config changes then vswitchd sets the ofport
column to -1, but does not remove the non-operational port from the
datapath. This patch fixes this problem.

ovs-vsctl add-br ovsbr
ovs-vsctl add-port ovsbr p1
ovs-vsctl add-port ovsbr p2
ovs-vsctl set Interface p1 options:remote_ip=2.1.1.1 options:key=123 type=gre
ovs-vsctl set Interface p2 options:remote_ip=1.1.1.1 options:key=123 type=gre
ovs-vsctl set Interface p2 options:remote_ip=2.1.1.1 options:key=123 type=gre
ovs-dpctl show #observe that p2 does not appear here anymore

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
vswitchd/bridge.c