From nobody Mon Feb 2 06:00:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768903441; cv=none; d=zohomail.com; s=zohoarc; b=JLRbLeDNVQjzqRl3PDcy9+MJmlefqpdY/BAuJ6nseSGuk9fZAagx0e0TBAUPLKTPzVZkgHQZnvPFBsZCaP+UGRP1o7dfiJ90+NECzJ7AmMAhiKWEosYcrKVhWxERlE3eCGHzFBaHT28NEqvuT1ZIbWbq7PZJro/N9DrAR9GMNkw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768903441; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=aMlGBOzX7VgOKPrV5kOfuLGytvE4DuKogv5pqbMt46s=; b=aGQhjKdpW+P7cmVHdjRxYzPzjHet6zsnS6drzl5jBbRO1A240gNpmTllE/parPpnfC+72blnqfYtrIP/NSGpJ7HcEy/VmYT/9qQhZbfHGLvVHOctbMwtzeztqI8ih8oLKfvPjs7LEMZX0dtb9579eVa2/Utimyvje+pvyfhKm48= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1768903441241764.8331015625542; Tue, 20 Jan 2026 02:04:01 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 5449A41AEA; Tue, 20 Jan 2026 05:04:00 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 2BD7741C73; Tue, 20 Jan 2026 05:03:24 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3DD14418CE; Tue, 20 Jan 2026 05:03:19 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 83BA041891 for ; Tue, 20 Jan 2026 05:03:18 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-491-lo0NL0mvNW-A2L4nnr9JCw-1; Tue, 20 Jan 2026 05:03:16 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4DE9E1955F68 for ; Tue, 20 Jan 2026 10:03:00 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AB50F19560AB for ; Tue, 20 Jan 2026 10:02:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768903398; h=from:from: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; bh=aMlGBOzX7VgOKPrV5kOfuLGytvE4DuKogv5pqbMt46s=; b=B1Z00CgDpoYRjuQJHniSlyWhaBqafagAoR8I4Dr7X5D0rRXrVnuGAXjrUatGgTz8X/57s9 1YwgdqQb/H2JF0vK4jnj87SD/qKKnWbHb6SrQJgUSxu1RjCDtM8fUpFMrMHVMNxCFGKL5g olgDgkVptsH5vo0q5iCBTSae1UNvT9U= X-MC-Unique: lo0NL0mvNW-A2L4nnr9JCw-1 X-Mimecast-MFC-AGG-ID: lo0NL0mvNW-A2L4nnr9JCw_1768903396 To: devel@lists.libvirt.org Subject: [PATCH] virnetdevtap: Produce more helpful error message in virNetDevTapCreate() Date: Tue, 20 Jan 2026 11:02:57 +0100 Message-ID: <94390fc1ef221addb7dc3d07bd06ce0dcf686e06.1768903377.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ANSMHXQtmTk7jvjSgygkPNwxtvpaZjWI1yE9iYHPF5E_1768903396 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HYE7GTV4G7P5PNATGSQFIYOZT5JCM66J X-Message-ID-Hash: HYE7GTV4G7P5PNATGSQFIYOZT5JCM66J X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768903442776158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Since v10.8.0-rc1~133 a different error is reported from virNetDevTapCreate() when the tap device already exists (and XML specifies managed=3D'no'). But the change covers only one scenario: if multique was requested in XML BUT pre-created tap device doesn't have multi_queue flag set. The opposite scenario: if the device has the multi_queue flag set BUT no multique was specified in the XML is missing. Until now. Resolves: https://issues.redhat.com/browse/RHEL-118303 Fixes: f6fb097e11a15e390d989411b2660ead0d1a7c10 Fixes: 465a38154f0cfc31d62c4105770e1f4a9599a611 Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/util/virnetdevtap.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index b709d76cc7..e3a6209642 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -230,11 +230,16 @@ int virNetDevTapCreate(char **ifname, } =20 if (ioctl(fd, TUNSETIFF, &ifr) < 0) { - if (flags & VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING && - tapfdSize > 1) { - virReportSystemError(errno, - _("Unable to create multiple fds for = tap device %1$s (maybe existing device was created without multi_queue flag= )"), - *ifname); + if (flags & VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING) { + if (tapfdSize > 1) { + virReportSystemError(errno, + _("Unable to create multiple fds = for tap device %1$s (maybe existing device was created without multi_queue = flag)"), + *ifname); + } else { + virReportSystemError(errno, + _("Unable to set tap device %1$s = (maybe existing device was created with multi_queue flag but device XML lac= ks 'queues' greater than one)"), + *ifname); + } } else { virReportSystemError(errno, _("Unable to create tap device %1$s"), --=20 2.52.0