From nobody Sun Feb 8 16:30:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1641300816; cv=none; d=zohomail.com; s=zohoarc; b=WuIwZ0MnADVQ+uqH5X/1xnmr+ePpHAV5GdT0k9/BXvxkAkezXpVQ4be/todskIx+9gsQOf2MKuXlUPeOxnhFcROPjs6d0pFlZyvJBLAXI8wupv8BpuPbpxPlElCT1vmDnvB3TC0IOdNuRHSpbHo9ASeRK9PlLISS85LctO0PlCk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641300816; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cUeDVqos4IYB2R/A0ts2rDsiOXhdJCYyAtJI5CeKEjU=; b=ZzvJVnhg5RH6bgSI+mT7HxZqSWrlBNif4/aPA2CwHFodkAms9Sq7qoPig7PgUWNcG/0NYWmLr6YpZYc5YezFc+vaTsQsn4El6lkyxd0xK6lmiTa9VWDN05MSSuSObilfZHqu4O7A2uUYgytZ9i2QrQT2o+q39OxusIfaruSZ2ME= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1641300816650634.6837873712834; Tue, 4 Jan 2022 04:53:36 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-2--AibzoWRMIW1-gl12xmeBg-1; Tue, 04 Jan 2022 07:53:32 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5F631015DA2; Tue, 4 Jan 2022 12:53:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CF357AB68; Tue, 4 Jan 2022 12:53:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6D79C1806D2E; Tue, 4 Jan 2022 12:53:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 204CrHvq014879 for ; Tue, 4 Jan 2022 07:53:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id C36397E648; Tue, 4 Jan 2022 12:53:17 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C8D07E647 for ; Tue, 4 Jan 2022 12:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641300815; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=cUeDVqos4IYB2R/A0ts2rDsiOXhdJCYyAtJI5CeKEjU=; b=RVl3tXjIw8pveD2Xo9Ksq2t/7B1iEpQ2k/035tFCHPoASRcSxK9Au7l+esRrsLwO/g4pKl aE+AM01+03QZbGhZ12+Rf9rmawCi8X7qruqWW+m8VJ1NL+3crqh7Spxv0wXDf1QZzQQu2L bC8b5rqBJgrVcWqVNfuROd80oP2wJso= X-MC-Unique: -AibzoWRMIW1-gl12xmeBg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/2] docs: Clarify 'burst' units for QoS Date: Tue, 4 Jan 2022 13:53:05 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641300817632100001 Content-Type: text/plain; charset="utf-8" The burst attribute for bandwidth specifies how much bytes can be transmitted in a single burst. Therefore, the unit is in multiples of 1024 (thus kibibytes) not SI-like 1000. It always has been like that. The 'tc' output is still confusing though, for instance: # tc class add dev $DEV parent 1: classid 1:1 htb rate 1000kbps burst 209= 7152 # tc class show dev vnet2 class htb 1:1 root rate 8Mbit ceil 8Mbit burst 2Mb cburst 1600b Please note that 2097152 =3D 2*1024*1024. Even the man page is confusing. From tc(8): kb or k Kilobytes mb or m Megabytes But I guess this is because 'tc' predates IEC standardisation of binary multiples and thus can't change without breaking scripts parsing its output. And while at it, adjust _virNetDevBandwidthRate struct member description, to make it obvious which members use SI/IEC units. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- docs/formatnetwork.html.in | 2 +- src/util/virnetdevbandwidth.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index b1b2391f43..fad43f77ea 100644 --- a/docs/formatnetwork.html.in +++ b/docs/formatnetwork.html.in @@ -634,7 +634,7 @@
burst
- Optional attribute which specifies the amount of kilobytes that + Optional attribute which specifies the amount of kibibytes that can be transmitted in a single burst at peak speed.
floor
diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h index 3d520721f6..c82029fc0f 100644 --- a/src/util/virnetdevbandwidth.h +++ b/src/util/virnetdevbandwidth.h @@ -23,10 +23,10 @@ =20 typedef struct _virNetDevBandwidthRate virNetDevBandwidthRate; struct _virNetDevBandwidthRate { - unsigned long long average; /* kbytes/s */ - unsigned long long peak; /* kbytes/s */ - unsigned long long floor; /* kbytes/s */ - unsigned long long burst; /* kbytes */ + unsigned long long average; /* kilobytes/s */ + unsigned long long peak; /* kilobytes/s */ + unsigned long long floor; /* kilobytes/s */ + unsigned long long burst; /* kibibytes */ }; =20 typedef struct _virNetDevBandwidth virNetDevBandwidth; --=20 2.34.1