From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 69DFE2661 for ; Mon, 13 Aug 2018 10:21:14 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 28FFB7A9; Mon, 13 Aug 2018 01:21:13 -0700 (PDT) Received: from phil-VirtualBox.shanghai.arm.com (unknown [10.169.109.169]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3EBFF3F73C; Mon, 13 Aug 2018 01:21:12 -0700 (PDT) From: Phil Yang To: dts@dpdk.org Cc: nd@arm.com, phil.yang@arm.com, yong.liu@intel.com Date: Mon, 13 Aug 2018 16:20:59 +0800 Message-Id: <1534148459-10206-1-git-send-email-phil.yang@arm.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH] framework/crb: Add new option in crbs to identify dut arch 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: Mon, 13 Aug 2018 08:21:14 -0000 The SOCKET IDs on some arm64 servers are incorrect which listed by lscpu on Linux. This defect will causes DTS failures. 0,0,0,0 1,1,0,0 2,2,0,0 3,3,0,0 4,4,1,0 5,5,1,0 6,6,1,0 7,7,1,0 8,8,2,0 9,9,2,0 10,10,2,0 11,11,2,0 12,12,3,0 13,13,3,0 14,14,3,0 15,15,3,0 16,16,4,1 17,17,4,1 18,18,4,1 19,19,4,1 20,20,5,1 21,21,5,1 22,22,5,1 23,23,5,1 ... However, the NUMA NODE ID is correct and the NUMA NODE ID is the equivalence of SOCKET ID on arm server. By replacing the SOCKET ID with the NUMA NODE ID on the arm64 platform can solve this issue. Signed-off-by: Phil Yang Tested-by: Liang JiangWang --- conf/crbs.cfg | 2 ++ framework/config.py | 2 ++ framework/crb.py | 12 ++++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/conf/crbs.cfg b/conf/crbs.cfg index 0a17c35..f8676e6 100644 --- a/conf/crbs.cfg +++ b/conf/crbs.cfg @@ -14,6 +14,7 @@ dut_ip=xxx.xxx.xxx.xxx dut_user=root dut_passwd= os=linux +dut_arch= tester_ip=xxx.xxx.xxx.xxx tester_passwd= ixia_group= @@ -24,6 +25,7 @@ dut_ip=yyy.yyy.yyy.yyy dut_user=root dut_passwd= os=linux +dut_arch= tester_ip=yyy.yyy.yyy.yyy tester_passwd= ixia_group= diff --git a/framework/config.py b/framework/config.py index 71b1c37..46c6ffb 100644 --- a/framework/config.py +++ b/framework/config.py @@ -301,6 +301,8 @@ class CrbsConf(UserConf): crb['bypass core0'] = False elif key == 'board': crb['board'] = value + elif key == 'dut_arch': + crb['dut arch'] = value self.crbs_cfg.append(crb) return self.crbs_cfg diff --git a/framework/crb.py b/framework/crb.py index 0885539..5c555db 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -545,7 +545,7 @@ class Crb(object): cpuinfo = \ self.send_expect( - "lscpu -p|grep -v \#", + "lscpu -p=CPU,CORE,SOCKET,NODE|grep -v \#", "#", alt_session=True) cpuinfo = cpuinfo.split() @@ -554,7 +554,7 @@ class Crb(object): core_id = 0 coremap = {} for line in cpuinfo: - (thread, core, socket, unused) = line.split(',')[0:4] + (thread, core, socket, node) = line.split(',')[0:4] if core not in coremap.keys(): coremap[core] = core_id @@ -563,8 +563,12 @@ class Crb(object): if self.crb['bypass core0'] and core == '0' and socket == '0': self.logger.info("Core0 bypassed") continue - self.cores.append( - {'thread': thread, 'socket': socket, 'core': coremap[core]}) + if self.crb['dut arch'] == "arm64": + self.cores.append( + {'thread': thread, 'socket': node, 'core': coremap[core]}) + else: + self.cores.append( + {'thread': thread, 'socket': socket, 'core': coremap[core]}) self.number_of_cores = len(self.cores) -- 2.7.4