From patchwork Sat May 14 20:00:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 67808 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp850827qge; Sat, 14 May 2016 13:05:00 -0700 (PDT) X-Received: by 10.140.85.230 with SMTP id n93mr21565228qgd.7.1463256300724; Sat, 14 May 2016 13:05:00 -0700 (PDT) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id y11si16848635qhy.79.2016.05.14.13.04.59 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 14 May 2016 13:05:00 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u4EK0OJ6010257; Sat, 14 May 2016 16:00:25 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u4EK0Fd2010442 for ; Sat, 14 May 2016 16:00:15 -0400 Received: from colepc.redhat.com (ovpn-116-31.phx2.redhat.com [10.3.116.31]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4EK0C1I004370; Sat, 14 May 2016 16:00:14 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Sat, 14 May 2016 16:00:09 -0400 Message-Id: <40944cfd4c0f7821c65bfc0f3d2ff8f9baa8fae4.1463255562.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani Subject: [libvirt] [PATCH 3/4] qemu: Remove redundant qemuDomainAssignAddresses calls 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: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com All these calls come near immediately after parsing the domain XML, which now triggers qemuDomainAssignAddresses. So drop the now redundnat calls --- src/qemu/qemu_driver.c | 19 ------------------- 1 file changed, 19 deletions(-) -- 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 37d970e..f47c620 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1771,7 +1771,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn, virObjectEventPtr event = NULL; virObjectEventPtr event2 = NULL; unsigned int start_flags = VIR_QEMU_PROCESS_START_COLD; - virQEMUCapsPtr qemuCaps = NULL; virCapsPtr caps = NULL; unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE | VIR_DOMAIN_DEF_PARSE_ABI_UPDATE; @@ -1799,12 +1798,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn, if (virDomainCreateXMLEnsureACL(conn, def) < 0) goto cleanup; - if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator))) - goto cleanup; - - if (qemuDomainAssignAddresses(def, qemuCaps, NULL) < 0) - goto cleanup; - if (!(vm = virDomainObjListAdd(driver->domains, def, driver->xmlopt, VIR_DOMAIN_OBJ_LIST_ADD_LIVE | @@ -1858,7 +1851,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn, qemuDomainEventQueue(driver, event2); } virObjectUnref(caps); - virObjectUnref(qemuCaps); virNWFilterUnlockFilterUpdates(); return dom; } @@ -7249,7 +7241,6 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml virDomainObjPtr vm = NULL; virDomainPtr dom = NULL; virObjectEventPtr event = NULL; - virQEMUCapsPtr qemuCaps = NULL; virQEMUDriverConfigPtr cfg; virCapsPtr caps = NULL; unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE | @@ -7272,12 +7263,6 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0) goto cleanup; - if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator))) - goto cleanup; - - if (qemuDomainAssignAddresses(def, qemuCaps, NULL) < 0) - goto cleanup; - if (!(vm = virDomainObjListAdd(driver->domains, def, driver->xmlopt, 0, &oldDef))) @@ -7328,7 +7313,6 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml virDomainDefFree(def); virDomainObjEndAPI(&vm); qemuDomainEventQueue(driver, event); - virObjectUnref(qemuCaps); virObjectUnref(caps); virObjectUnref(cfg); return dom; @@ -15975,9 +15959,6 @@ static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn, if (qemuAssignDeviceAliases(def, qemuCaps) < 0) goto cleanup; - if (qemuDomainAssignAddresses(def, qemuCaps, NULL) < 0) - goto cleanup; - if (!(vm = virDomainObjListAdd(driver->domains, def, driver->xmlopt, VIR_DOMAIN_OBJ_LIST_ADD_LIVE |