From nobody Thu May 2 19:09:04 2024 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 1511741405842193.7629520435579; Sun, 26 Nov 2017 16:10:05 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD5BB12B6; Mon, 27 Nov 2017 00:10:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4CCD35D9C6; Mon, 27 Nov 2017 00:10:03 +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 CDBF91800BDE; Mon, 27 Nov 2017 00:10:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAR09xM8009075 for ; Sun, 26 Nov 2017 19:09:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2C3C960F91; Mon, 27 Nov 2017 00:09:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BAC4609A5; Mon, 27 Nov 2017 00:09:56 +0000 (UTC) Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) (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 B982383F43; Mon, 27 Nov 2017 00:09:55 +0000 (UTC) Received: by mail-qk0-f179.google.com with SMTP id d125so30403898qkc.12; Sun, 26 Nov 2017 16:09:55 -0800 (PST) Received: from localhost.localdomain ([187.107.182.187]) by smtp.googlemail.com with ESMTPSA id f38sm14134581qtc.73.2017.11.26.16.09.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Nov 2017 16:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Vj5W1NM+D88wvZVxbaQryG1+xvMarIazNGqGLS/Vmp0=; b=rUnaNnxA1Fr/jMN2ZYpIdpEXRHmXJtdH3p0VLY2e8yKYosGf+PG1JYnueDUaroPi5j uuYJKbQLwA1DMOKpoVuo0cx3v1hfigN/n1BJYKQ7Z0DWZcD3TXX59mb6H0bZ4pDEA/Nx nJPLb4VFFgrtfL7vIuGFdPXbUmEhikmjJX/js/QjCEq973/UqkwMOj05b6U5zVWA/RCW HxGWy5pJCil0erFZ+dfLNpFn/AoSq1eXgMpFD9xvEbo6HtrMLGF2Bd82Ev1W7TmoIBNi kn/UDxg5X/TEXiDfIUQRLl4mJMyz/XuG317pvdENvhqaCSsG/l0FiZLqvq8j5Yspgx5+ wrxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Vj5W1NM+D88wvZVxbaQryG1+xvMarIazNGqGLS/Vmp0=; b=Gu+ATb1mYAwM+cgiI9s40ktI80Pian1NtZ9zvJyjQvioxw+IjzmF5iSccsbD3IcydB mI3QgmTjrR0h8fJCGlW5f9tbJjkdYFpYHQCXaEMzQFrvN8rlF4z2YyXJO99oFgLiBOzr FajdZ/7bl16eXvnOXvNVuxf9eQvzswvl/tkkGCZCJ7cKi/w2HgrH/IxOgTJlnNW2LnYz jaYX+iH5lR0cgaaJyYdTlSnX706sJvzKwea12eInb4lBVVyt3YMdBYbpLsaKL1HbDV1e /xQ8I2eig2Uj30+rDv7Y+rFwGAm5mBLoAeZw2gutn14XoPRfbxsHs5fJBsqlDI9csOs8 JRBg== X-Gm-Message-State: AJaThX5aczVLmfuQ3cA6rHKH6RnfBcr5tJmnIRlSBIWvrVvwZtp5W/sW CgXxB4swxw+EulaVAeoV6DqDqQ== X-Google-Smtp-Source: AGs4zMacgXgsmPpfFbqHGqS/yy3qw9jZi/wH8IqHlnEjT/7/5+W1wJOkHN41+ox0qrYnaf+UTue+yg== X-Received: by 10.55.187.69 with SMTP id l66mr45299056qkf.6.1511741394686; Sun, 26 Nov 2017 16:09:54 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Sun, 26 Nov 2017 22:09:42 -0200 Message-Id: <1511741382-5841-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.27]); Mon, 27 Nov 2017 00:09:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 27 Nov 2017 00:09:55 +0000 (UTC) for IP:'209.85.220.179' DOMAIN:'mail-qk0-f179.google.com' HELO:'mail-qk0-f179.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.13 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.220.179 mail-qk0-f179.google.com 209.85.220.179 mail-qk0-f179.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: jtomko@redhat.com Subject: [libvirt] [PATCH v3] 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 27 Nov 2017 00:10:05 +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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9dab6b2..bee44d1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3622,6 +3622,16 @@ qemuDomainDeviceDefValidateNetwork(const virDomainNe= tDef *net) return -1; } =20 + 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)); + return -1; + } + } + if (STREQ_NULLABLE(net->model, "virtio")) { if (net->driver.virtio.rx_queue_size & (net->driver.virtio.rx_queu= e_size - 1)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list