From nobody Mon Feb 2 07:30:15 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=1768498662; cv=none; d=zohomail.com; s=zohoarc; b=Qx2WyABvGDG7vKmiCU4IOOyEdfJRdrszi642E8yyu9en/gmNeS29+PgqSC2mDdnPcKkLnwfW1T4kZ8V2q/05BkHrEbzwx019DoeAF5f+59D52sSnq0qAqaoFzspc8LKxkYRE4Tt9fmPmyDPJqEh+xjsPVGlY0fBCCXQhZ1snUi4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768498662; 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=oOogYrDezjru5ZQMMQSDkDCWn4defvLFfTqguAe3KDE=; b=cem3zBQSgSCfoRBGjIdOm5331Ff209Xi61rUAYkFlbbLjGl97pjT2vIWJ59wdk5wmfibOUwSEnJ0649K+/OAGTLMELYSxFS3TyHwmGqUbVBneDedBRkv4JznU4MJudzMW5PTjNIh5LtdakfkkAKnsOg+jgXuEG10d7JNeXd7chs= 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 1768498662247249.37961397790104; Thu, 15 Jan 2026 09:37:42 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4AB1B41AB4; Thu, 15 Jan 2026 12:37:41 -0500 (EST) Received: from [172.19.199.83] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id A7E67418DC; Thu, 15 Jan 2026 12:36:22 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id C469241AC2; Thu, 15 Jan 2026 12:36:08 -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 1FB3641AA5 for ; Thu, 15 Jan 2026 12:36:06 -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-187-_UagcZYAPW6VY35kDcPSMw-1; Thu, 15 Jan 2026 12:36:04 -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 9CEEF1954B0C for ; Thu, 15 Jan 2026 17:36:03 +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 457673001DB9 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=1768498565; 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=oOogYrDezjru5ZQMMQSDkDCWn4defvLFfTqguAe3KDE=; b=WaL0wB/dO8FIVkDGrzf7q8fwhT2tH3kSe8ybMFq9tgF74LXfSj5waekgQd1WStu9NFEqJ/ pxHJFzcnbKHHpIutQuaAe+pZHYswZd5A+uBV3fGlMwUVh2JIb2mb/il2AdmqVLZtFkJwv9 N8zsKJOFPb81Ae7Vk3T2vY4FxQO/mfY= X-MC-Unique: _UagcZYAPW6VY35kDcPSMw-1 X-Mimecast-MFC-AGG-ID: _UagcZYAPW6VY35kDcPSMw_1768498563 To: devel@lists.libvirt.org Subject: [PATCH 1/4] qemu: update vlan tag of macvtap (direct) passthrough devices during update-device Date: Thu, 15 Jan 2026 12:35:58 -0500 Message-ID: <20260115173601.514507-2-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: 55a3KvM2uH-73necWi_gSTXW-8v6UYiAPOzjYH3Bd0I_1768498563 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MC7HP6LCFBUK7FQD6T5SIHAATII2EJC2 X-Message-ID-Hash: MC7HP6LCFBUK7FQD6T5SIHAATII2EJC2 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: 1768498665236158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Laine Stump We already update the vlan tag of interfaces that are attached to an OVS bridge or Linux host bridge. This patch adds the bit of code necessary to update the vlan tag of a macvtap passthrough interface (the only other type of interface that supports vlan tagging). Resolves: https://issues.redhat.com/browse/RHEL-74487 Resolves: https://issues.redhat.com/browse/RHEL-7300 Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index fccbef5d0c..6d20e3a850 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -4265,11 +4265,21 @@ qemuDomainChangeNet(virQEMUDriver *driver, */ if (virNetDevOpenvswitchUpdateVlan(newdev->ifname, &newdev->vl= an) < 0) goto cleanup; - } else { + } else if (newType =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT && + virDomainNetGetActualDirectMode(newdev) =3D=3D VIR_NETD= EV_MACVLAN_MODE_PASSTHRU) { + if (virNetDevSetNetConfig(virDomainNetGetActualDirectDev(newde= v), + -1, NULL, virDomainNetGetActualVlan(= newdev), NULL, true) < 0) { + goto cleanup; + } + } else if (newBridgeName) { /* vlan setup is done as a part of reconnecting the tap * device to a new bridge (either OVS or Linux host bridge). */ needBridgeChange =3D true; + } else { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, + _("unable to change vlan on '%1$s' network type= "), + virDomainNetTypeToString(newType)); } needReplaceDevDef =3D true; } --=20 2.52.0