test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH v3]tests vf_vlan: update vm cases
@ 2016-03-14  5:02 Lijuan Tu
  2016-03-14  8:11 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Lijuan Tu @ 2016-03-14  5:02 UTC (permalink / raw)
  To: yong.liu, dts; +Cc: Lijuan Tu

1. stop forwarding and then can start again
2. for fortville ,"enabletx_vlan" must "enable rx_vlan" at same time 
3. a little time waitafter 'rx_vlan add %d 0'
4. fix vlan set strip on/off in for-cycle

Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
---
 tests/TestSuite_vf_vlan.py | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index 6bde6ca..0a0dbe1 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -243,6 +243,7 @@ class TestVfVlan(TestCase):
         inst = sniff_packets(self.tester_intf0, timeout=5)
         self.vm0_testpmd.execute_cmd('set burst 1')
         self.vm0_testpmd.execute_cmd('start tx_first')
+        self.vm0_testpmd.execute_cmd('stop')
 
         # strip sniffered vlans
         pkts = load_sniff_packets(inst)
@@ -265,6 +266,11 @@ class TestVfVlan(TestCase):
         self.vm0_testpmd.execute_cmd('set verbose 1')
 
         for tx_vlan in tx_vlans:
+            # for fortville ,
+            # if you want insert tx_vlan,
+            # please enable rx_vlan at the same time
+            if self.kdriver == "i40e":
+                self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % tx_vlan)
             self.vm0_testpmd.execute_cmd('tx_vlan set 0 %d' % tx_vlan)
             self.tx_and_check(tx_vlan=tx_vlan)
 
@@ -280,7 +286,7 @@ class TestVfVlan(TestCase):
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('set fwd rxonly')
         self.vm0_testpmd.execute_cmd('set verbose 1')
-        self.vm0_testpmd.execute_cmd('vlan set strip off 0')
+        self.vm0_testpmd.execute_cmd('vlan set strip on 0')
         self.vm0_testpmd.execute_cmd('start')
 
         # send packet without vlan
@@ -295,6 +301,7 @@ class TestVfVlan(TestCase):
 
         for rx_vlan in rx_vlans:
             self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % rx_vlan)
+            time.sleep(1)
             # send packet with same vlan
             out = self.send_and_getout(vlan=rx_vlan, pkt_type="VLAN_UDP")
             vlan_hex = hex(rx_vlan)
@@ -312,7 +319,7 @@ class TestVfVlan(TestCase):
                 "received 1 packets" not in out, "Received filtered vlan packet!!!")
 
         for rx_vlan in rx_vlans:
-            self.vm0_testpmd.execute_cmd('rx_vlan rm 0 %d' % random_vlan)
+            self.vm0_testpmd.execute_cmd('rx_vlan rm 0 %d' % rx_vlan)
 
         # send packet with vlan 0
         out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP")
@@ -341,11 +348,12 @@ class TestVfVlan(TestCase):
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('set fwd rxonly')
         self.vm0_testpmd.execute_cmd('set verbose 1')
-        self.vm0_testpmd.execute_cmd('vlan set strip on 0')
         self.vm0_testpmd.execute_cmd('start')
 
         for rx_vlan in rx_vlans:
+            self.vm0_testpmd.execute_cmd('vlan set strip on 0')
             self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % rx_vlan)
+            time.sleep(1)
             out = self.send_and_getout(vlan=rx_vlan, pkt_type="VLAN_UDP")
             # enable strip, vlan will be in mbuf
             vlan_hex = hex(rx_vlan)
-- 
1.9.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH v3]tests vf_vlan: update vm cases
  2016-03-14  5:02 [dts] [PATCH v3]tests vf_vlan: update vm cases Lijuan Tu
@ 2016-03-14  8:11 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2016-03-14  8:11 UTC (permalink / raw)
  To: Tu, LijuanX A, dts

Applied. Thanks.

