]> xenbits.xensource.com Git - libvirt.git/commitdiff
Revert "network: Check for QOS before blindly using it"
authorErik Skultety <eskultet@redhat.com>
Fri, 22 Nov 2019 15:21:33 +0000 (16:21 +0100)
committerErik Skultety <eskultet@redhat.com>
Mon, 25 Nov 2019 08:41:40 +0000 (09:41 +0100)
This reverts commit f4db846c32c0a1e99a0f62b340273e48f8a98ed3.

This patch results in the following error when trying to start
essentially any VM with default network:

unsupported configuration: QOS must be defined for network 'default'

Coverity didn't see that the bandwidth == NULL it complained about in
virNetDevBandwidthPlug was already checked properly in
networkCheckBandwidth, thus causing networkPlugBandwidth to return 0
and finish before a call to virNetDevBandwidthPlug would have been even
made.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/network/bridge_driver.c

index 9c49c705643d498c5476fee8a0177d5d22c60402..68bb916501c292d7eb00ab058ea415e9f3ad07e1 100644 (file)
@@ -4567,13 +4567,6 @@ networkAllocatePort(virNetworkObjPtr obj,
             return -1;
         }
 
-        if (!port->bandwidth) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("QOS must be defined for network '%s'"),
-                           netdef->name);
-            return -1;
-        }
-
         if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->class_id) < 0)
             return -1;
         break;
@@ -4640,13 +4633,6 @@ networkAllocatePort(virNetworkObjPtr obj,
                 }
             }
 
-            if (!port->bandwidth) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("QOS must be defined for network '%s'"),
-                               netdef->name);
-                return -1;
-            }
-
             if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->class_id) < 0)
                 return -1;
             break;