From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 21DE4A052A; Tue, 2 Feb 2021 14:47:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B3042402C5; Tue, 2 Feb 2021 14:47:24 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 324B22402B5 for ; Tue, 2 Feb 2021 14:47:22 +0100 (CET) IronPort-SDR: 3RZIPeamdHk/bOmwaMg8tA0QEH5OEJgtwYW0SYIDrJV7A4t4lTXVsHoRqck64va2WeNx7IGvZA FIOvmJHyYGPA== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="265685770" X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="265685770" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 05:47:21 -0800 IronPort-SDR: 9LjPNtCtu2QV7fsNYqmRjwGQ3PST4+jWcREFmoLUQg910GYTX3JpvFTpsHInN+zGBWV4xCk6jg NURzmoICO0bQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="355118870" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 02 Feb 2021 05:47:21 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 2 Feb 2021 05:47:20 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 2 Feb 2021 05:47:20 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 2 Feb 2021 05:47:20 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 2 Feb 2021 05:47:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U/Zg7GI87+PEHCbdYDch2VmPEIbyvc9u0gmH5wTs4SOrg4uAX8+JeCODzySCrknFmZlSwG5DgNt2NyVV2bcQuNT78S3bBgHET+GSZxzHbnpts1QnCIcoiVx+dapfO3SbJFZDsN72zeT38i/EPnZ7KL0aT7pmvPzQ0MkZdCvEay00nf4UiK1qlyc+7TFo380qZq8VHF3sBsyGukNhEPg2YrGyjpBBkuqcShf32OMpROXgWXIfqYmI8NUJ8JHkuaJotb86HzHu8x1nmcJqbk7ZuzoABrrsIHJIv0K1I9W4Il/XUIup5JNq5rH4j39pqtWLXIVDMH8Yh4P0UTFqQ7rFMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wNrS6I1e2QV4lUxIaQ1K2tIzkFEZqwor+lIo9Wy4HW0=; b=Fb3EbxByuIsKvmmJ3SvTV5mcfJvZIu7fydyD0SpkvFIi0Awj8sLzopvTWXnSH2ywGmorH3Xvwv1BStQ9KibcwgDr9WBbZzh56M9w9LMecCf5FGo88Hp9X2Xpme8OB6t8BCoxTu1Hc5RpW1YObczakyvqQdRzUPXPolO5tY/RnwMV3HXi78vbjFV7T+WX+DEMpfTlqYyS6RCCdnZf7MQc0WqY69ZwB7ghB8PxI37YU7g8TgTDfYwtwt7x/SmB9kjaKUnwR6IBm+nePQG1t648+R9eDj6dNt7TZAzcGydiGGjfPd/Z7OnYW/BHXfISDmZcoWooGK+l2+KVHZAk8622rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wNrS6I1e2QV4lUxIaQ1K2tIzkFEZqwor+lIo9Wy4HW0=; b=N7rG04Z/HVNovCSIsbRT4xcydgM2pHLVEob+kOwmpyNXJr4Zl+haf3JRsAT/Q2JipCheFY6mvqsg9Lf3uJLFGJd1zchqVZLNvwHuH1uRg4fWLzlzk6MGi5rQ3ssyno+vor3vHzUcRBwGB4AppybrJIFAzHWeddCsJC+k+pJx/Rw= Received: from BYAPR11MB2648.namprd11.prod.outlook.com (2603:10b6:a02:c7::10) by BYAPR11MB2693.namprd11.prod.outlook.com (2603:10b6:a02:cc::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13; Tue, 2 Feb 2021 13:47:17 +0000 Received: from BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::281e:c126:2abc:b2a]) by BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::281e:c126:2abc:b2a%4]) with mapi id 15.20.3805.024; Tue, 2 Feb 2021 13:47:17 +0000 From: "Wang, Yinan" To: "Ling, WeiX" , "Ling, WeiX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V6] tests/virtio_smoke:add virtio smoke test suite sync with test plan Thread-Index: AQHW+TVX72j5OH0PxE2JCEyv41VyfKpEfgWAgABjYIA= Date: Tue, 2 Feb 2021 13:47:17 +0000 Message-ID: References: <20210202152313.3878782-1-weix.ling@intel.com> <4bc0a9af6cea4cacbc52d5b9edd0a055@intel.com> In-Reply-To: <4bc0a9af6cea4cacbc52d5b9edd0a055@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0c312108-1601-42cf-7eca-08d8c7810e3b x-ms-traffictypediagnostic: BYAPR11MB2693: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1775; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WtMF8usByHv20XtRYLBMlBisGQPKR6qidEwKapotzjqCmgFzfHO0BWafGlU9dtt+7FdNhcqBcYJBD5NvcwsTHdUD2kYvmMROry39HQihO5fas/ReyMjMV4yQvCbl/9/0r5PfLTty897tOq2mFm5Y4xlZg3ngP6UcZjWdgnD2FjAmf0Mb6pUNz2N2Tv4umEjYwFoduFby6KULg9dYINGz7UNiX/kt5F00AUBbWeqxMzMNi/fX+WmYs72eXZGIS1LvHgxYIN/vvE7OTtPZHPUbvcoGtscl/6kxeAGhSBdguAzB7SgmkVuLXUPkQhWTpe1KAQG04NMlEpLXOGCZ0IlN3jgAH4vuVwuupADEgYTE4qFm5YgyDxR4WWolusz+yKszXbuB+H0Txcqx2aFh4SkYYTVLKEVYhNu8aT0112H1m4smNWd4txWNnB462FFmB0riJUUQnET16rJe7wkjLSc29vQBUyLQGoO8a3ZZ/F/5fV075aHp1WaLGUO7ceCOT5PVe/WylezHnNauZLcCr/Zraw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2648.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(136003)(376002)(39860400002)(478600001)(186003)(55016002)(66946007)(71200400001)(8936002)(9686003)(83380400001)(6506007)(53546011)(66446008)(52536014)(64756008)(86362001)(110136005)(316002)(26005)(8676002)(30864003)(33656002)(66476007)(7696005)(66556008)(76116006)(2906002)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?Windows-1252?Q?VC7tOQ/OBoA/gVLaqaFqZhHCn7197X1lABjVs5dXeK0q+bxMMIvVyS/v?= =?Windows-1252?Q?47Mqlv3+VvRtwO5mkxvg66/cIu1+iv804fd7ieDVlu17v/jpl1D2P4cy?= =?Windows-1252?Q?0EPsHu5xLfSti0g4+20bl4fyndsGIGZgpYWW8rOiAFgdc+qI37ueH835?= =?Windows-1252?Q?sVCaMng/JEg+SEfjlqox60nioe7TOupYSr1i9ksqys6ojWfiRLykBd9Y?= =?Windows-1252?Q?/cWy97ku6mA9OIc6j6L8eY+j/KuT6hnCfkb5F+fvsgF2ibCvTWD3x6Y7?= =?Windows-1252?Q?1IyH5c7pWac5swro5ev2g2VfKm7Qbgp5EImgP1JUAhHZuXhrCLE1/fga?= =?Windows-1252?Q?9KH0Uf6i49GvX8ZsQWtNb1EmeT2ptH4k3fVwDaAwA++GmMP+Unbe45ES?= =?Windows-1252?Q?NsMtxAz0s22CQA/BOEftVNwoYD3f55gRxTQjbykdJL1HSmZxvALKH2J+?= =?Windows-1252?Q?HNy/xP3akBgk7gtkDv3WMvQf8TiKy08BNYDBErhF29l+5AUIIFVHXuGX?= =?Windows-1252?Q?oALANOdqZDjkG/Esg/N7OAZkb1xdcJ0aDksu8ry7n9C+d7ww07cAIj8R?= =?Windows-1252?Q?kS13P0PgaPfR1QCWxj/L5VUDWGPx8kVM1I/mh3AUn3/hSQ4mNGr1EZkh?= =?Windows-1252?Q?eulk1OPacdcAOIq0Hq5AR91mNWUrWZgwiaOXuGOeVdp/0zpmKH2KYTno?= =?Windows-1252?Q?fFgk4MVaO0TDOWLyP8IkZ4GwdDef2vtujeG/s/BxJ7zaFX78GFaYJ2ha?= =?Windows-1252?Q?pBLm+6CSBDsP3gp/Qs/BNje5coK3PLCFKrFMprdqVetdFaG/2iYujfQs?= =?Windows-1252?Q?7wwMufsWPTc2ATZLgRhikpfnqBkX2jhx/C0vzdzgo0ZGnIZY4nHKlSde?= =?Windows-1252?Q?21tkXQx7RU0pepgKsTE56JG9lu9Wk0tpN1loyz0R//j1qBMP0ZBAENKS?= =?Windows-1252?Q?C68OqN8I37+7yUspUa0+jltrmR2ME5ZXPG69BIx+9mZBf52JRTH7l2nN?= =?Windows-1252?Q?vLLTlZzM5rd7Jo0QUP1Y+4rpFay5OsSYhaUDyeMd2FoUQdSOVE9CSKbM?= =?Windows-1252?Q?Cpyauwq3j9FbvJYjM14R9N//BZ3PFlrpuecG6Ap/g1k2ikintGp8c8/b?= =?Windows-1252?Q?1QEylBV3a44iUNZtsv0oRM32?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2648.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c312108-1601-42cf-7eca-08d8c7810e3b X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2021 13:47:17.5564 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JILisSnslrfxmQfGjABt/cUyG0+2WXJfsmcP2LFHj2IL4wEfDtoy52lL738k6UyZtfgRIueLSWzIyLMC9mDrqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2693 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH V6] tests/virtio_smoke:add virtio smoke test suite sync with test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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" Acked-by: Wang, Yinan > -----Original Message----- > From: dts On Behalf Of Ling, WeiX > Sent: 2021?2?2? 15:52 > To: Ling, WeiX ; dts@dpdk.org > Subject: Re: [dts] [PATCH V6] tests/virtio_smoke:add virtio smoke test su= ite > sync with test plan >=20 > Tested-by: Wei Ling >=20 > Regards, > Ling Wei >=20 > > -----Original Message----- > > From: Ling Wei > > Sent: Tuesday, February 2, 2021 11:23 PM > > To: dts@dpdk.org > > Cc: Ling, WeiX > > Subject: [dts][PATCH V6] tests/virtio_smoke:add virtio smoke test suite= sync > > with test plan > > > > v1: > > Add virtio smoke test suite sync with test plan. > > > > v2: > > 1.Modiry Copyrint(c)<2019> to Copyrint(c)<2021>. > > 2.Fix CentOS check hugepagesize return ' 2048' dts issue. > > 3.Add test case run exception handing 'kill dpdk-testpmd' > > in set_up and tear_down. > > > > v3: > > Modify patch subject and comments description error. > > > > v4: > > Modify set_up method,kill testpmd then remove vhost-net*. > > > > v5: > > Fix patch spelling error. > > > > v6: > > Fix patch spelling error. > > > > Signed-off-by: Ling Wei > > --- > > tests/TestSuite_virtio_smoke.py | 202 > > ++++++++++++++++++++++++++++++++ > > 1 file changed, 202 insertions(+) > > create mode 100644 tests/TestSuite_virtio_smoke.py > > > > diff --git a/tests/TestSuite_virtio_smoke.py > > b/tests/TestSuite_virtio_smoke.py new file mode 100644 index > > 00000000..3c9e96fc > > --- /dev/null > > +++ b/tests/TestSuite_virtio_smoke.py > > @@ -0,0 +1,202 @@ > > +# BSD LICENSE+#+# Copyright(c) <2021> Intel Corporation. All rights > > reserved.+# All rights reserved.+#+# Redistribution and use in source a= nd > > binary forms, with or without+# modification, are permitted provided th= at > > the following conditions+# are met:+#+# * Redistributions of source c= ode > > must retain the above copyright+# notice, this list of conditions a= nd the > > following disclaimer.+# * Redistributions in binary form must reprodu= ce > the > > above copyright+# notice, this list of conditions and the following > > disclaimer in+# the documentation and/or other materials provided w= ith > > the+# distribution.+# * Neither the name of Intel Corporation nor= the > > names of its+# contributors may be used to endorse or promote produ= cts > > 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.+"""++import re+from test_case import TestCase+from pmd_output > > import PmdOutput+DEFAULT_MTU =3D 1500+TSO_MTU =3D 9000++class > > TestVirtioSmoke(TestCase):+++ def set_up_all(self):+ """+ = Run at > > the start of each test suite.+ """+ self.dst_mac =3D > "00:01:02:03:04:05"+ > > self.dut_ports =3D self.dut.get_ports()+ self.txItf =3D > > self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0])= )+ > > self.socket =3D self.dut.get_numa_id(self.dut_ports[0])+ self.co= res =3D > > self.dut.get_core_list("all", socket=3Dself.socket)+ self.vhost_= cores =3D > > self.cores[0:3]+ self.virtio1_cores =3D self.cores[3:6]+ = self.base_dir =3D > > self.dut.base_dir.replace('~', '/root')+ self.path =3D > > self.dut.apps_name['test-pmd']+ self.testpmd_name =3D > > self.path.split("/")[-1]+ self.vhost_user =3D > > self.dut.new_session(suite=3D"vhost-user")+ self.virtio_user1 = =3D > > self.dut.new_session(suite=3D"virtio-user1")+ self.pmdout_vhost_= user =3D > > PmdOutput(self.dut, self.vhost_user)+ self.pmdout_virtio_user1 = =3D > > PmdOutput(self.dut, self.virtio_user1)++ def set_up(self):+ "= ""+ > > Run before each test case.+ """+ self.dut.send_expect("ki= llall -s > > INT %s" % self.testpmd_name, "#")+ self.dut.send_expect("rm - > > rf %s/vhost-net*" % self.base_dir, "#")++ @property+ def > > check_2M_env(self):+ out =3D self.dut.send_expect("cat /proc/mem= info > > |grep Hugepagesize|awk '{print($2)}'", "# ")+ # On CentOS, somet= imes > > return ' 2048'+ resp =3D out.replace(' ', '')+ return Tru= e if resp =3D=3D > '2048' > > else False++ def launch_testpmd_as_vhost_user(self, param, > > cores=3D"Default", udev=3D"", ports=3D[], no_pci=3DTrue):+ > > self.pmdout_vhost_user.start_testpmd(cores=3Dcores, param=3Dparam, > > vdevs=3D[udev], ports=3Dports, prefix=3D"vhost",+ > > fixed_prefix=3DTrue, no_pci=3Dno_pci)+ > > self.pmdout_vhost_user.execute_cmd('set fwd mac')++ def > > launch_testpmd_as_virtio_user1(self, param, cores=3D"Default", udev=3D"= ", > > no_pci=3DTrue):+ eal_param =3D ""+ if self.check_2M_env:+ > > eal_param +=3D " --single-file-segments"+ if 'vectorized' in > > self.running_case:+ eal_param +=3D " --force-max-simd-bitwid= th=3D512"+ > > self.pmdout_virtio_user1.start_testpmd(cores=3Dcores, param=3Dparam, > > vdevs=3D[udev], ports=3D[], prefix=3D"virtio1",+ > > fixed_prefix=3DTrue, eal_param=3Deal_param, no_pci=3Dno_pci)++ def > > verify_vhost_queue_rx_tx_pkts(self, queue_list):+ out =3D > > self.pmdout_vhost_user.execute_cmd('stop')+ for queue_index in > > queue_list:+ queue =3D "Queue=3D %d" % queue_index+ = index =3D > > out.find(queue)+ rx =3D re.search("RX-packets:\s*(\d*)", out= [index:])+ > > tx =3D re.search("TX-packets:\s*(\d*)", out[index:])+ rx_pac= kets =3D > > int(rx.group(1))+ tx_packets =3D int(tx.group(1))+ > > self.verify(rx_packets > 0 and tx_packets > 0,+ = "The queue %d > rx- > > packets or tx-packets is 0 about " % queue_index ++ = "rx- > > packets:%d, tx-packets:%d" % (rx_packets, tx_packets))++ def > > test_virtio_loopback(self):+ param =3D " --nb-cores=3D{} --rxq= =3D{} --txq=3D{}"+ > > other_param =3D " --tx-offloads=3D0x0 --enable-hw-vlan-strip --rss-ip"+ > > vhost_dev =3D f"'eth_vhost0,iface=3Dvhost-net,client=3D1,queues=3D8'"+ > > virtio_dev =3D f"'net_virtio_user0,mac=3D{self.dst_mac},path=3D./vhost- > > net,server=3D1,queues=3D8,mrg_rxbuf=3D1,in_order=3D1'"++ > > self.logger.info("Launch vhost as client mode with 2 queues")+ n= b_core > =3D > > 2+ vhost_rxq_txq =3D 2+ virtio_rxq_txq =3D 8+ vhos= t_param =3D > > param.format(nb_core, vhost_rxq_txq, vhost_rxq_txq)+ virtio_para= m =3D > > (other_param + param).format(nb_core, virtio_rxq_txq, virtio_rxq_txq)+ > > self.launch_testpmd_as_vhost_user(param=3Dvhost_param, > > cores=3Dself.vhost_cores, udev=3Dvhost_dev, no_pci=3DTrue)+ > > self.pmdout_vhost_user.execute_cmd('start')+ self.logger.info("L= aunch > > virtio-user as server mode with 8 queues")+ > > self.launch_testpmd_as_virtio_user1(param=3Dvirtio_param, > > cores=3Dself.virtio1_cores, udev=3Dvirtio_dev, no_pci=3DTrue)+ > > self.pmdout_virtio_user1.execute_cmd('set fwd mac')+ > > self.pmdout_virtio_user1.execute_cmd('start tx_first 32')+ > > self.verify_vhost_queue_rx_tx_pkts(queue_list=3Drange(vhost_rxq_txq))+ > > self.pmdout_vhost_user.execute_cmd('quit', '#')++ > > self.logger.info("Relaunch vhost with 8 queues and send packets")+ > > vhost_rxq_txq =3D 8+ vhost_param =3D param.format(nb_core, > > vhost_rxq_txq, vhost_rxq_txq)+ > > self.launch_testpmd_as_vhost_user(param=3Dvhost_param, > > cores=3Dself.cores[0:3], udev=3Dvhost_dev, no_pci=3DTrue)+ > > self.pmdout_vhost_user.execute_cmd('start tx_first 32')+ > > self.pmdout_vhost_user.execute_cmd('stop')+ > > self.pmdout_vhost_user.execute_cmd('set burst 1')+ > > self.pmdout_vhost_user.execute_cmd('start tx_first 1')+ > > self.verify_vhost_queue_rx_tx_pkts(queue_list=3Drange(vhost_rxq_txq))++ > > self.pmdout_virtio_user1.execute_cmd('quit', '#')+ > > self.pmdout_vhost_user.execute_cmd('quit', '#')++ def send_packets(s= elf, > > frame_size, pkt_count):+ pkt =3D > > "Ether(dst=3D'%s')/IP()/('x'*%d)" %(self.dst_mac, frame_size)+ > > self.tester.scapy_append('sendp([%s], iface=3D"%s", count=3D%s)' % (pkt= , > > self.txItf, pkt_count))+ self.tester.scapy_execute()++ def > > verify_virtio_user_receive_packets(self, pkt_count):+ out =3D > > self.pmdout_virtio_user1.execute_cmd('show port stats all')+ rx = =3D > > re.search("RX-packets:\s*(\d*)", out)+ tx =3D re.search("TX- > > packets:\s*(\d*)", out)+ rx_packets =3D int(rx.group(1))+ = tx_packets =3D > > int(tx.group(1))+ self.verify(rx_packets >=3D pkt_count and tx_p= ackets >=3D > > pkt_count,+ "Virtio-user receive no enough packets, = RX-packets: > > {},RX-packets: {}".format(rx_packets, tx_packets))++ def > > test_virtio_pvp(self):+ param =3D " --nb-cores=3D{} --txd=3D{} -= -rxd=3D{}"+ > > vhost_dev =3D f"'net_vhost0,iface=3Dvhost-net,queues=3D1'"+ virt= io_dev =3D > > f"'net_virtio_user0,mac=3D{self.dst_mac},path=3D./vhost- > > net,packed_vq=3D1,mrg_rxbuf=3D0,in_order=3D1," \+ > > f"vectorized=3D1,queue_size=3D1024'"+ self.logger.info("Launch v= host")+ > > nb_core =3D 2+ vhost_rxd_txd =3D 1024+ vhost_param =3D > > param.format(nb_core, vhost_rxd_txd, vhost_rxd_txd)+ port =3D > > self.dut.ports_info[self.dut_ports[0]]['pci']+ > > self.launch_testpmd_as_vhost_user(param=3Dvhost_param, > > cores=3Dself.vhost_cores, udev=3Dvhost_dev,+ > ports=3D[port], > > no_pci=3DFalse)+ self.pmdout_vhost_user.execute_cmd('start')++ > > self.logger.info("Launch virtio")+ nb_core =3D 1+ virtio_= param =3D > > param.format(nb_core, vhost_rxd_txd, vhost_rxd_txd)+ > > self.launch_testpmd_as_virtio_user1(param=3Dvirtio_param, > > cores=3Dself.virtio1_cores, udev=3Dvirtio_dev, no_pci=3DTrue)+ > > self.pmdout_virtio_user1.execute_cmd('set fwd mac')+ > > self.pmdout_virtio_user1.execute_cmd('start')++ self.logger.info= ("Start > > send packets and verify")+ # set tester port MTU=3D9000 when nee= d to > > send big packets.+ self.tester.send_expect("ifconfig %s mtu %s" = % > > (self.txItf, TSO_MTU), "# ")+ # set vhost testpmd port MTU=3D900= 0+ > > self.pmdout_vhost_user.execute_cmd('stop')+ > > self.pmdout_vhost_user.execute_cmd('port stop 0')+ > > self.pmdout_vhost_user.execute_cmd('port config mtu 0 %s' % TSO_MTU)+ > > self.pmdout_vhost_user.execute_cmd('port start 0')+ > > self.pmdout_vhost_user.execute_cmd('start')+ > > self.send_packets(frame_size=3D64, pkt_count=3D10)+ > > self.send_packets(frame_size=3D1518, pkt_count=3D10)+ > > self.verify_virtio_user_receive_packets(pkt_count=3D20)++ > > self.pmdout_virtio_user1.execute_cmd('quit', '#')+ > > self.pmdout_vhost_user.execute_cmd('quit', '#')++ def tear_down(self= ):+ > > """+ Run after each test case.+ """+ self.dut.send= _expect("killall - > s > > INT %s" % self.testpmd_name, "#")++ def tear_down_all(self):+ = """+ > > Run after each test suite.+ """+ > > self.dut.close_session(self.vhost_user)+ > > self.dut.close_session(self.virtio_user1)+ > > self.tester.send_expect("ifconfig %s mtu %s" % (self.txItf, DEFAULT_MTU= ), > > "# ")-- > > 2.25.1