Change in vdsm[master]: sriov: stop virtual functions from being reported as nics
asegurap at redhat.com
asegurap at redhat.com
Thu Dec 19 12:43:51 UTC 2013
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: sriov: stop virtual functions from being reported as nics
......................................................................
sriov: stop virtual functions from being reported as nics
Previously we were reporting SR-IOV Virtual functions a regular nics.
This was misleading and was counter productive when wanting to use
a hook for attaching (or passing through) a VF as a vNIC to a VM.
This patch implements the first part, "Filter out unused virtual functions from
being reported as nics." of:
http://www.ovirt.org/Features/UCS_Integration
Change-Id: Idbb345ee22b7b108f1fd58765bd371339b82198f
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
---
M lib/vdsm/ipwrapper.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/22559/1
diff --git a/lib/vdsm/ipwrapper.py b/lib/vdsm/ipwrapper.py
index f62980a..a68bc5b 100644
--- a/lib/vdsm/ipwrapper.py
+++ b/lib/vdsm/ipwrapper.py
@@ -68,6 +68,7 @@
OVS = 'openvswitch'
TEAM = 'team'
VETH = 'veth'
+ VF = 'vf'
@equals
@@ -175,6 +176,8 @@
detectedType = LinkType.BOND
elif 'VLAN' in driver or 'vlan' in driver:
detectedType = LinkType.VLAN
+ elif os.path.exists('/sys/class/net/name/device/physfn/'):
+ detectedType = LinkType.VF
else:
detectedType = LinkType.NIC
return detectedType
@@ -194,6 +197,9 @@
def isVETH(self):
return self.type == LinkType.VETH
+ def isVF(self):
+ return self.type == LinkType.VF
+
def isVLAN(self):
return self.type == LinkType.VLAN
--
To view, visit http://gerrit.ovirt.org/22559
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbb345ee22b7b108f1fd58765bd371339b82198f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
More information about the vdsm-patches
mailing list