test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] modify the initialization of core list on linux
@ 2016-07-14  2:50 yongjie
  2016-07-14 13:44 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: yongjie @ 2016-07-14  2:50 UTC (permalink / raw)
  To: dts; +Cc: yongjie

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 <yongjiex.gu@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH] modify the initialization of core list on linux
  2016-07-14  2:50 [dts] [PATCH] modify the initialization of core list on linux yongjie
@ 2016-07-14 13:44 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2016-07-14 13:44 UTC (permalink / raw)
  To: Gu, YongjieX, dts; +Cc: Gu, YongjieX

Applied, thanks. Please check on other linux distribution.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yongjie
> Sent: Thursday, July 14, 2016 10:51 AM
> To: dts@dpdk.org
> Cc: Gu, YongjieX
> Subject: [dts] [PATCH] modify the initialization of core list on linux
> 
> 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 <yongjiex.gu@intel.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-14 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14  2:50 [dts] [PATCH] modify the initialization of core list on linux yongjie
2016-07-14 13:44 ` Liu, Yong

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).