From nobody Sun Apr 28 08:32:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513697840914991.2916530733921; Tue, 19 Dec 2017 07:37:20 -0800 (PST) Received: from localhost ([::1]:50137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRJx7-0000y7-Lt for importer@patchew.org; Tue, 19 Dec 2017 10:37:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRJpH-0001cp-Se for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRJpF-0007kS-8z for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60598) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRJpF-0007k4-0R for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:01 -0500 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 359D113A5F; Tue, 19 Dec 2017 15:29:00 +0000 (UTC) Received: from thh440s.str.redhat.com (dhcp-192-189.str.redhat.com [10.33.192.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 65830183C6; Tue, 19 Dec 2017 15:28:59 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Date: Tue, 19 Dec 2017 16:28:54 +0100 Message-Id: <1513697336-2863-2-git-send-email-thuth@redhat.com> In-Reply-To: <1513697336-2863-1-git-send-email-thuth@redhat.com> References: <1513697336-2863-1-git-send-email-thuth@redhat.com> 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.29]); Tue, 19 Dec 2017 15:29:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/3] net: Remove the legacy "-net channel" parameter 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: Samuel Thibault , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It has never been documented, so hardly anybody knows about this parameter, and it is marked as deprecated since QEMU v2.6. Time to let it go now. Reviewed-by: Samuel Thibault Signed-off-by: Thomas Huth --- include/net/slirp.h | 2 -- net/net.c | 7 ------- net/slirp.c | 34 ---------------------------------- qemu-doc.texi | 5 ----- 4 files changed, 48 deletions(-) diff --git a/include/net/slirp.h b/include/net/slirp.h index 64b795c..0c98e46 100644 --- a/include/net/slirp.h +++ b/include/net/slirp.h @@ -36,8 +36,6 @@ void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict); =20 int net_slirp_redir(const char *redir_str); =20 -int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, in= t *ret); - int net_slirp_smb(const char *exported_dir); =20 void hmp_info_usernet(Monitor *mon, const QDict *qdict); diff --git a/net/net.c b/net/net.c index 39ef546..7425857 100644 --- a/net/net.c +++ b/net/net.c @@ -1565,13 +1565,6 @@ int net_init_clients(void) =20 int net_client_parse(QemuOptsList *opts_list, const char *optarg) { -#if defined(CONFIG_SLIRP) - int ret; - if (net_slirp_parse_legacy(opts_list, optarg, &ret)) { - return ret; - } -#endif - if (!qemu_opts_parse_noisily(opts_list, optarg, true)) { return -1; } diff --git a/net/slirp.c b/net/slirp.c index 318a26e..cb8ca23 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -956,37 +956,3 @@ int net_init_slirp(const Netdev *netdev, const char *n= ame, =20 return ret; } - -int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, in= t *ret) -{ - if (strcmp(opts_list->name, "net") !=3D 0 || - strncmp(optarg, "channel,", strlen("channel,")) !=3D 0) { - return 0; - } - - error_report("The '-net channel' option is deprecated. " - "Please use '-netdev user,guestfwd=3D...' instead."); - - /* handle legacy -net channel,port:chr */ - optarg +=3D strlen("channel,"); - - if (QTAILQ_EMPTY(&slirp_stacks)) { - struct slirp_config_str *config; - - config =3D g_malloc(sizeof(*config)); - pstrcpy(config->str, sizeof(config->str), optarg); - config->flags =3D SLIRP_CFG_LEGACY; - config->next =3D slirp_configs; - slirp_configs =3D config; - *ret =3D 0; - } else { - Error *err =3D NULL; - *ret =3D slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), optarg, 1, &e= rr); - if (*ret < 0) { - error_report_err(err); - } - } - - return 1; -} - diff --git a/qemu-doc.texi b/qemu-doc.texi index f7317df..09680f9 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2459,11 +2459,6 @@ The ``-smb /some/dir'' argument is now a synonym for= setting the ``-netdev user,smb=3D/some/dir'' argument instead. The new syntax allows different settings to be provided per NIC. =20 -@subsection -net channel (since 2.6.0) - -The ``--net channel,ARGS'' argument is now a synonym for setting -the ``-netdev user,guestfwd=3DARGS'' argument instead. - @subsection -net vlan (since 2.9.0) =20 The ``-net vlan=3DNN'' argument is partially replaced with the --=20 1.8.3.1 From nobody Sun Apr 28 08:32:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513698011818184.00112810508017; Tue, 19 Dec 2017 07:40:11 -0800 (PST) Received: from localhost ([::1]:50329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRJzq-0003ay-M4 for importer@patchew.org; Tue, 19 Dec 2017 10:39:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRJpK-0001fA-7u for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRJpG-0007lJ-8q for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40582) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRJpG-0007kg-36 for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:02 -0500 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 44C1B61E53; Tue, 19 Dec 2017 15:29:01 +0000 (UTC) Received: from thh440s.str.redhat.com (dhcp-192-189.str.redhat.com [10.33.192.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 770B270108; Tue, 19 Dec 2017 15:29:00 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Date: Tue, 19 Dec 2017 16:28:55 +0100 Message-Id: <1513697336-2863-3-git-send-email-thuth@redhat.com> In-Reply-To: <1513697336-2863-1-git-send-email-thuth@redhat.com> References: <1513697336-2863-1-git-send-email-thuth@redhat.com> 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.39]); Tue, 19 Dec 2017 15:29:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/3] qemu-doc: The "-net nic" option can be used with "netdev=...", too 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: Samuel Thibault , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Looks like we missed to document that it is also possible to specify a netdev with "-net nic" - which is very useful if you want to configure your on-board NIC to use a backend that has been specified with "-netdev". Signed-off-by: Thomas Huth --- qemu-options.hx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 32d9378..4e235c6 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2022,9 +2022,10 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, "-netdev hubport,id=3Dstr,hubid=3Dn\n" " configure a hub port on QEMU VLAN 'n'\n", QEMU_ARCH_A= LL) DEF("net", HAS_ARG, QEMU_OPTION_net, - "-net nic[,vlan=3Dn][,macaddr=3Dmac][,model=3Dtype][,name=3Dstr][,addr= =3Dstr][,vectors=3Dv]\n" - " old way to create a new NIC and connect it to VLAN 'n= '\n" - " (use the '-device devtype,netdev=3Dstr' option if pos= sible instead)\n" + "-net nic[,vlan=3Dn][,netdev=3Dnd][,macaddr=3Dmac][,model=3Dtype][,nam= e=3Dstr][,addr=3Dstr][,vectors=3Dv]\n" + " configure or create an on-board (or machine default) = NIC and\n" + " connect it either to VLAN 'n' or the netdev 'nd' (for= pluggable\n" + " NICs please use '-device devtype,netdev=3Dnd' instead= )\n" "-net dump[,vlan=3Dn][,file=3Df][,len=3Dn]\n" " dump traffic on vlan 'n' to file 'f' (max n bytes per= packet)\n" "-net none use it alone to have zero network devices. If no -net= option\n" @@ -2045,10 +2046,11 @@ DEF("net", HAS_ARG, QEMU_OPTION_net, " old way to initialize a host network interface\n" " (use the -netdev option if possible instead)\n", QEMU= _ARCH_ALL) STEXI -@item -net nic[,vlan=3D@var{n}][,macaddr=3D@var{mac}][,model=3D@var{type}]= [,name=3D@var{name}][,addr=3D@var{addr}][,vectors=3D@var{v}] +@item -net nic[,vlan=3D@var{n}][,netdev=3D@var{nd}][,macaddr=3D@var{mac}][= ,model=3D@var{type}] [,name=3D@var{name}][,addr=3D@var{addr}][,vectors=3D@v= ar{v}] @findex -net -Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n} -=3D 0 is the default). The NIC is an e1000 by default on the PC +Configure or create an on-board (or machine default) Network Interface Card +(NIC) and connect it either to VLAN @var{n} (@var{n} =3D 0 is the default)= , or +to the netdev @var{nd}. The NIC is an e1000 by default on the PC target. Optionally, the MAC address can be changed to @var{mac}, the device address set to @var{addr} (PCI cards only), and a @var{name} can be assigned for use in monitor commands. --=20 1.8.3.1 From nobody Sun Apr 28 08:32:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513697829968872.2337596944374; Tue, 19 Dec 2017 07:37:09 -0800 (PST) Received: from localhost ([::1]:50136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRJx1-0000qw-TA for importer@patchew.org; Tue, 19 Dec 2017 10:37:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRJpI-0001dc-OO for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRJpH-0007mA-Ma for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49648) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRJpH-0007ll-Fh for qemu-devel@nongnu.org; Tue, 19 Dec 2017 10:29:03 -0500 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 A405D5BEC9; Tue, 19 Dec 2017 15:29:02 +0000 (UTC) Received: from thh440s.str.redhat.com (dhcp-192-189.str.redhat.com [10.33.192.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8AE5B60C8E; Tue, 19 Dec 2017 15:29:01 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Date: Tue, 19 Dec 2017 16:28:56 +0100 Message-Id: <1513697336-2863-4-git-send-email-thuth@redhat.com> In-Reply-To: <1513697336-2863-1-git-send-email-thuth@redhat.com> References: <1513697336-2863-1-git-send-email-thuth@redhat.com> 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.38]); Tue, 19 Dec 2017 15:29:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] qemu-doc: Update the deprecation information of -tftp, -bootp, -redir and -smb 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: Samuel Thibault , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The information how to update the deprecated parameters was too scarce, so that some people did not update to the new syntax yet. Provide some more information to make sure that it is clear how to update from the old syntax to the new one. Signed-off-by: Thomas Huth --- qemu-doc.texi | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi index 09680f9..9236c0b 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2437,27 +2437,36 @@ combined with ``-vnc tls-creds=3Dtls0' =20 @subsection -tftp (since 2.6.0) =20 -The ``-tftp /some/dir'' argument is now a synonym for setting -the ``-netdev user,tftp=3D/some/dir' argument. The new syntax -allows different settings to be provided per NIC. +The ``-tftp /some/dir'' argument is replaced by +``-netdev user,id=3Dx,tftp=3D/some/dir'', either accompanied with +``-device ...,netdev=3Dx'' (for pluggable NICs) or ``-net nic,netdev=3Dx'' +(for embedded NICs). The new syntax allows different settings to be +provided per NIC. =20 @subsection -bootp (since 2.6.0) =20 -The ``-bootp /some/file'' argument is now a synonym for setting -the ``-netdev user,bootp=3D/some/file' argument. The new syntax -allows different settings to be provided per NIC. +The ``-bootp /some/file'' argument is replaced by +``-netdev user,id=3Dx,bootp=3D/some/file'', either accompanied with +``-device ...,netdev=3Dx'' (for pluggable NICs) or ``-net nic,netdev=3Dx'' +(for embedded NICs). The new syntax allows different settings to be +provided per NIC. =20 @subsection -redir (since 2.6.0) =20 -The ``-redir ARGS'' argument is now a synonym for setting -the ``-netdev user,hostfwd=3DARGS'' argument instead. The new -syntax allows different settings to be provided per NIC. +The ``-redir [tcp|udp]:hostport:[guestaddr]:guestport'' argument is +replaced by ``-netdev +user,id=3Dx,hostfwd=3D[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport'= ', +either accompanied with ``-device ...,netdev=3Dx'' (for pluggable NICs) or +``-net nic,netdev=3Dx'' (for embedded NICs). The new syntax allows differe= nt +settings to be provided per NIC. =20 @subsection -smb (since 2.6.0) =20 -The ``-smb /some/dir'' argument is now a synonym for setting -the ``-netdev user,smb=3D/some/dir'' argument instead. The new -syntax allows different settings to be provided per NIC. +The ``-smb /some/dir'' argument is replaced by +``-netdev user,id=3Dx,smb=3D/some/dir'', either accompanied with +``-device ...,netdev=3Dx'' (for pluggable NICs) or ``-net nic,netdev=3Dx'' +(for embedded NICs). The new syntax allows different settings to be +provided per NIC. =20 @subsection -net vlan (since 2.9.0) =20 --=20 1.8.3.1