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 1D054A055D; Wed, 3 Mar 2021 10:46:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E37DB40683; Wed, 3 Mar 2021 10:46:12 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 405D04067B for ; Wed, 3 Mar 2021 10:46:10 +0100 (CET) IronPort-SDR: tuNOlHrVXj1moEwxpZhVIShpBLwESu3zvWmI+2TbCNjE/yRAYkT1H2Khq8LV6i4+beRi1E52/l gf2pMdn+bsIQ== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="186505104" X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="186505104" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 01:46:07 -0800 IronPort-SDR: C+UikgGdR0XBHtBgoRBLvxgVOLy8lBeLUBVatU9sXvSfgSHlMDNYXrMKlI+LqtvDrxhc8UyH8u KR0JbDga3HTg== X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="407161366" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 01:46:05 -0800 From: Ling Wei To: dts@dpdk.org Cc: Ling Wei Date: Wed, 3 Mar 2021 17:45:19 +0800 Message-Id: <20210303094519.223755-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/pvp_multi_paths_vhost_single_core_performance:Remove vectorized=0 by default in test case 9 and optimize code 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" Remove vectorized=0 by default in test case 9 and use pmd.start_testpmd() to replace session.send_expect() to start and quit testpmd. Signed-off-by: Ling Wei --- ...lti_paths_vhost_single_core_performance.py | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py b/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py index d0e075c8..5624e29a 100644 --- a/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py +++ b/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py @@ -43,6 +43,7 @@ from packet import Packet from pktgen import PacketGeneratorHelper from settings import UPDATE_EXPECTED, load_global_setting from copy import deepcopy +from pmd_output import PmdOutput class TestPVPMultiPathVhostPerformance(TestCase): @@ -67,8 +68,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): self.tester.send_expect('mkdir -p %s' % self.out_path, '# ') # create an instance to set stream field setting self.pktgen_helper = PacketGeneratorHelper() - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") + self.vhost_user = self.dut.new_session(suite="vhost-user") + self.virtio_user0 = self.dut.new_session(suite="virtio-user0") + self.vhost_user_pmd = PmdOutput(self.dut, self.vhost_user) + self.virtio_user0_pmd = PmdOutput(self.dut, self.virtio_user0) self.save_result_flag = True self.json_obj = {} self.path=self.dut.apps_name['test-pmd'] @@ -160,33 +163,26 @@ class TestPVPMultiPathVhostPerformance(TestCase): self.dut.send_expect("rm -rf ./vhost-net*", "#") self.dut.send_expect("killall -s INT %s" % self.testpmd_name , "#") self.dut.send_expect("killall -s INT qemu-system-x86_64", "#") - eal_param = self.dut.create_eal_parameters(cores=self.core_list_host, prefix='vhost', - no_pci=True, - vdevs=['net_vhost0,iface=vhost-net,queues=1']) - command_line_client =self.path + eal_param + \ - " -- -i --nb-cores=1 --txd=%d --rxd=%d" % (self.nb_desc, self.nb_desc) - self.vhost.send_expect(command_line_client, "testpmd> ", 120) - self.vhost.send_expect("set fwd mac", "testpmd> ", 120) - self.vhost.send_expect("start", "testpmd> ", 120) + vdevs = ['net_vhost0,iface=vhost-net,queues=1'] + param = "--nb-cores=1 --txd=%d --rxd=%d" % (self.nb_desc, self.nb_desc) + self.vhost_user_pmd.start_testpmd(cores=self.core_list_host, param=param, vdevs=vdevs, no_pci=True, prefix="vhost") + self.vhost_user_pmd.execute_cmd("set fwd mac") + self.vhost_user_pmd.execute_cmd("start") def start_virtio_testpmd(self, args): """ start testpmd on virtio """ - eal_param = self.dut.create_eal_parameters(cores=self.core_list_user, prefix='virtio', - ports=[0], - vdevs=['virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=1,%s' % - args["version"]]) + eal_param = "" if self.check_2M_env: eal_param += " --single-file-segments" if 'virtio11_vectorized' in self.running_case: eal_param += " --force-max-simd-bitwidth=512" - command_line_user = self.path + eal_param + \ - " -- -i %s --nb-cores=2 --txd=%d --rxd=%d" % \ - (args["path"], self.nb_desc, self.nb_desc) - self.vhost_user.send_expect(command_line_user, "testpmd> ", 120) - self.vhost_user.send_expect("set fwd io", "testpmd> ", 120) - self.vhost_user.send_expect("start", "testpmd> ", 120) + vdevs = ['net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=1,%s' % args["version"]] + param = "%s --rss-ip --nb-cores=2 --txd=%d --rxd=%d" % (args["path"], self.nb_desc, self.nb_desc) + self.virtio_user0_pmd.start_testpmd(cores=self.core_list_user, eal_param=eal_param, param=param, vdevs=vdevs, ports=[0], prefix='virtio') + self.virtio_user0_pmd.execute_cmd("set fwd mac") + self.virtio_user0_pmd.execute_cmd("start") def handle_expected(self): """ @@ -287,15 +283,15 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ close all testpmd of vhost and virtio """ - self.vhost.send_expect("quit", "#", 60) - self.vhost_user.send_expect("quit", "#", 60) + self.vhost_user_pmd.execute_cmd("quit", "# ") + self.virtio_user0_pmd.execute_cmd("quit", "# ") def close_all_session(self): """ close all session of vhost and vhost-user """ self.dut.close_session(self.vhost_user) - self.dut.close_session(self.vhost) + self.dut.close_session(self.virtio_user0) def test_perf_vhost_single_core_virtio11_mergeable(self): """ @@ -354,7 +350,7 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ self.test_target = self.running_case self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target] - virtio_pmd_arg = {"version": "in_order=1,packed_vq=1,mrg_rxbuf=0,vectorized=0", + virtio_pmd_arg = {"version": "in_order=1,packed_vq=1,mrg_rxbuf=0", "path": "--enable-hw-vlan-strip --rss-ip"} self.start_vhost_testpmd() self.start_virtio_testpmd(virtio_pmd_arg) -- 2.25.1