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 8FA93A0548; Fri, 2 Apr 2021 11:38:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 555BF140ED1; Fri, 2 Apr 2021 11:38:35 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id ECD4F40141 for ; Fri, 2 Apr 2021 11:38:33 +0200 (CEST) IronPort-SDR: 2oLoqauqLTQh6nYVNnw8VIADTVJX1q79yVgZ3wGLCWgr8rEwwN0kd5ve1QaaJTfjpsjpxjMqjL vV95XHYpdVpw== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="189176095" X-IronPort-AV: E=Sophos;i="5.81,299,1610438400"; d="scan'208";a="189176095" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 02:38:32 -0700 IronPort-SDR: YA5bS34GiKVrTSCBtK4sF14ZWztu8CQAOa24UBh2esxq7firMszR4l6aLDfq7MyPH5i6qoSzqH vihfg/jnBrJw== X-IronPort-AV: E=Sophos;i="5.81,299,1610438400"; d="scan'208";a="419592486" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 02:38:31 -0700 From: Ling Wei To: dts@dpdk.org Cc: Ling Wei Date: Fri, 2 Apr 2021 17:37:12 +0800 Message-Id: <20210402093712.3089-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: add 2 packed ring cdbma testcase 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" Add 2 packed ring cdbma testcase 9 and 10 sync with testplan. Signed-off-by: Ling Wei --- .../TestSuite_vhost_virtio_user_interrupt.py | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py index 04c86769..1c4a5a98 100644 --- a/tests/TestSuite_vhost_virtio_user_interrupt.py +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py @@ -103,7 +103,10 @@ class TestVirtioUserInterrupt(TestCase): def launch_l3fwd(self, path, packed=False): self.core_interrupt = self.core_list_l3fwd[0] example_para = "./%s " % self.app_l3fwd_power_path - vdev = "virtio_user0,path=%s,cq=1" % path if not packed else "virtio_user0,path=%s,cq=1,packed_vq=1" % path + if not packed: + vdev = "virtio_user0,path=%s,cq=1" % path + else: + vdev = "virtio_user0,path=%s,cq=1,packed_vq=1" % path eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, prefix='l3fwd-pwd', no_pci=True, vdevs=[vdev]) if self.check_2M_env: eal_params += " --single-file-segments" @@ -152,7 +155,10 @@ class TestVirtioUserInterrupt(TestCase): start testpmd on virtio side """ testcmd = self.app_testpmd_path + " " - vdev = "net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net" if not packed else "net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1" + if not packed: + vdev = "net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net" + else: + vdev = "net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1" eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, prefix='virtio', no_pci=True, vdevs=[vdev]) para = " -- -i --txd=512 --rxd=128 --tx-offloads=0x00" cmd_virtio_user = testcmd + eal_params + para @@ -342,6 +348,38 @@ class TestVirtioUserInterrupt(TestCase): self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.close_all_session() + def test_lsc_event_between_vhost_user_and_virtio_user_with_packed_ring_and_cbdma_enabled(self): + """ + Test Case9: LSC event between vhost-user and virtio-user with packed ring and cbdma enabled + """ + self.get_cbdma_ports_info_and_bind_to_dpdk(1) + self.start_vhost_testpmd(pci=self.used_cbdma, dmas=self.dmas_info) + self.start_virtio_user(packed=True) + self.check_virtio_side_link_status("up") + self.vhost.send_expect("quit", "#", 20) + self.check_virtio_side_link_status("down") + self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.close_all_session() + + def test_packed_ring_virtio_user_interrupt_test_with_vhost_user_as_backend_and_cbdma_enabled(self): + """ + Test Case10: Packed ring virtio-user interrupt test with vhost-user as backend and cbdma enabled + """ + self.get_cbdma_ports_info_and_bind_to_dpdk(1) + self.start_vhost_testpmd(pci="", dmas=self.dmas_info) + self.launch_l3fwd(path="./vhost-net", packed=True) + # double check the status of interrupt core + for i in range(2): + self.tester.scapy_append('pk=[Ether(dst="52:54:00:00:00:01")/IP()/("X"*64)]') + self.tester.scapy_append('sendp(pk, iface="%s", count=100)' % self.tx_interface) + self.tester.scapy_execute() + time.sleep(3) + self.check_interrupt_log(status="waked up") + self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.close_all_session() + def tear_down(self): """ run after each test case. -- 2.25.1