[ovs-dev] [PATCH 2/2] system-traffic: Add basic geneve tunnel sanity test.
Signed-off-by: Joe Stringer --- tests/system-common-macros.at | 4 tests/system-traffic.at | 41 + 2 files changed, 45 insertions(+) diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at index 1b9b5c1e9f15..2116f1e31357 100644 --- a/tests/system-common-macros.at +++ b/tests/system-common-macros.at @@ -159,3 +159,7 @@ m4_define([OVS_CHECK_VXLAN], # OVS_CHECK_GRE() m4_define([OVS_CHECK_GRE], [AT_SKIP_IF([! ip link add foo type gretap help 2>&1 | grep gre >/dev/null])]) + +# OVS_CHECK_GENEVE() +m4_define([OVS_CHECK_GENEVE], +[AT_SKIP_IF([! ip link add foo type geneve help 2>&1 | grep geneve >/dev/null])]) diff --git a/tests/system-traffic.at b/tests/system-traffic.at index 8684a5f06c68..a3d93e92c887 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -188,6 +188,47 @@ NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PI OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP +AT_SETUP([datapath - ping over geneve tunnel]) +OVS_CHECK_GENEVE() + +OVS_TRAFFIC_VSWITCHD_START() +ADD_BR([br-underlay]) + +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) +AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"]) + +ADD_NAMESPACES(at_ns0) + +dnl Set up underlay link from host into the namespace using veth pair. +ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24") +AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"]) +AT_CHECK([ip link set dev br-underlay up]) + +dnl Set up tunnel endpoints on OVS outside the namespace and with a native +dnl linux device inside the namespace. +ADD_OVS_TUNNEL([geneve], [br0], [at_gnv0], [172.31.1.1], [10.1.1.100/24]) +ADD_NATIVE_TUNNEL([geneve], [ns_gnv0], [at_ns0], [172.31.1.100], [10.1.1.1/24], + [vni 0]) + +dnl First, check the underlay +NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) + +dnl Okay, now check the overlay with different packet sizes +NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) +NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) +NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + AT_SETUP([conntrack - controller]) CHECK_CONNTRACK() OVS_TRAFFIC_VSWITCHD_START() -- 2.1.4 ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 2/2] system-traffic: Add basic geneve tunnel sanity test.
Thanks for adding this tests! Acked-by: Daniele Di Proietto On 20/04/2016 16:07, "Joe Stringer" wrote: >Signed-off-by: Joe Stringer >--- > tests/system-common-macros.at | 4 > tests/system-traffic.at | 41 >+ > 2 files changed, 45 insertions(+) > >diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at >index 1b9b5c1e9f15..2116f1e31357 100644 >--- a/tests/system-common-macros.at >+++ b/tests/system-common-macros.at >@@ -159,3 +159,7 @@ m4_define([OVS_CHECK_VXLAN], > # OVS_CHECK_GRE() > m4_define([OVS_CHECK_GRE], > [AT_SKIP_IF([! ip link add foo type gretap help 2>&1 | grep gre >>/dev/null])]) >+ >+# OVS_CHECK_GENEVE() >+m4_define([OVS_CHECK_GENEVE], >+[AT_SKIP_IF([! ip link add foo type geneve help 2>&1 | grep geneve >>/dev/null])]) >diff --git a/tests/system-traffic.at b/tests/system-traffic.at >index 8684a5f06c68..a3d93e92c887 100644 >--- a/tests/system-traffic.at >+++ b/tests/system-traffic.at >@@ -188,6 +188,47 @@ NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 >-w 2 10.1.1.100 | FORMAT_PI > OVS_TRAFFIC_VSWITCHD_STOP > AT_CLEANUP > >+AT_SETUP([datapath - ping over geneve tunnel]) >+OVS_CHECK_GENEVE() >+ >+OVS_TRAFFIC_VSWITCHD_START() >+ADD_BR([br-underlay]) >+ >+AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) >+AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"]) >+ >+ADD_NAMESPACES(at_ns0) >+ >+dnl Set up underlay link from host into the namespace using veth pair. >+ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24") >+AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"]) >+AT_CHECK([ip link set dev br-underlay up]) >+ >+dnl Set up tunnel endpoints on OVS outside the namespace and with a >native >+dnl linux device inside the namespace. >+ADD_OVS_TUNNEL([geneve], [br0], [at_gnv0], [172.31.1.1], [10.1.1.100/24]) >+ADD_NATIVE_TUNNEL([geneve], [ns_gnv0], [at_ns0], [172.31.1.100], >[10.1.1.1/24], >+ [vni 0]) >+ >+dnl First, check the underlay >+NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | >FORMAT_PING], [0], [dnl >+3 packets transmitted, 3 received, 0% packet loss, time 0ms >+]) >+ >+dnl Okay, now check the overlay with different packet sizes >+NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | >FORMAT_PING], [0], [dnl >+3 packets transmitted, 3 received, 0% packet loss, time 0ms >+]) >+NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | >FORMAT_PING], [0], [dnl >+3 packets transmitted, 3 received, 0% packet loss, time 0ms >+]) >+NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | >FORMAT_PING], [0], [dnl >+3 packets transmitted, 3 received, 0% packet loss, time 0ms >+]) >+ >+OVS_TRAFFIC_VSWITCHD_STOP >+AT_CLEANUP >+ > AT_SETUP([conntrack - controller]) > CHECK_CONNTRACK() > OVS_TRAFFIC_VSWITCHD_START() >-- >2.1.4 > ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 2/2] system-traffic: Add basic geneve tunnel sanity test.
On 21 April 2016 at 17:11, Daniele Di Proietto wrote: > Thanks for adding this tests! > > Acked-by: Daniele Di Proietto Thanks for the review! Applied to master. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev