From nobody Mon Sep 8 17:11:52 2025 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; 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=1753279433; cv=none; d=zohomail.com; s=zohoarc; b=dvZT1oqcKUH+SVadVNFUIbLpoYwnIm6h8LNCnCLBxj5WADGM0xi7asBj1Hz0S3PUF9aU8N48Dwl0xcGjp5vBb7eQ2qKhN/86CBJaIhFOZFlyGkuJ/srmG4Xt2WW219ObaZ6Ts3vOOsk6IPctNr47V+F3PO5k+umqDMa/jWdIZWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753279433; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post: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=qgLFxdMcX/MP3OlmkJBP+AUYCukq/UByYXJBHlLVwB4=; b=Z40CwrNs9RrB1dhrGcPaRPSeNBlsch/jpku86WL5IZ0QqHbmBEsBgFnFSy4Zkw64xlvgGq2KP5y4QcioZyEyZJ9NF021rQsa0Tu6KDrzqFHXXjqqnDwq+MhY+kxaeo0zvTI/bGIDEDlWC0s3VlFl5kv4rz/kPu4sQuWb61ijc+0= 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 1753279433756471.1663427337378; Wed, 23 Jul 2025 07:03:53 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B13AFB97; Wed, 23 Jul 2025 10:03:52 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E700F1475; Wed, 23 Jul 2025 10:02:04 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id A82B51220; Wed, 23 Jul 2025 10:02:00 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 943871422 for ; Wed, 23 Jul 2025 10:01:16 -0400 (EDT) Received: from mx-prod-mc-03.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-619-RJVsCFjtMbKtJHBA9kXU5Q-1; Wed, 23 Jul 2025 10:01:09 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 034B51977308 for ; Wed, 23 Jul 2025 14:01:09 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4EB26180045B for ; Wed, 23 Jul 2025 14:01:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753279276; 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=WuJ+v5smGE5iUURiQiBL1Zq7OdyPT4IlffKO01OBddc=; b=LqiIbx5EtpG6vHyIoEnF2ifm2zqOBBRmFCrRayK34NzBhGwdYxP2C+cAJ59PhmVQDvNHs+ dbYS8sq2FaS7cWMQ6/OdOHi0ujYpfaz1CbkTFk1ESG8Rpu3l6S6OEMIvZYHYMNsBKPq4rO OGBPDjQmRhmkf36LIwvs62Y2PrjP4aw= X-MC-Unique: RJVsCFjtMbKtJHBA9kXU5Q-1 X-Mimecast-MFC-AGG-ID: RJVsCFjtMbKtJHBA9kXU5Q_1753279269 To: devel@lists.libvirt.org Subject: [PATCH 1/2] virnetdevvportprofile: Drop explicit enum virNetDevVPortProfile declaration Date: Wed, 23 Jul 2025 16:01:03 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: n3FePd1Mn4V8Jn9G-x5_5skV_DM353_V9EOGpXGgzTE_1753279269 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: UYJ6QESUECJPZB5ART7KHGHFVT576KGV X-Message-ID-Hash: UYJ6QESUECJPZB5ART7KHGHFVT576KGV X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: 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: 1753279435197116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The virNetDevVPortProfile enum is both explicitly declared and also typedef-ed. This repetition is redundant. Just use typedef. To make matters worse, there's another type with the same name, but because in the code, those few places used 'enum virNetDevVPortProfile var;' to declare variables compilers didn't complain. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/conf/netdev_vport_profile_conf.c | 2 +- src/util/virnetdevvportprofile.c | 2 +- src/util/virnetdevvportprofile.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_p= rofile_conf.c index 523d9b642c..f7928a5679 100644 --- a/src/conf/netdev_vport_profile_conf.c +++ b/src/conf/netdev_vport_profile_conf.c @@ -169,7 +169,7 @@ void virNetDevVPortProfileFormat(const virNetDevVPortProfile *virtPort, virBuffer *buf) { - enum virNetDevVPortProfile type; + virNetDevVPortProfileType type; bool noParameters; =20 if (!virtPort) diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprof= ile.c index c755fa79ec..221e0888b3 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -279,7 +279,7 @@ static int virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, const virNetDevVPortProfile *mods) { - enum virNetDevVPortProfile otype; + virNetDevVPortProfileType otype; =20 if (!orig || !mods) return 0; diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprof= ile.h index 600b2093c5..43ccb891e7 100644 --- a/src/util/virnetdevvportprofile.h +++ b/src/util/virnetdevvportprofile.h @@ -25,7 +25,7 @@ =20 #define LIBVIRT_IFLA_VF_PORT_PROFILE_MAX 40 =20 -typedef enum virNetDevVPortProfile { +typedef enum { VIR_NETDEV_VPORT_PROFILE_NONE, VIR_NETDEV_VPORT_PROFILE_8021QBG, VIR_NETDEV_VPORT_PROFILE_8021QBH, --=20 2.49.1 From nobody Mon Sep 8 17:11:52 2025 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; 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=1753279413; cv=none; d=zohomail.com; s=zohoarc; b=XOlwIjjZ+1zq3Hi5ibUPDKwmckD75RtD1HrFXf2Rb36IQV/6xbM7nQKYmLZUT1VEJwLExLWw+Qy64seKfynO5NojduZgo60TjJHx4PP2jsfwqpuWFXNXYKFi4Vb8qJmcOx3t4BuEuPY0EHZIRuqNgpPVO7LcX0PA0th4k2W887U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753279413; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post: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=S+pD6eoWC15ZaMGT7snC72T/P0tOVal8X5n+A7IAkzc=; b=U/ezJWJigNlMy7L5x64rhyWkGzva5Hb7Cq/baTJihjsaFXkV7771pPpEBwanWueYYMkLsyP97Cfs6td0P3R8cx7lp/z/f7XHoLGd4Th54GP5cpVbhKwIfqeTlEuIXJLQGvMJloj4NGjZpubIwbTtFl0OE8LCiOFpcOF+pQTlHZI= 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 1753279413750831.8333821229902; Wed, 23 Jul 2025 07:03:33 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id AAD3C11DF; Wed, 23 Jul 2025 10:03:32 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id ED10F13BB; Wed, 23 Jul 2025 10:01:58 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E17BB14C3; Wed, 23 Jul 2025 10:01:50 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DBA2B12A9 for ; Wed, 23 Jul 2025 10:01:12 -0400 (EDT) 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-278-isiVaKa_OsGVLu9qBDM0NQ-1; Wed, 23 Jul 2025 10:01:10 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 19A58180029D for ; Wed, 23 Jul 2025 14:01:10 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 68090180045B for ; Wed, 23 Jul 2025 14:01:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753279272; 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=Lr3G3rDc0Xg0HKFjgKyOWKNYGmQwfr7eAfY9BBWySgE=; b=MBTmnQErP5z5SjkUOpC2YMOcu/QAMUrJZW3oHmd7sFXcDbLcN7NzGIQx2gydfvroXYKGAe 5xUL0AOrW+A8y1C9xya8/x2j9yP7f6RBc5nvreLRqifoWHcCjM6TOTedNYNRug/saaRWT5 xj5vHst2bC7HehKzj0mNoahWjypo/tI= X-MC-Unique: isiVaKa_OsGVLu9qBDM0NQ-1 X-Mimecast-MFC-AGG-ID: isiVaKa_OsGVLu9qBDM0NQ_1753279270 To: devel@lists.libvirt.org Subject: [PATCH 2/2] virnetdevvportprofile: Turn 'virtPortType' of virNetDevVPortProfile into proper enum type Date: Wed, 23 Jul 2025 16:01:04 +0200 Message-ID: <1c6c8fe0c06629749da434415a6d0edf065782f5.1753279251.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: iYtAWJGpBVGsnlZq18l-zc90HzNB3RyO2cBQIupigbI_1753279270 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: Y5Z2UNY24WDTFG3EZ6ZECPFDQ74PZPXW X-Message-ID-Hash: Y5Z2UNY24WDTFG3EZ6ZECPFDQ74PZPXW X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: 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: 1753279414960116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Convert the member to the appropriate type, fix few missing cases in switch() and switch to virXMLPropEnum() in parsing. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/conf/netdev_vport_profile_conf.c | 9 ++++----- src/hypervisor/virhostdev.c | 1 + src/qemu/qemu_migration_cookie.c | 2 ++ src/util/virnetdevvportprofile.c | 17 +++++++++++++++-- src/util/virnetdevvportprofile.h | 2 +- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_p= rofile_conf.c index f7928a5679..6106130a39 100644 --- a/src/conf/netdev_vport_profile_conf.c +++ b/src/conf/netdev_vport_profile_conf.c @@ -28,16 +28,15 @@ virNetDevVPortProfile * virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags) { - g_autofree char *virtPortType =3D NULL; g_autofree virNetDevVPortProfile *virtPort =3D NULL; xmlNodePtr parameters; =20 virtPort =3D g_new0(virNetDevVPortProfile, 1); =20 - if ((virtPortType =3D virXMLPropString(node, "type")) && - (virtPort->virtPortType =3D virNetDevVPortTypeFromString(virtPortT= ype)) <=3D 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown virtualport type %1$s"), virtPortType); + if (virXMLPropEnum(node, "type", + virNetDevVPortTypeFromString, + VIR_XML_PROP_NONZERO, + &virtPort->virtPortType) < 0) { return NULL; } =20 diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index 0a1d8500d4..7d7df4418d 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -370,6 +370,7 @@ virHostdevNetConfigVirtPortProfile(const char *linkdev,= int vf, case VIR_NETDEV_VPORT_PROFILE_NONE: case VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH: case VIR_NETDEV_VPORT_PROFILE_8021QBG: + case VIR_NETDEV_VPORT_PROFILE_MIDONET: case VIR_NETDEV_VPORT_PROFILE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("virtualport type %1$s is currently not supported= on interfaces of type hostdev"), diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 90cc079c1a..01529c99b8 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -283,6 +283,7 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriver *driver G= _GNUC_UNUSED, case VIR_NETDEV_VPORT_PROFILE_NONE: case VIR_NETDEV_VPORT_PROFILE_8021QBG: case VIR_NETDEV_VPORT_PROFILE_8021QBH: + case VIR_NETDEV_VPORT_PROFILE_MIDONET: break; case VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH: if (virNetDevOpenvswitchGetMigrateData(&mig->net[i].portda= ta, @@ -293,6 +294,7 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriver *driver G= _GNUC_UNUSED, return NULL; } break; + case VIR_NETDEV_VPORT_PROFILE_LAST: default: break; } diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprof= ile.c index 221e0888b3..d6674390a7 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -109,11 +109,13 @@ virNetDevVPortProfileEqual(const virNetDevVPortProfil= e *a, const virNetDevVPortP break; =20 case VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH: + case VIR_NETDEV_VPORT_PROFILE_MIDONET: if (STRNEQ(a->profileID, b->profileID) || memcmp(a->interfaceID, b->interfaceID, VIR_UUID_BUFLEN) !=3D 0) return false; break; =20 + case VIR_NETDEV_VPORT_PROFILE_LAST: default: break; } @@ -151,7 +153,7 @@ virNetDevVPortProfileCheckComplete(virNetDevVPortProfil= e *virtport, { const char *missing =3D NULL; =20 - if (!virtport || virtport->virtPortType =3D=3D VIR_NETDEV_VPORT_PROFIL= E_NONE) + if (!virtport) return 0; =20 switch (virtport->virtPortType) { @@ -201,6 +203,10 @@ virNetDevVPortProfileCheckComplete(virNetDevVPortProfi= le *virtport, if (!virtport->interfaceID_specified) missing =3D "interfaceid"; break; + + case VIR_NETDEV_VPORT_PROFILE_NONE: + case VIR_NETDEV_VPORT_PROFILE_LAST: + break; } =20 if (missing) { @@ -224,7 +230,7 @@ virNetDevVPortProfileCheckNoExtras(const virNetDevVPort= Profile *virtport) { const char *extra =3D NULL; =20 - if (!virtport || virtport->virtPortType =3D=3D VIR_NETDEV_VPORT_PROFIL= E_NONE) + if (!virtport) return 0; =20 switch (virtport->virtPortType) { @@ -249,6 +255,7 @@ virNetDevVPortProfileCheckNoExtras(const virNetDevVPort= Profile *virtport) break; =20 case VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH: + case VIR_NETDEV_VPORT_PROFILE_MIDONET: if (virtport->managerID_specified) extra =3D "managerid"; else if (virtport->typeID_specified) @@ -258,6 +265,10 @@ virNetDevVPortProfileCheckNoExtras(const virNetDevVPor= tProfile *virtport) else if (virtport->instanceID_specified) extra =3D "instanceid"; break; + + case VIR_NETDEV_VPORT_PROFILE_NONE: + case VIR_NETDEV_VPORT_PROFILE_LAST: + break; } =20 if (extra) { @@ -1238,6 +1249,7 @@ virNetDevVPortProfileAssociate(const char *macvtap_if= name, switch (virtPort->virtPortType) { case VIR_NETDEV_VPORT_PROFILE_NONE: case VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH: + case VIR_NETDEV_VPORT_PROFILE_MIDONET: case VIR_NETDEV_VPORT_PROFILE_LAST: break; =20 @@ -1303,6 +1315,7 @@ virNetDevVPortProfileDisassociate(const char *macvtap= _ifname, switch (virtPort->virtPortType) { case VIR_NETDEV_VPORT_PROFILE_NONE: case VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH: + case VIR_NETDEV_VPORT_PROFILE_MIDONET: case VIR_NETDEV_VPORT_PROFILE_LAST: break; =20 diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprof= ile.h index 43ccb891e7..c15fd4163a 100644 --- a/src/util/virnetdevvportprofile.h +++ b/src/util/virnetdevvportprofile.h @@ -53,7 +53,7 @@ VIR_ENUM_DECL(virNetDevVPortProfileOp); /* profile data for macvtap (VEPA) and openvswitch */ typedef struct _virNetDevVPortProfile virNetDevVPortProfile; struct _virNetDevVPortProfile { - int virtPortType; /* enum virNetDevVPortProfile */ + virNetDevVPortProfileType virtPortType; /* these members are used when virtPortType =3D=3D 802.1Qbg */ uint8_t managerID; bool managerID_specified; --=20 2.49.1