From patchwork Fri Dec 2 04:33:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 120427 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 BDD8EA0543; Fri, 2 Dec 2022 05:39:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B92F542B77; Fri, 2 Dec 2022 05:39:42 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id F3DAB40687 for ; Fri, 2 Dec 2022 05:39:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669955981; x=1701491981; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=PF0jXR0U5AM2Nfl8XjRCcJcq4ibsgLOL2zinwEcbrZg=; b=FxM32UsJHOopEc34ahQVtdu2l76Qn0e0mgLrx+HzyDvSPFRXcWdbOwKU u124FANPg9tf8Z7nNeIBxzInWFwcIEpn5EfViKenQ2o1yYhWIsyP4XvqW p0fADTQcMSxWAzzf6dFnUxbQju1egaDBy0S7RS6/DwehiAyI60JxBUhih ClRT9OgguP99CE20oOA96SYEAWLVSuXveejAdUZ8H+q7wcIi7cpj28GJq VxvLf/2wFAt49awpxQtvjKNlel3Qcu8SyRGl+ZBBznxRZaIxFzfl9Umy6 6+zAdfhLWd3QFxkjPzUTYTjBX+hLgVruKugyjp+GT7PBSMhcQX6uszR9h w==; X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="317734037" X-IronPort-AV: E=Sophos;i="5.96,210,1665471600"; d="scan'208";a="317734037" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2022 20:39:39 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="751109287" X-IronPort-AV: E=Sophos;i="5.96,210,1665471600"; d="scan'208";a="751109287" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2022 20:39:38 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 2/2] framework/virt_base: add pin_threads option when start VM Date: Fri, 2 Dec 2022 12:33:47 +0800 Message-Id: <20221202043347.1179751-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Add pin_threads option when start VM, default pin_threads=True. Signed-off-by: Wei Ling --- 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 a7fc8c4e..e3aecb60 100644 --- a/framework/virt_base.py +++ b/framework/virt_base.py @@ -273,7 +273,7 @@ class VirtBase(object): self._attach_vm() return None - def start(self, load_config=True, set_target=True, cpu_topo="", bind_dev=True): + def start(self, load_config=True, set_target=True, cpu_topo="", bind_dev=True, pin_threads=True): """ Start VM and instantiate the VM with VirtDut. """ @@ -284,7 +284,7 @@ class VirtBase(object): self.compose_boot_param() # start virtual machine - self._start_vm() + self._start_vm(pin_threads=pin_threads) if self.vm_status is ST_RUNNING: # connect vm dut and init running environment