On 30 July 2015 at 11:37, Daniele Di Proietto <diproiet...@vmware.com> wrote: > I get a warning in the OVS log that causes this test to fail. > > It appears that when br0 is removed (in OVS_KMOD_VSWITCHD_STOP) > OVS gets a rtnetlink message (because br0 had an address in the > routing table), but route_table_parse() fails, because > if_indextoname() returns an error (the device is not there anymore). > > Adding > > AT_CHECK([ip addr del dev br0 "10.1.1.100/24"]) > > before OVS_KMOD_VSWITCHD_STOP solves the problem for me. > Could you add that? What do you think?
I guess that just deleting the datapath before cleaning up the OVS side is a bit aggressive. We could probably do this, or we should remove the bridge from ovs via ovs-vsctl first. I can roll that into the next version. > Also, I think that instead of creating the veth pair for > the tunnel underlay manually, we could use another OVS > bridge. This has two advantages: > > * The code is shorter > * Tunnelling in userspace requires an OVS bridge as > underlay. > > This is a summary of the changes I'm proposing: > > diff --git a/tests/kmod-traffic.at b/tests/kmod-traffic.at > index 169078d..346d464 100644 > --- a/tests/kmod-traffic.at > +++ b/tests/kmod-traffic.at > @@ -110,20 +110,18 @@ AT_SETUP([kmod - ping over vxlan tunnel]) > AT_SKIP_IF([! ip link help 2>&1 | grep vxlan >/dev/null]) > > OVS_KMOD_VSWITCHD_START( > - [set-fail-mode br0 standalone --]) > + [set-fail-mode br0 standalone --dnl > + add-br br-ovs-p0]) > dnl Ensure that vport_* can be removed on exit. > ON_EXIT([modprobe -r vport_vxlan]) > ON_EXIT([ovs-dpctl del-dp ovs-system]) > > ADD_NAMESPACES(at_ns0) > > +ADD_VETH(p0, at_ns0, br-ovs-p0, "172.31.1.1/24") > dnl Set up underlay link from host into the namespace using veth pair. > -AT_CHECK([ip link add p0 type veth peer name host-p0]) > -AT_CHECK([ip addr add dev host-p0 "172.31.1.100/24"]) > -AT_CHECK([ip link set dev host-p0 up]) > -AT_CHECK([ip link set p0 netns at_ns0]) > -AT_CHECK([ip netns exec at_ns0 ip addr add dev p0 "172.31.1.1/24"]) > -AT_CHECK([ip netns exec at_ns0 ip link set dev p0 up]) > +AT_CHECK([ip addr add dev br-ovs-p0 "172.31.1.100/24"]) > +AT_CHECK([ip link set dev br-ovs-p0 up]) > > dnl Set up remote end of tunnel inside the namespace. > ADD_NATIVE_TUNNEL([vxlan], [at_vxlan1], [at_ns0], [172.31.1.1], > [172.31.1.100], > @@ -152,5 +150,8 @@ AT_CHECK([cat ping.output | grep "transmitted" | sed > 's/time.*ms$/time 0ms/'], [ > 3 packets transmitted, 3 received, 0% packet loss, time 0ms > ]) > > +AT_CHECK([ip addr del dev br0 "10.1.1.100/24"]) > +AT_CHECK([ip addr del dev br-ovs-p0 "172.31.1.100/24"]) > + > OVS_KMOD_VSWITCHD_STOP > AT_CLEANUP > > > I'll leave it up to you, I can also make this change in my next series. > > Acked-by: Daniele Di Proietto <diproiet...@vmware.com> This looks like a reasonable change. I'll test it out and roll it in with a v2, thanks. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev