test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Wang, Yinan" <yinan.wang@intel.com>,
	"Ma, LihongX" <lihongx.ma@intel.com>
Subject: Re: [dts] [PATCH V1] tests/vm2vm_virtio_net_perf: add test case about	packet payload check
Date: Wed, 10 Jul 2019 02:08:58 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BADE6B4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1562549035-9318-1-git-send-email-lihongx.ma@intel.com>

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 <yinan.wang@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests/vm2vm_virtio_net_perf: add test case about
> packet payload check
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  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


      reply	other threads:[~2019-07-10  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08  1:23 lihong
2019-07-10  2:08 ` Tu, Lijuan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BADE6B4@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=lihongx.ma@intel.com \
    --cc=yinan.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).