From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 490302BA2 for ; Thu, 14 Jul 2016 04:55:06 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 13 Jul 2016 19:55:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,360,1464678000"; d="scan'208";a="845913537" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2016 19:55:04 -0700 From: yongjie To: dts@dpdk.org Cc: yongjie Date: Thu, 14 Jul 2016 10:50:42 +0800 Message-Id: <1468464642-45496-1-git-send-email-yongjiex.gu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH] modify the initialization of core list on linux 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: Thu, 14 Jul 2016 02:55:06 -0000 Change the order to obtain socket info by "lscpu -p" Output of "lscpu -p" on Ubuntu14.04: # The following is the parsable format, which can be fed to other # programs. Each different item in every column has an unique ID # starting from zero. # CPU,Core,Socket,Node,,L1d,L1i,L2,L3 0,0,0,0,,0,0,0,0 1,1,0,1,,1,1,1,0 2,2,0,0,,2,2,2,0 3,3,0,0,,3,3,3,0 4,4,0,0,,4,4,4,0 5,5,0,0,,5,5,5,0 6,6,0,81,,6,6,6,0 7,7,0,0,,7,7,7,0 8,8,0,1920169263,,8,8,8,0 9,9,0,1634235183,,9,9,9,0 10,10,1,1815045490,,10,10,10,1 ... 37,17,1,0,,17,17,17,1 38,18,1,20778128,,18,18,18,1 39,19,1,0,,19,19,19,1 Signed-off-by: yongjie --- framework/crb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/crb.py b/framework/crb.py index b302a76..066bb3f 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -505,7 +505,7 @@ class Crb(object): core_id = 0 coremap = {} for line in cpuinfo: - (thread, core, unused, socket) = line.split(',')[0:4] + (thread, core, socket, unused) = line.split(',')[0:4] if core not in coremap.keys(): coremap[core] = core_id -- 2.1.4