test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/vf daemon fix vlan issue
@ 2018-03-13  1:33 zhao,meijuan
  2018-03-19  8:42 ` Liu, Yong
  0 siblings, 1 reply; 3+ messages in thread
From: zhao,meijuan @ 2018-03-13  1:33 UTC (permalink / raw)
  To: dts; +Cc: zhao,meijuan

add enable vlan filter parameter, you can refer to dpdk 8b9bd0,
vlan default promiscuous setting is different for different 
VF kernel driver

Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
 tests/TestSuite_vf_daemon.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py
index b1ad522..08d6abe 100644
--- a/tests/TestSuite_vf_daemon.py
+++ b/tests/TestSuite_vf_daemon.py
@@ -562,13 +562,15 @@ class Testvf_daemon(TestCase):
         Enable/disable vlan antispoof for a VF from PF 
         """
         self.check_vf_link_status()
-
+        if self.kdriver == "ixgbe":
+            self.dut_testpmd.execute_cmd('vlan set filter on 0')
         self.vf0_mac = self.vm0_testpmd.get_port_mac(0)
         vf0_mac_lower = self.vf0_mac.lower()
         random_vlan = random.randint(1, MAX_VLAN)
         match_vlan = random_vlan
         unmatch_vlan = (random_vlan + 2) % 4096
         self.vm0_testpmd.execute_cmd('set fwd mac')
+        self.vm0_testpmd.execute_cmd('vlan set filter on 0')
         self.vm0_testpmd.execute_cmd('start')
         #self.dut_testpmd.execute_cmd('rx_vlan add %d port 0 vf 1' % match_vlan)
         self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % match_vlan)
@@ -607,6 +609,9 @@ class Testvf_daemon(TestCase):
         out = self.send_and_macstrip(self.vf0_mac)
         self.verify(vf0_mac_lower not in out, 
             "Failed to enable vlan antispoof with no vlan!!!")
+        self.vm0_testpmd.execute_cmd('vlan set filter off 0')
+        if self.kdriver == "ixgbe":
+            self.dut_testpmd.execute_cmd('vlan set filter off 0') 
     
     
     def test_vlan_strip(self): 
@@ -618,6 +623,8 @@ class Testvf_daemon(TestCase):
 
         random_vlan = random.randint(1, MAX_VLAN - 1) 
         rx_vlans = [1, random_vlan, MAX_VLAN]
+        if self.kdriver == "ixgbe":
+            self.vm0_testpmd.execute_cmd('vlan set filter on 0')
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('set verbose 1')  
         self.vm0_testpmd.execute_cmd('start')
@@ -632,6 +639,8 @@ class Testvf_daemon(TestCase):
             time.sleep(3)
             out = self.send_and_vlanstrip(self.vf0_mac,rx_vlan)
             self.verify(rx_vlan not in out, "Failed to disable strip vlan!!!")
+        if self.kdriver == "ixgbe":
+            self.vm0_testpmd.execute_cmd('vlan set filter off 0')
 
     
     def test_vlan_filter(self):
-- 
1.9.3

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

* Re: [dts] [PATCH V1] tests/vf daemon fix vlan issue
  2018-03-13  1:33 [dts] [PATCH V1] tests/vf daemon fix vlan issue zhao,meijuan
@ 2018-03-19  8:42 ` Liu, Yong
  0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2018-03-19  8:42 UTC (permalink / raw)
  To: Zhao, MeijuanX, dts; +Cc: Zhao, MeijuanX

