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 DCE4CA00E6 for ; Mon, 8 Jul 2019 10:46:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ACCFA2F42; Mon, 8 Jul 2019 10:46:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D2E3C2E81 for ; Mon, 8 Jul 2019 10:46:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2019 01:46:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,466,1557212400"; d="scan'208";a="364171033" Received: from ubuntu.sh.intel.com ([10.67.119.68]) by fmsmga006.fm.intel.com with ESMTP; 08 Jul 2019 01:46:16 -0700 From: lihong To: dts@dpdk.org Cc: yinan.wang@intel.com, lihong Date: Mon, 8 Jul 2019 09:23:55 +0800 Message-Id: <1562549035-9318-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [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" Signed-off-by: lihong --- tests/TestSuite_vm2vm_virtio_net_perf.py | 35 +++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) 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=vhost " + \ "--vdev 'net_vhost0,iface=vhost-net0,queues=1%s' " + \ "--vdev 'net_vhost1,iface=vhost-net1,queues=1%s' " + \ - "-- -i --nb-cores=1 --txd=1024 --rxd=1024 --txfreet=992 " + "-- -i --nb-cores=1 --txd=1024 --rxd=1024" self.command_line = self.command_line % ( self.coremask, self.memory_channel, @@ -93,15 +93,17 @@ class TestVM2VMVirtioNetPerf(TestCase): self.vhost.send_expect(self.command_line, "testpmd> ", 30) self.vhost.send_expect("start", "testpmd> ", 30) - def start_vms(self, mode="tso"): + def start_vms(self, mode="normal"): """ start two VM, each VM has one virtio device """ - setting_args = "mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" + setting_args = "mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" if mode == "tso": setting_args += ",gso=on" elif mode == "ufo": setting_args += ",guest_ufo=on,host_ufo=on" + elif mode == "normal": + setting_args = "mrg_rxbuf=on" for i in range(self.vm_num): vm_dut = None @@ -227,6 +229,23 @@ class TestVM2VMVirtioNetPerf(TestCase): self.verify(tcp6_info is not None and tcp6_info.group(1) == "on", "tx-tcp6-segmentation in vm not right") + 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 = 'x'*b_size + self.vm_dut[0].send_expect('echo "%s" > /tmp/payload' % data, '# ') + # scp this file to vm1 + out = self.vm_dut[1].send_command('scp root@%s:/tmp/payload /root' % self.virtio_ip1, timeout=5) + if 'Are you sure you want to continue connecting' in out: + self.vm_dut[1].send_command('yes', timeout=3) + self.vm_dut[1].send_command(self.vm[0].password, timeout=3) + # get the file info in vm1, and check it valid + file_info = self.vm_dut[1].send_expect('cat /root/payload', '# ') + self.verify(file_info == 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() + 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=False) + self.start_vms(mode="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