From patchwork Fri Mar 19 06:47:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 89537 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B4865A0562; Fri, 19 Mar 2021 07:48:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF3E7140E92; Fri, 19 Mar 2021 07:48:17 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 6305D4003F for ; Fri, 19 Mar 2021 07:48:16 +0100 (CET) IronPort-SDR: qgtYSivoZhmV3nHzr5v38Ady/gQnCZPJ5fBJXAsz/KceWIxEp1w2SU873O7zovBKM1f4erqviX 9rs9uozaEsgQ== X-IronPort-AV: E=McAfee;i="6000,8403,9927"; a="209859782" X-IronPort-AV: E=Sophos;i="5.81,261,1610438400"; d="scan'208";a="209859782" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 23:48:15 -0700 IronPort-SDR: VN1RHfk9ntBIu+o+39veJCviiJ9sbpQHY5nJo+MjAmf0ijChAjWiH6q839MJmrfTHNTi7aQiNp OVO9thlJ4EPg== X-IronPort-AV: E=Sophos;i="5.81,261,1610438400"; d="scan'208";a="606504871" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 23:48:14 -0700 From: Ling Wei To: dts@dpdk.org Cc: Ling Wei Date: Fri, 19 Mar 2021 14:47:13 +0800 Message-Id: <20210319064713.4894-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 9/9] tests/vswitch_sample_cbdma:modify hard code bind cbdma device to igb_uio by drivername in execution.cfg 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" 1.Modify hard code bind cbdma device to igb_uio by drivername in execution.cfg. 2.Adjust code format. Signed-off-by: Ling Wei --- tests/TestSuite_vswitch_sample_cbdma.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py index b067cc09..df3ab6f3 100644 --- a/tests/TestSuite_vswitch_sample_cbdma.py +++ b/tests/TestSuite_vswitch_sample_cbdma.py @@ -228,6 +228,9 @@ class TestVswitchSampleCBDMA(TestCase): """ get all cbdma ports """ + # check driver name in execution.cfg + self.verify(self.drivername == 'igb_uio', + "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg") str_info = 'Misc (rawdev) devices using kernel driver' out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30) device_info = out.split('\n') @@ -252,8 +255,7 @@ class TestVswitchSampleCBDMA(TestCase): dmas_info += dmas self.dmas_info = dmas_info[:-1] self.device_str = ' '.join(used_cbdma) - self.dut.setup_modules(self.target, "igb_uio","None") - self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s' % ("igb_uio", self.device_str), '# ', 60) + self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s' % (self.drivername, self.device_str), '# ', 60) def send_vlan_packet(self, dts_mac, pkt_size=64, pkt_count=1): """ @@ -338,7 +340,6 @@ class TestVswitchSampleCBDMA(TestCase): self.set_async_threshold(1518) self.build_vhost_app() cbmda_copy = self.pvp_test_with_cbdma(socket_num=1, with_cbdma=True, cbdma_num=1) - self.virtio_user0_pmd.execute_cmd("quit", "#") self.vhost_user.send_expect("^C", "# ", 20) @@ -348,14 +349,12 @@ class TestVswitchSampleCBDMA(TestCase): self.set_async_threshold(0) self.build_vhost_app() sync_copy = self.pvp_test_with_cbdma(socket_num=1, with_cbdma=True, cbdma_num=1) - self.virtio_user0_pmd.execute_cmd("quit", "#") self.vhost_user.send_expect("^C", "# ", 20) # test CPU copy # CPU copy means vhost enqueue w/o cbdma channel cpu_copy = self.pvp_test_with_cbdma(socket_num=1, with_cbdma=False, cbdma_num=0) - self.virtio_user0_pmd.execute_cmd("quit", "#") self.vhost_user.send_expect("^C", "# ", 20) @@ -414,7 +413,6 @@ class TestVswitchSampleCBDMA(TestCase): self.logger.info("Relaunch vhost app perf test") after_relunch = self.pvp_test_with_multi_cbdma(socket_num=2, with_cbdma=True, cbdma_num=2, launch_virtio=False, quit_vhost=False) - self.virtio_user0_pmd.execute_cmd("quit", "#") self.virtio_user1_pmd.execute_cmd("quit", "#") self.vhost_user.send_expect("^C", "# ", 20) @@ -492,13 +490,11 @@ class TestVswitchSampleCBDMA(TestCase): self.build_vhost_app() cbdma_enable = self.vm2vm_check_with_two_cbdma(with_cbdma=True, cbdma_num=2, socket_num=2) - self.virtio_user0_pmd.execute_cmd("quit", "#") self.virtio_user1_pmd.execute_cmd("quit", "#") self.vhost_user.send_expect("^C", "# ", 20) cbdma_disable = self.vm2vm_check_with_two_cbdma(with_cbdma=False, cbdma_num=2, socket_num=2) - self.virtio_user0_pmd.execute_cmd("quit", "#") self.virtio_user1_pmd.execute_cmd("quit", "#") self.vhost_user.send_expect("^C", "# ", 20) @@ -545,7 +541,6 @@ class TestVswitchSampleCBDMA(TestCase): self.result_table_add([frame_size, rx_pps]) rx_throughput[frame_size] = rx_pps self.result_table_print() - return rx_throughput def start_vms_testpmd_and_test(self, launch, quit_vm_testpmd=False):