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 058DAA058A; Wed, 25 Mar 2020 09:22:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ECF2E374C; Wed, 25 Mar 2020 09:22:35 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E725E1E34 for ; Wed, 25 Mar 2020 09:22:33 +0100 (CET) IronPort-SDR: Uoskm3C3lXITIh6Uwc1nRT5NfTkTf5Su++smiTFAmVvOdfmeTIfbZXDeLX6g6FYnyOUnB7yMuS BuOtPYNi6QVA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2020 01:22:32 -0700 IronPort-SDR: CVBufoAVaGCvO12ukPJUm+Zlcenib91DC+Mj3EEp7Gdlc/kq2AH/DBaWHkeqAqvtNNo4ULLKc9 oebGEBIgOY2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,303,1580803200"; d="scan'208";a="446547388" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 25 Mar 2020 01:22:32 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Mar 2020 01:22:32 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 25 Mar 2020 16:22:30 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Wed, 25 Mar 2020 16:22:30 +0800 From: "Wang, Yinan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1 09/11]vhost_virtio_user_interrupt: update script according to testplan's update Thread-Index: AQHWAn3kEYQHW50V4km/g/jYBjno4ahY+Aog Date: Wed, 25 Mar 2020 08:22:30 +0000 Message-ID: References: <1585123857-130281-1-git-send-email-qimaix.xiao@intel.com> <1585123857-130281-9-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1585123857-130281-9-git-send-email-qimaix.xiao@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.2.0.6 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 09/11]vhost_virtio_user_interrupt: update script according to testplan's update 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" Acked-by: Wang, Yinan > -----Original Message----- > From: dts On Behalf Of Xiao Qimai > Sent: 2020=1B$BG/=1B(B3=1B$B7n=1B(B25=1B$BF|=1B(B 16:11 > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V1 09/11]vhost_virtio_user_interrupt: update script > according to testplan's update >=20 > Signed-off-by: Xiao Qimai > --- > tests/TestSuite_vhost_virtio_user_interrupt.py | 72 > +++++++++++++++++++++----- > 1 file changed, 59 insertions(+), 13 deletions(-) >=20 > diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py > b/tests/TestSuite_vhost_virtio_user_interrupt.py > index 610e56e..69d5668 100644 > --- a/tests/TestSuite_vhost_virtio_user_interrupt.py > +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py > @@ -89,13 +89,13 @@ class TestVirtioUserInterrupt(TestCase): > out =3D self.dut.build_dpdk_apps("./examples/l3fwd-power") > self.verify("Error" not in out, "compilation l3fwd-power error") >=20 > - def launch_l3fwd(self, path): > + def launch_l3fwd(self, path, packed=3DFalse): > self.core_interrupt =3D self.core_list_l3fwd[0] > example_para =3D "./examples/l3fwd-power/build/l3fwd-power " > - vdev =3D " --log-level=3D'user1,7' --vdev=3Dvirtio_user0,path=3D= %s,cq=3D1 -- -p > 1" % path > - eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, prefix=3D'l3= fwd-pwd', > no_pci=3DTrue, ports=3D[self.pci_info]) > + vdev =3D "virtio_user0,path=3D%s,cq=3D1" % path if not packed el= se > "virtio_user0,path=3D%s,cq=3D1,packed_vq=3D1" % path > + eal_params =3D > + self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, > + prefix=3D'l3fwd-pwd', no_pci=3DTrue, ports=3D[self.pci_info], vdevs=3D[= vdev]) > para =3D " --config=3D'(0,0,%s)' --parse-ptype" % self.core_inte= rrupt > - cmd_l3fwd =3D example_para + eal_params + vdev + para > + cmd_l3fwd =3D example_para + eal_params + " --log-level=3D'user1= ,7' > + -- -p 1 " + para > self.l3fwd.get_session_before(timeout=3D2) > self.l3fwd.send_expect(cmd_l3fwd, "POWER", 40) > time.sleep(10) > @@ -110,27 +110,27 @@ class TestVirtioUserInterrupt(TestCase): > start testpmd on vhost side > """ > testcmd =3D self.dut.target + "/app/testpmd " > - vdev =3D [r"'net_vhost0,iface=3Dvhost-net,queues=3D1,client=3D0'= "] > + vdev =3D ["net_vhost0,iface=3Dvhost-net,queues=3D1,client=3D0"] > para =3D " -- -i --rxq=3D1 --txq=3D1" > if len(pci) =3D=3D 0: > eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_vhost, ports=3D[sel= f.pci_info], > vdevs=3Dvdev) > else: > - eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_vhost, prefix=3D'vh= ost', > no_pci=3DTrue, ports=3D[self.pci_info], vdevs=3Dvdev) > + eal_params =3D > + self.dut.create_eal_parameters(cores=3Dself.core_list_vhost, > + prefix=3D'vhost', no_pci=3DTrue, vdevs=3Dvdev) > cmd_vhost_user =3D testcmd + eal_params + para >=20 > self.vhost.send_expect(cmd_vhost_user, "testpmd>", 30) > self.vhost.send_expect("set fwd mac", "testpmd>", 30) > self.vhost.send_expect("start", "testpmd>", 30) >=20 > - def start_virtio_user(self): > + def start_virtio_user(self, packed=3DFalse): > """ > start testpmd on virtio side > """ > testcmd =3D self.dut.target + "/app/testpmd " > - vdev =3D " > --vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost-net" > - eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, prefix=3D'vi= rtio', > no_pci=3DTrue, ports=3D[self.pci_info]) > + vdev =3D "net_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhos= t-net" > if not packed else > "net_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost-net,packed_vq=3D= 1" > + eal_params =3D > + self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, > + prefix=3D'virtio', no_pci=3DTrue, vdevs=3D[vdev]) > para =3D " -- -i --txd=3D512 --rxd=3D128 --tx-offloads=3D0x00" > - cmd_virtio_user =3D testcmd + eal_params + vdev + para > + cmd_virtio_user =3D testcmd + eal_params + para > self.virtio.send_expect(cmd_virtio_user, "testpmd>", 120) > self.virtio.send_expect("set fwd mac", "testpmd>", 20) > self.virtio.send_expect("start", "testpmd>", 20) @@ -154,7 +154,= 7 > @@ class TestVirtioUserInterrupt(TestCase): > else: > self.logger.error("Wrong link status not right, status is %s= " % > result) >=20 > - def test_interrupt_with_vhost_net_as_backed(self): > + def > test_split_ring_virtio_user_interrupt_with_vhost_net_as_backed(self): > """ > Check the virtio-user interrupt can work when use vhost-net as > backend > """ > @@ -175,7 +175,7 @@ class TestVirtioUserInterrupt(TestCase): > self.check_interrupt_log(status=3D"waked up") > self.dut.send_expect("killall -s INT ping", "#") >=20 > - def test_interrupt_with_vhost_user_as_backed(self): > + def > test_split_ring_virtio_user_interrupt_with_vhost_user_as_backed(self): > """ > Check the virtio-user interrupt can work when use vhost-user as > backend > """ > @@ -189,7 +189,7 @@ class TestVirtioUserInterrupt(TestCase): > time.sleep(3) > self.check_interrupt_log(status=3D"waked up") >=20 > - def test_lsc_event_between_vhost_and_virtio_user(self): > + def > test_lsc_event_between_vhost_user_and_virtio_user_with_split_ring(self): > """ > LSC event between vhost-user and virtio-user > """ > @@ -200,6 +200,52 @@ class TestVirtioUserInterrupt(TestCase): > self.vhost.send_expect("quit", "#", 20) > self.check_virtio_side_link_status("down") >=20 > + def > test_packed_ring_virtio_user_interrupt_with_vhost_user_as_backed(self): > + """ > + Check the virtio-user interrupt can work when use vhost-user as > backend > + """ > + self.start_vhost_testpmd(pci=3D"") > + self.launch_l3fwd(path=3D"./vhost-net", packed=3DTrue) > + # double check the status of interrupt core > + for i in range(2): > + > self.tester.scapy_append('pk=3D[Ether(dst=3D"52:54:00:00:00:01")/IP()/("X= "*64)]') > + self.tester.scapy_append('sendp(pk, iface=3D"%s", count=3D10= 0)' % > self.tx_interface) > + self.tester.scapy_execute() > + time.sleep(3) > + self.check_interrupt_log(status=3D"waked up") > + > + def > test_packed_ring_virtio_user_interrupt_with_vhost_net_as_backed(self): > + """ > + Check the virtio-user interrupt can work when use vhost-net as > backend > + """ > + self.launch_l3fwd(path=3D"/dev/vhost-net", packed=3DTrue) > + self.virtio.send_expect("ifconfig tap0 up", "#", 20) > + self.virtio.send_expect("ifconfig tap0 1.1.1.2", "#", 20) > + # start to ping, check the status of interrupt core > + self.virtio.send_command("ping -I tap0 1.1.1.1 > aa &", 20) > + time.sleep(3) > + self.check_interrupt_log(status=3D"waked up") > + # stop ping, check the status of interrupt core > + self.dut.send_expect("killall -s INT ping", "#") > + time.sleep(2) > + self.check_interrupt_log(status=3D"sleeps") > + # restart ping, check the status of interrupt core > + self.virtio.send_command("ping -I tap0 1.1.1.1 > aa &", 20) > + time.sleep(3) > + self.check_interrupt_log(status=3D"waked up") > + self.dut.send_expect("killall -s INT ping", "#") > + > + def > test_lsc_event_between_vhost_user_and_virtio_user_with_packed_ring(self): > + """ > + LSC event between vhost-user and virtio-user > + """ > + self.start_vhost_testpmd(pci=3D"--no-pci") > + self.start_virtio_user(packed=3DTrue) > + self.check_virtio_side_link_status("up") > + > + self.vhost.send_expect("quit", "#", 20) > + self.check_virtio_side_link_status("down") > + > def tear_down(self): > """ > run after each test case. > -- > 1.8.3.1