summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu, Yong <yong.liu@intel.com>2016-12-27 10:27:42 +0800
committerMarvin Liu <yong.liu@intel.com>2017-01-16 09:20:52 +0800
commit7141f800901d2aee6eb4093208c78477d84a9e5d (patch)
treeb7edd344ad09cf4b2216e8da3d133d87a1a8f5eb
parenta6a36df95f50689088e2972ddfdc276f566d3cf7 (diff)
framework crb: support socket paramater when require all logic cores
When case get lcore by get_core_list function, socket parameter should also workable even requiring for all lcores. Signed-off-by: Marvin Liu <yong.liu@intel.com>
-rw-r--r--framework/crb.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/framework/crb.py b/framework/crb.py
index a8e308a..9b41a0f 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -605,7 +605,14 @@ class Crb(object):
We can specify the physical CPU socket by paramter "socket".
"""
if config == 'all':
- return [n['thread'] for n in self.cores]
+ cores = []
+ if socket != -1:
+ for core in self.cores:
+ if int(core['socket']) == socket:
+ cores.append(core['thread'])
+ else:
+ cores = [core['thread'] for core in self.cores]
+ return cores
m = re.match("([1234])S/([0-9]+)C/([12])T", config)