From patchwork Tue Jun 19 16:40:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 139227 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5428738lji; Tue, 19 Jun 2018 09:41:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLgPk8WS/U1l/cP6DHY+rFq1ZsHwkKOdIHau2IL6OjV4+Ug9k4smUHpx5VTWwcoVUxtyxeU X-Received: by 2002:a9d:2c26:: with SMTP id f35-v6mr11348411otb.336.1529426491439; Tue, 19 Jun 2018 09:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529426491; cv=none; d=google.com; s=arc-20160816; b=huuIGM0zB/1IFdVFTj5RKVf3tjqZZpPGF21NJLMydFT8UMYyDpyKrpMzhpxgkJGiMw R2G2oBW3V8P+FvJAr16C38nYjKIHuUNNQKP9VAFfxTAyfde4cgPGYoYrEEDeH+6ot5A7 iVxE3ILZnaZ19ZyXaot2MX891csk/5PuyhAoUDfTkxP+Y07yTkX5Y1dRFQGDWeVjPN5H /jmo4EijTpZrxsJwlHfXH33VA6i0yAFD9Y9NdPwQiDVGHqbIbwJBBoVIXLZUVL4I6w/Z xNpvi2r7l1FDAiUofF3JHTfXohtwUSGZexlyi5FRgQ0ewQ6n6J5zPKgVS6Kn94WP2CBc 5SSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:references :in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=6IQXMulBnoSGThq0DOhS5p0afk334vF4x87TWfkiO8E=; b=kF2ST/MhX0btrcRo0rFjloiSVdozv3xc2MyKBXN5+W6L0SGlYrswla1ZwOkzKZwGj4 rOqggFkzgnxL/83FWRARR9hCVIV65kJ8RGjS/uPcYQ8Muk6bKpC9ZPTHbn6TCmwSAxGM bCtemJuxbGg5JiSZWOPqx2D89j5Xt04SXUo+d+no4HlztcI2KNqkgd6jPQGJJptVN0Su svRoAJ0sXD+8UzMZ+LsauRWf1Szu7ck08VQ7CJ7SrNYevtzQT07gmxP+mfuuCAbm7gNs QJe+yKckokdNAxpO6pl52nXM3Po4iATdkGJ444MGbNBwJLXuL/UVnIZzRlAKD/MYEYlS AJ+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id 22-v6si36025otj.449.2018.06.19.09.41.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 09:41:31 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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) Delivered-To: libvirt-list@redhat.com 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 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) 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(-) -- 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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) 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, } if (!(netdev = qemuBuildHostNetStr(net, driver, - -1, NULL, 0, NULL, 0))) goto error; @@ -8210,7 +8206,7 @@ qemuBuildVhostuserCommandLine(virQEMUDriverPtr driver, virCommandAddArg(cmd, netdev); VIR_FREE(netdev); - if (!(nic = qemuBuildNicDevStr(def, net, -1, bootindex, + if (!(nic = 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, } if (!(host = qemuBuildHostNetStr(net, driver, - vlan, tapfdName, tapfdSize, vhostfdName, vhostfdSize))) goto cleanup; @@ -8499,12 +8493,12 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, * New way: -netdev type=tap,id=netdev1 -device e1000,id=netdev1 */ if (qemuDomainSupportsNicdev(def, net)) { - if (!(nic = qemuBuildNicDevStr(def, net, vlan, bootindex, + if (!(nic = qemuBuildNicDevStr(def, net, bootindex, vhostfdSize, qemuCaps))) goto cleanup; virCommandAddArgList(cmd, "-device", nic, NULL); } else { - if (!(nic = qemuBuildLegacyNicStr(net, vlan))) + if (!(nic = qemuBuildLegacyNicStr(net))) goto cleanup; virCommandAddArgList(cmd, "-net", nic, NULL); } @@ -8577,16 +8571,9 @@ qemuBuildNetCommandLine(virQEMUDriverPtr driver, for (i = 0; i < def->nnets; i++) { virDomainNetDefPtr net = def->nets[i]; - int vlan; - - /* VLANs are not used with -netdev and -device, so don't record them */ - if (qemuDomainSupportsNicdev(def, net)) - vlan = -1; - else - vlan = i; if (qemuBuildInterfaceCommandLine(driver, logManager, cmd, def, net, - qemuCaps, vlan, bootNet, vmop, + 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); -/* With vlan == -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, } if (!(netstr = qemuBuildHostNetStr(net, driver, - -1, tapfdName, tapfdSize, vhostfdName, vhostfdSize))) goto cleanup; @@ -1027,7 +1026,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, for (i = 0; i < vhostfdSize; i++) VIR_FORCE_CLOSE(vhostfd[i]); - if (!(nicstr = qemuBuildNicDevStr(vm->def, net, -1, 0, + if (!(nicstr = qemuBuildNicDevStr(vm->def, net, 0, queueSize, priv->qemuCaps))) goto try_remove;