From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B54332C5 for ; Sat, 18 Aug 2018 04:01:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Aug 2018 19:01:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,253,1531810800"; d="scan'208";a="255864542" Received: from dts-maintain.sh.intel.com (HELO [10.67.119.110]) ([10.67.119.110]) by fmsmga006.fm.intel.com with ESMTP; 17 Aug 2018 19:01:09 -0700 To: dts@dpdk.org References: <1534148459-10206-1-git-send-email-phil.yang@arm.com> From: Lijuan Tu Message-ID: Date: Sat, 18 Aug 2018 18:29:20 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1534148459-10206-1-git-send-email-phil.yang@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [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: Sat, 18 Aug 2018 02:01:19 -0000 Applied, thanks On 2018年08月13日 16:20, dts-bounces@dpdk.org wrote: > 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) >