test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start testpmd in vm
@ 2016-06-24  6:54 Lijuan Tu
  2016-06-29  0:44 ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: Lijuan Tu @ 2016-06-24  6:54 UTC (permalink / raw)
  To: dts; +Cc: Lijuan Tu

For NIC fortville, dpdk16.07 will quit testpmd if VF can't disable HW CRC Strip

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

diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index e32e5bd..1034602 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -152,7 +152,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('start')
 
@@ -176,7 +179,7 @@ class TestVfVlan(TestCase):
             pkt.config_layer('ether', {'dst': self.vf0_mac})
         elif pkt_type == "VLAN_UDP":
             pkt = Packet(pkt_type='VLAN_UDP')
-            pkt.config_layer('dot1q', {'vlan': vlan})
+            pkt.config_layer('vlan', {'vlan': vlan})
             pkt.config_layer('ether', {'dst': self.vf0_mac})
 
         pkt.send_pkt(tx_port=self.tester_intf0)
@@ -197,7 +200,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            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('start')
@@ -249,7 +255,7 @@ class TestVfVlan(TestCase):
         pkts = load_sniff_packets(inst)
         vlans = []
         for pkt in pkts:
-            vlan = pkt.strip_element_dot1q("vlan")
+            vlan = pkt.strip_element_vlan("vlan")
             vlans.append(vlan)
 
         self.verify(
@@ -262,7 +268,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('set verbose 1')
 
         for tx_vlan in tx_vlans:
@@ -283,10 +292,14 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            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('vlan set filter on 0')
         self.vm0_testpmd.execute_cmd('start')
 
         # send packet without vlan
@@ -334,7 +347,7 @@ class TestVfVlan(TestCase):
         # send packet with vlan
         out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
         self.verify(
-            "received 1 packets" in out, "Not received vlan packet without vlan filter!!!")
+            "received 1 packets" not in out, "Not received vlan packet without vlan filter!!!")
 
         self.vm0_testpmd.quit()
 
@@ -345,7 +358,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            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('start')
-- 
1.9.3

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

