From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 32FFD2C4F for ; Thu, 29 Dec 2016 02:39:11 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 28 Dec 2016 17:39:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,424,1477983600"; d="scan'208";a="1077171388" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 28 Dec 2016 17:39:10 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 28 Dec 2016 17:39:10 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by shsmsx102.ccr.corp.intel.com ([169.254.2.88]) with mapi id 14.03.0248.002; Thu, 29 Dec 2016 09:39:06 +0800 From: "Liu, Yong" To: "Yao, Lei A" , "dts@dpdk.org" CC: "Yao, Lei A" Thread-Topic: [dts] [PATCH V2] tests: add test for vhost/virtio loopback performance Thread-Index: AQHSYXJlZH40F781G0+DXLKX0jkDpaEeItYw Date: Thu, 29 Dec 2016 01:39:06 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D34A5E@SHSMSX103.ccr.corp.intel.com> References: <1482974742-19984-1-git-send-email-lei.a.yao@intel.com> In-Reply-To: <1482974742-19984-1-git-send-email-lei.a.yao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjJhYjIwMzUtNzJjZS00YjA0LTk4MDItYjUwMjFhZjZjNTFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Inh0d3MrdmJjTXkzUyt4ZGlGOXA3d2lwWmNUT3VvVnNObitMSWMwUVpjM2s9In0= x-ctpclassification: CTP_IC 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 V2] tests: add test for vhost/virtio loopback performance 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: , X-List-Received-Date: Thu, 29 Dec 2016 01:39:12 -0000 Lei, few comments below. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lei,yao > Sent: Thursday, December 29, 2016 9:26 AM > To: dts@dpdk.org > Cc: Yao, Lei A > Subject: [dts] [PATCH V2] tests: add test for vhost/virtio loopback > performance >=20 > From: lei yao >=20 > This test won't use qemu, but will use two testpmd thread to launch vhost= - > user and > virtio-user to simulate the qemu user case. >=20 > Signed-off-by: lei yao > --- > ...Suite_vhost_loopback_performance_virtio_user.py | 260 > +++++++++++++++++++++ > 1 file changed, 260 insertions(+) > create mode 100644 > tests/TestSuite_vhost_loopback_performance_virtio_user.py >=20 > diff --git a/tests/TestSuite_vhost_loopback_performance_virtio_user.py > b/tests/TestSuite_vhost_loopback_performance_virtio_user.py > new file mode 100644 > index 0000000..377aa66 > --- /dev/null > +++ b/tests/TestSuite_vhost_loopback_performance_virtio_user.py > @@ -0,0 +1,260 @@ > +# > +# BSD LICENSE > +# > +# Copyright(c) 2010-2016 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. > +Test Vhost loopback performance for Mergeable, normal , vector Path > +""" > +import string > +import utils > +import time > +import re > +from test_case import TestCase > + > + > +class TestVhostLoopback(TestCase): > + > + def set_up_all(self): > + """ > + Run at the start of each test suite. > + """ > + # Clean the execution environment > + self.dut.send_expect("rm -rf ./vhost.out", "#") > + self.dut.send_expect("rm -rf ./vhost-net*", "#") > + self.header_row =3D ["FrameSize(B)", "Mode", "Throughput(Mpps)", > "Virtio Version"] > + self.frame_sizes =3D [64, 128, 260, 520, 1024, 1500] > + self.test_cycles =3D {'Mpps': {}, 'pct': {}} > + # Don't use any NIC in this test case > + port_list =3D self.dut.get_ports() > + for i in port_list: > + port =3D self.dut.ports_info[i]['port'] > + port.bind_driver() > + > + self.dut.send_expect("sed -i -e 's/#define > TXONLY_DEF_PACKET_LEN.*$/#define TXONLY_DEF_PACKET_LEN 64/' ./app/test- > pmd/testpmd.h", "#", 30) > + Packet length maybe changed later, we can't assume the value is always 64. Please capture the value in set_up_all function and restore it back in tear= _down_all. > + > + def tear_down(self): > + """ > + Run after each test case. > + """ > + time.sleep(2) > + > + def tear_down_all(self): > + """ > + Run after each test suite. > + """ > + # Recompile the dpdk because we change the source code during th= e > test Need to bind port back to self.drivername. You can restore TXONLY_DEF_PACKET_LEN value here, it's only need restore th= e value at the end of this suite execution. > + self.dut.build_install_dpdk(self.dut.target) > -- > 2.7.4