> -----Original Message-----
> From: Tu, LijuanX A
> Sent: Monday, March 14, 2016 1:03 PM
> To: Liu, Yong; dts@dpdk.org
> Cc: Tu, LijuanX A
> Subject: [dts][PATCH v3]tests vf_vlan: update vm cases
> 
> 1. stop forwarding and then can start again
> 2. for fortville ,"enabletx_vlan" must "enable rx_vlan" at same time
> 3. a little time waitafter 'rx_vlan add %d 0'
> 4. fix vlan set strip on/off in for-cycle
> 
> Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
> ---
>  tests/TestSuite_vf_vlan.py | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
> index 6bde6ca..0a0dbe1 100644
> --- a/tests/TestSuite_vf_vlan.py
> +++ b/tests/TestSuite_vf_vlan.py
> @@ -243,6 +243,7 @@ class TestVfVlan(TestCase):
>          inst = sniff_packets(self.tester_intf0, timeout=5)
>          self.vm0_testpmd.execute_cmd('set burst 1')
>          self.vm0_testpmd.execute_cmd('start tx_first')
> +        self.vm0_testpmd.execute_cmd('stop')
> 
>          # strip sniffered vlans
>          pkts = load_sniff_packets(inst)
> @@ -265,6 +266,11 @@ class TestVfVlan(TestCase):
>          self.vm0_testpmd.execute_cmd('set verbose 1')
> 
>          for tx_vlan in tx_vlans:
> +            # for fortville ,
> +            # if you want insert tx_vlan,
> +            # please enable rx_vlan at the same time
> +            if self.kdriver == "i40e":
> +                self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' %
> tx_vlan)
>              self.vm0_testpmd.execute_cmd('tx_vlan set 0 %d' % tx_vlan)
>              self.tx_and_check(tx_vlan=tx_vlan)
> 
> @@ -280,7 +286,7 @@ class TestVfVlan(TestCase):
>          self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>          self.vm0_testpmd.execute_cmd('set fwd rxonly')
>          self.vm0_testpmd.execute_cmd('set verbose 1')
> -        self.vm0_testpmd.execute_cmd('vlan set strip off 0')
> +        self.vm0_testpmd.execute_cmd('vlan set strip on 0')
>          self.vm0_testpmd.execute_cmd('start')
> 
>          # send packet without vlan
> @@ -295,6 +301,7 @@ class TestVfVlan(TestCase):
> 
>          for rx_vlan in rx_vlans:
>              self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % rx_vlan)
> +            time.sleep(1)
>              # send packet with same vlan
>              out = self.send_and_getout(vlan=rx_vlan, pkt_type="VLAN_UDP")
>              vlan_hex = hex(rx_vlan)
> @@ -312,7 +319,7 @@ class TestVfVlan(TestCase):
>                  "received 1 packets" not in out, "Received filtered vlan
> packet!!!")
> 
>          for rx_vlan in rx_vlans:
> -            self.vm0_testpmd.execute_cmd('rx_vlan rm 0 %d' % random_vlan)
> +            self.vm0_testpmd.execute_cmd('rx_vlan rm 0 %d' % rx_vlan)
> 
>          # send packet with vlan 0
>          out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP")
> @@ -341,11 +348,12 @@ class TestVfVlan(TestCase):
>          self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>          self.vm0_testpmd.execute_cmd('set fwd rxonly')
>          self.vm0_testpmd.execute_cmd('set verbose 1')
> -        self.vm0_testpmd.execute_cmd('vlan set strip on 0')
>          self.vm0_testpmd.execute_cmd('start')
> 
>          for rx_vlan in rx_vlans:
> +            self.vm0_testpmd.execute_cmd('vlan set strip on 0')
>              self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % rx_vlan)
> +            time.sleep(1)
>              out = self.send_and_getout(vlan=rx_vlan, pkt_type="VLAN_UDP")
>              # enable strip, vlan will be in mbuf
>              vlan_hex = hex(rx_vlan)
> --
> 1.9.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-14  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14  5:02 [dts] [PATCH v3]tests vf_vlan: update vm cases Lijuan Tu
2016-03-14  8:11 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).