Re: [ovs-dev] [PATCH] tests: fix PTAP system test to check only OF stats
Thank you for pointing this out! I've sent v2 to the list. https://patchwork.ozlabs.org/patch/787037/ /Zoltan > -Original Message- > From: Darrell Ball [mailto:db...@vmware.com] > Sent: Tuesday, July 11, 2017 6:11 PM > To: Zoltán Balogh <zoltan.bal...@ericsson.com>; 'd...@openvswitch.org' > <d...@openvswitch.org> > Subject: Re: [ovs-dev] [PATCH] tests: fix PTAP system test to check only OF > stats > > signoff is missing > maybe suggested by Jan ? > > On 7/11/17, 9:07 AM, "ovs-dev-boun...@openvswitch.org on behalf of Zoltán > Balogh" <ovs-dev-boun...@openvswitch.org > on behalf of zoltan.bal...@ericsson.com> wrote: > > > It turned out, checking datapath flow statistics during system-userspace > test is not reliable. Unwanted packets can be injected depending on > system configuration. As a workaround, this commit removes checking > statistics of datapath flows and does check OpenFlow statistics of the > integrator bridges. Datapath flows can be checked in normal PTAP unit > tests by running 'make check'. > > Reported-by: Darrell Ball <db...@vmware.com> > --- > tests/system-userspace-packet-type-aware.at | 127 > +++- > 1 file changed, 67 insertions(+), 60 deletions(-) > > diff --git a/tests/system-userspace-packet-type-aware.at > b/tests/system-userspace-packet-type-aware.at > index 65d81ce8e..24a7698ab 100644 > --- a/tests/system-userspace-packet-type-aware.at > +++ b/tests/system-userspace-packet-type-aware.at > @@ -33,9 +33,9 @@ AT_SETUP([ptap - triangle bridge setup with L2 and L3 > GRE tunnels]) > # 1030 br-in1 gre-13 l2 br-in3 3010 (l2) > # 2010 br-in2 gre-21 ptapbr-in1 1020 (l2), 1021 > (l3) > # 2030 br-in2 gre-23 ptapbr-in3 3020 (l2), 3021 > (l3) > -# 3010 br-in1 gre-31 l2 br-in1 1030 (l2) > -# 3020 br-in1 gre-32 l2 br-in2 2010 (ptap) > -# 3021 br-in1 gre-32_l3 l3same > +# 3010 br-in3 gre-31 l2 br-in1 1030 (l2) > +# 3020 br-in3 gre-32 l2 br-in2 2010 (ptap) > +# 3021 br-in3 gre-32_l3 l3same > > > AT_SKIP_IF([test $HAVE_NC = no]) > @@ -176,15 +176,15 @@ AT_CHECK([ > > ### Flows in br-pto twist TEP IP addresses in tunnel IP headers > AT_CHECK([ > -ovs-ofctl add-flow br-p1 in_port:LOCAL,actions=2 > +ovs-ofctl add-flow br-p1 in_port:LOCAL,ip,actions=2 > ovs-ofctl add-flow br-p1 > in_port:2,ip,nw_dst:20.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL > ovs-ofctl add-flow br-p1 > in_port:2,ip,nw_dst:30.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL > > -ovs-ofctl add-flow br-p2 in_port:LOCAL,actions=2 > +ovs-ofctl add-flow br-p2 in_port:LOCAL,ip,actions=2 > ovs-ofctl add-flow br-p2 > in_port:2,ip,nw_dst:10.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL > ovs-ofctl add-flow br-p2 > in_port:2,ip,nw_dst:30.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL > > -ovs-ofctl add-flow br-p3 in_port:LOCAL,actions=2 > +ovs-ofctl add-flow br-p3 in_port:LOCAL,ip,actions=2 > ovs-ofctl add-flow br-p3 > in_port:2,ip,nw_dst:10.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL > ovs-ofctl add-flow br-p3 > in_port:2,ip,nw_dst:20.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL > ], [0]) > @@ -204,15 +204,15 @@ AT_CHECK([ > ovs-ofctl dump-flows br-p2 | ofctl_strip | strip_n_packets | > strip_n_bytes | sort | grep actions > ovs-ofctl dump-flows br-p3 | ofctl_strip | strip_n_packets | > strip_n_bytes | sort | grep actions > ], [0], [dnl > - in_port=LOCAL actions=output:2 > ip,in_port=2,nw_dst=20.0.0.1 > actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL > ip,in_port=2,nw_dst=30.0.0.1 > actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL > - in_port=LOCAL actions=output:2 > + ip,in_port=LOCAL actions=output:2 > ip,in_port=2,nw_dst=10.0.0.2 > actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL > ip,in_port=2,nw_dst=30.0.0.2 > actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL > - in_port=LOCAL actions=output:2 > + ip,in_port=LOCAL actions=output:2 > ip,in_port=2,nw_dst=10.0.0.3 > actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL > ip,in_port=2,nw_dst=20.0.0.3 > actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL >
Re: [ovs-dev] [PATCH] tests: fix PTAP system test to check only OF stats
signoff is missing maybe suggested by Jan ? On 7/11/17, 9:07 AM, "ovs-dev-boun...@openvswitch.org on behalf of Zoltán Balogh"wrote: It turned out, checking datapath flow statistics during system-userspace test is not reliable. Unwanted packets can be injected depending on system configuration. As a workaround, this commit removes checking statistics of datapath flows and does check OpenFlow statistics of the integrator bridges. Datapath flows can be checked in normal PTAP unit tests by running 'make check'. Reported-by: Darrell Ball --- tests/system-userspace-packet-type-aware.at | 127 +++- 1 file changed, 67 insertions(+), 60 deletions(-) diff --git a/tests/system-userspace-packet-type-aware.at b/tests/system-userspace-packet-type-aware.at index 65d81ce8e..24a7698ab 100644 --- a/tests/system-userspace-packet-type-aware.at +++ b/tests/system-userspace-packet-type-aware.at @@ -33,9 +33,9 @@ AT_SETUP([ptap - triangle bridge setup with L2 and L3 GRE tunnels]) # 1030 br-in1 gre-13 l2 br-in3 3010 (l2) # 2010 br-in2 gre-21 ptapbr-in1 1020 (l2), 1021 (l3) # 2030 br-in2 gre-23 ptapbr-in3 3020 (l2), 3021 (l3) -# 3010 br-in1 gre-31 l2 br-in1 1030 (l2) -# 3020 br-in1 gre-32 l2 br-in2 2010 (ptap) -# 3021 br-in1 gre-32_l3 l3same +# 3010 br-in3 gre-31 l2 br-in1 1030 (l2) +# 3020 br-in3 gre-32 l2 br-in2 2010 (ptap) +# 3021 br-in3 gre-32_l3 l3same AT_SKIP_IF([test $HAVE_NC = no]) @@ -176,15 +176,15 @@ AT_CHECK([ ### Flows in br-pto twist TEP IP addresses in tunnel IP headers AT_CHECK([ -ovs-ofctl add-flow br-p1 in_port:LOCAL,actions=2 +ovs-ofctl add-flow br-p1 in_port:LOCAL,ip,actions=2 ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:20.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:30.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL -ovs-ofctl add-flow br-p2 in_port:LOCAL,actions=2 +ovs-ofctl add-flow br-p2 in_port:LOCAL,ip,actions=2 ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:10.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:30.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL -ovs-ofctl add-flow br-p3 in_port:LOCAL,actions=2 +ovs-ofctl add-flow br-p3 in_port:LOCAL,ip,actions=2 ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:10.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:20.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL ], [0]) @@ -204,15 +204,15 @@ AT_CHECK([ ovs-ofctl dump-flows br-p2 | ofctl_strip | strip_n_packets | strip_n_bytes | sort | grep actions ovs-ofctl dump-flows br-p3 | ofctl_strip | strip_n_packets | strip_n_bytes | sort | grep actions ], [0], [dnl - in_port=LOCAL actions=output:2 ip,in_port=2,nw_dst=20.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL ip,in_port=2,nw_dst=30.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL - in_port=LOCAL actions=output:2 + ip,in_port=LOCAL actions=output:2 ip,in_port=2,nw_dst=10.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL ip,in_port=2,nw_dst=30.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL - in_port=LOCAL actions=output:2 + ip,in_port=LOCAL actions=output:2 ip,in_port=2,nw_dst=10.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL ip,in_port=2,nw_dst=20.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL + ip,in_port=LOCAL actions=output:2 ]) ### Setup test ports for traffic injection @@ -331,9 +331,6 @@ AT_CHECK([ ]) -# Clear up megaflow cache -sleep 10 - # Ping between N1 and N3, via the L2 GRE tunnel between br-in1 and br-in3 NS_CHECK_EXEC([ns1], [ping -q -c 3 -i 0.3 -w 2 $N3_IP | FORMAT_PING], [0], [dnl 3 packets transmitted, 3 received, 0% packet loss, time 0ms @@ -342,26 +339,25 @@ NS_CHECK_EXEC([ns1], [ping -q -c 3 -i 0.3 -w 2 $N3_IP | FORMAT_PING], [0], [dnl sleep 1 AT_CHECK([ -ovs-appctl dpctl/dump-flows | strip_used | grep -v ipv6 | grep -v arp |sort -], [0], [flow-dump from non-dpdk interfaces: -recirc_id(0),in_port(10),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:03),eth_type(0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=47,frag=no), packets:2, bytes:272,