From nobody Sat May 4 05:25:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559649779; cv=none; d=zoho.com; s=zohoarc; b=luVn5yJwCTbMybbHomAsHSTPnWT9jwYa17ahoNSZwK9eu3DGzKlA9tVBF4D2P8fW50+J1AG0KlokE6qEvxYnsd/gc7w1DJUyGemx8aRoOt6isZ0fnUH5kgMIS55ifq8FmNV6yJCs/YjXn8egS9nRUwqN/a2kLdhcv3Z6qlyxqXA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559649779; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=UgVIAifAcQwQAi3qnZdJOjHdEXAC9H8dfyoo2B2rL9w=; b=N38QLtGe64b00K4o1iEJIvFIHx/GXkY/Pmh7UpkbP7eoq2gsKiZLrFsx8pc+73Elm3lRlYEl1a/NQHddkQiNcR3niy2JV8Yx2JBIFr7Hl+DzCh+7hcPHL0Tva9x/7XaSCrlv81lvIXag6O0y6F1TUku2CnM9O6+KSKO6ZMSQ8Jk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559649779404616.9495255306763; Tue, 4 Jun 2019 05:02:59 -0700 (PDT) Received: from localhost ([127.0.0.1]:50959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY89Q-0002pV-Dw for importer@patchew.org; Tue, 04 Jun 2019 08:02:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY84W-0007u9-9l for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:57:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hY7zM-0000Qu-Rr for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:52:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60683) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hY7zL-0000Pb-VC for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:52:24 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E45C8CB56 for ; Tue, 4 Jun 2019 11:52:23 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D93B60C9E; Tue, 4 Jun 2019 11:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A33B211386A3; Tue, 4 Jun 2019 13:52:21 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2019 13:52:19 +0200 Message-Id: <20190604115221.28364-2-armbru@redhat.com> In-Reply-To: <20190604115221.28364-1-armbru@redhat.com> References: <20190604115221.28364-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 04 Jun 2019 11:52:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/3] MAINTAINERS: Add qemu-bridge-helper.c to "Network device backends" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jasowang@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index a96829ea83..8b73f1f0d2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1936,6 +1936,7 @@ M: Jason Wang S: Maintained F: net/ F: include/net/ +F: qemu-bridge-helper.c T: git https://github.com/jasowang/qemu.git net F: qapi/net.json =20 --=20 2.21.0 From nobody Sat May 4 05:25:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559649662; cv=none; d=zoho.com; s=zohoarc; b=GRDnwCad5NK8INxx8qJXnTlBGMv9z1D3S9CTn8EcjM6V94NsN2SZokZrTAbyPP5r/o4hvsPNCYRUO30U/4IM+2+M/mJTNKsV7GxoE6ZknzdoJsuTHw/YFp6FoicdibrOFCp8HSpmw58xHLKzjVRfSTshsHzp5d41IlqQKejas5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559649662; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=fpDV81gVkUJtbnSXPjEp+BovhimRC21BH4ywuAnFwZQ=; b=DqzDuSavGueUHaq8pYW1jsIoY0RBAjTVeAHwCpQMmnCK91lvE0IVKaJuG4Mxbs20oPd49dmHehDf3CZoDWfqS3YGBO5fmMylcw3pzK/2cJ5qtlBRDN40LHmN0y0NhIDzlcYgKF7oVEY702+C4PHncVNL0ZPwo7MIHXujuae5UfM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559649662960544.123536996414; Tue, 4 Jun 2019 05:01:02 -0700 (PDT) Received: from localhost ([127.0.0.1]:50893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY87Y-0001SJ-Em for importer@patchew.org; Tue, 04 Jun 2019 08:00:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY84V-0007vE-6w for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:57:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hY7zP-0000Sf-3t for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:52:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45844) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hY7zM-0000Pn-Rp for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:52:25 -0400 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 8310D821D8 for ; Tue, 4 Jun 2019 11:52:23 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2136C5B683; Tue, 4 Jun 2019 11:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A5F7F11386A6; Tue, 4 Jun 2019 13:52:21 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2019 13:52:20 +0200 Message-Id: <20190604115221.28364-3-armbru@redhat.com> In-Reply-To: <20190604115221.28364-1-armbru@redhat.com> References: <20190604115221.28364-1-armbru@redhat.com> MIME-Version: 1.0 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]); Tue, 04 Jun 2019 11:52:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/3] net: Deprecate tap backend's parameter "helper" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jasowang@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" -netdev tap,helper=3D... is a useless duplicate of -netdev bridge. Deprecate and de-document. Signed-off-by: Markus Armbruster --- qapi/net.json | 3 ++- qemu-deprecated.texi | 4 ++++ qemu-options.hx | 18 ++---------------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/qapi/net.json b/qapi/net.json index 5f7bff1637..59d79a1ae1 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -221,7 +221,8 @@ # # @br: bridge name (since 2.8) # -# @helper: command to execute to configure bridge +# @helper: command to execute to configure bridge (deprecated, use +# type 'bridge' instead) # # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes. # diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 50292d820b..52e7600ebc 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -48,6 +48,10 @@ for these file types is 'host_cdrom' or 'host_device' as= appropriate. The @option{name} parameter of the @option{-net} option is a synonym for the @option{id} parameter, which should now be used instead. =20 +@subsection -netdev tap,helper=3D... (since 4.1) + +Use -netdev bridge instead. + @subsection -smp (invalid topologies) (since 3.1) =20 CPU topology properties should describe whole machine topology including diff --git a/qemu-options.hx b/qemu-options.hx index 39dc170429..3324203b51 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2121,7 +2121,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, " configure a host TAP network backend with ID 'str'\n" #else "-netdev tap,id=3Dstr[,fd=3Dh][,fds=3Dx:y:...:z][,ifname=3Dname][,scri= pt=3Dfile][,downscript=3Ddfile]\n" - " [,br=3Dbridge][,helper=3Dhelper][,sndbuf=3Dnbytes][,vnet_hdr= =3Don|off][,vhost=3Don|off]\n" + " [,br=3Dbridge][,sndbuf=3Dnbytes][,vnet_hdr=3Don|off][,vhost= =3Don|off]\n" " [,vhostfd=3Dh][,vhostfds=3Dx:y:...:z][,vhostforce=3Don|off][= ,queues=3Dn]\n" " [,poll-us=3Dn]\n" " configure a host TAP network backend with ID 'str'\n" @@ -2130,8 +2130,6 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, " to configure it and 'dfile' (default=3D" DEFAULT_NETW= ORK_DOWN_SCRIPT ")\n" " to deconfigure it\n" " use '[down]script=3Dno' to disable script execution\n" - " use network helper 'helper' (default=3D" DEFAULT_BRID= GE_HELPER ") to\n" - " configure it\n" " use 'fd=3Dh' to connect to an already opened TAP inte= rface\n" " use 'fds=3Dx:y:...:z' to connect to already opened mu= ltiqueue capable TAP interfaces\n" " use 'sndbuf=3Dnbytes' to limit the size of the send b= uffer (the\n" @@ -2435,7 +2433,7 @@ qemu-system-i386 -nic 'user,id=3Dn1,guestfwd=3Dtcp:1= 0.0.2.100:1234-cmd:netcat 10.10 =20 @end table =20 -@item -netdev tap,id=3D@var{id}[,fd=3D@var{h}][,ifname=3D@var{name}][,scri= pt=3D@var{file}][,downscript=3D@var{dfile}][,br=3D@var{bridge}][,helper=3D@= var{helper}] +@item -netdev tap,id=3D@var{id}[,fd=3D@var{h}][,ifname=3D@var{name}][,scri= pt=3D@var{file}][,downscript=3D@var{dfile}][,br=3D@var{bridge}] Configure a host TAP network backend with ID @var{id}. =20 Use the network script @var{file} to configure it and the network script @@ -2445,11 +2443,6 @@ automatically provides one. The default network conf= igure script is @file{/etc/qemu-ifdown}. Use @option{script=3Dno} or @option{downscript=3D= no} to disable script execution. =20 -If running QEMU as an unprivileged user, use the network helper -@var{helper} to configure the TAP interface and attach it to the bridge. -The default network helper executable is @file{/path/to/qemu-bridge-helper} -and the default bridge device is @file{br0}. - @option{fd}=3D@var{h} can be used to specify the handle of an already opened host TAP interface. =20 @@ -2468,13 +2461,6 @@ qemu-system-i386 linux.img \ -netdev tap,id=3Dnd1,ifname=3Dtap1 -device rtl8139,netdev=3Dnd1 @end example =20 -@example -#launch a QEMU instance with the default network helper to -#connect a TAP device to bridge br0 -qemu-system-i386 linux.img -device virtio-net-pci,netdev=3Dn1 \ - -netdev tap,id=3Dn1,"helper=3D/path/to/qemu-bridge-helper" -@end example - @item -netdev bridge,id=3D@var{id}[,br=3D@var{bridge}][,helper=3D@var{help= er}] Connect a host TAP network interface to a host bridge device. =20 --=20 2.21.0 From nobody Sat May 4 05:25:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559649664; cv=none; d=zoho.com; s=zohoarc; b=GUpam6AXHIfK9lKyhg5M8DExFSAFCO7VUHHVZLfjpAd2xnLe9Yv2qzxkyZklkHAfwrPBO1EQg0snWoRJiVkM4E/X8f3qSX5M7ns1KaEgC1DM8yWI2l1r0lLG0viUE7It1lm7R/6sdqdyw8MEh+bnBouYUR9qgCBVRtRsi9oQE/4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559649664; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=lzkSo8m4TOTiDSPGyjUX5RwViHP1lGLbfHLSoGmrHY8=; b=WCEUv9pvYRCaxiLWAxeq74NU0ITtSvX0QnC7IoECSQzQADA0BI5l69X0vwGiDMkdbIuywcLYJdQ+HRw16p/3+Ii8t7ZcaoLez5P4YuP+y8XyNphsTOP9+ji62wI2U6Z0rYd3574pgBUg4JecZR4vD2R6eWrzEKu8E5SZzQBc/5o= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559649664102499.67850862598345; Tue, 4 Jun 2019 05:01:04 -0700 (PDT) Received: from localhost ([127.0.0.1]:50906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY87f-0001a7-55 for importer@patchew.org; Tue, 04 Jun 2019 08:00:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY84V-0007xN-Mt for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:57:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hY7zN-0000R6-5t for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:52:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43866) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hY7zM-0000Pi-0H for qemu-devel@nongnu.org; Tue, 04 Jun 2019 07:52:24 -0400 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 590388F90F for ; Tue, 4 Jun 2019 11:52:23 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23B6D5D9D2; Tue, 4 Jun 2019 11:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A93AC11386A7; Tue, 4 Jun 2019 13:52:21 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2019 13:52:21 +0200 Message-Id: <20190604115221.28364-4-armbru@redhat.com> In-Reply-To: <20190604115221.28364-1-armbru@redhat.com> References: <20190604115221.28364-1-armbru@redhat.com> MIME-Version: 1.0 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.26]); Tue, 04 Jun 2019 11:52:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] qemu-bridge-helper: Document known shortcomings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jasowang@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster --- qemu-bridge-helper.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c index f9940deefd..95624bc300 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -10,7 +10,17 @@ * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. - * + */ + +/* + * Known shortcomings: + * - There is no manual page + * - The syntax of the ACL file is not documented anywhere + * - parse_acl_file() doesn't report fopen() failure properly, fails + * to check ferror() after fgets() failure, arbitrarily truncates + * long lines, handles whitespace inconsistently, error messages + * don't point to the offending file and line, errors in included + * files are reported, but otherwise ignored, ... */ =20 #include "qemu/osdep.h" --=20 2.21.0