From patchwork Fri Apr 29 09:09:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Dong X-Patchwork-Id: 110511 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 C92EAA04FD; Fri, 29 Apr 2022 11:10:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C1E9A415D7; Fri, 29 Apr 2022 11:10:08 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id E5EBD410E3 for ; Fri, 29 Apr 2022 11:10:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651223408; x=1682759408; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dJfNDPXdAzfzR4k/nsqaHGXHGxtA2DoikR3AD8tCi14=; b=JsaSh4XrnEGiIV12xLTAI9IGdG4jiAa4yo9OE/EMopB7JA1zVY+XoCA1 BeEWyTgMA7d1phasD1ej69MKqIf8l3zP/bfRGe4J0FCe7M6/UffjVjy0B shZpam7nRuFXxEyNQmFak+9Jlfqvlu46lAG09IF7de9Vsjw8kDWHbMejE 6o1USEQlv121nPP997/YRiScnIuDL4P8bVF+3JlSs2RPLimZVuOszrK+V 7BV2whT3u8KrR2uy2huef/Gr8yctzPuykLw/AlBYDSMHCS+9tsBPyQknD B1Hc9UdKiXnW+WoaH4JeXwqmDnZHC3Ebz1VUwhWDFEYLcK/zWPyiOcetH Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10331"; a="248516135" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="248516135" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 02:10:07 -0700 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="706464202" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.109.70]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 02:10:05 -0700 From: Jun Dong To: dts@dpdk.org Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com Subject: [V1] framework/crb: fix bug of generating core list on freebsd platform Date: Fri, 29 Apr 2022 17:09:58 +0800 Message-Id: <20220429090958.8126-1-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.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 On freebsd platform that supporting Hyper threading, if crb.cfg configured support pass core 0, the cores list(Hyper threading) need not only skip thread 0, but also other threads that on core 0. Signed-off-by: Jun Dong Reviewed-by: Lijuan Tu --- framework/crb.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/crb.py b/framework/crb.py index a15d15e9..0dc82005 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -739,10 +739,11 @@ class Crb(object): for core in core_elements: threads = [int(x) for x in core.text.split(",")] for thread in threads: - if thread != 0: - self.cores.append( - {"socket": socket_id, "core": core_id, "thread": thread} - ) + if self.crb["bypass core0"] and socket_id == 0 and core_id == 0: + continue + self.cores.append( + {"socket": socket_id, "core": core_id, "thread": thread} + ) core_id += 1 socket_id += 1 self.number_of_cores = len(self.cores)