[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] net: Change help text to list -netdev instead o
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] net: Change help text to list -netdev instead of -net by default |
Date: |
Fri, 08 May 2015 16:39:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
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 <address@hidden>
> ---
> 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