From nobody Thu May 15 08:56:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1510954331101503.00082198135897; Fri, 17 Nov 2017 13:32:11 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C61A07F7B0; Fri, 17 Nov 2017 21:32:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 882AD11E7ED; Fri, 17 Nov 2017 21:32:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4F1AA4A467; Fri, 17 Nov 2017 21:32:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAHLS7ZW023166 for ; Fri, 17 Nov 2017 16:28:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 413F811A4DF; Fri, 17 Nov 2017 21:28:07 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B89311A4DE for ; Fri, 17 Nov 2017 21:28:05 +0000 (UTC) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BCF57652C for ; Fri, 17 Nov 2017 21:28:04 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id o6so1051866qkh.3 for ; Fri, 17 Nov 2017 13:28:04 -0800 (PST) Received: from localhost.localdomain (201-42-6-40.dsl.telesp.net.br. [201.42.6.40]) by smtp.googlemail.com with ESMTPSA id y7sm3168791qke.58.2017.11.17.13.28.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 13:28:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=guN21KYrXjMviDxl9n0bxo/+TgO1XGIWLyPs2lqQuiE=; b=E/pHpjwF1uexwBcw2ufVQUL1FAsbgPdUkf4DcQPR9xk9q2JmdPbtoNC4iZutEFwys0 MhCimg9NaAATyvYqs8MH36tUPVtuzFi/dt8CmmlONBVE0v0SoLqKy66hiXix1+a8X0WD VfEQX6isPM3ikNWPnzwQuU8JTqyEtV3z4/9RmwgKFOKU5Tu00URhdAu4KfTvm/Gbmjxa vroe4kJH8CpHtlG0w20CYL4i0gmrx6L93IZIlwr+zj9M6dlrMrzg0LvlImj36iqdRHxE KQ//3qDoYNK4Cs3Kxf5W4IWZyKI6u1Bat9u/YmVYifH34vJzIUy1JjkwiThCbfB5MhGg 0Wwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=guN21KYrXjMviDxl9n0bxo/+TgO1XGIWLyPs2lqQuiE=; b=IKezBD2wZhVJgiat3dzqzIL6tBjXcdtD4bRLoGFmlWTe8nHBM6Tqv959m9goEvMVUj kjd/PqeOFr4Qx8BHz4zFsWAtMI91Jv0VZjdPfHe58GFISAaKTPRqZQYynqjmpHwLkd1s AfFro46kt9Cf5vAVJMGy/HcCdLap1uUQS2X/8p6bbKjew5Zyc99jkAB7H4CtDvVt0tSB ublcdnG2tmvzPTvxQC49Nb7RoCffy5QziHkEHG3PgcT+LPQcWjNfLptg/otEukArFaxU CLO8a8E3LZckQtZczZmfSmNMsOKNmz4bSeTKDp+XS7uJlLl3gno2hmE1YbGmgNNKpGqT rvJg== X-Gm-Message-State: AJaThX4GXwEQstur2dLnGhIRprWWL9nZq0WVDagG6WkRAtubdtyTuiIQ NCm0x5GDBt+G8Lh9ZNzqnf17mA== X-Google-Smtp-Source: AGs4zMa17587bJOIu++sc66WK6WGb40vX1zlUcHSf5+anEYalsjff07Dr8MLiVKoZ5hiRSk0uW8lpQ== X-Received: by 10.55.42.100 with SMTP id q97mr9931501qkh.53.1510954083424; Fri, 17 Nov 2017 13:28:03 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 17 Nov 2017 19:27:41 -0200 Message-Id: <1510954061-5333-3-git-send-email-jcfaracco@gmail.com> In-Reply-To: <1510954061-5333-1-git-send-email-jcfaracco@gmail.com> References: <1510954061-5333-1-git-send-email-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 17 Nov 2017 21:28:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 17 Nov 2017 21:28:04 +0000 (UTC) for IP:'209.85.220.195' DOMAIN:'mail-qk0-f195.google.com' HELO:'mail-qk0-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.37 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.220.195 mail-qk0-f195.google.com 209.85.220.195 mail-qk0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/2] qemu: network user/direct/hostdev do not support backend. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 17 Nov 2017 21:32:10 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The tag backend is not supported for user/direct/hostdev network when you try to define them inside the domain XML. So, other ways to include devices cannot be permitted too. But the attach-device command is wrongly adding unsupported features. This commit fixes this bug. After the patch: virsh # attach-device rhel7.4 backend.xml error: Failed to attach device from backend.xml error: unsupported configuration: Custom tap device path is not supported f= or: user Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1480251 Signed-off-by: Julio Faracco --- src/qemu/qemu_domain.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index cc7596b..0215b2a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3608,6 +3608,13 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef= *dev, goto cleanup; } =20 + if (net->backend.tap) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Custom tap device path is not supported = for: %s"), + virDomainNetTypeToString(net->type)); + goto cleanup; + } + for (i =3D 0; i < net->guestIP.nips; i++) { const virNetDevIPAddr *ip =3D net->guestIP.ips[i]; =20 @@ -3649,6 +3656,14 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef= *dev, } } } + } else if (net->type =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT || + net->type =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV) { + if (net->backend.tap) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Custom tap device path is not supported = for: %s"), + virDomainNetTypeToString(net->type)); + goto cleanup; + } } else if (net->guestIP.nroutes || net->guestIP.nips) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Invalid attempt to set network interface " --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list