From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id F1F342934 for ; Wed, 23 Nov 2016 06:02:47 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 22 Nov 2016 21:02:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,684,1473145200"; d="scan'208";a="789766118" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 22 Nov 2016 21:02:46 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 22 Nov 2016 21:02:46 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 22 Nov 2016 21:02:45 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.96]) by shsmsx102.ccr.corp.intel.com ([169.254.2.239]) with mapi id 14.03.0248.002; Wed, 23 Nov 2016 13:02:42 +0800 From: "Liu, Yong" To: "Tu, LijuanX A" , "dts@dpdk.org" CC: "Tu, LijuanX A" Thread-Topic: [dts] [PATCH v2]vf_packet_rxtx: optimize test case Thread-Index: AQHSRIcWiQfpuBE/D0uD1BB7CzCZ/qDmBIJA Date: Wed, 23 Nov 2016 05:02:41 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6032E9A9@SHSMSX103.ccr.corp.intel.com> References: <1479795052-9133-1-git-send-email-lijuanx.a.tu@intel.com> In-Reply-To: <1479795052-9133-1-git-send-email-lijuanx.a.tu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjdmM2RiYTEtY2NiNS00YjhhLWJjYTUtMGM2ZjQxNGFhOThlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjZ2cDBjTE5PUFFnU0hRMFRzQW9ZK3pWbEZqY1hGZHJUQVZ1U2F6Z1ZtbmM9In0= x-ctpclassification: CTP_IC 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 v2]vf_packet_rxtx: optimize test case 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: , X-List-Received-Date: Wed, 23 Nov 2016 05:02:48 -0000 Thanks, applied. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu > Sent: Tuesday, November 22, 2016 2:11 PM > To: dts@dpdk.org > Cc: Tu, LijuanX A > Subject: [dts] [PATCH v2]vf_packet_rxtx: optimize test case >=20 > 1,all nic should enable vf crc-strip ,not just forville, > because of HW not support > Refer: http://dpdk.org/dev/patchwork/patch/16980/ > 2, enable pf(igb_uio) crc-strip (DPDK-1755) > To make share pf & vf behavior the same > 3, fix grammatical & logic error >=20 > Signed-off-by: Lijuan Tu > --- > tests/TestSuite_vf_packet_rxtx.py | 47 ++++++++++++++++-----------------= - > ----- > 1 file changed, 19 insertions(+), 28 deletions(-) >=20 > diff --git a/tests/TestSuite_vf_packet_rxtx.py > b/tests/TestSuite_vf_packet_rxtx.py > index 25b03eb..62d3a3c 100644 > --- a/tests/TestSuite_vf_packet_rxtx.py > +++ b/tests/TestSuite_vf_packet_rxtx.py > @@ -46,12 +46,13 @@ class TestVfPacketRxtx(TestCase): > vf0_prop =3D {'opt_host': self.sriov_vfs_port_0[0].pci} > vf1_prop =3D {'opt_host': self.sriov_vfs_port_1[0].pci} >=20 > + > if driver =3D=3D 'igb_uio': > # start testpmd without the two VFs on the host > self.host_testpmd =3D PmdOutput(self.dut) > eal_param =3D '-b %(vf0)s -b %(vf1)s' % {'vf0': > self.sriov_vfs_port_0[0].pci, > 'vf1': > self.sriov_vfs_port_1[0].pci} > - self.host_testpmd.start_testpmd("1S/2C/2T", > eal_param=3Deal_param) > + self.host_testpmd.start_testpmd("1S/2C/2T", "--crc-strip= ", > eal_param=3Deal_param) >=20 > # set up VM0 ENV > self.vm0 =3D QEMUKvm(self.dut, 'vm0', 'vf_packet_rxtx') > @@ -69,9 +70,10 @@ class TestVfPacketRxtx(TestCase): > def destroy_2pf_2vf_1vm_env(self): > if getattr(self, 'vm0', None): > #destroy testpmd in vm0 > - self.vm0_testpmd.execute_cmd('stop') > - self.vm0_testpmd.execute_cmd('quit', '# ') > - self.vm0_testpmd =3D None > + if getattr(self, 'vm0_testpmd', None): > + self.vm0_testpmd.execute_cmd('stop') > + self.vm0_testpmd.execute_cmd('quit', '# ') > + self.vm0_testpmd =3D None > self.vm0_dut_ports =3D None > #destroy vm0 > self.vm0.stop() > @@ -81,13 +83,13 @@ class TestVfPacketRxtx(TestCase): > self.host_testpmd.execute_cmd('quit', '# ') > self.host_testpmd =3D None >=20 > - if getattr(self, 'used_dut_port_0', None): > + if getattr(self, 'used_dut_port_0', None) !=3D None: > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_0) > port =3D self.dut.ports_info[self.used_dut_port_0]['port'] > port.bind_driver() > self.used_dut_port_0 =3D None >=20 > - if getattr(self, 'used_dut_port_1', None): > + if getattr(self, 'used_dut_port_1', None) !=3D None: > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_1) > port =3D self.dut.ports_info[self.used_dut_port_1]['port'] > port.bind_driver() > @@ -110,14 +112,7 @@ class TestVfPacketRxtx(TestCase): > self.vm0_dut_ports =3D self.vm_dut_0.get_ports('any') > port_id_0 =3D 0 > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) > - if self.kdriver =3D=3D "i40e": > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') > - else: > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK) > - self.vm0_testpmd.execute_cmd('port stop all') > - self.vm0_testpmd.execute_cmd('port config all crc-strip on') > - self.vm0_testpmd.execute_cmd('port start all') > - self.vm0_testpmd.execute_cmd('show port info all') > + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') > pmd_vf0_mac =3D self.vm0_testpmd.get_port_mac(port_id_0) > self.vm0_testpmd.execute_cmd('set fwd mac') > self.vm0_testpmd.execute_cmd('start') > @@ -199,8 +194,9 @@ class TestVfPacketRxtx(TestCase): >=20 > def destroy_3vf_2vm_env(self): > if getattr(self, 'vm0', None): > - self.vm0_testpmd.execute_cmd('stop') > - self.vm0_testpmd.execute_cmd('quit', '# ') > + if getattr(self, 'vm0_testpmd', None): > + self.vm0_testpmd.execute_cmd('stop') > + self.vm0_testpmd.execute_cmd('quit', '# ') > self.vm0_testpmd =3D None > self.vm0_dut_ports =3D None > self.vm_dut_0 =3D None > @@ -208,19 +204,20 @@ class TestVfPacketRxtx(TestCase): > self.vm0 =3D None >=20 > if getattr(self, 'vm1', None): > - self.vm1_testpmd.execute_cmd('stop') > - self.vm1_testpmd.execute_cmd('quit', '# ') > + if getattr(self, 'vm1_testpmd', None): > + self.vm1_testpmd.execute_cmd('stop') > + self.vm1_testpmd.execute_cmd('quit', '# ') > self.vm1_testpmd =3D None > self.vm1_dut_ports =3D None > self.vm_dut_1 =3D None > self.vm1.stop() > self.vm1 =3D None >=20 > - if getattr(self, 'host_testpmd', None): > + if getattr(self, 'host_testpmd', None) !=3D None: > self.host_testpmd.execute_cmd('quit', '# ') > self.host_testpmd =3D None >=20 > - if getattr(self, 'used_dut_port', None): > + if getattr(self, 'used_dut_port', None) !=3D None: > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port) > port =3D self.dut.ports_info[self.used_dut_port]['port'] > port.bind_driver() > @@ -243,10 +240,7 @@ class TestVfPacketRxtx(TestCase): > port_id_1 =3D 1 >=20 > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) > - if self.kdriver =3D=3D "i40e": > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') > - else: > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK) > + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') > self.vm0_testpmd.execute_cmd('show port info all') > pmd0_vf0_mac =3D self.vm0_testpmd.get_port_mac(port_id_0) > self.vm0_testpmd.execute_cmd('set fwd mac') > @@ -255,10 +249,7 @@ class TestVfPacketRxtx(TestCase): > time.sleep(2) >=20 > self.vm1_testpmd =3D PmdOutput(self.vm_dut_1) > - if self.kdriver =3D=3D "i40e": > - self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') > - else: > - self.vm1_testpmd.start_testpmd(VM_CORES_MASK) > + self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') > self.vm1_testpmd.execute_cmd('show port info all') >=20 > tx_port =3D self.tester.get_local_port(self.dut_ports[0]) > -- > 1.9.3