From nobody Thu Jul 3 18:41:28 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1529426491496983.6597684797877; Tue, 19 Jun 2018 09:41:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A37FC04AC53; Tue, 19 Jun 2018 16:41:29 +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 03A06308BDB2; Tue, 19 Jun 2018 16:41:29 +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 A3860180053B; Tue, 19 Jun 2018 16:41:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5JGfE9D011291 for ; Tue, 19 Jun 2018 12:41:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8BC022018078; Tue, 19 Jun 2018 16:41:14 +0000 (UTC) Received: from worklaptop.bos.redhat.com (dhcp-17-157.bos.redhat.com [10.18.17.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 712592026D68; Tue, 19 Jun 2018 16:41:14 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 19 Jun 2018 12:40:51 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/6] qemu: Remove vlan function arguments 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 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 19 Jun 2018 16:41:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" They are all unused now Signed-off-by: Cole Robinson --- src/qemu/qemu_command.c | 23 +++++------------------ src/qemu/qemu_command.h | 3 --- src/qemu/qemu_hotplug.c | 3 +-- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a2687c5693..f2dbb3fadd 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3353,8 +3353,7 @@ qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem) =20 =20 static char * -qemuBuildLegacyNicStr(virDomainNetDefPtr net, - int vlan ATTRIBUTE_UNUSED) +qemuBuildLegacyNicStr(virDomainNetDefPtr net) { char *str; char macaddr[VIR_MAC_STRING_BUFLEN]; @@ -3374,7 +3373,6 @@ qemuBuildLegacyNicStr(virDomainNetDefPtr net, char * qemuBuildNicDevStr(virDomainDefPtr def, virDomainNetDefPtr net, - int vlan ATTRIBUTE_UNUSED, unsigned int bootindex, size_t vhostfdSize, virQEMUCapsPtr qemuCaps) @@ -3552,7 +3550,6 @@ qemuBuildNicDevStr(virDomainDefPtr def, char * qemuBuildHostNetStr(virDomainNetDefPtr net, virQEMUDriverPtr driver, - int vlan ATTRIBUTE_UNUSED, char **tapfd, size_t tapfdSize, char **vhostfd, @@ -8194,7 +8191,6 @@ qemuBuildVhostuserCommandLine(virQEMUDriverPtr driver, } =20 if (!(netdev =3D qemuBuildHostNetStr(net, driver, - -1, NULL, 0, NULL, 0))) goto error; =20 @@ -8210,7 +8206,7 @@ qemuBuildVhostuserCommandLine(virQEMUDriverPtr driver, virCommandAddArg(cmd, netdev); VIR_FREE(netdev); =20 - if (!(nic =3D qemuBuildNicDevStr(def, net, -1, bootindex, + if (!(nic =3D qemuBuildNicDevStr(def, net, bootindex, queues, qemuCaps))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Error generating NIC -device string")); @@ -8239,7 +8235,6 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, virDomainDefPtr def, virDomainNetDefPtr net, virQEMUCapsPtr qemuCaps, - int vlan, unsigned int bootindex, virNetDevVPortProfileOp vmop, bool standalone, @@ -8486,7 +8481,6 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, } =20 if (!(host =3D qemuBuildHostNetStr(net, driver, - vlan, tapfdName, tapfdSize, vhostfdName, vhostfdSize))) goto cleanup; @@ -8499,12 +8493,12 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driv= er, * New way: -netdev type=3Dtap,id=3Dnetdev1 -device e1000,id=3Dnetde= v1 */ if (qemuDomainSupportsNicdev(def, net)) { - if (!(nic =3D qemuBuildNicDevStr(def, net, vlan, bootindex, + if (!(nic =3D qemuBuildNicDevStr(def, net, bootindex, vhostfdSize, qemuCaps))) goto cleanup; virCommandAddArgList(cmd, "-device", nic, NULL); } else { - if (!(nic =3D qemuBuildLegacyNicStr(net, vlan))) + if (!(nic =3D qemuBuildLegacyNicStr(net))) goto cleanup; virCommandAddArgList(cmd, "-net", nic, NULL); } @@ -8577,16 +8571,9 @@ qemuBuildNetCommandLine(virQEMUDriverPtr driver, =20 for (i =3D 0; i < def->nnets; i++) { virDomainNetDefPtr net =3D def->nets[i]; - int vlan; - - /* VLANs are not used with -netdev and -device, so don't recor= d them */ - if (qemuDomainSupportsNicdev(def, net)) - vlan =3D -1; - else - vlan =3D i; =20 if (qemuBuildInterfaceCommandLine(driver, logManager, cmd, def= , net, - qemuCaps, vlan, bootNet, vmo= p, + qemuCaps, bootNet, vmop, standalone, nnicindexes, nicindexes, chardevStdioLogd) < 0) diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 0bcbf3018b..c78282eb09 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -83,10 +83,8 @@ qemuBuildChrDeviceStr(char **deviceStr, virDomainChrDefPtr chr, virQEMUCapsPtr qemuCaps); =20 -/* With vlan =3D=3D -1, use netdev syntax, else old hostnet */ char *qemuBuildHostNetStr(virDomainNetDefPtr net, virQEMUDriverPtr driver, - int vlan, char **tapfd, size_t tapfdSize, char **vhostfd, @@ -95,7 +93,6 @@ char *qemuBuildHostNetStr(virDomainNetDefPtr net, /* Current, best practice */ char *qemuBuildNicDevStr(virDomainDefPtr def, virDomainNetDefPtr net, - int vlan, unsigned int bootindex, size_t vhostfdSize, virQEMUCapsPtr qemuCaps); diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 7c0c366b99..7a1bbc7c8c 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -994,7 +994,6 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, } =20 if (!(netstr =3D qemuBuildHostNetStr(net, driver, - -1, tapfdName, tapfdSize, vhostfdName, vhostfdSize))) goto cleanup; @@ -1027,7 +1026,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, for (i =3D 0; i < vhostfdSize; i++) VIR_FORCE_CLOSE(vhostfd[i]); =20 - if (!(nicstr =3D qemuBuildNicDevStr(vm->def, net, -1, 0, + if (!(nicstr =3D qemuBuildNicDevStr(vm->def, net, 0, queueSize, priv->qemuCaps))) goto try_remove; =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list