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 18670A00E6 for ; Tue, 6 Aug 2019 11:26:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08C211BDE1; Tue, 6 Aug 2019 11:26:07 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6428C1BDF7 for ; Tue, 6 Aug 2019 11:26:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2019 02:26:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,353,1559545200"; d="scan'208";a="349371650" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 06 Aug 2019 02:26:04 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 02:26:03 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.215]) with mapi id 14.03.0439.000; Tue, 6 Aug 2019 17:26:01 +0800 From: "Tu, Lijuan" To: "Mei, JianweiX" , "dts@dpdk.org" CC: "Mei, JianweiX" Thread-Topic: [dts] [PATCH V1] tests/runtime_vf_queue_number:use default core list Thread-Index: AQHVOrJm+PQO0+ifSkeajFAFCOdp8Kbt/H9A Date: Tue, 6 Aug 2019 09:26:01 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAFD3B3@SHSMSX101.ccr.corp.intel.com> References: <1563188342-201320-1-git-send-email-jianweix.mei@intel.com> In-Reply-To: <1563188342-201320-1-git-send-email-jianweix.mei@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2RmYTg4MmItZjJmMC00OGJlLTljYjItNTg3YjIzNDUyYWRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYjVPWXI4bUtrS2Q5Q3lUZDFLZjlFdk5RTWZUWkpHMFNnVkEwckhkMXkxbE9XSElBNzNLTzNGZ1RMY0JcL1FcL1RMIn0= 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/runtime_vf_queue_number:use default core list 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 Jianwei Mei > Sent: Monday, July 15, 2019 6:59 PM > To: dts@dpdk.org > Cc: Mei, JianweiX > Subject: [dts] [PATCH V1] tests/runtime_vf_queue_number:use default core > list >=20 > use default core list to instead of VM_CORES_MASK =3D 'all' and update co= de > defect of test case test_reserve_valid_vf_qn. >=20 >=20 > Signed-off-by: Jianwei Mei > --- > tests/TestSuite_runtime_vf_queue_number.py | 31 +++++++++++++++--------- > ------ > 1 file changed, 16 insertions(+), 15 deletions(-) >=20 > diff --git a/tests/TestSuite_runtime_vf_queue_number.py > b/tests/TestSuite_runtime_vf_queue_number.py > index e825556..69d22fd 100644 > --- a/tests/TestSuite_runtime_vf_queue_number.py > +++ b/tests/TestSuite_runtime_vf_queue_number.py > @@ -40,8 +40,6 @@ from qemu_kvm import QEMUKvm from test_case > import TestCase from pmd_output import PmdOutput >=20 > -VM_CORES_MASK =3D 'all' > - > class TestRuntimeVfQn(TestCase): > supported_vf_driver =3D ['pci-stub', 'vfio-pci'] > def set_up_all(self): > @@ -54,6 +52,7 @@ class TestRuntimeVfQn(TestCase): > self.pf_pci =3D self.dut.ports_info[self.dut_ports[0]]['pci'] > self.used_dut_port =3D self.dut_ports[0] > self.vf_mac =3D "00:11:22:33:44:55" > + self.pmdout =3D PmdOutput(self.dut) >=20 > def set_up(self): > self.dut.kill_all() > @@ -222,14 +221,15 @@ class TestRuntimeVfQn(TestCase): > valid_qn =3D (2, 4, 8,) > for qn in valid_qn: > host_eal_param =3D '-w %s,queue-num-per-vf=3D%d --file-prefi= x=3Dtest1 -- > socket-mem 1024,1024' % (self.pf_pci, qn) > - self.host_testpmd.start_testpmd(VM_CORES_MASK, param=3D'', > eal_param=3Dhost_eal_param) > + self.host_testpmd.start_testpmd(self.pmdout.default_cores, > + param=3D'', eal_param=3Dhost_eal_param) >=20 > gest_eal_param =3D '-w %s --file-prefix=3Dtest2' % > self.vm_dut_0.ports_info[0]['pci'] > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, > eal_param=3Dgest_eal_param, param=3D'') > + self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, > + eal_param=3Dgest_eal_param, param=3D'') > guest_cmds =3D self.testpmd_config_cmd_list(qn) > self.execute_testpmd_cmd(guest_cmds) > outstring =3D self.vm0_testpmd.execute_cmd("start", "testpmd= > ") > + self.logger.info(outstring) > self.verify("port 0: RX queue number: %d Tx queue number: %d= " % > (qn, qn) in outstring, "The RX/TX queue number error.") > self.vm0_dut_ports =3D self.vm_dut_0.get_ports('any') > self.vf_mac =3D self.vm0_testpmd.get_port_mac(self.vm0_dut_p= orts[0]) > @@ -239,13 +239,14 @@ class TestRuntimeVfQn(TestCase): > guest_cmds1 =3D self.testpmd_config_cmd_list(qn + 1) > self.execute_testpmd_cmd(guest_cmds1) > outstring2 =3D self.vm0_testpmd.execute_cmd("start", "testpm= d> ") > - time.sleep(2) > + self.logger.info(outstring2) > self.verify("port 0: RX queue number: %d Tx queue number: %d= " % > ((qn + 1), (qn + 1)) in outstring2, "The RX/TX queue number error.") > self.send_packet(self.vf_mac, self.src_intf, 254) > outstring3 =3D self.vm0_testpmd.execute_cmd("stop", "testpmd= > ") > - time.sleep(2) > + self.logger.info(outstring3) > self.verify_queue_number(outstring3, qn + 1, 254) > self.vm0_testpmd.execute_cmd('quit', '# ') > + self.dut.send_expect("quit", "# ") >=20 > def test_reserve_invalid_vf_qn(self): > """ > @@ -254,7 +255,7 @@ class TestRuntimeVfQn(TestCase): > """ > for invalid_qn in (0, 3, 5, 6, 7, 9, 11, 15, 17, 25,): > eal_param =3D '-w %s,queue-num-per-vf=3D%d --file-prefix=3Dt= est1 --socket- > mem 1024,1024' % (self.pf_pci, invalid_qn) > - testpmd_out =3D self.host_testpmd.start_testpmd(VM_CORES_MAS= K, > param=3D'', eal_param=3Deal_param) > + testpmd_out =3D > + self.host_testpmd.start_testpmd(self.pmdout.default_cores, param=3D'', > + eal_param=3Deal_param) > self.verify("it must be power of 2 and equal or less than 16= " in > testpmd_out, "there is no 'Wrong VF queue number =3D 0' logs.") > self.dut.send_expect("quit", "# ") >=20 > @@ -264,20 +265,20 @@ class TestRuntimeVfQn(TestCase): > :return: > """ > host_eal_param =3D '-w %s --file-prefix=3Dtest1 --socket-mem 102= 4,1024' % > self.pf_pci > - self.host_testpmd.start_testpmd(VM_CORES_MASK, param=3D'', > eal_param=3Dhost_eal_param) > + self.host_testpmd.start_testpmd(self.pmdout.default_cores, > + param=3D'', eal_param=3Dhost_eal_param) >=20 > gest_eal_param =3D '-w %s --file-prefix=3Dtest2' % > self.vm_dut_0.ports_info[0]['pci'] > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) > for valid_qn in range(1, 17): > if valid_qn =3D=3D 1: > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, > eal_param=3Dgest_eal_param, param=3D' --rxq=3D1 --txq=3D1') > + > + self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, > + eal_param=3Dgest_eal_param, param=3D' --rxq=3D1 --txq=3D1') > self.vm0_testpmd.execute_cmd('set verbose 1') > self.vm0_testpmd.execute_cmd("set promisc all off", "tes= tpmd> ") > self.vm0_testpmd.execute_cmd("set fwd mac", "testpmd> ") > self.verify_result(valid_qn, 500) > self.vm0_testpmd.execute_cmd('quit', '# ') > else: > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, > eal_param=3Dgest_eal_param, > + > + self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, > + eal_param=3Dgest_eal_param, > param=3D' --rxq=3D%d --tx= q=3D%d' % (valid_qn, > valid_qn)) > self.vm0_testpmd.execute_cmd("set promisc all off", "tes= tpmd> ") > self.vm0_testpmd.execute_cmd("set fwd mac", "testpmd> ")= @@ - > 290,7 +291,7 @@ class TestRuntimeVfQn(TestCase): > :return: > """ > host_eal_param =3D '-w %s --file-prefix=3Dtest1 --socket-mem 102= 4,1024' % > self.pf_pci > - self.host_testpmd.start_testpmd(VM_CORES_MASK, param=3D'', > eal_param=3Dhost_eal_param) > + self.host_testpmd.start_testpmd(self.pmdout.default_cores, > + param=3D'', eal_param=3Dhost_eal_param) > gest_eal_param =3D '-w %s --file-prefix=3Dtest2' % > self.vm_dut_0.ports_info[0]['pci'] > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) >=20 > @@ -311,11 +312,11 @@ class TestRuntimeVfQn(TestCase): > :return: > """ > host_eal_param =3D '-w %s --file-prefix=3Dtest1 --socket-mem 102= 4,1024' % > self.pf_pci > - self.host_testpmd.start_testpmd(VM_CORES_MASK, param=3D'', > eal_param=3Dhost_eal_param) > + self.host_testpmd.start_testpmd(self.pmdout.default_cores, > + param=3D'', eal_param=3Dhost_eal_param) >=20 > gest_eal_param =3D '-w %s --file-prefix=3Dtest2' % > self.vm_dut_0.ports_info[0]['pci'] > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, > eal_param=3Dgest_eal_param, param=3D'') > + self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, > + eal_param=3Dgest_eal_param, param=3D'') > for valid_qn in range(1, 17): > if valid_qn =3D=3D 1: > guest_cmds =3D self.testpmd_config_cmd_list(1) @@ -346,7= +347,7 > @@ class TestRuntimeVfQn(TestCase): > :return: > """ > host_eal_param =3D '-w %s,queue-num-per-vf=3D2 --file-prefix=3Dt= est1 -- > socket-mem 1024,1024' % self.pf_pci > - self.host_testpmd.start_testpmd(VM_CORES_MASK, param=3D'', > eal_param=3Dhost_eal_param) > + self.host_testpmd.start_testpmd(self.pmdout.default_cores, > + param=3D'', eal_param=3Dhost_eal_param) > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) > self.vm0_testpmd.execute_cmd("./usertools/dpdk-devbind.py -b > i40evf %s" % self.vm_dut_0.ports_info[0]['pci'], expected=3D'# ') > # wait few seconds for link ready @@ -372,4 +373,4 @@ class > TestRuntimeVfQn(TestCase): > def tear_down_all(self): > self.destroy_vm_env() > for port_id in self.dut_ports: > - self.dut.destroy_sriov_vfs_by_port(port_id) > \ No newline at end of file > + self.dut.destroy_sriov_vfs_by_port(port_id) > -- > 1.8.3.1