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 62934A0518; Fri, 24 Jul 2020 04:29:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4663E1D455; Fri, 24 Jul 2020 04:29:27 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 19B0B1D452 for ; Fri, 24 Jul 2020 04:29:24 +0200 (CEST) IronPort-SDR: Ui7M6Omw54jBpsyPVKF5irS8Bme8JtXUfHMiVRPMooohztjq38eTRDvT3z6xuI9xpXOp9PEv2W 7lxITeUQTFbA== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="150636041" X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="150636041" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 19:29:23 -0700 IronPort-SDR: x/a9EJj3Tzn2rmpKTuD1IRnNZPDk6nbtBocrZ0u8LGgV9Ftm+hWaU6y7GUJxO7auRJsYhscrq5 WGcwG2xCDnaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="311247210" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 23 Jul 2020 19:29:23 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 19:29:23 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 19:29:22 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.22]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.22]) with mapi id 14.03.0439.000; Fri, 24 Jul 2020 10:29:20 +0800 From: "Tu, Lijuan" To: "Xie, WeiX" , "Zhang, XiX" , "dts@dpdk.org" CC: "Zhang, XiX" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_ddp_gtp:modify pf case not start vm Thread-Index: AQHWUOlwQDytby5F5UCcuDRLdgT5Lqj0rIcAgCF2FpA= Date: Fri, 24 Jul 2020 02:29:19 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC84004@SHSMSX101.ccr.corp.intel.com> References: <1593746716-29771-1-git-send-email-xix.zhang@intel.com> <6FD6A7610D20924F885A4ECF34E8AC910462637F@CDSMSX102.ccr.corp.intel.com> In-Reply-To: <6FD6A7610D20924F885A4ECF34E8AC910462637F@CDSMSX102.ccr.corp.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.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/TestSuite_ddp_gtp:modify pf case not start 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" Applied, thanks > -----Original Message----- > From: dts On Behalf Of Xie, WeiX > Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B3=1B$BF|=1B(B 11:30 > To: Zhang, XiX ; dts@dpdk.org > Cc: Zhang, XiX > Subject: Re: [dts] [PATCH V1] tests/TestSuite_ddp_gtp:modify pf case not = start > vm >=20 > Tested-by: Xie,WeiX < weix.xie@intel.com> >=20 > Regards, > Xie Wei >=20 >=20 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xizhan4x > Sent: Friday, July 3, 2020 11:25 AM > To: dts@dpdk.org > Cc: Zhang, XiX > Subject: [dts] [PATCH V1] tests/TestSuite_ddp_gtp:modify pf case not star= t vm >=20 >=20 > modify pf case not start vm env >=20 >=20 > Signed-off-by: xizhan4x > --- > tests/TestSuite_ddp_gtp.py | 61 +++++++++++++++++++++++++++++++++-------= - > ----- > 1 file changed, 44 insertions(+), 17 deletions(-) >=20 > diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py inde= x > e7aa96e..972c401 100644 > --- a/tests/TestSuite_ddp_gtp.py > +++ b/tests/TestSuite_ddp_gtp.py > @@ -43,10 +43,39 @@ class TestDdpGtp(TestCase): > else: > self.vf_assign_method =3D 'vfio-pci' > self.dut.send_expect('modprobe vfio-pci', '#') > + def insmod_modprobe(self,modename=3D''): > + """ > + Insmod modProbe before run test case > + """ > + if modename =3D=3D "igb_uio": > + self.dut.send_expect("modprobe uio", "#", 10) > + out =3D self.dut.send_expect("lsmod | grep igb_uio", "#") > + if "igb_uio" in out: > + self.dut.send_expect("rmmod -f igb_uio", "#", 10) > + self.dut.send_expect("insmod ./" + self.target + > + "/kmod/igb_uio.ko", "#", 10) > + > + out =3D self.dut.send_expect("lsmod | grep igb_uio", "#") > + assert ("igb_uio" in out), "Failed to insmod igb_uio" >=20 > def set_up(self): > - self.setup_vm_env() > - self.load_profile() > + self.dut_testpmd =3D PmdOutput(self.dut) > + self.used_dut_port =3D self.dut_ports[0] > + tester_port =3D self.tester.get_local_port(self.used_dut_port) > + self.tester_intf =3D self.tester.get_interface(tester_port) > + if "vf" in self._suite_result.test_case: > + self.insmod_modprobe("igb_uio") > + self.bind_nic_driver(self.dut_ports,"igb_uio") > + self.setup_vm_env() > + self.load_profile() > + self.vm0_testpmd.start_testpmd( > + VM_CORES_MASK, "--port-topology=3Dchained --txq=3D%s --r= xq=3D%s" > + % (self.VF_QUEUE, self.VF_QUEUE)) > + self.vm0_testpmd.execute_cmd('set fwd rxonly') > + self.vm0_testpmd.execute_cmd('set verbose 1') > + self.vm0_testpmd.execute_cmd('start') > + else: > + self.load_profile() > + >=20 > def search_queue_number(self, Q_strip): > """ > @@ -91,10 +120,6 @@ class TestDdpGtp(TestCase): > Create testing environment with VF generated from 1PF > """ > if self.env_done is False: > - self.bind_nic_driver(self.dut_ports[:1], driver=3D"igb_uio") > - self.used_dut_port =3D self.dut_ports[0] > - tester_port =3D self.tester.get_local_port(self.used_dut_por= t) > - self.tester_intf =3D self.tester.get_interface(tester_port) > self.dut.generate_sriov_vfs_by_port( > self.used_dut_port, 1, driver=3Ddriver) > self.sriov_vfs_port =3D self.dut.ports_info[ @@ -102,8 +127,= 6 @@ class > TestDdpGtp(TestCase): > for port in self.sriov_vfs_port: > port.bind_driver(self.vf_driver) > time.sleep(1) > - self.dut_testpmd =3D PmdOutput(self.dut) > - time.sleep(1) > vf0_prop =3D {'opt_host': self.sriov_vfs_port[0].pci} > # set up VM0 ENV > self.vm0 =3D QEMUKvm(self.dut, 'vm0', 'ddp_gtp') @@ -119,6 += 142,7 @@ > class TestDdpGtp(TestCase): > self.vm0_testpmd =3D PmdOutput(self.vm0_dut) > self.env_done =3D True >=20 > + > def destroy_vm_env(self): >=20 > if getattr(self, 'vm0', None): > @@ -146,9 +170,7 @@ class TestDdpGtp(TestCase): > "Default", "--pkt-filter-mode=3Dperfect --port-topology=3Dch= ained \ > --txq=3D%s --rxq=3D%s" > % (self.PF_QUEUE, self.PF_QUEUE)) > - self.vm0_testpmd.start_testpmd( > - VM_CORES_MASK, "--port-topology=3Dchained --txq=3D%s --rxq= =3D%s" > - % (self.VF_QUEUE, self.VF_QUEUE)) > + > self.dut_testpmd.execute_cmd('port stop all') > time.sleep(1) > out =3D self.dut_testpmd.execute_cmd('ddp get list 0') @@ -161,9= +183,9 > @@ class TestDdpGtp(TestCase): > self.dut_testpmd.execute_cmd('set fwd rxonly') > self.dut_testpmd.execute_cmd('set verbose 1') > self.dut_testpmd.execute_cmd('start') > - self.vm0_testpmd.execute_cmd('set fwd rxonly') > - self.vm0_testpmd.execute_cmd('set verbose 1') > - self.vm0_testpmd.execute_cmd('start') > + time.sleep(2) > + > + >=20 > def gtp_packets( > self, type=3D'fdir', tunnel_pkt=3D'gtpu', inner_L3=3D'ipv4',= @@ -409,7 +431,10 > @@ class TestDdpGtp(TestCase): > type=3D'clfter', port=3D'vf id 0', tunnel_pkt=3D'gtpu', inne= r_L3=3D'ipv6') >=20 > def tear_down(self): > - self.vm0_testpmd.execute_cmd('stop') > + if "vf" in self._suite_result.test_case: > + self.destroy_vm_env() > + self.vm0_testpmd.execute_cmd('stop') > + self.vm0_testpmd.quit() > self.dut_testpmd.execute_cmd('stop') > out =3D self.dut_testpmd.execute_cmd('ddp get list 0') > if "Profile number is: 0" not in out: > @@ -420,8 +445,10 @@ class TestDdpGtp(TestCase): > self.verify("Profile number is: 0" in out, > "Failed to delete ddp profile!!!") > self.dut_testpmd.execute_cmd('port start all') > - self.vm0_testpmd.quit() > self.dut_testpmd.quit() >=20 > + > def tear_down_all(self): > - self.destroy_vm_env() > + if self.env_done: > + self.destroy_vm_env() > + > -- > 1.8.3.1