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=1768498769; cv=none; d=zohomail.com; s=zohoarc; b=fn9AE7qBlw4D7nPwLTbfHZYGooCr3FsKkOY6kWsd/tMNnx94IBsTG01OrqX/k5SvXC7puOdEB5BSvgNrlYqnSZHJchICnL1ydrqTWkysJlOS0/WAZiWQqKdmbJq9tx8obOHGxy9BZjK24JXIs7LSVpCRvO3rEjgHe4dqYp/uHmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768498769; 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=LxcI1Fvywzv+83FPcEffnFx4eMsTwMmKVWflUMtILQU=; b=GYR9AY5kpnDPhedMJap3stYER/KxJTuTTahUvrbONH7YqEKUvx9nMUJMOpTYXyPTaK4aKR/z62qFD27JKY6OOBeIwIioimjTYFVM373gJqN4wuqlTAPslNVuWVmCXd7OZbpvW/AzWCZfHcX5OeYYzF8djeJrvWOTuHmqiaV9KDE= 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 1768498769235811.1441018756797; Thu, 15 Jan 2026 09:39:29 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4740F41AD6; Thu, 15 Jan 2026 12:39:28 -0500 (EST) Received: from [172.19.199.83] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id A665E43EB9; Thu, 15 Jan 2026 12:36:34 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 22AD24188C; Thu, 15 Jan 2026 12:36:10 -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 7206D41AAD for ; Thu, 15 Jan 2026 12:36:07 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-304-j_qxk1djNuOPDl7ED3TLZg-1; Thu, 15 Jan 2026 12:36:05 -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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 34B571800610 for ; Thu, 15 Jan 2026 17:36:04 +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 CEFCB3001DB9 for ; Thu, 15 Jan 2026 17:36:03 +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=LxcI1Fvywzv+83FPcEffnFx4eMsTwMmKVWflUMtILQU=; b=TK9TZKbhOMC0zpmX56yt9rd2nJXO7ZT6ABaoELgUHqvY8FsTDm5RCQQEs4MCWiBB9jo5Pa aTGyxP6gpWjvL/5/+xSVc7XpbsZ6bpDik61lQDjRdGAoCPqP4WUx4PTJBynV6f9oTz3NNm 4F9ra/wnTjrzSLJSgFRJ5ts8LX0iYBk= X-MC-Unique: j_qxk1djNuOPDl7ED3TLZg-1 X-Mimecast-MFC-AGG-ID: j_qxk1djNuOPDl7ED3TLZg_1768498564 To: devel@lists.libvirt.org Subject: [PATCH 2/4] qemu: use actual/effective vlan when updating OVS-based interface vlan tag Date: Thu, 15 Jan 2026 12:35:59 -0500 Message-ID: <20260115173601.514507-3-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: lgPuP_pwaQ9Nx_k8G0aiO7fwwxrnpp7u7jSs4UmhoXQ_1768498564 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: H4US5PNKWASY4AODTEXT5TY4R33MVM4Y X-Message-ID-Hash: H4US5PNKWASY4AODTEXT5TY4R33MVM4Y 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: 1768498769573158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Laine Stump Using &newdev->vlan when updating the vlan tag causes problems if the interface is using a libvirt virtual network to get its vlan tag info - in this case the info won't be properly pulled from the virtual netw= ork config, but instead it will just use the (empty) vlan object from the netdef. The proper thing to do is to use virDomainNetGetActualVlan(), which will pull the vlan tag from the network definition, if applicable. Signed-off-by: Laine Stunp Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 6d20e3a850..c5905dba23 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -4263,7 +4263,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, * will redo vlan setup without needing to re-attach the * tap device to the bridge */ - if (virNetDevOpenvswitchUpdateVlan(newdev->ifname, &newdev->vl= an) < 0) + if (virNetDevOpenvswitchUpdateVlan(newdev->ifname, virDomainNe= tGetActualVlan(newdev)) < 0) goto cleanup; } else if (newType =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT && virDomainNetGetActualDirectMode(newdev) =3D=3D VIR_NETD= EV_MACVLAN_MODE_PASSTHRU) { --=20 2.52.0