Meijuan,
I think DPDK should keep PF/VF vlan related setting same across the NICs. 
There're lot of special NIC type check in your patch. Please check whether they are must needed.

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhao,meijuan
> Sent: Tuesday, March 13, 2018 9:33 AM
> To: dts@dpdk.org
> Cc: Zhao, MeijuanX <meijuanx.zhao@intel.com>
> Subject: [dts] [PATCH V1] tests/vf daemon fix vlan issue
> 
> add enable vlan filter parameter, you can refer to dpdk 8b9bd0,
> vlan default promiscuous setting is different for different
> VF kernel driver
> 
> Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
> ---
>  tests/TestSuite_vf_daemon.py | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py
> index b1ad522..08d6abe 100644
> --- a/tests/TestSuite_vf_daemon.py
> +++ b/tests/TestSuite_vf_daemon.py
> @@ -562,13 +562,15 @@ class Testvf_daemon(TestCase):
>          Enable/disable vlan antispoof for a VF from PF
>          """
>          self.check_vf_link_status()
> -
> +        if self.kdriver == "ixgbe":
> +            self.dut_testpmd.execute_cmd('vlan set filter on 0')

Why need to enable vlan filter on PF device for ixgbe? 

>          self.vf0_mac = self.vm0_testpmd.get_port_mac(0)
>          vf0_mac_lower = self.vf0_mac.lower()
>          random_vlan = random.randint(1, MAX_VLAN)
>          match_vlan = random_vlan
>          unmatch_vlan = (random_vlan + 2) % 4096
>          self.vm0_testpmd.execute_cmd('set fwd mac')
> +        self.vm0_testpmd.execute_cmd('vlan set filter on 0')
>          self.vm0_testpmd.execute_cmd('start')
>          #self.dut_testpmd.execute_cmd('rx_vlan add %d port 0 vf 1' %
> match_vlan)
>          self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % match_vlan)
> @@ -607,6 +609,9 @@ class Testvf_daemon(TestCase):
>          out = self.send_and_macstrip(self.vf0_mac)
>          self.verify(vf0_mac_lower not in out,
>              "Failed to enable vlan antispoof with no vlan!!!")
> +        self.vm0_testpmd.execute_cmd('vlan set filter off 0')
> +        if self.kdriver == "ixgbe":
> +            self.dut_testpmd.execute_cmd('vlan set filter off 0')
> 
> 
>      def test_vlan_strip(self):
> @@ -618,6 +623,8 @@ class Testvf_daemon(TestCase):
> 
>          random_vlan = random.randint(1, MAX_VLAN - 1)
>          rx_vlans = [1, random_vlan, MAX_VLAN]
> +        if self.kdriver == "ixgbe":
> +            self.vm0_testpmd.execute_cmd('vlan set filter on 0')

I think vlan setting should be the same across NICs when using dpdk. Why only ixgbe should enable vlan filter?

>          self.vm0_testpmd.execute_cmd('set fwd mac')
>          self.vm0_testpmd.execute_cmd('set verbose 1')
>          self.vm0_testpmd.execute_cmd('start')
> @@ -632,6 +639,8 @@ class Testvf_daemon(TestCase):
>              time.sleep(3)
>              out = self.send_and_vlanstrip(self.vf0_mac,rx_vlan)
>              self.verify(rx_vlan not in out, "Failed to disable strip
> vlan!!!")
> +        if self.kdriver == "ixgbe":
> +            self.vm0_testpmd.execute_cmd('vlan set filter off 0')
> 
> 
>      def test_vlan_filter(self):
> --
> 1.9.3

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

* [dts] [PATCH V1] tests/vf daemon fix vlan issue
@ 2018-03-12 10:01 zhao,meijuan
  0 siblings, 0 replies; 3+ messages in thread
From: zhao,meijuan @ 2018-03-12 10:01 UTC (permalink / raw)
  To: dts; +Cc: zhao,meijuan

add enable vlan filter parameter, you can refer to dpdk 8b9bd0,
vlan default promiscuous setting is different for different
 VF kernel driver

Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
 tests/TestSuite_vf_daemon.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py
index b1ad522..38a0feb 100644
--- a/tests/TestSuite_vf_daemon.py
+++ b/tests/TestSuite_vf_daemon.py
@@ -562,13 +562,15 @@ class Testvf_daemon(TestCase):
         Enable/disable vlan antispoof for a VF from PF 
         """
         self.check_vf_link_status()
-
+        if self.kdriver == "ixgbe":
+            self.dut_testpmd.execute_cmd('vlan set filter on 0')
         self.vf0_mac = self.vm0_testpmd.get_port_mac(0)
         vf0_mac_lower = self.vf0_mac.lower()
         random_vlan = random.randint(1, MAX_VLAN)
         match_vlan = random_vlan
         unmatch_vlan = (random_vlan + 2) % 4096
         self.vm0_testpmd.execute_cmd('set fwd mac')
+        self.vm0_testpmd.execute_cmd('vlan set filter on 0')
         self.vm0_testpmd.execute_cmd('start')
         #self.dut_testpmd.execute_cmd('rx_vlan add %d port 0 vf 1' % match_vlan)
         self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % match_vlan)
@@ -618,6 +620,8 @@ class Testvf_daemon(TestCase):
 
         random_vlan = random.randint(1, MAX_VLAN - 1) 
         rx_vlans = [1, random_vlan, MAX_VLAN]
+        if self.kdriver == "ixgbe":
+            self.vm0_testpmd.execute_cmd('vlan set filter on 0')
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('set verbose 1')  
         self.vm0_testpmd.execute_cmd('start')
-- 
1.9.3

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

end of thread, other threads:[~2018-03-19  8:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13  1:33 [dts] [PATCH V1] tests/vf daemon fix vlan issue zhao,meijuan
2018-03-19  8:42 ` Liu, Yong
  -- strict thread matches above, loose matches on Subject: below --
2018-03-12 10:01 zhao,meijuan

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