[libvirt] [PATCH] network: add debug when bandwidth settings are not applied

Daniel P. Berrangé posted 1 patch 4 years, 7 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190913160519.14730-1-berrange@redhat.com
src/network/bridge_driver.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
[libvirt] [PATCH] network: add debug when bandwidth settings are not applied
Posted by Daniel P. Berrangé 4 years, 7 months ago
To aid in troubleshooting add some debug messages wrt
bandwidth settings and networks.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/network/bridge_driver.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 6a97bb17e2..c54be96407 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -5192,9 +5192,14 @@ networkCheckBandwidth(virNetworkObjPtr obj,
         return -1;
     }
 
+    if (!netBand || !netBand->in) {
+        VIR_DEBUG("No network bandwidth controls present");
+        /* no QoS required, claim success */
+        return 1;
+    }
     if (((!ifaceBand || !ifaceBand->in || !ifaceBand->in->floor) &&
-         (!oldBandwidth || !oldBandwidth->in || !oldBandwidth->in->floor)) ||
-        !netBand || !netBand->in) {
+         (!oldBandwidth || !oldBandwidth->in || !oldBandwidth->in->floor))) {
+        VIR_DEBUG("No old/new interface bandwidth floor");
         /* no QoS required, claim success */
         return 1;
     }
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] network: add debug when bandwidth settings are not applied
Posted by Laine Stump 4 years, 7 months ago
On 9/13/19 12:05 PM, Daniel P. Berrangé wrote:
> To aid in troubleshooting add some debug messages wrt
> bandwidth settings and networks.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


Reviewed-by: Laine Stump <laine@laine.org>


(although it sounds like you already found the problem you were looking 
for :-)


> ---
>   src/network/bridge_driver.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 6a97bb17e2..c54be96407 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -5192,9 +5192,14 @@ networkCheckBandwidth(virNetworkObjPtr obj,
>           return -1;
>       }
>   
> +    if (!netBand || !netBand->in) {
> +        VIR_DEBUG("No network bandwidth controls present");
> +        /* no QoS required, claim success */
> +        return 1;
> +    }
>       if (((!ifaceBand || !ifaceBand->in || !ifaceBand->in->floor) &&
> -         (!oldBandwidth || !oldBandwidth->in || !oldBandwidth->in->floor)) ||
> -        !netBand || !netBand->in) {
> +         (!oldBandwidth || !oldBandwidth->in || !oldBandwidth->in->floor))) {
> +        VIR_DEBUG("No old/new interface bandwidth floor");
>           /* no QoS required, claim success */
>           return 1;
>       }


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list