<div dir="ltr">Ping, the series beginning here fixes various stats duplication bugs introduced with the revalidation threading patches:<div><br><div>* Flows missed during a datapath dump will have their stats duplicated (Caused by flow deletions while dumping)</div>




<div>* Flows that are dumped twice may have their stats duplicated (Caused by flow additions while dumping)</div><div>* When the number of threads is changed, all flows in the datapath will have stats duplicated.</div>
<div><div class="gmail_extra"><br><div class="gmail_quote">On 11 February 2014 13:55, Joe Stringer <span dir="ltr">&lt;<a href="mailto:joestringer@nicira.com" target="_blank">joestringer@nicira.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Basic test to check that the datapath reports the correct number of<br>
packets seen, after a delay of 1 second.<br>
<br>
Signed-off-by: Joe Stringer &lt;<a href="mailto:joestringer@nicira.com" target="_blank">joestringer@nicira.com</a>&gt;<br>
---<br>
 tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a> |   21 +++++++++++++++++++++<br>
 1 file changed, 21 insertions(+)<br>
<br>
diff --git a/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a> b/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a><br>
index 8dcd7b9..7c49093 100644<br>
--- a/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a><br>
+++ b/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a><br>
@@ -2700,6 +2700,27 @@ m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],<br>
 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])<br>
 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])<br>
<br>
+AT_SETUP([ofproto-dpif - flow stats])<br>
+OVS_VSWITCHD_START<br>
+AT_CHECK([ovs-ofctl add-flow br0 &quot;ip,actions=NORMAL&quot;])<br>
+AT_CHECK([ovs-ofctl add-flow br0 &quot;icmp,actions=NORMAL&quot;])<br>
+<br>
+ovs-appctl time/stop<br>
+<br>
+for i in `seq 1 10`; do<br>
+    ovs-appctl netdev-dummy/receive br0 &#39;in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)&#39;<br>
+done<br>
+<br>
+ovs-appctl time/warp 1000<br>
+<br>
+AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])<br>
+AT_CHECK([STRIP_XIDS stdout | sed -n &#39;s/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p&#39;], [0], [dnl<br>
+ cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL<br>
+ cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL<br>
+])<br>
+OVS_VSWITCHD_STOP<br>
+AT_CLEANUP<br>
+<br>
 AT_SETUP([idle_age and hard_age increase over time])<br>
 OVS_VSWITCHD_START<br>
<span><font color="#888888"><br>
--<br>
1.7.9.5<br>
<br>
</font></span></blockquote></div><br></div></div></div></div>