Vitor de Lima has uploaded a new change for review.

Change subject: core, engine: Do not count sPAPR VLAN devices as PCI
......................................................................

core, engine: Do not count sPAPR VLAN devices as PCI

The checkPciAndIdeLimits function accounted sPAPR VLAN devices as PCI,
but these devices have their own bus (the spapr-vio bus). This change
skips these devices in the total count of PCI devices done in the VM
related commands.

Change-Id: Iab14ae25f59cd77e29ef444bb1887911a2dcdb05
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1076518
Signed-off-by: Vitor de Lima <vitor.l...@eldorado.org.br>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/58/25758/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
index f02027f..6bc15f0 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
@@ -147,6 +147,8 @@
         for (VmNic a : interfaces) {
             if (a.getType() != null && VmInterfaceType.forValue(a.getType()) 
== VmInterfaceType.rtl8139_pv) {
                 pciInUse += 2;
+            } else if (a.getType() != null && 
VmInterfaceType.forValue(a.getType()) == VmInterfaceType.spaprVlan) {
+                // Do not count sPAPR VLAN devices since they are not PCI
             } else {
                 pciInUse += 1;
             }


-- 
To view, visit http://gerrit.ovirt.org/25758
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab14ae25f59cd77e29ef444bb1887911a2dcdb05
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <vitor.l...@eldorado.org.br>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to