From nobody Mon Feb 9 03:14:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1652196263; cv=none; d=zohomail.com; s=zohoarc; b=CvWN6B0m/I70zIxBKod44v1rKbd6vupkg0NYm1SUQZff2akUsHHahPzV3W+QHQ0w9sTm5+Sp3CfD12cZ60eNo6kdunUfqJO3rJBXITtKTJD23uH9Qwox4VrFwM1dYbBiy7zpA58782nSlmOK8mFXhYOLB87WBmyPJJeIhcWUS2o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652196263; h=Content-Type:Content-Transfer-Encoding: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; bh=jAoZPKNnCFE9lj+8UWQu1zeUst87uT1aRJDTBshnMVA=; b=nDDB8XGLi8eD4LX0/lz3aHZE2QUMAq0S6q+U4z8oaCzqZg9SV0w9dn7f4F1veCht4zIZb8JX4iiTXgBBPhcN+6hegxsgqwL/nxD0rGnr44WOWFtn8g2bQGG8lQxw3JECQkolXNFa2bSLMpS2aOyB/vH2hqB5LNC0wQqt0NeYzn8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652196263493333.8890394828437; Tue, 10 May 2022 08:24:23 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-107-AV3_ZNWGMReB_vlqq8BctQ-1; Tue, 10 May 2022 11:24:00 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D6DDC805F0A; Tue, 10 May 2022 15:23:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C278F54B070; Tue, 10 May 2022 15:23:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 710A1194705F; Tue, 10 May 2022 15:23:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CD3F21947061 for ; Tue, 10 May 2022 15:23:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A80F1200C0DA; Tue, 10 May 2022 15:23:32 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 222BB2024CC8 for ; Tue, 10 May 2022 15:23:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652196262; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=jAoZPKNnCFE9lj+8UWQu1zeUst87uT1aRJDTBshnMVA=; b=HDL8YNzt2Fiiiqqq4GE/82BhM0S8UMaskFWkbzyBb6dmA1DFNc/qbeqfo0lK3RNsMx+/wm dr9qRQOkFN953i4tZVqHHJJFw8sTJ1lnoSuI7vJaeqGL6PQxFn+XesPgfHnVll1BQTXXfm +K/F7cWHnWdP0gVm5M7qfSsTBtn4p0M= X-MC-Unique: AV3_ZNWGMReB_vlqq8BctQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 28/37] qemuDomainAttachNetDevice: Remove unused 'tapfd' infrastructure Date: Tue, 10 May 2022 17:20:04 +0200 Message-Id: <5cdb9ecd7557858a9ec71bba0eaf1e840ba770d0.1652195735.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652196265388100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 9c6f9e673c..c3891ddca7 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1185,9 +1185,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, virErrorPtr originalError =3D NULL; g_autofree char *slirpfdName =3D NULL; int slirpfd =3D -1; - char **tapfdName =3D NULL; - int *tapfd =3D NULL; - size_t tapfdSize =3D 0; g_autoptr(virJSONValue) nicprops =3D NULL; g_autoptr(virJSONValue) netprops =3D NULL; int ret =3D -1; @@ -1198,7 +1195,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, const virNetDevBandwidth *actualBandwidth; g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); virDomainCCWAddressSet *ccwaddrs =3D NULL; - size_t i; g_autofree char *charDevAlias =3D NULL; bool charDevPlugged =3D false; bool netdevPlugged =3D false; @@ -1383,19 +1379,8 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, virNetDevSetMTU(net->ifname, net->mtu) < 0) goto cleanup; - for (i =3D 0; i < tapfdSize; i++) { - if (qemuSecuritySetTapFDLabel(driver->securityManager, - vm->def, tapfd[i]) < 0) - goto cleanup; - } - - tapfdName =3D g_new0(char *, tapfdSize); - - for (i =3D 0; i < tapfdSize; i++) - tapfdName[i] =3D g_strdup_printf("fd-%s%zu", net->info.alias, i); - if (!(netprops =3D qemuBuildHostNetProps(net, - tapfdName, tapfdSize, + NULL, 0, slirpfdName))) goto cleanup; @@ -1430,7 +1415,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, } if (qemuMonitorAddNetdev(priv->mon, &netprops, - tapfd, tapfdName, tapfdSize, + NULL, NULL, 0, slirpfd, slirpfdName) < 0) { qemuDomainObjExitMonitor(vm); virDomainAuditNet(vm, NULL, net, "attach", false); @@ -1440,9 +1425,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, qemuDomainObjExitMonitor(vm); - for (i =3D 0; i < tapfdSize; i++) - VIR_FORCE_CLOSE(tapfd[i]); - if (!(nicprops =3D qemuBuildNicDevProps(vm->def, net, priv->qemuCaps))) goto try_remove; @@ -1536,13 +1518,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, virErrorRestore(&save_err); } - for (i =3D 0; tapfd && i < tapfdSize; i++) { - VIR_FORCE_CLOSE(tapfd[i]); - if (tapfdName) - VIR_FREE(tapfdName[i]); - } - VIR_FREE(tapfd); - VIR_FREE(tapfdName); virDomainCCWAddressSetFree(ccwaddrs); VIR_FORCE_CLOSE(slirpfd); --=20 2.35.1