test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1]tests/TestSuite_vm_hotplug: optimize test case load vfio-pci in vm
@ 2020-07-01  7:36 Xiao Qimai
  2020-07-02  7:17 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Qimai @ 2020-07-01  7:36 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

*. vfio-pci has been loaded by default in framework

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_vm_hotplug.py | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/tests/TestSuite_vm_hotplug.py b/tests/TestSuite_vm_hotplug.py
index 45cfc89..2dfd835 100644
--- a/tests/TestSuite_vm_hotplug.py
+++ b/tests/TestSuite_vm_hotplug.py
@@ -96,18 +96,6 @@ class TestVmHotplug(TestCase):
         self.vm0_dut = self.connect_vm()
         self.verify(self.vm0_dut is not None, 'vm start fail')
         self.setup_pf_1vm_env_flag = 1
-        # load vfio
-        self.vm0_dut.send_expect('modprobe -r vfio_iommu_type1', '#')
-        self.vm0_dut.send_expect('modprobe -r vfio', '#')
-        self.vm0_dut.send_expect('modprobe vfio enable_unsafe_noiommu_mode=1', '#')
-        self.vm0_dut.send_expect('modprobe vfio-pci', '#')
-        # bind device to vfio
-        netdev = self.vm0_dut.ports_info[0]['port']
-        netdev.bind_driver(driver='vfio-pci')
-        if device == 2:
-            netdev = self.vm0_dut.ports_info[1]['port']
-            netdev.bind_driver(driver='vfio-pci')
-
         self.vm_session = self.vm0_dut.new_session(suite="vm_session")
         self.vf_pci0 = self.vm0_dut.ports_info[0]['pci']
         if device == 2:
@@ -119,7 +107,8 @@ class TestVmHotplug(TestCase):
         self.vm0 = QEMUKvm(self.dut, 'vm0', 'vm_hotplug')
         self.vm0.net_type = 'hostfwd'
         self.vm0.hostfwd_addr = '%s:6000' % self.dut.get_ip_address()
-        self.vm0.def_driver = 'igb_uio'
+        self.vm0.def_driver = 'vfio-pci'
+        self.vm0.driver_mode = 'noiommu'
         self.wait_vm_net_ready()
         vm_dut = self.vm0.instantiate_vm_dut(autodetect_topo=False)
         if vm_dut:
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1]tests/TestSuite_vm_hotplug: optimize test case load vfio-pci in vm
  2020-07-01  7:36 [dts] [PATCH V1]tests/TestSuite_vm_hotplug: optimize test case load vfio-pci in vm Xiao Qimai
@ 2020-07-02  7:17 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-07-02  7:17 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Applied, thanks

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xiao Qimai
> Sent: 2020年7月1日 15:37
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]tests/TestSuite_vm_hotplug: optimize test case load
> vfio-pci in vm
> 
> *. vfio-pci has been loaded by default in framework
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_vm_hotplug.py | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/TestSuite_vm_hotplug.py b/tests/TestSuite_vm_hotplug.py
> index 45cfc89..2dfd835 100644
> --- a/tests/TestSuite_vm_hotplug.py
> +++ b/tests/TestSuite_vm_hotplug.py
> @@ -96,18 +96,6 @@ class TestVmHotplug(TestCase):
>          self.vm0_dut = self.connect_vm()
>          self.verify(self.vm0_dut is not None, 'vm start fail')
>          self.setup_pf_1vm_env_flag = 1
> -        # load vfio
> -        self.vm0_dut.send_expect('modprobe -r vfio_iommu_type1', '#')
> -        self.vm0_dut.send_expect('modprobe -r vfio', '#')
> -        self.vm0_dut.send_expect('modprobe vfio
> enable_unsafe_noiommu_mode=1', '#')
> -        self.vm0_dut.send_expect('modprobe vfio-pci', '#')
> -        # bind device to vfio
> -        netdev = self.vm0_dut.ports_info[0]['port']
> -        netdev.bind_driver(driver='vfio-pci')
> -        if device == 2:
> -            netdev = self.vm0_dut.ports_info[1]['port']
> -            netdev.bind_driver(driver='vfio-pci')
> -
>          self.vm_session = self.vm0_dut.new_session(suite="vm_session")
>          self.vf_pci0 = self.vm0_dut.ports_info[0]['pci']
>          if device == 2:
> @@ -119,7 +107,8 @@ class TestVmHotplug(TestCase):
>          self.vm0 = QEMUKvm(self.dut, 'vm0', 'vm_hotplug')
>          self.vm0.net_type = 'hostfwd'
>          self.vm0.hostfwd_addr = '%s:6000' % self.dut.get_ip_address()
> -        self.vm0.def_driver = 'igb_uio'
> +        self.vm0.def_driver = 'vfio-pci'
> +        self.vm0.driver_mode = 'noiommu'
>          self.wait_vm_net_ready()
>          vm_dut = self.vm0.instantiate_vm_dut(autodetect_topo=False)
>          if vm_dut:
> --
> 1.8.3.1


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

end of thread, other threads:[~2020-07-02  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  7:36 [dts] [PATCH V1]tests/TestSuite_vm_hotplug: optimize test case load vfio-pci in vm Xiao Qimai
2020-07-02  7:17 ` 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).