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 BA2EBA046B for ; Thu, 27 Jun 2019 10:26:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2B2E1E25; Thu, 27 Jun 2019 10:26:15 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D66A31E20 for ; Thu, 27 Jun 2019 10:26:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 01:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,423,1557212400"; d="scan'208";a="313718364" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 27 Jun 2019 01:26:13 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 27 Jun 2019 01:26:13 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 27 Jun 2019 01:26:12 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.33]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.89]) with mapi id 14.03.0439.000; Thu, 27 Jun 2019 16:26:11 +0800 From: "Zhu, WenhuiX" To: "Zhang, YanX A" , "dts@dpdk.org" CC: "Zhang, YanX A" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind Thread-Index: AQHVLL86joRadDzXe0mLVF1409ybx6avKlUQ Date: Thu, 27 Jun 2019 08:26:10 +0000 Message-ID: References: <1561623057-83510-1-git-send-email-yanx.a.zhang@intel.com> In-Reply-To: <1561623057-83510-1-git-send-email-yanx.a.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way drivers bind 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" Tested-by: Zhu, WenhuiX -----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 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 --- 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 inde= x b002788..599e5cd 100644 --- a/tests/TestSuite_ddp_mpls.py +++ b/tests/TestSuite_ddp_mpls.py @@ -16,6 +16,7 @@ PF_MAX_QUEUE =3D 64 VF_MAX_QUEUE =3D 4 =20 class Testddp_mpls(TestCase): + supported_vf_driver =3D ['pci-stub', 'vfio-pci'] =20 def set_up_all(self): self.verify('fortville' in self.nic, @@ -28,6 +29,15 @@ class Test= ddp_mpls(TestCase): profile_dst =3D "/tmp/" self.dut.session.copy_file_to(profile_file, profile_dst) =20 + self.vf_driver =3D self.get_suite_cfg()['vf_driver'] + if self.vf_driver is None: + self.vf_driver =3D 'pci-stub' + self.verify(self.vf_driver in self.supported_vf_driver, "Unspporte= d vf driver") + if self.vf_driver =3D=3D 'pci-stub': + self.vf_assign_method =3D 'pci-assign' + else: + self.vf_assign_method =3D 'vfio-pci' + self.dut.send_expect('modprobe vfio-pci', '#') =20 def set_up(self): self.setup_vm_env() @@ -50,7 +60,7 @@ class Testddp_mpls(TestCase): netdev.bind_driver(driver=3Ddriver) =20 =20 - def setup_vm_env(self, driver=3D'igb_uio'): + def setup_vm_env(self, driver=3D'default'): """ Create testing environment with VF generated from 1PF """ @@ -65,7 +75,7 @@ class Testddp_mpls(TestCase): self.sriov_vfs_port =3D 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 =3D PmdOutput(self.dut) time.sleep(1) @@ -73,7 +83,7 @@ class Testddp_mpls(TestCase): =20 # set up VM0 ENV self.vm0 =3D QEMUKvm(self.dut, 'vm0', 'ddp_mpls') - self.vm0.set_vm_device(driver=3D'pci-assign', **vf0_prop) + self.vm0.set_vm_device(driver=3Dself.vf_assign_method,=20 + **vf0_prop) try: self.vm0_dut =3D self.vm0.start() if self.vm0_dut is None: -- 2.17.2