From patchwork Wed Aug 4 02:51:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 96644 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 ED1A6A0C45; Wed, 4 Aug 2021 04:59:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7A474014F; Wed, 4 Aug 2021 04:59:36 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 9B0014003C for ; Wed, 4 Aug 2021 04:59:34 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10065"; a="213564404" X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="213564404" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2021 19:59:33 -0700 X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="479928332" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2021 19:59:32 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Wed, 4 Aug 2021 10:51:46 +0800 Message-Id: <20210804025146.3396626-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1] tests/pvp_vhost_user_reconnect: add bind_dev parameter in start_vms 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 bind_dev parameter in start_vms to decide whether bind NIC port to DPDK or not after start VM. Signed-off-by: Wei Ling Tested-by: Wei Ling Acked-by: Yinan Wang Acked-by: Yinan Wang --- tests/TestSuite_pvp_vhost_user_reconnect.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py index 4be19c5a..4b28f9d0 100644 --- a/tests/TestSuite_pvp_vhost_user_reconnect.py +++ b/tests/TestSuite_pvp_vhost_user_reconnect.py @@ -164,7 +164,7 @@ class TestPVPVhostUserReconnect(TestCase): 'in this suite, please config it in vhost_sample.cfg file') self.checked_vm = True - def start_vms(self, packed=False): + def start_vms(self, packed=False, bind_dev=True): """ start two VM """ @@ -186,7 +186,7 @@ class TestPVPVhostUserReconnect(TestCase): try: vm_dut = None - vm_dut = vm_info.start() + vm_dut = vm_info.start(bind_dev=bind_dev) if vm_dut is None: raise Exception("Set up VM ENV failed") except Exception as e: @@ -223,8 +223,6 @@ class TestPVPVhostUserReconnect(TestCase): restore vm interfaces and config intf arp """ for i in range(len(self.vm_dut)): - self.vm_dut[i].restore_interfaces() - time.sleep(5) vm_intf = self.vm_dut[i].ports_info[0]['intf'] self.vm_dut[i].send_expect("ifconfig %s %s" % (vm_intf, self.virtio_ip[i]), "#", 10) @@ -387,7 +385,7 @@ class TestPVPVhostUserReconnect(TestCase): self.vm_num = 2 vm_cycle = 0 self.launch_testpmd_as_vhost_user_with_no_pci() - self.start_vms() + self.start_vms(bind_dev=False) self.config_vm_intf() self.start_iperf() self.before_data = self.iperf_result_verify(vm_cycle, 'before reconnet') @@ -412,7 +410,7 @@ class TestPVPVhostUserReconnect(TestCase): self.vm_dut[0].send_expect('rm iperf_server.log', '# ', 10) self.vm_dut[1].send_expect('rm iperf_client.log', '# ', 10) self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ") - self.start_vms() + self.start_vms(bind_dev=False) self.config_vm_intf() self.start_iperf() self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm') @@ -494,7 +492,7 @@ class TestPVPVhostUserReconnect(TestCase): self.vm_num = 2 vm_cycle = 0 self.launch_testpmd_as_vhost_user_with_no_pci() - self.start_vms(packed=True) + self.start_vms(packed=True, bind_dev=False) self.config_vm_intf() self.start_iperf() self.before_data = self.iperf_result_verify(vm_cycle, 'before reconnet') @@ -518,7 +516,7 @@ class TestPVPVhostUserReconnect(TestCase): self.vm_dut[0].send_expect('rm iperf_server.log', '# ', 10) self.vm_dut[1].send_expect('rm iperf_client.log', '# ', 10) self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ") - self.start_vms(packed=True) + self.start_vms(packed=True, bind_dev=False) self.config_vm_intf() self.start_iperf() self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm')