[ovs-dev,v5,2/2] tests: Fix unit test case caused by SMC cache.

Message ID 1531217647-99968-3-git-send-email-yipeng1.wang@intel.com
State New
Headers show
Series
  • dpif-netdev: Combine CD/DFC patch for datapath refactor
Related show

Commit Message

Yipeng Wang July 10, 2018, 10:14 a.m.
Test 1024 PMD - stats reported different stats data during tests because of
the SMC data. This commit fix the test.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 tests/pmd.at | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

O Mahony, Billy July 11, 2018, 4:01 p.m. | #1
Acked-by: Billy O'Mahony <billy.o.mahony@intel.com>

> -----Original Message-----
> From: Wang, Yipeng1
> Sent: Tuesday, July 10, 2018 11:14 AM
> To: dev@openvswitch.org; jan.scheurich@ericsson.com; O Mahony, Billy
> <billy.o.mahony@intel.com>
> Cc: Wang, Yipeng1 <yipeng1.wang@intel.com>; Stokes, Ian
> <ian.stokes@intel.com>; blp@ovn.org
> Subject: [PATCH v5 2/2] tests: Fix unit test case caused by SMC cache.
> 
> Test 1024 PMD - stats reported different stats data during tests because of the
> SMC data. This commit fix the test.
> 
> Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
> ---
>  tests/pmd.at | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/pmd.at b/tests/pmd.at index 60452f5..4cae6c8 100644
> --- a/tests/pmd.at
> +++ b/tests/pmd.at
> @@ -196,12 +196,13 @@ dummy@ovs-dummy: hit:0 missed:0
>      p0 7/1: (dummy-pmd: configured_rx_queues=4,
> configured_tx_queues=<cleared>, requested_rx_queues=4,
> requested_tx_queues=<cleared>)
>  ])
> 
> -AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed
> SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 8], [0], [dnl
> +AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed
> +SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 9], [0], [dnl
>  pmd thread numa_id <cleared> core_id <cleared>:
>    packets received: 0
>    packet recirculations: 0
>    avg. datapath passes per packet: 0.00
>    emc hits: 0
> +  smc hits: 0
>    megaflow hits: 0
>    avg. subtable lookups per megaflow hit: 0.00
>    miss with success upcall: 0
> @@ -226,12 +227,13 @@ AT_CHECK([cat ovs-vswitchd.log | filter_flow_install
> | strip_xout], [0], [dnl
> recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:77,dst=50
> :54:00:00:01:78),eth_type(0x0800),ipv4(frag=no), actions: <del>
>  ])
> 
> -AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed
> SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 8], [0], [dnl
> +AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed
> +SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 9], [0], [dnl
>  pmd thread numa_id <cleared> core_id <cleared>:
>    packets received: 20
>    packet recirculations: 0
>    avg. datapath passes per packet: 1.00
>    emc hits: 19
> +  smc hits: 0
>    megaflow hits: 0
>    avg. subtable lookups per megaflow hit: 0.00
>    miss with success upcall: 1
> --
> 2.7.4

Patch

diff --git a/tests/pmd.at b/tests/pmd.at
index 60452f5..4cae6c8 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -196,12 +196,13 @@  dummy@ovs-dummy: hit:0 missed:0
     p0 7/1: (dummy-pmd: configured_rx_queues=4, configured_tx_queues=<cleared>, requested_rx_queues=4, requested_tx_queues=<cleared>)
 ])
 
-AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 8], [0], [dnl
+AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 9], [0], [dnl
 pmd thread numa_id <cleared> core_id <cleared>:
   packets received: 0
   packet recirculations: 0
   avg. datapath passes per packet: 0.00
   emc hits: 0
+  smc hits: 0
   megaflow hits: 0
   avg. subtable lookups per megaflow hit: 0.00
   miss with success upcall: 0
@@ -226,12 +227,13 @@  AT_CHECK([cat ovs-vswitchd.log | filter_flow_install | strip_xout], [0], [dnl
 recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:77,dst=50:54:00:00:01:78),eth_type(0x0800),ipv4(frag=no), actions: <del>
 ])
 
-AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 8], [0], [dnl
+AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 9], [0], [dnl
 pmd thread numa_id <cleared> core_id <cleared>:
   packets received: 20
   packet recirculations: 0
   avg. datapath passes per packet: 1.00
   emc hits: 19
+  smc hits: 0
   megaflow hits: 0
   avg. subtable lookups per megaflow hit: 0.00
   miss with success upcall: 1