* [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind
@ 2019-06-27 8:10 zhang,yan
2019-06-27 8:26 ` Zhu, WenhuiX
2019-07-03 6:13 ` Tu, Lijuan
0 siblings, 2 replies; 3+ messages in thread
From: zhang,yan @ 2019-06-27 8:10 UTC (permalink / raw)
To: dts; +Cc: zhang,yan
Instead of the original single binding driver,
Signed-off-by: zhang,yan <yanx.a.zhang@intel.com>
---
tests/TestSuite_ddp_mpls.py | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py
index b002788..599e5cd 100644
--- a/tests/TestSuite_ddp_mpls.py
+++ b/tests/TestSuite_ddp_mpls.py
@@ -16,6 +16,7 @@ PF_MAX_QUEUE = 64
VF_MAX_QUEUE = 4
class Testddp_mpls(TestCase):
+ supported_vf_driver = ['pci-stub', 'vfio-pci']
def set_up_all(self):
self.verify('fortville' in self.nic,
@@ -28,6 +29,15 @@ class Testddp_mpls(TestCase):
profile_dst = "/tmp/"
self.dut.session.copy_file_to(profile_file, profile_dst)
+ self.vf_driver = self.get_suite_cfg()['vf_driver']
+ if self.vf_driver is None:
+ self.vf_driver = 'pci-stub'
+ self.verify(self.vf_driver in self.supported_vf_driver, "Unspported vf driver")
+ if self.vf_driver == 'pci-stub':
+ self.vf_assign_method = 'pci-assign'
+ else:
+ self.vf_assign_method = 'vfio-pci'
+ self.dut.send_expect('modprobe vfio-pci', '#')
def set_up(self):
self.setup_vm_env()
@@ -50,7 +60,7 @@ class Testddp_mpls(TestCase):
netdev.bind_driver(driver=driver)
- def setup_vm_env(self, driver='igb_uio'):
+ def setup_vm_env(self, driver='default'):
"""
Create testing environment with VF generated from 1PF
"""
@@ -65,7 +75,7 @@ class Testddp_mpls(TestCase):
self.sriov_vfs_port = self.dut.ports_info[
self.used_dut_port]['vfs_port']
for port in self.sriov_vfs_port:
- port.bind_driver('pci-stub')
+ port.bind_driver(self.vf_driver)
time.sleep(1)
self.dut_testpmd = PmdOutput(self.dut)
time.sleep(1)
@@ -73,7 +83,7 @@ class Testddp_mpls(TestCase):
# set up VM0 ENV
self.vm0 = QEMUKvm(self.dut, 'vm0', 'ddp_mpls')
- self.vm0.set_vm_device(driver='pci-assign', **vf0_prop)
+ self.vm0.set_vm_device(driver=self.vf_assign_method, **vf0_prop)
try:
self.vm0_dut = self.vm0.start()
if self.vm0_dut is None:
--
2.17.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind
2019-06-27 8:10 [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind zhang,yan
@ 2019-06-27 8:26 ` Zhu, WenhuiX
2019-07-03 6:13 ` Tu, Lijuan
1 sibling, 0 replies; 3+ messages in thread
From: Zhu, WenhuiX @ 2019-06-27 8:26 UTC (permalink / raw)
To: Zhang, YanX A, dts; +Cc: Zhang, YanX A
Tested-by: Zhu, WenhuiX <wenhuix.zhu@intel.com>
-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhang,yan
Sent: Thursday, June 27, 2019 4:11 PM
To: dts@dpdk.org
Cc: Zhang, YanX A <yanx.a.zhang@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind
Instead of the original single binding driver,
Signed-off-by: zhang,yan <yanx.a.zhang@intel.com>
---
tests/TestSuite_ddp_mpls.py | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index b002788..599e5cd 100644
--- a/tests/TestSuite_ddp_mpls.py
+++ b/tests/TestSuite_ddp_mpls.py
@@ -16,6 +16,7 @@ PF_MAX_QUEUE = 64
VF_MAX_QUEUE = 4
class Testddp_mpls(TestCase):
+ supported_vf_driver = ['pci-stub', 'vfio-pci']
def set_up_all(self):
self.verify('fortville' in self.nic, @@ -28,6 +29,15 @@ class Testddp_mpls(TestCase):
profile_dst = "/tmp/"
self.dut.session.copy_file_to(profile_file, profile_dst)
+ self.vf_driver = self.get_suite_cfg()['vf_driver']
+ if self.vf_driver is None:
+ self.vf_driver = 'pci-stub'
+ self.verify(self.vf_driver in self.supported_vf_driver, "Unspported vf driver")
+ if self.vf_driver == 'pci-stub':
+ self.vf_assign_method = 'pci-assign'
+ else:
+ self.vf_assign_method = 'vfio-pci'
+ self.dut.send_expect('modprobe vfio-pci', '#')
def set_up(self):
self.setup_vm_env()
@@ -50,7 +60,7 @@ class Testddp_mpls(TestCase):
netdev.bind_driver(driver=driver)
- def setup_vm_env(self, driver='igb_uio'):
+ def setup_vm_env(self, driver='default'):
"""
Create testing environment with VF generated from 1PF
"""
@@ -65,7 +75,7 @@ class Testddp_mpls(TestCase):
self.sriov_vfs_port = self.dut.ports_info[
self.used_dut_port]['vfs_port']
for port in self.sriov_vfs_port:
- port.bind_driver('pci-stub')
+ port.bind_driver(self.vf_driver)
time.sleep(1)
self.dut_testpmd = PmdOutput(self.dut)
time.sleep(1)
@@ -73,7 +83,7 @@ class Testddp_mpls(TestCase):
# set up VM0 ENV
self.vm0 = QEMUKvm(self.dut, 'vm0', 'ddp_mpls')
- self.vm0.set_vm_device(driver='pci-assign', **vf0_prop)
+ self.vm0.set_vm_device(driver=self.vf_assign_method,
+ **vf0_prop)
try:
self.vm0_dut = self.vm0.start()
if self.vm0_dut is None:
--
2.17.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind
2019-06-27 8:10 [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind zhang,yan
2019-06-27 8:26 ` Zhu, WenhuiX
@ 2019-07-03 6:13 ` Tu, Lijuan
1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-07-03 6:13 UTC (permalink / raw)
To: Zhang, YanX A, dts; +Cc: Zhang, YanX A
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhang,yan
> Sent: Thursday, June 27, 2019 4:11 PM
> To: dts@dpdk.org
> Cc: Zhang, YanX A <yanx.a.zhang@intel.com>
> Subject: [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers
> bind
>
> Instead of the original single binding driver,
>
> Signed-off-by: zhang,yan <yanx.a.zhang@intel.com>
> ---
> tests/TestSuite_ddp_mpls.py | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py
> index b002788..599e5cd 100644
> --- a/tests/TestSuite_ddp_mpls.py
> +++ b/tests/TestSuite_ddp_mpls.py
> @@ -16,6 +16,7 @@ PF_MAX_QUEUE = 64
> VF_MAX_QUEUE = 4
>
> class Testddp_mpls(TestCase):
> + supported_vf_driver = ['pci-stub', 'vfio-pci']
>
> def set_up_all(self):
> self.verify('fortville' in self.nic, @@ -28,6 +29,15 @@ class
> Testddp_mpls(TestCase):
> profile_dst = "/tmp/"
> self.dut.session.copy_file_to(profile_file, profile_dst)
>
> + self.vf_driver = self.get_suite_cfg()['vf_driver']
> + if self.vf_driver is None:
> + self.vf_driver = 'pci-stub'
> + self.verify(self.vf_driver in self.supported_vf_driver, "Unspported vf
> driver")
> + if self.vf_driver == 'pci-stub':
> + self.vf_assign_method = 'pci-assign'
> + else:
> + self.vf_assign_method = 'vfio-pci'
> + self.dut.send_expect('modprobe vfio-pci', '#')
>
> def set_up(self):
> self.setup_vm_env()
> @@ -50,7 +60,7 @@ class Testddp_mpls(TestCase):
> netdev.bind_driver(driver=driver)
>
>
> - def setup_vm_env(self, driver='igb_uio'):
> + def setup_vm_env(self, driver='default'):
> """
> Create testing environment with VF generated from 1PF
> """
> @@ -65,7 +75,7 @@ class Testddp_mpls(TestCase):
> self.sriov_vfs_port = self.dut.ports_info[
> self.used_dut_port]['vfs_port']
> for port in self.sriov_vfs_port:
> - port.bind_driver('pci-stub')
> + port.bind_driver(self.vf_driver)
> time.sleep(1)
> self.dut_testpmd = PmdOutput(self.dut)
> time.sleep(1)
> @@ -73,7 +83,7 @@ class Testddp_mpls(TestCase):
>
> # set up VM0 ENV
> self.vm0 = QEMUKvm(self.dut, 'vm0', 'ddp_mpls')
> - self.vm0.set_vm_device(driver='pci-assign', **vf0_prop)
> + self.vm0.set_vm_device(driver=self.vf_assign_method,
> + **vf0_prop)
> try:
> self.vm0_dut = self.vm0.start()
> if self.vm0_dut is None:
> --
> 2.17.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-03 6:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 8:10 [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind zhang,yan
2019-06-27 8:26 ` Zhu, WenhuiX
2019-07-03 6:13 ` Tu, Lijuan
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).