From nobody Tue Feb 10 08:01:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1609977351; cv=none; d=zohomail.com; s=zohoarc; b=iNT3c8Fq3GaBzV8vyT1vx5VgBo/Da1F5xLWYqRT/8M5NRuYMnPLYYfOoJdiWRwmAVlgpgOrOPK7yzrkj96NV/NL4BqjJkuvtM7c6CS8Xgv3d9+MJrCkSn0b0MnKm0F+Gn6gWKA7Q8v1z3jV86uuo85tMef2i297lKRfp08QIeIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609977351; h=Content-Type:Content-Transfer-Encoding:Cc: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=Qr7AYKvyVq4N8VYhBknR37ROfkc2r2aZL8385aIx1yk=; b=ULsyGIZp67fq9zrtYXxk17YIMsubSQICeWm/LrZ+PTsW8QndVPzEMTgM2c6+8JYIPAxkG9Gbupt+22Gv/vcf9rEQKRknpqzxi43FTgI26bfXcrzz4sJkfPRcAModLfgZjzWiwZUxnPZVLuAia0YmXx3OQ+4LG+f1qZzKOAIGxew= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1609977351890174.04352492920987; Wed, 6 Jan 2021 15:55:51 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-444-6i_dyW3jOYa1NnXNs-wduA-1; Wed, 06 Jan 2021 18:55:48 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E156D800D53; Wed, 6 Jan 2021 23:55:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFAEB1840B; Wed, 6 Jan 2021 23:55:42 +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 8F0BB4BB7B; Wed, 6 Jan 2021 23:55:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 106Ntex5002582 for ; Wed, 6 Jan 2021 18:55:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4DCC96064B; Wed, 6 Jan 2021 23:55:40 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-226.phx2.redhat.com [10.3.112.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB4B1197F2; Wed, 6 Jan 2021 23:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609977350; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Qr7AYKvyVq4N8VYhBknR37ROfkc2r2aZL8385aIx1yk=; b=GRqw7P+70TOjNfYNWvhCFoZeG04ucLLtMCwa4gPm6IzTbwe6HrBtdptUvAuIKiRHFaPvjU 2BHVKCtLDIaLxfRX2JJcvBh7O4l9Epimg9/091KaeJbqvae2OCCDITpQ4PY5mCRmJpxYVe tAfAN9Nu7Py3b01z1Z9DqBCJ5dQeruQ= X-MC-Unique: 6i_dyW3jOYa1NnXNs-wduA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] lxc: remove unnecessary call to virNetDevReserveName() Date: Wed, 6 Jan 2021 18:55:34 -0500 Message-Id: <20210106235535.881120-2-laine@redhat.com> In-Reply-To: <20210106235535.881120-1-laine@redhat.com> References: <20210106235535.881120-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Shi Lei 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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) Content-Type: text/plain; charset="utf-8" In all cases *except* when parsing status XML as libvirt is being restarted, the XML parser will delete any manually specified interface name (aka "" aka net->ifname) that could have been generated by virNetDevGenerateName(). This means that during the setup when a domain is being started (e.g. during virLXCProcessSetupInterfaceTap()) it is pointless to call virNetDevReserveName() with any setting of net->ifname that has come from the XML parser - it is guaranteed to not fit the pattern of any auto-generated name, and so the call is just a NOP anyway. Signed-off-by: Laine Stump --- src/lxc/lxc_process.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index a842ac91c5..f6932c248b 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -308,8 +308,6 @@ virLXCProcessSetupInterfaceTap(virDomainDefPtr vm, =20 VIR_DEBUG("calling vethCreate()"); parentVeth =3D net->ifname; - if (parentVeth) - virNetDevReserveName(parentVeth); =20 if (virNetDevVethCreate(&parentVeth, &containerVeth) < 0) return NULL; --=20 2.29.2