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 CE93CA04B5; Mon, 11 Jan 2021 06:44:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD2FC140CDC; Mon, 11 Jan 2021 06:44:52 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 3F5DD140CD3 for ; Mon, 11 Jan 2021 06:44:51 +0100 (CET) IronPort-SDR: we0foDC0flL0281YrKBTvSFNe31SpukwkbaG3/s9lmNYRffjY+yeo1JDfjsouCJIMiU2SGq1oh abDww09m2OWQ== X-IronPort-AV: E=McAfee;i="6000,8403,9860"; a="165492796" X-IronPort-AV: E=Sophos;i="5.79,337,1602572400"; d="scan'208";a="165492796" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2021 21:44:50 -0800 IronPort-SDR: HEMtBzP+uMbvp1zI2UfuBIjm5IR8Esgnl7GUfMpLBrUNcJG0spbh6cER9MHcjHAn00RP6Cp3Ip ytAcRYRosmNw== X-IronPort-AV: E=Sophos;i="5.79,337,1602572400"; d="scan'208";a="571306430" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2021 21:44:48 -0800 From: JiangYu To: dts@dpdk.org Cc: JiangYu Date: Mon, 11 Jan 2021 13:37:04 +0000 Message-Id: <20210111133704.924036-1-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1] tests/vhost_cbdma: Add ports when launch_vhost_user 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 ports when launch_vhost_user Signed-off-by: JiangYu --- tests/TestSuite_vhost_cbdma.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py index 9b9d53d..977f290 100644 --- a/tests/TestSuite_vhost_cbdma.py +++ b/tests/TestSuite_vhost_cbdma.py @@ -201,9 +201,8 @@ class TestVirTioVhostCbdma(TestCase): out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ") return True if out == '2048' else False - def launch_testpmd_as_vhost_user(self, command, cores="Default", dev=""): - self.pmdout_vhost_user.start_testpmd(cores=cores, param=command, vdevs=[dev], ports=[], - + def launch_testpmd_as_vhost_user(self, command, cores="Default", dev="", ports = ""): + self.pmdout_vhost_user.start_testpmd(cores=cores, param=command, vdevs=[dev], ports=[ports], prefix="vhost", fixed_prefix=True) self.vhost_user.send_expect('set fwd mac', 'testpmd> ', 120) @@ -265,7 +264,7 @@ class TestVirTioVhostCbdma(TestCase): pvp_split_all_path_virtio_params = "--tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=%d --txd=%d " \ "--rxd=%d" % (queue, txd_rxd, txd_rxd) self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, txd_rxd, txd_rxd), self.cores[0:2], - dev=vhost_vdevs % (queue, dmathr), ) + dev=vhost_vdevs % (queue, dmathr), ports=self.dut_ports[0]) for key, path_mode in dev_path_mode_mapper.items(): if key == "vector_rx_path": @@ -319,7 +318,7 @@ class TestVirTioVhostCbdma(TestCase): # launch vhost testpmd self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], - dev=vhost_dev % vhost_dmas) + dev=vhost_dev % vhost_dmas, ports=self.dut_ports[0]) # # queue 2 start virtio testpmd, check perforamnce and RX/TX mode = "dynamic_queue2" @@ -360,7 +359,7 @@ class TestVirTioVhostCbdma(TestCase): dmathr = 512 vhost_dmas = f"dmas=[txq0@{self.used_cbdma[2]};txq1@{self.used_cbdma[3]}],dmathr={dmathr}" self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], - dev=vhost_dev % vhost_dmas) + dev=vhost_dev % vhost_dmas, ports=self.dut_ports[0]) self.virtio_user.send_expect("clear port stats all", "testpmd> ", 30) self.send_and_verify(mode, queue_list=range(queue)) self.check_port_stats_result(self.virtio_user) -- 2.7.4