From patchwork Tue Jul 27 06:29:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 96307 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 2329FA0C4D; Tue, 27 Jul 2021 08:36:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18133410ED; Tue, 27 Jul 2021 08:36:25 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 8F69D410EC for ; Tue, 27 Jul 2021 08:36:23 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10057"; a="297955923" X-IronPort-AV: E=Sophos;i="5.84,272,1620716400"; d="scan'208";a="297955923" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2021 23:36:21 -0700 X-IronPort-AV: E=Sophos;i="5.84,272,1620716400"; d="scan'208";a="516689874" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2021 23:36:20 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Tue, 27 Jul 2021 14:29:33 +0800 Message-Id: <20210727062933.4089848-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1] framework/virt_base: add bind_dev parameter in start VM method 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" In VM, no need to bind the nic to DPDK sometimes, so add bind_dev parameter in the start VM method. Signed-off-by: Wei Ling Tested-by: Wei Ling Acked-by: Yinan Wang --- framework/virt_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/virt_base.py b/framework/virt_base.py index b582f855..f19cbc4b 100644 --- a/framework/virt_base.py +++ b/framework/virt_base.py @@ -275,7 +275,7 @@ class VirtBase(object): self._attach_vm() return None - def start(self, load_config=True, set_target=True, cpu_topo=''): + def start(self, load_config=True, set_target=True, cpu_topo='', bind_dev=True): """ Start VM and instantiate the VM with VirtDut. """ @@ -290,7 +290,7 @@ class VirtBase(object): if self.vm_status is ST_RUNNING: # connect vm dut and init running environment - vm_dut = self.instantiate_vm_dut(set_target, cpu_topo, autodetect_topo=True) + vm_dut = self.instantiate_vm_dut(set_target, cpu_topo, bind_dev=bind_dev, autodetect_topo=True) else: vm_dut = None