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 BAD4EA0562; Tue, 31 Mar 2020 05:00:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B36AD1C07F; Tue, 31 Mar 2020 05:00:09 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B6DC61C045 for ; Tue, 31 Mar 2020 05:00:07 +0200 (CEST) IronPort-SDR: yoBxo5gomL9NFgidtwxxZJ3PGWxhw6M47FhrhHhq7Tafv5X8K81EVWV4iKF9k3ceJDn3aFjCZa wqMDjEFE1oaQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 20:00:06 -0700 IronPort-SDR: v8oU/VmPE47Qn/iagWR5oGFP+INlbtVSAJlmrWx0P0jPEzuEfKeU80/imFad5NqnnZ/cheIQB/ JEuocZZX24RQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,326,1580803200"; d="scan'208";a="241798096" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 30 Mar 2020 20:00:06 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 30 Mar 2020 20:00:05 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 31 Mar 2020 11:00:03 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Tue, 31 Mar 2020 11:00:03 +0800 From: "Xiao, QimaiX" To: "dts@dpdk.org" Thread-Topic: [dts][PATCH V1 09/11]vhost_virtio_user_interrupt: update script according to testplan's update Thread-Index: AQHWAn3gDU0WK9mO0kyhxgzr8bRFkKhiC/JQ Date: Tue, 31 Mar 2020 03:00:03 +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: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" 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" Tested-by: Xiao, QimaiX Regards, Xiao Qimai > -----Original Message----- > From: Xiao, QimaiX > Sent: Wednesday, March 25, 2020 4:11 PM > 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[self.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,pat= h=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=3D1" > + 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 b= ackend > """ > @@ -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(s > elf): > + """ > + 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