* Re: [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start testpmd in vm
  2016-06-24  6:54 [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start testpmd in vm Lijuan Tu
@ 2016-06-29  0:44 ` Liu, Yong
  2016-06-29  9:11   ` Tu, LijuanX A
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2016-06-29  0:44 UTC (permalink / raw)
  To: Lijuan Tu, dts

Hi Lijuan, one question below.

On 06/24/2016 02:54 PM, Lijuan Tu wrote:
> For NIC fortville, dpdk16.07 will quit testpmd if VF can't disable HW CRC Strip
>
> Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
> ---
>   tests/TestSuite_vf_vlan.py | 32 ++++++++++++++++++++++++--------
>   1 file changed, 24 insertions(+), 8 deletions(-)
>
> diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
> index e32e5bd..1034602 100644
> --- a/tests/TestSuite_vf_vlan.py
> +++ b/tests/TestSuite_vf_vlan.py
> @@ -152,7 +152,10 @@ class TestVfVlan(TestCase):
>           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>   
>           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> +        if self.kdriver == "i40e":
> +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> +        else:
> +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>           self.vm0_testpmd.execute_cmd('set fwd mac')
>           self.vm0_testpmd.execute_cmd('start')
>   
> @@ -176,7 +179,7 @@ class TestVfVlan(TestCase):
>               pkt.config_layer('ether', {'dst': self.vf0_mac})
>           elif pkt_type == "VLAN_UDP":
>               pkt = Packet(pkt_type='VLAN_UDP')
> -            pkt.config_layer('dot1q', {'vlan': vlan})
> +            pkt.config_layer('vlan', {'vlan': vlan})
>               pkt.config_layer('ether', {'dst': self.vf0_mac})
>   
>           pkt.send_pkt(tx_port=self.tester_intf0)
> @@ -197,7 +200,10 @@ class TestVfVlan(TestCase):
>           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>   
>           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> +        if self.kdriver == "i40e":
> +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> +        else:
> +            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('start')
> @@ -249,7 +255,7 @@ class TestVfVlan(TestCase):
>           pkts = load_sniff_packets(inst)
>           vlans = []
>           for pkt in pkts:
> -            vlan = pkt.strip_element_dot1q("vlan")
> +            vlan = pkt.strip_element_vlan("vlan")
>               vlans.append(vlan)
>   
>           self.verify(
> @@ -262,7 +268,10 @@ class TestVfVlan(TestCase):
>           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>   
>           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> +        if self.kdriver == "i40e":
> +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> +        else:
> +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>           self.vm0_testpmd.execute_cmd('set verbose 1')
>   
>           for tx_vlan in tx_vlans:
> @@ -283,10 +292,14 @@ class TestVfVlan(TestCase):
>           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>   
>           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> +        if self.kdriver == "i40e":
> +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> +        else:
> +            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('vlan set filter on 0')
>           self.vm0_testpmd.execute_cmd('start')
>   
>           # send packet without vlan
> @@ -334,7 +347,7 @@ class TestVfVlan(TestCase):
>           # send packet with vlan
>           out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
>           self.verify(
> -            "received 1 packets" in out, "Not received vlan packet without vlan filter!!!")
> +            "received 1 packets" not in out, "Not received vlan packet without vlan filter!!!")
The original judgment is that check vlan packet received by testpmd. Why 
change this judgment?

>           self.vm0_testpmd.quit()
>   
> @@ -345,7 +358,10 @@ class TestVfVlan(TestCase):
>           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>   
>           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> +        if self.kdriver == "i40e":
> +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> +        else:
> +            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('start')

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

* Re: [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start testpmd in vm
  2016-06-29  0:44 ` Liu, Yong
@ 2016-06-29  9:11   ` Tu, LijuanX A
  2016-06-29  9:22     ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: Tu, LijuanX A @ 2016-06-29  9:11 UTC (permalink / raw)
  To: Liu, Yong, dts



 > -----Original Message-----
 > From: Liu, Yong
 > Sent: Wednesday, June 29, 2016 8:45 AM
 > To: Tu, LijuanX A; dts@dpdk.org
 > Subject: Re: [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start
 > testpmd in vm
 > 
 > Hi Lijuan, one question below.
 > 
 > On 06/24/2016 02:54 PM, Lijuan Tu wrote:
 > > For NIC fortville, dpdk16.07 will quit testpmd if VF can't disable HW
 > > CRC Strip
 > >
 > > Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
 > > ---
 > >   tests/TestSuite_vf_vlan.py | 32 ++++++++++++++++++++++++--------
 > >   1 file changed, 24 insertions(+), 8 deletions(-)
 > >
 > > diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
 > > index e32e5bd..1034602 100644
 > > --- a/tests/TestSuite_vf_vlan.py
 > > +++ b/tests/TestSuite_vf_vlan.py
 > > @@ -152,7 +152,10 @@ class TestVfVlan(TestCase):
 > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 > >
 > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
 > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
 > > +        if self.kdriver == "i40e":
 > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
 > > +        else:
 > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
 > >           self.vm0_testpmd.execute_cmd('set fwd mac')
 > >           self.vm0_testpmd.execute_cmd('start')
 > >
 > > @@ -176,7 +179,7 @@ class TestVfVlan(TestCase):
 > >               pkt.config_layer('ether', {'dst': self.vf0_mac})
 > >           elif pkt_type == "VLAN_UDP":
 > >               pkt = Packet(pkt_type='VLAN_UDP')
 > > -            pkt.config_layer('dot1q', {'vlan': vlan})
 > > +            pkt.config_layer('vlan', {'vlan': vlan})
 > >               pkt.config_layer('ether', {'dst': self.vf0_mac})
 > >
 > >           pkt.send_pkt(tx_port=self.tester_intf0)
 > > @@ -197,7 +200,10 @@ class TestVfVlan(TestCase):
 > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 > >
 > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
 > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
 > > +        if self.kdriver == "i40e":
 > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
 > > +        else:
 > > +            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('start')
 > > @@ -249,7 +255,7 @@ class TestVfVlan(TestCase):
 > >           pkts = load_sniff_packets(inst)
 > >           vlans = []
 > >           for pkt in pkts:
 > > -            vlan = pkt.strip_element_dot1q("vlan")
 > > +            vlan = pkt.strip_element_vlan("vlan")
 > >               vlans.append(vlan)
 > >
 > >           self.verify(
 > > @@ -262,7 +268,10 @@ class TestVfVlan(TestCase):
 > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 > >
 > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
 > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
 > > +        if self.kdriver == "i40e":
 > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
 > > +        else:
 > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
 > >           self.vm0_testpmd.execute_cmd('set verbose 1')
 > >
 > >           for tx_vlan in tx_vlans:
 > > @@ -283,10 +292,14 @@ class TestVfVlan(TestCase):
 > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 > >
 > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
 > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
 > > +        if self.kdriver == "i40e":
 > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
 > > +        else:
 > > +            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('vlan set filter on 0')
 > >           self.vm0_testpmd.execute_cmd('start')
 > >
 > >           # send packet without vlan
 > > @@ -334,7 +347,7 @@ class TestVfVlan(TestCase):
 > >           # send packet with vlan
 > >           out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
 > >           self.verify(
 > > -            "received 1 packets" in out, "Not received vlan packet without
 > vlan filter!!!")
 > > +            "received 1 packets" not in out, "Not received vlan
 > > + packet without vlan filter!!!")
 > The original judgment is that check vlan packet received by testpmd. Why
 > change this judgment?
[lijuan] vlan set filter on port_id ,and then it should not receive packets.
 > 
 > >           self.vm0_testpmd.quit()
 > >
 > > @@ -345,7 +358,10 @@ class TestVfVlan(TestCase):
 > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 > >
 > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
 > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
 > > +        if self.kdriver == "i40e":
 > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
 > > +        else:
 > > +            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('start')

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

* Re: [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start testpmd in vm
  2016-06-29  9:11   ` Tu, LijuanX A
@ 2016-06-29  9:22     ` Liu, Yong
  0 siblings, 0 replies; 5+ messages in thread
From: Liu, Yong @ 2016-06-29  9:22 UTC (permalink / raw)
  To: Tu, LijuanX A, dts

Lijuan, please edit the error message as well.

> -----Original Message-----
> From: Tu, LijuanX A
> Sent: Wednesday, June 29, 2016 5:12 PM
> To: Liu, Yong; dts@dpdk.org
> Subject: RE: [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when
> start testpmd in vm
> 
> 
> 
>  > -----Original Message-----
>  > From: Liu, Yong
>  > Sent: Wednesday, June 29, 2016 8:45 AM
>  > To: Tu, LijuanX A; dts@dpdk.org
>  > Subject: Re: [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when
> start
>  > testpmd in vm
>  >
>  > Hi Lijuan, one question below.
>  >
>  > On 06/24/2016 02:54 PM, Lijuan Tu wrote:
>  > > For NIC fortville, dpdk16.07 will quit testpmd if VF can't disable HW
>  > > CRC Strip
>  > >
>  > > Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
>  > > ---
>  > >   tests/TestSuite_vf_vlan.py | 32 ++++++++++++++++++++++++--------
>  > >   1 file changed, 24 insertions(+), 8 deletions(-)
>  > >
>  > > diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
>  > > index e32e5bd..1034602 100644
>  > > --- a/tests/TestSuite_vf_vlan.py
>  > > +++ b/tests/TestSuite_vf_vlan.py
>  > > @@ -152,7 +152,10 @@ class TestVfVlan(TestCase):
>  > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>  > >
>  > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
>  > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>  > > +        if self.kdriver == "i40e":
>  > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
>  > > +        else:
>  > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>  > >           self.vm0_testpmd.execute_cmd('set fwd mac')
>  > >           self.vm0_testpmd.execute_cmd('start')
>  > >
>  > > @@ -176,7 +179,7 @@ class TestVfVlan(TestCase):
>  > >               pkt.config_layer('ether', {'dst': self.vf0_mac})
>  > >           elif pkt_type == "VLAN_UDP":
>  > >               pkt = Packet(pkt_type='VLAN_UDP')
>  > > -            pkt.config_layer('dot1q', {'vlan': vlan})
>  > > +            pkt.config_layer('vlan', {'vlan': vlan})
>  > >               pkt.config_layer('ether', {'dst': self.vf0_mac})
>  > >
>  > >           pkt.send_pkt(tx_port=self.tester_intf0)
>  > > @@ -197,7 +200,10 @@ class TestVfVlan(TestCase):
>  > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>  > >
>  > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
>  > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>  > > +        if self.kdriver == "i40e":
>  > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
>  > > +        else:
>  > > +            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('start')
>  > > @@ -249,7 +255,7 @@ class TestVfVlan(TestCase):
>  > >           pkts = load_sniff_packets(inst)
>  > >           vlans = []
>  > >           for pkt in pkts:
>  > > -            vlan = pkt.strip_element_dot1q("vlan")
>  > > +            vlan = pkt.strip_element_vlan("vlan")
>  > >               vlans.append(vlan)
>  > >
>  > >           self.verify(
>  > > @@ -262,7 +268,10 @@ class TestVfVlan(TestCase):
>  > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>  > >
>  > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
>  > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>  > > +        if self.kdriver == "i40e":
>  > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
>  > > +        else:
>  > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>  > >           self.vm0_testpmd.execute_cmd('set verbose 1')
>  > >
>  > >           for tx_vlan in tx_vlans:
>  > > @@ -283,10 +292,14 @@ class TestVfVlan(TestCase):
>  > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>  > >
>  > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
>  > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>  > > +        if self.kdriver == "i40e":
>  > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
>  > > +        else:
>  > > +            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('vlan set filter on 0')
>  > >           self.vm0_testpmd.execute_cmd('start')
>  > >
>  > >           # send packet without vlan
>  > > @@ -334,7 +347,7 @@ class TestVfVlan(TestCase):
>  > >           # send packet with vlan
>  > >           out = self.send_and_getout(vlan=random_vlan,
> pkt_type="VLAN_UDP")
>  > >           self.verify(
>  > > -            "received 1 packets" in out, "Not received vlan packet
> without
>  > vlan filter!!!")
>  > > +            "received 1 packets" not in out, "Not received vlan
>  > > + packet without vlan filter!!!")
>  > The original judgment is that check vlan packet received by testpmd.
> Why
>  > change this judgment?
> [lijuan] vlan set filter on port_id ,and then it should not receive
> packets.
[Marvin] So the error message is wrong, it should be "Received mismatched vlan packet while vlan filter on".

>  >
>  > >           self.vm0_testpmd.quit()
>  > >
>  > > @@ -345,7 +358,10 @@ class TestVfVlan(TestCase):
>  > >           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>  > >
>  > >           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
>  > > -        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
>  > > +        if self.kdriver == "i40e":
>  > > +            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
>  > > +        else:
>  > > +            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('start')

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

* [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start testpmd in vm
@ 2016-06-29  8:50 Lijuan Tu
  0 siblings, 0 replies; 5+ messages in thread
From: Lijuan Tu @ 2016-06-29  8:50 UTC (permalink / raw)
  To: dts; +Cc: Lijuan Tu

For NIC fortville, dpdk16.07 will quit testpmd if VF can't disable HW CRC Strip

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

diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index e32e5bd..1034602 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -152,7 +152,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('start')
 
@@ -176,7 +179,7 @@ class TestVfVlan(TestCase):
             pkt.config_layer('ether', {'dst': self.vf0_mac})
         elif pkt_type == "VLAN_UDP":
             pkt = Packet(pkt_type='VLAN_UDP')
-            pkt.config_layer('dot1q', {'vlan': vlan})
+            pkt.config_layer('vlan', {'vlan': vlan})
             pkt.config_layer('ether', {'dst': self.vf0_mac})
 
         pkt.send_pkt(tx_port=self.tester_intf0)
@@ -197,7 +200,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            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('start')
@@ -249,7 +255,7 @@ class TestVfVlan(TestCase):
         pkts = load_sniff_packets(inst)
         vlans = []
         for pkt in pkts:
-            vlan = pkt.strip_element_dot1q("vlan")
+            vlan = pkt.strip_element_vlan("vlan")
             vlans.append(vlan)
 
         self.verify(
@@ -262,7 +268,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('set verbose 1')
 
         for tx_vlan in tx_vlans:
@@ -283,10 +292,14 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            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('vlan set filter on 0')
         self.vm0_testpmd.execute_cmd('start')
 
         # send packet without vlan
@@ -334,7 +347,7 @@ class TestVfVlan(TestCase):
         # send packet with vlan
         out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
         self.verify(
-            "received 1 packets" in out, "Not received vlan packet without vlan filter!!!")
+            "received 1 packets" not in out, "Not received vlan packet without vlan filter!!!")
 
         self.vm0_testpmd.quit()
 
@@ -345,7 +358,10 @@ class TestVfVlan(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            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('start')
-- 
1.9.3

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

end of thread, other threads:[~2016-06-29  9:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24  6:54 [dts] [PATCH]tests vf_vlan: enable crc-strip of FLV when start testpmd in vm Lijuan Tu
2016-06-29  0:44 ` Liu, Yong
2016-06-29  9:11   ` Tu, LijuanX A
2016-06-29  9:22     ` Liu, Yong
2016-06-29  8:50 Lijuan Tu

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).