From nobody Mon Feb 9 00:38:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1652196249; cv=none; d=zohomail.com; s=zohoarc; b=UYKO9ql9EG8rtCHwpO5ZdVWhrhckDOMsnG3g8WUXh5r8E8EvZE4Sl3KgcCo8WiZeFTFouCOjuyhiDcKmQ5TJffLK23jrLJ4jhyQNmuboYX/DQtxJhp1PVFtN9hELMVRfaYRAZ/go/U+XDcdHz/aeRNBNZauwEXh6Nxh9mdsyOfU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652196249; 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=Ona7MmQ81ttmaM/nruhdCvOiHm/mw+NPY8T8DpMu6jQ=; b=Sn8j3WV/j/zEZnfAkY4fTnzrgrD2+RCKMBMTpjh6eXcgIp11VS7XjdwCiaZd4QtpRnILH2CKcGKDpNHecUqlXYUTj8Rnji+euUWlZRhWLO4LGoS8/wfc251aZX04ZNTzr4SNW75yb7GT+WYNz/bNvCJQVwH2BbKcvTItpXv5vAc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1652196249106447.20908312686504; Tue, 10 May 2022 08:24:09 -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-17-uZbhpXlFPNqI8dona4cliA-1; Tue, 10 May 2022 11:23:32 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 52364101AA46; Tue, 10 May 2022 15:23:13 +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 0EDB814DFBA2; Tue, 10 May 2022 15:23:13 +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 7736B194705E; Tue, 10 May 2022 15:23:12 +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 49DB31947060 for ; Tue, 10 May 2022 15:23:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2B46C200BCE9; Tue, 10 May 2022 15:23:10 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C9F4200C0DD for ; Tue, 10 May 2022 15:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652196248; 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=Ona7MmQ81ttmaM/nruhdCvOiHm/mw+NPY8T8DpMu6jQ=; b=e9y2Dh2krJA9u/nAp8BcKOM0nyt5astD6Z8eYrO4L89UD8qd5n8t0Ytk3qACTr8mKYmbn8 pFLT2IhWFQZiTCY6EI4F5rVXr+AAS7hSysMp/TYyWcEUtx1tcsG5aNSRWUSVSo4aY8g3jb EOFtUabDb9IakpQgZ3g8pQKWLg12XTs= X-MC-Unique: uZbhpXlFPNqI8dona4cliA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 22/37] qemuDomainAttachNetDevice: Remove 'vhostfd' machinery Date: Tue, 10 May 2022 17:19:58 +0200 Message-Id: <66c798f4bbde963c28735827d2c6d150223ac2f7.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.7 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: 1652196251083100001 Content-Type: text/plain; charset="utf-8" Now all the helper variables and code are not needed. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 2bede03e35..68e8030929 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1188,9 +1188,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, char **tapfdName =3D NULL; int *tapfd =3D NULL; size_t tapfdSize =3D 0; - char **vhostfdName =3D NULL; - int *vhostfd =3D NULL; - size_t vhostfdSize =3D 0; g_autoptr(virJSONValue) nicprops =3D NULL; g_autoptr(virJSONValue) netprops =3D NULL; int ret =3D -1; @@ -1423,14 +1420,10 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, } tapfdName =3D g_new0(char *, tapfdSize); - vhostfdName =3D g_new0(char *, vhostfdSize); for (i =3D 0; i < tapfdSize; i++) tapfdName[i] =3D g_strdup_printf("fd-%s%zu", net->info.alias, i); - for (i =3D 0; i < vhostfdSize; i++) - vhostfdName[i] =3D g_strdup_printf("vhostfd-%s%zu", net->info.alia= s, i); - if (!(netprops =3D qemuBuildHostNetProps(net, tapfdName, tapfdSize, NULL, 0, @@ -1481,8 +1474,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, for (i =3D 0; i < tapfdSize; i++) VIR_FORCE_CLOSE(tapfd[i]); - for (i =3D 0; i < vhostfdSize; i++) - VIR_FORCE_CLOSE(vhostfd[i]); if (!(nicprops =3D qemuBuildNicDevProps(vm->def, net, priv->qemuCaps))) goto try_remove; @@ -1584,13 +1575,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, } VIR_FREE(tapfd); VIR_FREE(tapfdName); - for (i =3D 0; vhostfd && i < vhostfdSize; i++) { - VIR_FORCE_CLOSE(vhostfd[i]); - if (vhostfdName) - VIR_FREE(vhostfdName[i]); - } - VIR_FREE(vhostfd); - VIR_FREE(vhostfdName); virDomainCCWAddressSetFree(ccwaddrs); VIR_FORCE_CLOSE(slirpfd); --=20 2.35.1