From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 4/5] tests/vf_vlan: update scripts to meet CVL
Date: Thu, 11 Jun 2020 14:59:39 +0800 [thread overview]
Message-ID: <1591858780-153380-5-git-send-email-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <1591858780-153380-1-git-send-email-haiyangx.zhao@intel.com>
*.update scripts to meet CVL.
Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
tests/TestSuite_vf_vlan.py | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index 7f46aa6..7aec89c 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -36,7 +36,6 @@ class TestVfVlan(TestCase):
self.vf_assign_method = 'vfio-pci'
self.dut.send_expect('modprobe vfio-pci', '#')
-
def set_up(self):
self.setup_vm_env()
@@ -84,6 +83,8 @@ class TestVfVlan(TestCase):
self.used_dut_port_0, 1, driver=driver)
self.sriov_vfs_port_0 = self.dut.ports_info[
self.used_dut_port_0]['vfs_port']
+ if self.kdriver == 'ice':
+ self.dut.send_expect("ip link set %s vf 0 spoofchk off" %(self.host_intf0), "# ")
self.vf0_mac = "00:10:00:00:00:00"
self.dut.send_expect("ip link set %s vf 0 mac %s" %
(self.host_intf0, self.vf0_mac), "# ")
@@ -231,12 +232,19 @@ class TestVfVlan(TestCase):
"received" not in out, "Received pacekt with wrong vlan!!!")
# remove vlan
- self.dut.send_expect(
- "ip link set %s vf 0 vlan 0" % self.host_intf0, "# ")
+ self.vm0_testpmd.execute_cmd("stop")
+ self.vm0_testpmd.execute_cmd("port stop all")
+ self.dut.send_expect("ip link set %s vf 0 vlan 0" % self.host_intf0, "# ")
+ out = self.dut.send_expect("ip link show %s" % self.host_intf0, "# ")
+ self.verify("vlan %d" % random_vlan not in out, "Failed to remove pvid on VF0")
# send packet with vlan
+ self.vm0_testpmd.execute_cmd("port reset 0")
+ self.vm0_testpmd.execute_cmd("port start all")
+ self.vm0_testpmd.execute_cmd("start")
+
out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
- if self.kdriver == "i40e":
+ if self.kdriver == "i40e" or self.kdriver == 'ice':
self.verify("received" in out, "Failed to received vlan packet!!!")
else:
self.verify(
@@ -288,7 +296,7 @@ class TestVfVlan(TestCase):
# for fortville ,
# if you want insert tx_vlan,
# please enable rx_vlan at the same time
- if self.kdriver == "i40e":
+ if self.kdriver == "i40e" or self.kdriver == 'ice':
self.vm0_testpmd.execute_cmd('vlan set filter on 0')
self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % tx_vlan)
self.vm0_testpmd.execute_cmd('stop')
@@ -358,7 +366,7 @@ class TestVfVlan(TestCase):
# send packet with vlan
out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
- if self.kdriver == "i40e":
+ if self.kdriver == "i40e" or self.kdriver == 'ice':
self.verify(
"received 1 packets" in out, "Received mismatched vlan packet while vlan filter on")
else:
--
1.8.3.1
next prev parent reply other threads:[~2020-06-11 7:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 6:59 [dts] [PATCH V1 0/5] tests: " Haiyang Zhao
2020-06-11 6:59 ` [dts] [PATCH V1 1/5] tests/runtime_vf_queue_number_kernel: " Haiyang Zhao
2020-06-11 6:59 ` [dts] [PATCH V1 2/5] tests/vf_rss: " Haiyang Zhao
2020-06-11 6:59 ` [dts] [PATCH V1 3/5] tests/vf_jumboframe: " Haiyang Zhao
2020-06-11 6:59 ` Haiyang Zhao [this message]
2020-06-11 6:59 ` [dts] [PATCH V1 5/5] tests/veb_switch: " Haiyang Zhao
2020-06-11 7:17 ` [dts] [PATCH V1 0/5] tests: " Zhao, HaiyangX
2020-06-19 4:50 ` Tu, Lijuan
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=1591858780-153380-5-git-send-email-haiyangx.zhao@intel.com \
--to=haiyangx.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).