From nobody Sat May 4 08:08:38 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 1510954226164851.002407325997; Fri, 17 Nov 2017 13:30:26 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 640D8C04AC47; Fri, 17 Nov 2017 21:30:23 +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 60B3B8CFA5; Fri, 17 Nov 2017 21:30:22 +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 1F4AE1800BDA; Fri, 17 Nov 2017 21:30:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAHLS4dR023150 for ; Fri, 17 Nov 2017 16:28:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 52CD88CFA2; Fri, 17 Nov 2017 21:28:04 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4DCFC5C8B0 for ; Fri, 17 Nov 2017 21:28:02 +0000 (UTC) Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) (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 919B3CD262 for ; Fri, 17 Nov 2017 21:28:01 +0000 (UTC) Received: by mail-qt0-f194.google.com with SMTP id 8so8565711qtv.1 for ; Fri, 17 Nov 2017 13:28:01 -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.27.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 13:28:00 -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=yU3e+Yvzqysj/BYyd7CwHaMwHAJCfdJ+PyT2k7EqWyA=; b=vArl20RCQVsOZfAs7FpbpSMt8GQVFFGUboWiBbya4iFM+9YNzgQHf6KBkplu84ZNo4 OIWfNPJ74XdJxqL2bXZz+NX8pERDXmc9yECbTAI82SBWl8+YqJgTuN5ZNYLwXFL5cGnQ CpUe/250GuS3cUQF1n16SeOdcEVqwAYSZZDGQHPFvC83rb/ejFILQOlygm0jhnUjeB3y TnplPin9svylCLK0YuOvqWLAarsYn7gf6XdRHsiGe5jdquKKBpsJ8TKdN0F7ZUSEvPxe uBLSEft5ep7fglX/F1b6GkO2HoNhnhUmMLEXFzqg8j0qvz3dAGgj50cJYv2CPQOiSgCh 89rw== 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=yU3e+Yvzqysj/BYyd7CwHaMwHAJCfdJ+PyT2k7EqWyA=; b=kB+71gtNS6GJ4jfhtvZZePq8szJWRh4WUpa1xJi8ePgBEeFdtEYaRFujqA45i5cmbI KYRkNaCmHb+UtxsBG7+v+d+iMZjtvLGbqXb3yCEy+SkRf3UrHMVeIaGA/MZdX/AvDzil zpRSQ+TPkfU+8q7VKPRhr8x67H+ScZcx4mhgD6ZpYMqLAC/liVlif/PfE/+E7GMMJgo/ 33v7Fib3t+J/szrx1HCz30hx2k7yIDeDVA8hDbHArfoAka+eP2c/et1enZK4RkFkX/Vr kaprsFtELGev3zaVubUyOzZ3bk/cifStoOWejRqDr83lppWpWtaNnFle96YdiHBo+ncH q77A== X-Gm-Message-State: AJaThX4t7GcWNRDMw02mFUxyokSFQD/YMY24QVUeI7sGV5s+kL2FVxbT WY9ufU6PGTGyfzusBdUsJsCfuA== X-Google-Smtp-Source: AGs4zMYvzP9YJG4aY2/Mvj21g1qvaIpD02FqoU78EVmSd51pcK7aSxuMqFC80JsdY0zmVgXLF9N/hA== X-Received: by 10.200.45.36 with SMTP id n33mr4570594qta.335.1510954080629; Fri, 17 Nov 2017 13:28:00 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 17 Nov 2017 19:27:40 -0200 Message-Id: <1510954061-5333-2-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.38]); Fri, 17 Nov 2017 21:28:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 17 Nov 2017 21:28:01 +0000 (UTC) for IP:'209.85.216.194' DOMAIN:'mail-qt0-f194.google.com' HELO:'mail-qt0-f194.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.216.194 mail-qt0-f194.google.com 209.85.216.194 mail-qt0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/2] tests: changing network interface types when backend tag is defined. 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 17 Nov 2017 21:30:25 +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" Some test cases have the backend tag inside wrong interfaces. The backend x= ml tag does not support . So this comm= it changes some network types inside the interfaces that have backend defined. Signed-off-by: Julio Faracco --- tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml | 6 ++++-- tests/qemuxml2argvdata/qemuxml2argv-tap-vhost.xml | 3 ++- tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml | 6 ++++-- tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml b/= tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml index a1532cb..4e1d67e 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml @@ -22,14 +22,16 @@ - + + - + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost.xml b/tests/qemu= xml2argvdata/qemuxml2argv-tap-vhost.xml index c2303b7..6d7ffb0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost.xml @@ -35,8 +35,9 @@ - + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xm= l b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml index 3a95b60..a6be754 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml @@ -26,14 +26,16 @@
- + +
- + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml b/tests/= qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml index 759b844..7787bef 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml @@ -39,8 +39,9 @@
- + + --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 08:08:38 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 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