From nobody Mon Feb 2 07:29:39 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=1768498735; cv=none; d=zohomail.com; s=zohoarc; b=OqR/rR64hOS88+wX6espS9zsTxeNje6VyS/bUaFDpR0lgW5qs3/Jt1HX38YaiXC/mV0p13ofFZyBE+raGk+sQ32YHJU+6WufFr5J+hrdcgYGSqTKQsZkx4eZEuc4LmhUnT7hmhV5GJ3ep/WlAAxKikbBi+itlufwvH93iEa0hWg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768498735; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=zx/gHslJBIsQ31dPSRrKr9eSGyJyWu/3aNmWQQUNjzE=; b=QNyIatxx6NFIVCzuB85D+1N2+xqBDmuj6yvCSGXHhyTfh21RxEQuNzbkTNxBnL/93VgNCK+fUIMGKiAQYB0iQlU/AgQbNaz6XPGZjShq9wui9TOvtwjaMsZW0poOBjeqory6l3ZM8wc/uO1j5ilig6niIsb9Ar7RqCsTN6ak8DU= 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 1768498735324458.57735517689366; Thu, 15 Jan 2026 09:38:55 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 7526D4190E; Thu, 15 Jan 2026 12:38:54 -0500 (EST) Received: from [172.19.199.83] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 6256343E6C; Thu, 15 Jan 2026 12:36:30 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 7FD6D41AA5; Thu, 15 Jan 2026 12:36:09 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 CC1C241AAF for ; Thu, 15 Jan 2026 12:36:07 -0500 (EST) Received: from mx-prod-mc-01.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-596-S4uS0YGkODuwxWcfgF8EDQ-1; Thu, 15 Jan 2026 12:36:06 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 55C4419540E3 for ; Thu, 15 Jan 2026 17:36:05 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.64.106]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F0A2A3001DBC for ; Thu, 15 Jan 2026 17:36:04 +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=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, 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=1768498567; 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: in-reply-to:in-reply-to:references:references; bh=zx/gHslJBIsQ31dPSRrKr9eSGyJyWu/3aNmWQQUNjzE=; b=FkKvzhOWZxcwzpbKEBoirENNI0HmjJUeJsilPqUfxBNsMKmNq3Pi/4t4VFq4m8Pcxet0x3 ZvwcJhXuyj4oEyfZ+IvHNMisz+RWWmojcUNq11mP3khO8G9wlMqG7neDjAtS6V0ciC7iRz x3S7NGDqmYj0qtElgzkyZz/3EXVo/7Q= X-MC-Unique: S4uS0YGkODuwxWcfgF8EDQ-1 X-Mimecast-MFC-AGG-ID: S4uS0YGkODuwxWcfgF8EDQ_1768498565 To: devel@lists.libvirt.org Subject: [PATCH 4/4] conf: simplify check for vlan tagging support in virDomainActualNetDefValidate() Date: Thu, 15 Jan 2026 12:36:01 -0500 Message-ID: <20260115173601.514507-5-laine@redhat.com> In-Reply-To: <20260115173601.514507-1-laine@redhat.com> References: <20260115173601.514507-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: yTNV7IX88sap2veQi8tSmnp3Kb5cQ6TiM8amv1spLqI_1768498565 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6DZWRFMOTVPYBQRDJSCEORIL5ARH7RHN X-Message-ID-Hash: 6DZWRFMOTVPYBQRDJSCEORIL5ARH7RHN X-MailFrom: laine@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: Laine Stump via Devel Reply-To: Laine Stump X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768498737401158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Laine Stump Since the only two types of bridges we support are OVS bridges and Linux host bridges, and since both of those now support vlan tagging, we don't need to check the virtualport type etc - if there is a bridge specified then we know the interface will support vlan tagging. Signed-off-by: Laine Stump --- src/conf/domain_validate.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 4589965923..4482203087 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -2229,15 +2229,12 @@ virDomainActualNetDefValidate(const virDomainNetDef= *net) if (virDomainNetGetActualVlan(net)) { /* vlan configuration via libvirt is only supported for PCI * Passthrough SR-IOV devices (hostdev or macvtap passthru - * mode) and openvswitch bridges. Otherwise log an error and - * fail + * mode) and openvswitch/linux host bridges. */ - if (!(actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV || + if (!(virDomainNetGetActualBridgeName(net) || + actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV || (actualType =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT && - virDomainNetGetActualDirectMode(net) =3D=3D VIR_NETDEV_MACV= LAN_MODE_PASSTHRU) || - (actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE && - vport && vport->virtPortType =3D=3D VIR_NETDEV_VPORT_PROFIL= E_OPENVSWITCH) || - (actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE && !vport))) { + virDomainNetGetActualDirectMode(net) =3D=3D VIR_NETDEV_MACV= LAN_MODE_PASSTHRU))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("interface %1$s - vlan tag not supported for = this connection type"), macstr); --=20 2.52.0