From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 47FBF2661 for ; Wed, 26 Jul 2017 04:33:12 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2017 19:33:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,413,1496127600"; d="scan'208";a="1155410097" Received: from dpdk-test38.sh.intel.com ([10.67.111.97]) by orsmga001.jf.intel.com with ESMTP; 25 Jul 2017 19:33:05 -0700 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Tue, 25 Jul 2017 22:30:58 -0400 Message-Id: <1501036258-38598-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH v1] framework crb: allocate lcores from thread if lack of partial cores X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 02:33:13 -0000 Signed-off-by: Marvin Liu diff --git a/framework/crb.py b/framework/crb.py index 63c8093..8fbd5b3 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -662,17 +662,13 @@ class Crb(object): partial_cores = self.cores sockList = set([int(n['socket']) for n in partial_cores]) - sockList = list(sockList)[1:nr_sockets + 1] + sockList = list(sockList)[:nr_sockets] partial_cores = [n for n in partial_cores if int( n['socket']) in sockList] - core_list = set([int(n['core']) for n in partial_cores]) - core_list = list(core_list) - thread_list = set([int(n['thread']) for n in partial_cores]) - thread_list = list(thread_list) temp = [] for sock in sockList: - core_list = list([int(n['core']) for n in partial_cores if int( + core_list = list([int(n['thread']) for n in partial_cores if int( n['socket']) == sock]) core_list = core_list[:nr_cores] temp.extend(core_list) -- 1.9.3