From nobody Sun Feb 8 07:08:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1555521596; cv=none; d=zoho.com; s=zohoarc; b=gT7Nv2FErIkiC35M6EP2bFSWc2GB8fnnKVkkRT00EymaZuuQPotvlwPs3Xv/XcKH+GF6gS3kVCQqMFzYFwWtotj2UkoOfBHNhbk42uQ/9jtktRi9BQkS87zAlh6QgOcYwczXVRCvfPCxhfapmZW/+PHL1G4njQlzrFP89KEw/CI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555521596; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=EHgJ/EH+g+wd/3k9OWtAzy3VPt896cYpyNOzvb8dX30=; b=JUVmUHnlGtmO+HyJYBtumi/c2eU3zp1FArZaaFiLy7ajddM0sbCEYgAyzptDK6yd4dN9p6ggZ+/RIcVtHvWcA7iuUZqSnvnqRIJf37N6og9/TwLhrEPyPhldRx7B4ifW0PCm0gEp/QwrcFpTidvUzvT5uanffsvOyHJuG+XsBpc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555521596308162.60480895049716; Wed, 17 Apr 2019 10:19:56 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id BDFF0C066442; Wed, 17 Apr 2019 17:19:54 +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 90E8960BF3; Wed, 17 Apr 2019 17:19:54 +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 2D1CE181AC45; Wed, 17 Apr 2019 17:19:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HHJq6Y030560 for ; Wed, 17 Apr 2019 13:19:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id F19715D71A; Wed, 17 Apr 2019 17:19:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 703745D6A6; Wed, 17 Apr 2019 17:19:48 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 17 Apr 2019 18:19:07 +0100 Message-Id: <20190417171929.9399-8-berrange@redhat.com> In-Reply-To: <20190417171929.9399-1-berrange@redhat.com> References: <20190417171929.9399-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Laine Stump Subject: [libvirt] [PATCH v4 07/29] network: move fixup for domain actual net def out of network driver 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 17 Apr 2019 17:19:55 +0000 (UTC) The hypervisor drivers are soon going to communicate with the network driver via public APIs only. As such the network driver will not ever see the domain actual network def. Thus the backwards compatibility fixup logic must be moved out of the network driver. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrang=C3=A9 --- src/conf/domain_conf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b94b70aabc..c4c2eb0281 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -30437,6 +30437,7 @@ virDomainNetNotifyActualDevice(virConnectPtr conn, virDomainDefPtr dom, virDomainNetDefPtr iface) { + virDomainNetType actualType =3D virDomainNetGetActualType(iface); virNetworkPtr net =3D NULL; =20 if (!netNotify) @@ -30445,6 +30446,16 @@ virDomainNetNotifyActualDevice(virConnectPtr conn, if (!(net =3D virNetworkLookupByName(conn, iface->data.network.name))) return; =20 + /* Older libvirtd uses actualType=3D=3Dnetwork, but we now + * just use actualType=3D=3Dbridge, as nothing needs to + * distinguish the two cases, and this simplifies virt + * drive code */ + if (actualType =3D=3D VIR_DOMAIN_NET_TYPE_NETWORK) { + iface->data.network.actual->type =3D VIR_DOMAIN_NET_TYPE_BRIDGE; + actualType =3D VIR_DOMAIN_NET_TYPE_BRIDGE; + } + + if (netNotify(net, dom, iface) < 0) goto cleanup; =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list