From nobody Tue Feb 10 04:03:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 15813510715161008.9544297150328; Mon, 10 Feb 2020 08:11:11 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-246-Ef4jH_f3P6CCPyO5MRbVQA-1; Mon, 10 Feb 2020 11:11:07 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 454421800D42; Mon, 10 Feb 2020 16:11:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E7AC8ED1B; Mon, 10 Feb 2020 16:11:01 +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 CB969866DD; Mon, 10 Feb 2020 16:11:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01AGAnFZ023794 for ; Mon, 10 Feb 2020 11:10:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id C115427073; Mon, 10 Feb 2020 16:10:49 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FDEF27067; Mon, 10 Feb 2020 16:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581351070; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=JN+0eaMDrHBmAWfe7E+ZMz2yY8p3rZtb6aMrgmh8TLY=; b=eM+yTdmT+vxwRMi0Mo0zxPoKKdTON6zLqysfWWE6EmkteNERI3qRBlt4EI7eSQuyTf/o0O UFXZTlWxd7T3ra3CpSDBav66eHK1KJ4F9SB5Ckmwlb1qY6aaImJ0w9AAaJTrbWfpZsDlSJ WUiY36VAbEVK78t/f7rRA8jISzf2uJs= From: Pavel Mores To: libvir-list@redhat.com Subject: [libvirt PATCH 3/5] qemu: call networkPlugBandwidth() for all types of network Date: Mon, 10 Feb 2020 17:10:39 +0100 Message-Id: <20200210161041.515468-4-pmores@redhat.com> In-Reply-To: <20200210161041.515468-1-pmores@redhat.com> References: <20200210161041.515468-1-pmores@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Pavel Mores 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.13 X-MC-Unique: Ef4jH_f3P6CCPyO5MRbVQA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" To fix the actual bug, it was necessary to make networkPlugBandwidth() be called also for 'bridge'-type networks implemented using macvtap's 'bridge' mode (previously it was only called for those implemented on top of an existing bridge). However, it seems beneficial to call it for other network types as well, at least because it removes an inconsistency in types of bandwidth configuration changes permissible in inactive and active domain configs. Signed-off-by: Pavel Mores Reviewed-by: Michal Privoznik --- src/network/bridge_driver.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 3b70e52afd..513ae59e68 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -4571,8 +4571,6 @@ networkAllocatePort(virNetworkObjPtr obj, return -1; } =20 - if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->= class_id) < 0) - return -1; break; =20 case VIR_NETWORK_FORWARD_HOSTDEV: { @@ -4637,8 +4635,6 @@ networkAllocatePort(virNetworkObjPtr obj, } } =20 - if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &po= rt->class_id) < 0) - return -1; break; } =20 @@ -4736,6 +4732,9 @@ networkAllocatePort(virNetworkObjPtr obj, return -1; } =20 + if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->clas= s_id) < 0) + return -1; + if (virNetworkObjMacMgrAdd(obj, driver->dnsmasqStateDir, port->ownername, &port->mac) < 0) return -1; --=20 2.24.1