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 3DF11A0487 for ; Wed, 3 Jul 2019 08:13:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32B7844C3; Wed, 3 Jul 2019 08:13:51 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8F0002B99 for ; Wed, 3 Jul 2019 08:13:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 23:13:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="154654765" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 02 Jul 2019 23:13:47 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jul 2019 23:13:44 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 2 Jul 2019 23:13:44 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 2 Jul 2019 23:13:43 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.232]) with mapi id 14.03.0439.000; Wed, 3 Jul 2019 14:13:42 +0800 From: "Tu, Lijuan" 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: AQHVLL86dQb077k8zEqUMo/me4W0yKa4c2ig Date: Wed, 3 Jul 2019 06:13:42 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BADA444@SHSMSX101.ccr.corp.intel.com> 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: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjMwMGVlYjQtOGU3My00NWQ5LWFmYTMtOTQwOTYzZTU0NTljIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaXFVNzAwQlhcL2FZa2FJWFlOZ2YwT3lEWitRUVVLS1M1YndkNjRBQU13SXcwNmlUQThEWkNWY01YSlFucHQydysifQ== 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" 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 > Subject: [dts] [PATCH V1] tests/TestSuite_ddp_mpls:Improve the way driver= s > bind >=20 > Instead of the original single binding driver, >=20 > Signed-off-by: zhang,yan > --- > tests/TestSuite_ddp_mpls.py | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) >=20 > 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 =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 > Testddp_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, "Unsppor= ted 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, > + **vf0_prop) > try: > self.vm0_dut =3D self.vm0.start() > if self.vm0_dut is None: > -- > 2.17.2