test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Xu, Qian Q" <qian.q.xu@intel.com>
To: "Fu, JingguoX" <jingguox.fu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [DTS][PATCH 1/3] virtio: update vhost cuse cases
Date: Thu, 21 Jan 2016 08:03:05 +0000	[thread overview]
Message-ID: <82F45D86ADE5454A95A89742C8D1410E031BBF50@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1453358572-30310-1-git-send-email-jingguox.fu@intel.com>



Thanks
Qian


-----Original Message-----
From: Fu, JingguoX 
Sent: Thursday, January 21, 2016 2:43 PM
To: dts@dpdk.org
Cc: Liu, Yong; Xu, Qian Q; Fu, JingguoX
Subject: [DTS][PATCH 1/3] virtio: update vhost cuse cases

1: optimize case
2: add get rx rate for generator
3: better way to check vhost.out file
Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
 tests/TestSuite_vhost_cuse_one_copy_one_vm.py | 438 +++++++++++++++++++++++++
 tests/TestSuite_vhost_cuse_sample.py          | 454 --------------------------
 tests/TestSuite_vhost_sample.py               | 425 ------------------------
 tests/TestSuite_vhost_user_one_copy_one_vm.py | 425 ++++++++++++++++++++++++
 4 files changed, 863 insertions(+), 879 deletions(-)
 create mode 100644 tests/TestSuite_vhost_cuse_one_copy_one_vm.py
 delete mode 100644 tests/TestSuite_vhost_cuse_sample.py
 delete mode 100644 tests/TestSuite_vhost_sample.py
 create mode 100644 tests/TestSuite_vhost_user_one_copy_one_vm.py

diff --git a/tests/TestSuite_vhost_cuse_one_copy_one_vm.py b/tests/TestSuite_vhost_cuse_one_copy_one_vm.py
new file mode 100644
index 0000000..bff5760
--- /dev/null
+++ b/tests/TestSuite_vhost_cuse_one_copy_one_vm.py
@@ -0,0 +1,438 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Vhost Cuse one-copy sample test suite.
+"""
+import os
+import dts
+import string
+import re
+import time
+from scapy.utils import wrpcap, rdpcap
+from test_case import TestCase
+from exception import VerifyFailure
+from settings import HEADER_SIZE
+from etgen import IxiaPacketGenerator
+from qemu_kvm import QEMUKvm
+
+
+class TestVhostCuseOneCopyOneVm(TestCase, IxiaPacketGenerator):
+
+    def set_up_all(self):
+        # To Extend IXIA packet generator method, call the tester's method.
+        self.tester.extend_external_packet_generator(TestVhostCuseOneCopyOneVm, self)
+
+        # Change config file to enable vhost-cuse compiled.
+        self.dut.send_expect(
+            "sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST_USER=.*$/CONFIG_RTE_LIBRTE"
+            "_VHOST_USER=n/' ./config/common_linuxapp",
+            "# ",
+            30)
+        self.dut.build_install_dpdk(self.target)
+        self.dut.send_expect("cd ./lib/librte_vhost", "#", 30)
+        print self.dut.send_expect("make", "#", 30)
+        self.dut.send_expect("cd ./eventfd_link", "#", 30)
+        print self.dut.send_expect("make", "#", 30)
+        self.dut.send_expect("cd ~/dpdk", "#", 30)
+
+        # build the vhost sample in vhost-cuse mode.
+        if self.nic in ['niantic']:
+            self.dut.send_expect(
+                "sed -i -e 's/#define MAX_QUEUES.*$/#define MAX_QUEUES 128/' "
+                "./examples/vhost/main.c",
+                "#")
+        else:
+            self.dut.send_expect(
+                "sed -i -e 's/#define MAX_QUEUES.*$/#define MAX_QUEUES 512/' "
+                "./examples/vhost/main.c",
+                "#")
+        out = self.dut.send_expect("make -C examples/vhost", "#")
+        self.verify("Error" not in out, "compilation error")
+        self.verify("No such file" not in out, "Not found file error")
+
+        # Build target with modified config file
+        self.dut.build_install_dpdk(self.target)
+
+        # Get and verify the ports
+        self.dut_ports = self.dut.get_ports()
+        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
+
+        # Get the port's socket
+        self.pf = self.dut_ports[0]
+        netdev = self.dut.ports_info[self.pf]['port']
+        self.socket = netdev.get_nic_socket()
+        self.cores = self.dut.get_core_list("1S/3C/1T", socket=self.socket)
+
+        # Set the params of vhost-cuse sample
+        self.vhost_app = "./examples/vhost/build/vhost-switch"
+        self.zero_copy = 0
+        self.vm2vm = 0
+        self.jumbo = 0
+        self.vhost_test = self.vhost_app + \
+            " -c %s -n %d --socket-mem 1024,1024 -- -p 0x1 --mergeable %d" + \
+            " --zero-copy %d --vm2vm %d 2 > ./vhost.out &"
+
+        # Define the virtio/VM variables
+        self.virtio1 = "eth1"
+        self.virtio2 = "eth2"
+        self.virtio1_mac = "52:54:00:00:00:01"
+        self.virtio2_mac = "52:54:00:00:00:02"
+        self.src1 = "192.168.4.1"
+        self.src2 = "192.168.3.1"
+        self.dst1 = "192.168.3.1"
+        self.dst2 = "192.168.4.1"
+        self.vm_dut = None
+        self.virtio_cmd_params = \
+        'csum=off,gso=off,guest_csum=off,guest_tso4=off,guest_tso6=off,guest_ecn=off'
+        # Define the table columns
+        self.header_row = ["FrameSize(B)", "RecvPackets(Mpps)", "SendPackets(Mpps)", "LineRate(%)"]
+        self.memory_channel = 4
Similar comments as vhost-user, suggest to remove RecvPackets(Mpps). 

Qian 
Thx. 

      parent reply	other threads:[~2016-01-21  8:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21  6:42 Jingguo Fu
2016-01-21  6:42 ` [dts] [DTS][PATCH 2/3] virtio: update vhost user cases Jingguo Fu
2016-01-21  7:58   ` Xu, Qian Q
2016-01-21  9:03     ` Fu, JingguoX
2016-01-22  1:55       ` Xu, Qian Q
2016-01-22  2:33         ` Fu, JingguoX
2016-01-22  8:46         ` Fu, JingguoX
2016-01-21  6:42 ` [dts] [DTS][PATCH 3/3] virtio: update vhost cuse and user one vm cases Jingguo Fu
2016-01-21  8:03 ` Xu, Qian Q [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=82F45D86ADE5454A95A89742C8D1410E031BBF50@shsmsx102.ccr.corp.intel.com \
    --to=qian.q.xu@intel.com \
    --cc=dts@dpdk.org \
    --cc=jingguox.fu@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).