test suite reviews and discussions
 help / color / mirror / Atom feed
From: "zhao,meijuan" <meijuanx.zhao@intel.com>
To: dts@dpdk.org
Cc: "zhao,meijuan" <meijuanx.zhao@intel.com>
Subject: [dts] [PATCH V1] tests/vf daemon fix vlan issue
Date: Tue, 13 Mar 2018 09:33:01 +0800	[thread overview]
Message-ID: <1520904781-81004-1-git-send-email-meijuanx.zhao@intel.com> (raw)

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

             reply	other threads:[~2018-03-13  1:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13  1:33 zhao,meijuan [this message]
2018-03-19  8:42 ` Liu, Yong
  -- strict thread matches above, loose matches on Subject: below --
2018-03-12 10:01 zhao,meijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520904781-81004-1-git-send-email-meijuanx.zhao@intel.com \
    --to=meijuanx.zhao@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).