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 085A0A0540; Mon, 20 Jul 2020 08:55:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F13B21BEE4; Mon, 20 Jul 2020 08:55:27 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 3A1351BEBF for ; Mon, 20 Jul 2020 08:55:26 +0200 (CEST) IronPort-SDR: b4xdJ4y01NG11B/VIiZn1WEa/Attaj/VO5uLPaneMOhZH0esnunO9HcVMywcnjxVrAC8yygK9s eo0R/N4GLcEQ== X-IronPort-AV: E=McAfee;i="6000,8403,9687"; a="214546464" X-IronPort-AV: E=Sophos;i="5.75,374,1589266800"; d="scan'208";a="214546464" 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/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2020 23:55:24 -0700 IronPort-SDR: NxnvDlZiELl5+vRFp2gQ9TprNpqv9Sz8AOM1FWkui2uTTZBBR3I2YL6LJYQo1VobgWO1EpiChQ Qt7ooxltx/Zg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,374,1589266800"; d="scan'208";a="431513085" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 19 Jul 2020 23:55:23 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 19 Jul 2020 23:55:23 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.22]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.49]) with mapi id 14.03.0439.000; Mon, 20 Jul 2020 14:55:20 +0800 From: "Tu, Lijuan" To: "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: AQHWUOlwQDytby5F5UCcuDRLdgT5LqkQI6GQ Date: Mon, 20 Jul 2020 06:55:20 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC82132@SHSMSX101.ccr.corp.intel.com> References: <1593746716-29771-1-git-send-email-xix.zhang@intel.com> In-Reply-To: <1593746716-29771-1-git-send-email-xix.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.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 xizhan4x > Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B3=1B$BF|=1B(B 11:25 > 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