* [dts] [PATCH] framework virt_dut: fix virtual dut update port failed
@ 2015-11-09 7:51 Yong Liu
0 siblings, 0 replies; only message in thread
From: Yong Liu @ 2015-11-09 7:51 UTC (permalink / raw)
To: dts
From: Marvin Liu <yong.liu@intel.com>
Host port may not contain VF devices, so before compare need check VF devices
existed.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/framework/virt_dut.py b/framework/virt_dut.py
index 529a2b1..844d193 100644
--- a/framework/virt_dut.py
+++ b/framework/virt_dut.py
@@ -318,11 +318,14 @@ class VirtDut(DPDKdut):
# search host port info structure
for hostport in self.host_dut.ports_info:
# update port numa
- if hostpci == hostport['pci'] or \
- hostpci in hostport['sriov_vfs_pci']:
+ if hostpci == hostport['pci']:
port['numa'] = hostport['numa']
port['port'].socket = hostport['numa']
break
+ if 'sriov_vfs_pci' in hostport and \
+ hostpci in hostport['sriov_vfs_pci']:
+ port['numa'] = hostport['numa']
+ port['port'].socket = hostport['numa']
break
def map_available_ports(self):
--
1.9.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-09 7:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 7:51 [dts] [PATCH] framework virt_dut: fix virtual dut update port failed Yong Liu
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).