aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDino Madarang <dinox.madarang@intel.com>2017-10-19 20:41:05 +0000
committerDino Madarang <dinox.madarang@intel.com>2017-11-20 06:44:30 +0000
commit78fff64b00e255d7e4624bcc62faddc0d135e5a2 (patch)
tree420875243ebf88e1eccbfb44488edd2f52bd9bb9
parent31b02e5b95d8b4076ef60667d051a8a1a6b072ba (diff)
NSB: Fix IndexError in pin_vcpu_for_perf
This addresses the IndexError in Standalone SRIOV/OVSDPDK context. The correct sys_cpu number should be sys_cpu-1 Error: threads = "%s-%s" % (soc_cpu[socket][sys_cpu], soc_cpu[socket][-1]) IndexError: list index out of range Tested platform: (Hyper-Threading disabled) NUMA node0 CPU(s): 0-21 NUMA node1 CPU(s): 22-43 With socket equal to 0, sys_cpu value was 22 which resulted to IndexError. Change-Id: I36b045cacce4caff4b5ddafaa9b6737f1c6df0a1 Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
-rw-r--r--yardstick/benchmark/contexts/standalone/model.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py
index ffd8858d9..45ae3c18a 100644
--- a/yardstick/benchmark/contexts/standalone/model.py
+++ b/yardstick/benchmark/contexts/standalone/model.py
@@ -222,7 +222,7 @@ class Libvirt(object):
soc_cpu = sys_obj.get_core_socket()
sys_cpu = int(soc_cpu["cores_per_socket"])
cores = "%s-%s" % (soc_cpu[socket][0], soc_cpu[socket][sys_cpu - 1])
- if int(soc_cpu["thread_per_core"]):
+ if int(soc_cpu["thread_per_core"]) > 1:
threads = "%s-%s" % (soc_cpu[socket][sys_cpu], soc_cpu[socket][-1])
cpuset = "%s,%s" % (cores, threads)
return cpuset