test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] fix bug that vf device do not have sysfs attribute sriov_numvfs
@ 2015-07-28  1:58 Yong Liu
  0 siblings, 0 replies; only message in thread
From: Yong Liu @ 2015-07-28  1:58 UTC (permalink / raw)
  To: dts

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

Signed-off-by: Marvin Liu <yong.liu@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-28  1:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28  1:58 [dts] [PATCH] fix bug that vf device do not have sysfs attribute sriov_numvfs 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).