[dts] [PATCH] framework virt_dut: fix virtual dut update port failed
Yong Liu
yong.liu at intel.com
Mon Nov 9 08:51:15 CET 2015
From: Marvin Liu <yong.liu at intel.com>
Host port may not contain VF devices, so before compare need check VF devices
existed.
Signed-off-by: Marvin Liu <yong.liu at 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
More information about the dts
mailing list