* [dts] [PATCH] framework/crb: Add new option in crbs to identify dut arch
@ 2018-08-13 8:20 Phil Yang
2018-08-18 10:29 ` Lijuan Tu
0 siblings, 1 reply; 2+ messages in thread
From: Phil Yang @ 2018-08-13 8:20 UTC (permalink / raw)
To: dts; +Cc: nd, phil.yang, yong.liu
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 <phil.yang@arm.com>
Tested-by: Liang JiangWang <liangjiang.wang@arm.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] framework/crb: Add new option in crbs to identify dut arch
2018-08-13 8:20 [dts] [PATCH] framework/crb: Add new option in crbs to identify dut arch Phil Yang
@ 2018-08-18 10:29 ` Lijuan Tu
0 siblings, 0 replies; 2+ messages in thread
From: Lijuan Tu @ 2018-08-18 10:29 UTC (permalink / raw)
To: dts
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 <phil.yang@arm.com>
> Tested-by: Liang JiangWang <liangjiang.wang@arm.com>
> ---
> 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)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-18 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 8:20 [dts] [PATCH] framework/crb: Add new option in crbs to identify dut arch Phil Yang
2018-08-18 10:29 ` Lijuan Tu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).