From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17A66A0350; Wed, 1 Jul 2020 09:45:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F34721C1B1; Wed, 1 Jul 2020 09:45:17 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9263A1C1B1 for ; Wed, 1 Jul 2020 09:45:15 +0200 (CEST) IronPort-SDR: 4CtYABypfe11bWHMx9R1fPXtL4aqtAEQNjFEYKmC5ghbEMTDkqXlb933A8P0ugoY8u/shKlk0k LY6LqJOBSNIQ== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="148056976" X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="148056976" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 00:45:15 -0700 IronPort-SDR: SxsirWozIxnNgsas/jfjnrqoeazyAKQy7D9wg1JABOkOi/3fade4+uOl+Nsej2Ih9/+WHgL0qH yV53SYqYQwPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="295477184" Received: from unknown (HELO xqm-virtio_tester.localdomain) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 01 Jul 2020 00:45:14 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Wed, 1 Jul 2020 15:36:54 +0800 Message-Id: <1593589014-42912-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1]tests/TestSuite_vm_hotplug: optimize test case load vfio-pci in vm X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *. vfio-pci has been loaded by default in framework Signed-off-by: Xiao Qimai --- 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