Derive Params OvsPmdCoreList compute issue

This change is to compute DPDK derive parameter OvsPmdCoreList
correctly when DPDK NIC is associated to NUMA node 0 or
cores count is mentioned as same for all NUMA nodes.

Change-Id: I5fe6ccbd64a62cf0c6a3f4abf7785837a0d8f8c0
Closes-Bug: #1713733
This commit is contained in:
Jaganathan Palanisamy 2017-08-29 09:58:33 -04:00
parent 923658a720
commit aada6658b8
1 changed files with 2 additions and 3 deletions

View File

@ -148,7 +148,7 @@ class GetDpdkNicsNumaInfoAction(base.TripleOAction):
phy_name = self.get_physical_iface_name(
ordered_nics, name)
node = self.find_numa_node_id(numa_nics, phy_name)
if not node:
if node is None:
msg = ('Unable to determine NUMA node for '
'DPDK NIC: %s' % phy_name)
return actions.Result(error=msg)
@ -203,8 +203,7 @@ class GetDpdkCoreListAction(base.TripleOAction):
numa_nodes_threads[cpu['numa_node']] = []
numa_nodes_threads[cpu['numa_node']].extend(cpu['thread_siblings'])
for node_cores_count in self.numa_nodes_cores_count:
node = self.numa_nodes_cores_count.index(node_cores_count)
for node, node_cores_count in enumerate(self.numa_nodes_cores_count):
# Gets least thread in NUMA node
numa_node_min = min(numa_nodes_threads[node])
cores_count = node_cores_count