From: Jiale Song <songx.jiale@intel.com>
To: dts@dpdk.org
Cc: Jiale Song <songx.jiale@intel.com>
Subject: [dts] [PATCH V2 10/10] tests/vf_vlan: update case code for driver change
Date: Tue, 2 Nov 2021 16:12:00 +0800 [thread overview]
Message-ID: <1635840720-90878-10-git-send-email-songx.jiale@intel.com> (raw)
In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com>
the iavf vlan priv-flags of the kernel drive of columbiaville has changed from
vf-vlan-prune-disable to vf-vlan-pruning in ice 1.7.2_3_g03d5f45f,and is closed
by default,so the affected case needs to modify the code
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
tests/TestSuite_vf_vlan.py | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index 127eca39..db6c2dd6 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -68,6 +68,13 @@ class TestVfVlan(TestCase):
# get driver version
self.driver_version = self.nic_obj.driver_version
+ # bind to default driver
+ self.bind_nic_driver(self.dut_ports[:2], driver="")
+ self.host_intf0 = self.dut.ports_info[self.dut_ports[0]]['intf']
+ # get priv-flags default stats
+ self.flag = 'vf-vlan-pruning'
+ self.default_stats = self.dut.get_priv_flags_state(self.host_intf0, self.flag)
+
def set_up(self):
self.setup_vm_env()
@@ -103,14 +110,12 @@ class TestVfVlan(TestCase):
if self.env_done:
return
- # bind to default driver
- self.bind_nic_driver(self.dut_ports[:2], driver="")
-
self.used_dut_port_0 = self.dut_ports[0]
self.host_intf0 = self.dut.ports_info[self.used_dut_port_0]['intf']
tester_port = self.tester.get_local_port(self.used_dut_port_0)
self.tester_intf0 = self.tester.get_interface(tester_port)
-
+ if self.nic.startswith('columbiaville') and self.default_stats:
+ self.dut.send_expect("ethtool --set-priv-flags %s %s on" % (self.host_intf0, self.flag), "# ")
self.dut.generate_sriov_vfs_by_port(
self.used_dut_port_0, 1, driver=driver)
self.sriov_vfs_port_0 = self.dut.ports_info[
@@ -123,6 +128,8 @@ class TestVfVlan(TestCase):
self.used_dut_port_1 = self.dut_ports[1]
self.host_intf1 = self.dut.ports_info[self.used_dut_port_1]['intf']
+ if self.nic.startswith('columbiaville') and self.default_stats:
+ self.dut.send_expect("ethtool --set-priv-flags %s %s on" % (self.host_intf1, self.flag), "# ")
self.dut.generate_sriov_vfs_by_port(
self.used_dut_port_1, 1, driver=driver)
self.sriov_vfs_port_1 = self.dut.ports_info[
@@ -181,7 +188,7 @@ class TestVfVlan(TestCase):
port = self.dut.ports_info[self.used_dut_port_1]['port']
self.used_dut_port_1 = None
- self.bind_nic_driver(self.dut_ports[:2], driver='default')
+ self.bind_nic_driver(self.dut_ports[:2], driver="")
self.env_done = False
@@ -271,7 +278,7 @@ class TestVfVlan(TestCase):
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 reset 0", 'testpmd> ', 120)
self.vm0_testpmd.execute_cmd("port start all")
self.vm0_testpmd.execute_cmd("start")
@@ -449,4 +456,5 @@ class TestVfVlan(TestCase):
def tear_down_all(self):
self.destroy_vm_env()
- pass
+ if self.nic.startswith('columbiaville') and self.default_stats:
+ self.dut.send_expect("ethtool --set-priv-flags %s %s %s" % (self.host_intf0, self.flag, self.default_stats), "# ")
--
2.17.1
next prev parent reply other threads:[~2021-11-02 8:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 8:11 [dts] [PATCH V2 01/10] tests/cvl_dcf_flow_priority: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 02/10] tests/cvl_qinq: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 03/10] tests/cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 04/10] tests/cvl_dcf_switch_filter: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 05/10] tests/cvl_dcf_switch_filter_pppoe: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 06/10] tests/cvl_vf_support_multicast_address: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 07/10] tests/l2tp_esp_coverage: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 08/10] tests/kernelpf_iavf: " Jiale Song
2021-11-02 8:11 ` [dts] [PATCH V2 09/10] tests/iavf_flexible_descriptor: " Jiale Song
2021-11-02 8:12 ` Jiale Song [this message]
2021-11-05 11:51 ` [dts] [PATCH V2 10/10] tests/vf_vlan: " 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=1635840720-90878-10-git-send-email-songx.jiale@intel.com \
--to=songx.jiale@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).