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 DE1E1A0352; Wed, 6 May 2020 05:14:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D51F61D642; Wed, 6 May 2020 05:14:45 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 462AF1D5E5 for ; Wed, 6 May 2020 05:14:43 +0200 (CEST) IronPort-SDR: 7gq/JF32AvtDN4YYccr/YaBOuvv39j9Sjj4uO1d9/RP24JnOCexo4DkuJ11y0+Hae+Es5YhEzD oLG6+mveNMAA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 20:14:42 -0700 IronPort-SDR: jUlmjXseW11Enm6HlcyRbS2sh6Ym/BNOepI3QQHX7UXUgQiuF6kFV8qB8WSk4nmQhlbTFgzqNw GuFi7vyiHAPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,357,1583222400"; d="scan'208";a="296045528" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga008.jf.intel.com with ESMTP; 05 May 2020 20:14:42 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 May 2020 20:14:39 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 May 2020 20:14:39 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.225]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.225]) with mapi id 14.03.0439.000; Wed, 6 May 2020 11:14:37 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v1] tests: update test command to support vectorized cases in TestSuite_vm2vm_virtio_pmd.py Thread-Index: AQHWHWb6MDP/UsX6zkO9jmuubxuXH6iabh+w Date: Wed, 6 May 2020 03:14:36 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC21D94@SHSMSX101.ccr.corp.intel.com> References: <20200428070530.40530-1-yinan.wang@intel.com> In-Reply-To: <20200428070530.40530-1-yinan.wang@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="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v1] tests: update test command to support vectorized cases in TestSuite_vm2vm_virtio_pmd.py 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 Yinan > Sent: Tuesday, April 28, 2020 3:06 PM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v1] tests: update test command to support vectorize= d > cases in TestSuite_vm2vm_virtio_pmd.py >=20 > From: Wang Yinan >=20 > Signed-off-by: Wang Yinan > --- > tests/TestSuite_vm2vm_virtio_pmd.py | 79 ++++++++++++++++++++--------- > 1 file changed, 54 insertions(+), 25 deletions(-) >=20 > diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py > b/tests/TestSuite_vm2vm_virtio_pmd.py > index 62929e0..d1fce80 100644 > --- a/tests/TestSuite_vm2vm_virtio_pmd.py > +++ b/tests/TestSuite_vm2vm_virtio_pmd.py > @@ -1,3 +1,4 @@ > +710703wyn > # BSD LICENSE > # > # Copyright(c) <2019> Intel Corporation. > @@ -58,8 +59,6 @@ class TestVM2VMVirtioPMD(TestCase): > self.enable_pcap_lib_in_dpdk(self.dut) > self.virtio_user0 =3D None > self.virtio_user1 =3D None > - self.flag_compiled =3D False > - self.backup_speed =3D self.dut.skip_setup > self.pci_info =3D self.dut.ports_info[0]['pci'] >=20 > def set_up(self): > @@ -145,22 +144,28 @@ class TestVM2VMVirtioPMD(TestCase): > self.virtio_user0.send_expect('set burst 1', 'testpmd> ', 30) > self.virtio_user0.send_expect('start tx_first 10', 'testpmd> ', = 30) >=20 > - def start_vm_testpmd(self, vm_client, path_mode, extern_param=3D""): > + def start_vm_testpmd(self, vm_client, path_mode, extern_param=3D"", > virtio_net_pci=3D""): > """ > launch the testpmd in vm > """ > + # deal with ports > + w_pci_list =3D [] > + w_pci_list.append('-w %s,%s' % (virtio_net_pci, 'vectorized=3D1'= )) > + w_pci_str =3D ' '.join(w_pci_list) > if path_mode =3D=3D "mergeable": > command =3D self.dut.target + "/app/testpmd -c 0x3 -n 4 " + = \ > "--file-prefix=3Dvirtio -- -i --tx-offloads=3D0x= 00 " + \ > "--enable-hw-vlan-strip --txd=3D1024 --rxd=3D102= 4 %s" > + vm_client.send_expect(command % extern_param, "testpmd> ", 2= 0) > elif path_mode =3D=3D "normal": > command =3D self.dut.target + "/app/testpmd -c 0x3 -n 4 " + = \ > "--file-prefix=3Dvirtio -- -i --tx-offloads=3D0x= 00 " + \ > "--enable-hw-vlan-strip --txd=3D1024 --rxd=3D102= 4 %s" > + vm_client.send_expect(command % extern_param, "testpmd> ", 2= 0) > elif path_mode =3D=3D "vector_rx": > command =3D self.dut.target + "/app/testpmd -c 0x3 -n 4 " + = \ > - "--file-prefix=3Dvirtio -- -i --txd=3D1024 --rxd= =3D1024 %s" > - vm_client.send_expect(command % extern_param, "testpmd> ", 20) > + "--file-prefix=3Dvirtio %s -- -i --txd=3D1024 --= rxd=3D1024 %s" > + vm_client.send_expect(command % (w_pci_str, extern_param), > "testpmd> ", 20) >=20 > def launch_pdump_to_capture_pkt(self, client_dut, dump_port): > """ > @@ -184,12 +189,12 @@ class TestVM2VMVirtioPMD(TestCase): > """ > # for virtio 0.95, start vm with "disable-modern=3Dtrue" > # for virito 1.0, start vm with "disable-modern=3Dfalse" > - if self.flag_compiled: > - self.dut.skip_setup =3D True > if mode =3D=3D 0: > setting_args =3D "disable-modern=3Dtrue" > - else: > + elif mode =3D=3D 1: > setting_args =3D "disable-modern=3Dfalse" > + elif mode =3D=3D 2: > + setting_args =3D "disable-modern=3Dfalse,packed=3Don" > if mergeable is True: > setting_args +=3D "," + "mrg_rxbuf=3Don" > else: > @@ -213,10 +218,8 @@ class TestVM2VMVirtioPMD(TestCase): > except Exception as e: > print((utils.RED("Failure for %s" % str(e)))) > raise e > - > self.vm_dut.append(vm_dut) > self.vm.append(vm_info) > - self.flag_compiled =3D True >=20 > def calculate_avg_throughput(self): > results =3D 0.0 > @@ -316,11 +319,11 @@ class TestVM2VMVirtioPMD(TestCase): > self.get_core_list(2) > self.start_vhost_testpmd() > self.start_vms(mode=3D0, mergeable=3DFalse) > - self.start_vm_testpmd(self.vm_dut[0], path_mode) > - self.start_vm_testpmd(self.vm_dut[1], path_mode) > + self.start_vm_testpmd(self.vm_dut[0], path_mode, virtio_net_pci = =3D > self.vm_dut[0].ports_info[0]['pci']) > + self.start_vm_testpmd(self.vm_dut[1], path_mode, virtio_net_pci = =3D > self.vm_dut[1].ports_info[0]['pci']) > self.send_and_verify(mode=3D"virtio 0.95 vector_rx", path=3Dpath= _mode) >=20 > - def test_vhost_vm2vm_virtioi10_pmd_with_vector_rx_path(self): > + def test_vhost_vm2vm_virtio_10_pmd_with_vector_rx_path(self): > """ > vhost-user + virtio1.0-pmd with vector_rx path > """ > @@ -328,8 +331,8 @@ class TestVM2VMVirtioPMD(TestCase): > self.get_core_list(2) > self.start_vhost_testpmd() > self.start_vms(mode=3D1, mergeable=3DFalse) > - self.start_vm_testpmd(self.vm_dut[0], path_mode) > - self.start_vm_testpmd(self.vm_dut[1], path_mode) > + self.start_vm_testpmd(self.vm_dut[0], path_mode, virtio_net_pci = =3D > self.vm_dut[0].ports_info[0]['pci']) > + self.start_vm_testpmd(self.vm_dut[1], path_mode, virtio_net_pci = =3D > self.vm_dut[1].ports_info[0]['pci']) > self.send_and_verify(mode=3D"virtio 1.0 vector_rx", path=3Dpath_= mode) >=20 > def test_vhost_vm2vm_virito_pmd_with_mergeable_path(self): > @@ -390,19 +393,46 @@ class TestVM2VMVirtioPMD(TestCase): > # reset the evn in vm > self.disable_pcap_lib_in_dpdk(self.vm_dut[0]) >=20 > - def test_vhost_vm2vm_virtio_11_pmd_with_mergeable_path(self): > + def test_vhost_vm2vm_virito_11_pmd_with_normal_path(self): > """ > - vm2vm vhost-user/virtio1.1-pmd mergeable path test with payload > check > + vhost-user + virtio1.0-pmd with normal path > """ > - mode_info =3D 'packed_vq=3D1,mrg_rxbuf=3D1,in_order=3D0' > + path_mode =3D "normal" > + self.get_core_list(2) > + self.start_vhost_testpmd() > + self.start_vms(mode=3D2, mergeable=3DFalse) > + self.start_vm_testpmd(self.vm_dut[0], path_mode) > + self.start_vm_testpmd(self.vm_dut[1], path_mode) > + self.send_and_verify(mode=3D"virtio 1.0 normal path", path=3Dpat= h_mode) > + > + def test_vhost_vm2vm_virito_11_pmd_with_mergeable_path(self): > + """ > + vhost-user + virtio1.0-pmd with mergeable path test with payload= check > + """ > + path_mode =3D "mergeable" > extern_param =3D '--max-pkt-len=3D9600' > - dump_port =3D 'device_id=3Dnet_virtio_user1' > - self.get_core_list(6) > + dump_port =3D 'port=3D0' > + self.get_core_list(2) > self.start_vhost_testpmd() > - self.start_virtio_testpmd_with_vhost_net1(mode_info, extern_para= m) > - self.launch_pdump_to_capture_pkt(self.dut, dump_port) > - self.start_virtio_testpmd_with_vhost_net0(mode_info, extern_para= m) > - self.check_packet_payload_valid(self.dut) > + self.start_vms(mode=3D2, mergeable=3DTrue) > + # enable pcap in VM0 > + self.enable_pcap_lib_in_dpdk(self.vm_dut[0]) > + # git the vm enough huge to run pdump > + self.vm_dut[0].set_huge_pages(2048) > + # start testpmd and pdump in VM0 > + self.start_vm_testpmd(self.vm_dut[0], path_mode, extern_param) > + self.vm_dut[0].send_expect('set fwd rxonly', 'testpmd> ', 30) > + self.vm_dut[0].send_expect('start', 'testpmd> ', 30) > + self.launch_pdump_to_capture_pkt(self.vm_dut[0], dump_port) > + # start testpmd in VM1 and start to send packet > + self.start_vm_testpmd(self.vm_dut[1], path_mode, extern_param) > + self.vm_dut[1].send_expect('set txpkts 2000,2000,2000,2000', 'te= stpmd> > ', 30) > + self.vm_dut[1].send_expect('set burst 1', 'testpmd> ', 30) > + self.vm_dut[1].send_expect('start tx_first 10', 'testpmd> ', 30) > + # check the packet in vm0 > + self.check_packet_payload_valid(self.vm_dut[0]) > + # reset the evn in vm > + self.disable_pcap_lib_in_dpdk(self.vm_dut[0]) >=20 > def tear_down(self): > # > @@ -419,4 +449,3 @@ class TestVM2VMVirtioPMD(TestCase): > """ > self.disable_pcap_lib_in_dpdk(self.dut) > self.dut.close_session(self.vhost_user) > - self.dut.skip_setup =3D self.backup_speed > -- > 2.17.1