The pmd stats test is enhanced to include megaflow stats
counting and checking.

Signed-off-by: Darrell Ball <dlu...@gmail.com>
---
 tests/pmd.at | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/pmd.at b/tests/pmd.at
index b6732ea..0b1731a 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -206,6 +206,25 @@ pmd thread numa_id <cleared> core_id <cleared>:
        lost:0
 ])
 
+AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:emc-insert-inv-prob=0])
+(
+for i in `seq 0 5`;
+    do
+    
pkt="in_port(7),eth(src=50:54:00:00:00:77,dst=50:54:00:00:01:78),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.1.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
+    AT_CHECK([ovs-appctl netdev-dummy/receive p0 $pkt])
+    done
+)
+ovs-appctl time/warp 100
+
+AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | 
sed '/cycles/d' | grep pmd -A 5], [0], [dnl
+pmd thread numa_id <cleared> core_id <cleared>:
+       emc hits:19
+       megaflow hits:6
+       avg. subtable lookups per hit:1.00
+       miss:1
+       lost:0
+])
+
 OVS_VSWITCHD_STOP
 AT_CLEANUP
 
-- 
1.9.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to