test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xiao Qimai <qimaix.xiao@intel.com>
To: dts@dpdk.org
Cc: Xiao Qimai <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1]tests/TestSuite_vm_hotplug: optimize test case load vfio-pci in vm
Date: Wed,  1 Jul 2020 15:36:54 +0800	[thread overview]
Message-ID: <1593589014-42912-1-git-send-email-qimaix.xiao@intel.com> (raw)

*. 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


             reply	other threads:[~2020-07-01  7:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  7:36 Xiao Qimai [this message]
2020-07-02  7:17 ` 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=1593589014-42912-1-git-send-email-qimaix.xiao@intel.com \
    --to=qimaix.xiao@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).