From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqjRY-0002qY-NL for qemu-devel@nongnu.org; Fri, 08 May 2015 10:40:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqjRT-0002wz-FF for qemu-devel@nongnu.org; Fri, 08 May 2015 10:40:00 -0400 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:34938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqjRT-0002wo-1i for qemu-devel@nongnu.org; Fri, 08 May 2015 10:39:55 -0400 Received: by wgyo15 with SMTP id o15so74601555wgy.2 for ; Fri, 08 May 2015 07:39:54 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <554CCAB5.3030000@redhat.com> Date: Fri, 08 May 2015 16:39:49 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1431077765-6461-1-git-send-email-thuth@redhat.com> In-Reply-To: <1431077765-6461-1-git-send-email-thuth@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] net: Change help text to list -netdev instead of -net by default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , Jason Wang , Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Markus Armbruster , "Michael S. Tsirkin" On 08/05/2015 11:36, Thomas Huth wrote: > Looking at the output of "qemu-system-xxx -help", you easily get > the impression that "-net" is the preferred way instead of "-netdev" > to specify host network interface, since the "-net" option is > omnipresent but the "-netdev" option is only listed as a one-liner > at the end. This is ugly since "-net" is considered as legacy and > even might be removed one day. Thus, this patch switches the output > to explain the host network interfaces with the "-netdev" option > instead, moving the legacy "-net" option into some few lines at > the end. > > Signed-off-by: Thomas Huth > --- > qemu-options.hx | 66 ++++++++++++++++++++++++++++++++++----------------------- > 1 file changed, 39 insertions(+), 27 deletions(-) That would be great if it worked for all machine types, but it doesn't. For example, there's no equivalent of: $ qemu-system-arm -net user -net nic -machine versatilepb You cannot just use -netdev: $ qemu-system-arm -netdev user,id=nd0 -machine versatilepb Warning: netdev nd0 has no peer You cannot use -netdev and -net together: $ qemu-system-arm -netdev user,id=nd0 -net nic -machine versatilepb Warning: vlan 0 is not connected to host network Warning: netdev nd0 has no peer This particular board has a PCI controller, so you can just add a PCI NIC using -netdev/-device, but still that wouldn't be a match for "-net user -net nic" (which puts a smc91c111 NIC on sysbus). In most embedded boards there's not even a PCI controller. So the patch is great, but I wouldn't say it's deprecated, because in practice it isn't. Paolo