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 BEB4BA00E6 for ; Wed, 10 Jul 2019 04:09:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A85FD2AB; Wed, 10 Jul 2019 04:09:03 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 799B3160 for ; Wed, 10 Jul 2019 04:09:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 19:09:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,472,1557212400"; d="scan'208";a="156357599" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 09 Jul 2019 19:09:01 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jul 2019 19:09:01 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.232]) with mapi id 14.03.0439.000; Wed, 10 Jul 2019 10:08:59 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Wang, Yinan" , "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] tests/vm2vm_virtio_net_perf: add test case about packet payload check Thread-Index: AQHVNWmna46qc+eRBUCsPv53YR2PXKbDHf3Q Date: Wed, 10 Jul 2019 02:08:58 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BADE6B4@SHSMSX101.ccr.corp.intel.com> References: <1562549035-9318-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1562549035-9318-1-git-send-email-lihongx.ma@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTAxYmYwNjctOWI2Ny00NGY3LTk1NWEtNjA4YzMwYjI1NzFhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibHZjcWtNXC8raXJwb01BaThCTWpDdjh5SWhmNXNFb0JTZkJUNUw5TzRvM3JPcHBTM3hzKzFjZ0U5MUEwYk93bVUifQ== 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/vm2vm_virtio_net_perf: add test case about packet payload check 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 lihong > Sent: Monday, July 8, 2019 9:24 AM > To: dts@dpdk.org > Cc: Wang, Yinan ; Ma, LihongX > > Subject: [dts] [PATCH V1] tests/vm2vm_virtio_net_perf: add test case abou= t > packet payload check >=20 > Signed-off-by: lihong > --- > tests/TestSuite_vm2vm_virtio_net_perf.py | 35 > +++++++++++++++++++++++++++++--- > 1 file changed, 32 insertions(+), 3 deletions(-) >=20 > diff --git a/tests/TestSuite_vm2vm_virtio_net_perf.py > b/tests/TestSuite_vm2vm_virtio_net_perf.py > index dbcf5c4..9c0f85c 100644 > --- a/tests/TestSuite_vm2vm_virtio_net_perf.py > +++ b/tests/TestSuite_vm2vm_virtio_net_perf.py > @@ -85,7 +85,7 @@ class TestVM2VMVirtioNetPerf(TestCase): > "--socket-mem 2048,2048 --legacy-mem --no-pci --file-prefix= =3Dvhost " + > \ > "--vdev 'net_vhost0,iface=3Dvhost-net0,queues=3D1%s' " + \ > "--vdev 'net_vhost1,iface=3Dvhost-net1,queues=3D1%s' " + \ > - "-- -i --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 --txfreet=3D= 992 " > + "-- -i --nb-cores=3D1 --txd=3D1024 --rxd=3D1024" >=20 > self.command_line =3D self.command_line % ( > self.coremask, self.memory_channel, @@ -93,1= 5 +93,17 > @@ class TestVM2VMVirtioNetPerf(TestCase): > self.vhost.send_expect(self.command_line, "testpmd> ", 30) > self.vhost.send_expect("start", "testpmd> ", 30) >=20 > - def start_vms(self, mode=3D"tso"): > + def start_vms(self, mode=3D"normal"): > """ > start two VM, each VM has one virtio device > """ > - setting_args =3D > "mrg_rxbuf=3Don,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_tso4=3Don,= guest > _ecn=3Don" > + setting_args =3D > "mrg_rxbuf=3Doff,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_tso4=3Don= ,guest > _ecn=3Don" > if mode =3D=3D "tso": > setting_args +=3D ",gso=3Don" > elif mode =3D=3D "ufo": > setting_args +=3D ",guest_ufo=3Don,host_ufo=3Don" > + elif mode =3D=3D "normal": > + setting_args =3D "mrg_rxbuf=3Don" >=20 > for i in range(self.vm_num): > vm_dut =3D None > @@ -227,6 +229,23 @@ class TestVM2VMVirtioNetPerf(TestCase): > self.verify(tcp6_info is not None and tcp6_info.group(1) =3D=3D = "on", > "tx-tcp6-segmentation in vm not right") >=20 > + def check_payload_valid(self): > + """ > + scp 64b and 64KB file form VM1 to VM2, check the data is valid > + """ > + # create a 64b and 64K size file > + for b_size in [64, 65535]: > + data =3D 'x'*b_size > + self.vm_dut[0].send_expect('echo "%s" > /tmp/payload' % data= , '# ') > + # scp this file to vm1 > + out =3D self.vm_dut[1].send_command('scp root@%s:/tmp/payloa= d > /root' % self.virtio_ip1, timeout=3D5) > + if 'Are you sure you want to continue connecting' in out: > + self.vm_dut[1].send_command('yes', timeout=3D3) > + self.vm_dut[1].send_command(self.vm[0].password, timeout=3D3= ) > + # get the file info in vm1, and check it valid > + file_info =3D self.vm_dut[1].send_expect('cat /root/payload'= , '# ') > + self.verify(file_info =3D=3D data, 'the file info is invalid > + as: %s' % file_info) > + > def test_vhost_vm2vm_tso_iperf(self): > """ > vhost-user + virtio-net VM2VM with tcp traffic @@ -267,6 +286,16= @@ > class TestVM2VMVirtioNetPerf(TestCase): > self.offload_capbility_check(self.vm_dut[1]) > self.stop_all_apps() >=20 > + def test_vhost_vm2vm_packet_payload_valid_check(self): > + """ > + VM2VM vhost-user/virtio-net test with large packet payload valid > check > + """ > + self.start_vhost_testpmd(zerocopy=3DFalse) > + self.start_vms(mode=3D"normal") > + self.config_vm_env() > + self.check_payload_valid() > + self.stop_all_apps() > + > def tear_down(self): > """ > run after each test case. > -- > 2.7.4