[dts] [PATCH] fix bug that vf device do not have sysfs attribute sriov_numvfs

Yong Liu yong.liu at intel.com
Tue Jul 28 03:58:02 CEST 2015


From: Marvin Liu <yong.liu at intel.com>

Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/framework/net_device.py b/framework/net_device.py
index 6796269..9afa6ca 100644
--- a/framework/net_device.py
+++ b/framework/net_device.py
@@ -518,6 +518,10 @@ class NetDevice(object):
             "cat /sys/bus/pci/devices/0000\:%s\:%s/sriov_numvfs" %
             (bus_id, devfun_id), "# ")
         sriov_vfs_pci = []
+
+        if "No such file" in sriov_numvfs:
+            return sriov_vfs_pci
+
         if int(sriov_numvfs) == 0:
             pass
         else:
-- 
1.9.3



More information about the dts mailing list