[PATCH 2/2] virnetdevopenvswitch: Fix 'burst' value passed to ovs-vsctl

Martin Kletzander mkletzan at redhat.com
Tue Jan 4 15:14:27 UTC 2022


On Tue, Jan 04, 2022 at 01:53:06PM +0100, Michal Privoznik wrote:
>As described in the previous commit, the units for 'burst' are
>kibibytes and not kilobytes, i.e. multiples of 1024 not 1000.
>Therefore, when constructing ovs-vsctl command the burst value
>must be multiplied by 1024 and not just 1000. And because ovs
>expects this size in bits the value has to be multiplied again by
>8.
>
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1510237#c26
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/util/virnetdevopenvswitch.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
>diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
>index 5dab545037..8741e0ed3a 100644
>--- a/src/util/virnetdevopenvswitch.c
>+++ b/src/util/virnetdevopenvswitch.c
>@@ -638,11 +638,13 @@ virNetDevOpenvswitchFindUUID(const char *table,
> }
>
> /*
>- * Average, peak, floor and burst in virNetDevBandwidth are in kbytes.
>- * However other_config in ovs qos is in bit.
>- * ingress_policing_rate in ovs interface is in kbit.
>+ * In virNetDevBandwidthRate, average, peak, floor are in kilobyes and burst in
>+ * kibibytes. However other_config in ovs qos is in bits and
>+ * ingress_policing_rate in ovs interface is in kilobit for
>+ * ingress_policing_rate and kibibit for ingress_policing_rate.

I guess you meant ingress_policing_burst at the end and the sentence
could be written a bit less confusingly.  With that fixed

Reviewed-by: Martin Kletzander <mkletzan at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220104/d9183c34/attachment-0001.sig>


More information about the libvir-list mailing list