From nobody Thu Sep 19 01:44:39 2024 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1719580594457160.62482602055093; Fri, 28 Jun 2024 06:16:34 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 64012149D; Fri, 28 Jun 2024 09:16:33 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BA94213F3; Fri, 28 Jun 2024 09:13:14 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D9DDA1270; Fri, 28 Jun 2024 09:13:09 -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 43B561270 for ; Fri, 28 Jun 2024 09:12:50 -0400 (EDT) Received: from mx-prod-mc-04.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-391-FgxvSimoMg6GECxIy8bCKA-1; Fri, 28 Jun 2024 09:12:48 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 866A719560B6 for ; Fri, 28 Jun 2024 13:12:47 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B6DD919560A3 for ; Fri, 28 Jun 2024 13:12:46 +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.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE 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=1719580369; 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=XWfIJ3oRKOi6xgY/b0Va/xl32S8hV2+3IofyjyYIWkk=; b=Ybf/hbHmmuSUNuSl72sOwhS+xZCSeT3flXEC1eKubkKzr5iKxHkTHrZfRW/dV0biCk3Nb+ OfcfL9utvRTNfx6vaKuCpFC0sy+/570L+jK+X8cDy0AIDwRawoJ+qYyPniszFEwPhIG2JH JhSo/FjRL+HNEkQllvQU6ISOeqPp80I= X-MC-Unique: FgxvSimoMg6GECxIy8bCKA-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 6/8] conf: Accept 'default' backend type for Date: Fri, 28 Jun 2024 15:12:35 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4S76SHO7HGO5LY5CBSUQM3VKQCED54ZF X-Message-ID-Hash: 4S76SHO7HGO5LY5CBSUQM3VKQCED54ZF 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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1719580595807100001 Content-Type: text/plain; charset="utf-8"; x-default="true" After previous commits, domain capabilities XML reports basically two possible values for backend type: 'default' and 'passt'. Despite its misleading name, 'default' really means 'use hypervisor's builtin SLIRP'. Since it's reported in domain capabilities as a value accepted, make our parser and XML schema accept it. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/conf/domain_conf.c | 5 ++++- src/conf/schemas/domaincommon.rng | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cb1154b23f..334152c4ff 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9320,8 +9320,11 @@ virDomainNetBackendParseXML(xmlNodePtr node, g_autofree char *tap =3D virXMLPropString(node, "tap"); g_autofree char *vhost =3D virXMLPropString(node, "vhost"); =20 + /* The VIR_DOMAIN_NET_BACKEND_DEFAULT really means 'use hypervisor's + * builtin SLIRP'. It's reported in domain caps and thus we need to ac= cept + * it. Hence VIR_XML_PROP_NONE instead of VIR_XML_PROP_NONZERO. */ if (virXMLPropEnum(node, "type", virDomainNetBackendTypeFromString, - VIR_XML_PROP_NONZERO, &def->backend.type) < 0) { + VIR_XML_PROP_NONE, &def->backend.type) < 0) { return -1; } =20 diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 844a931deb..33e34255f4 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -3826,6 +3826,7 @@ + default passt --=20 2.44.2