From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Eric Blake <eblake@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH v2 0/8] Improvements and clean-ups related to -net
Date: Tue, 20 Feb 2018 18:39:58 +0100 [thread overview]
Message-ID: <1519148406-15006-1-git-send-email-thuth@redhat.com> (raw)
"-net" is a legacy option that often causes confusion and
misconfigurations for the users, since most people are not aware
of the underlying "vlan" (i.e. hub) concept that is used for this
parameter. The prefered way of configuring your network stack is
to use "--netdev" instead, which gives you a clean 1:1 connection
between your emulated guest hardware and the host network backend.
However, there are two reasons why we could not completely deprecate
"-net" yet:
1) Convenience:
In some cases, it's more convenient to use "-net" instead of "--netdev",
e.g. if you just want to have a "tap" network connection, it's faster
to type "-net nic -net tap" instead of "--device e1000,netdev=n1
--netdev tap,id=n1".
2) On-board NICs:
Currently the "-net nic" parameter is the only way to configure on-board
NICs on certain (embedded) machines via the nd_table[] array.
So beside some generic clean-ups and removal of code that has been
marked as deprecated since QEMU 2.10 already, this patch series intro-
duces a new parameter "--nic" (in patch 7/8) which should be able to
replace "-net" in the long run completely: This new convenience parameter
can be used to configure the default/on-board guest HW together with a
host network backend in a very compact way. To configure a tap backend
for the default NIC, you just have to type "--nic tap" here for example.
The last patch finally makes "-net" less prominent in our qemu docs,
e.g. by replacing the examples that contain "-net" with "--netdev".
Note that "-net" itself is not marked as deprecated yet - I think we
should rather do that after one or two QEMU release with "--nic" so
that we have enough time to test / get used to the new parameter first.
Or we should likely even keep the "-net" around for a couple of years
since there are a lot of scripts and tools out there that still use
this legacy parameter...
v2:
- Renamed "-n" to "--nic" (suggested by Paolo)
- Improved the QAPI comment about the removal of 'dump (suggested by Eric)
- exit(0) instead of exit(1) after showing the "-netdev help" (Eric)
- Improved the documenation for hubport a little bit (suggested by Paolo)
Thomas Huth (8):
net: Move error reporting from net_init_client/netdev to the calling
site
net: List available netdevs with "-netdev help"
net: Only show vhost-user in the help text if CONFIG_POSIX is defined
net: Make net_client_init() static
net: Remove the deprecated way of dumping network packets
net: Remove the deprecated 'host_net_add' and 'host_net_remove' HMP
commands
net: Add a new convenience option "--nic" to configure
default/on-board NICs
qemu-doc: Make "-net" less prominent
hmp-commands.hx | 30 ------
hmp.h | 3 -
include/net/net.h | 4 +-
include/sysemu/sysemu.h | 1 +
monitor.c | 61 ------------
net/dump.c | 102 +--------------------
net/net.c | 239 +++++++++++++++++++++++-------------------------
qapi/net.json | 29 ++----
qemu-doc.texi | 16 ----
qemu-options.hx | 224 ++++++++++++++++++++++++---------------------
tests/test-hmp.c | 2 -
vl.c | 10 +-
12 files changed, 256 insertions(+), 465 deletions(-)
--
1.8.3.1
next reply other threads:[~2018-02-20 17:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 17:39 Thomas Huth [this message]
2018-02-20 17:39 ` [Qemu-devel] [PATCH v2 1/8] net: Move error reporting from net_init_client/netdev to the calling site Thomas Huth
2018-02-20 17:40 ` [Qemu-devel] [PATCH v2 2/8] net: List available netdevs with "-netdev help" Thomas Huth
2018-02-20 22:28 ` Eric Blake
2018-02-20 17:40 ` [Qemu-devel] [PATCH v2 3/8] net: Only show vhost-user in the help text if CONFIG_POSIX is defined Thomas Huth
2018-02-20 17:40 ` [Qemu-devel] [PATCH v2 4/8] net: Make net_client_init() static Thomas Huth
2018-02-20 17:40 ` [Qemu-devel] [PATCH v2 5/8] net: Remove the deprecated way of dumping network packets Thomas Huth
2018-02-20 22:35 ` Eric Blake
2018-02-21 0:20 ` Thomas Huth
2018-02-20 17:40 ` [Qemu-devel] [PATCH v2 6/8] net: Remove the deprecated 'host_net_add' and 'host_net_remove' HMP commands Thomas Huth
2018-02-20 17:40 ` [Qemu-devel] [PATCH v2 7/8] net: Add a new convenience option "--nic" to configure default/on-board NICs Thomas Huth
2018-02-20 18:37 ` Paolo Bonzini
2018-02-20 17:40 ` [Qemu-devel] [PATCH v2 8/8] qemu-doc: Make "-net" less prominent Thomas Huth
2018-02-20 18:37 ` Paolo Bonzini
2018-02-21 0:05 ` Thomas Huth
2018-02-21 9:12 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519148406-15006-1-git-send-email-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=jasowang@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).