qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Jason Wang <jasowang@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] qemu-doc: Rework the network options chapter to make "-net" less prominent
Date: Tue, 27 Mar 2018 15:16:31 +0200	[thread overview]
Message-ID: <9d059301-fa9f-6303-5806-a2e6f7917ca5@redhat.com> (raw)
In-Reply-To: <e7c0d2c8-6451-a598-f140-29916c99e514@redhat.com>

On 27.03.2018 15:01, Jason Wang wrote:
> 
> 
> On 2018年03月12日 20:20, Thomas Huth wrote:
>> "-net" is clearly a legacy option. Yet we still use it in almost all
>> examples in the qemu documentation, and many other spots in the network
>> chapter. We should make it less prominent that users are not lured into
>> using it so often anymore. So instead of starting the network chapter
>> with
>> "-net nic" and documenting "-net <backend>" below "-netdev <backend>"
>> everywhere, all the "-net" related documentation is now moved to the end
>> of the chapter. The new "-nic" option is moved to the beginning of the
>> chapter instead, with a new example that should demonstrate how "-nic"
>> can be used to shortcut "-device" with "-netdev". The examples in this
>> chapter are changed to use the "-device" and "-netdev" options or
>> "-nic" instead of "-net nic -net <backend>".
>>
>> While we're at it, also remove a legacy remark about very old Linux
>> distributions. Also remove the "[...]" from the examples in this chapter
>> since we are not using this ellipsis in any other examples in our docu-
>> mentation.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   v3:
>>   - Use single dash options instead of double-dash options
>>
>>   qemu-options.hx | 189
>> ++++++++++++++++++++++++++++----------------------------
>>   1 file changed, 94 insertions(+), 95 deletions(-)
>>
>> diff --git a/qemu-options.hx b/qemu-options.hx
>> index 6585058..e86b3fb 100644
>> --- a/qemu-options.hx
>> +++ b/qemu-options.hx
[...]
>> +@item -nic
>> [tap|bridge|user|l2tpv3|vde|netmap|vhost-user|socket][,...][,mac=macaddr][,model=mn]
>>
>> +@findex -nic
>> +This option is a shortcut for configuring both the on-board (default)
>> guest
>> +NIC hardware and the host network backend in one go. The host backend
>> options
>> +are the same as with the corresponding @option{-netdev} options below.
>> +The guest NIC model can be set with @option{model=@var{modelname}}.
>> +Use @option{model=help} to list the available device types.
>> +The hardware MAC address can be set with @option{mac=@var{macaddr}}.
>> +
>> +The following two example do exactly the same, to show how
>> @option{-nic} can
>> +be used to shorten the command line length (note that the e1000 is
>> the default
>> +on i386, so the @option{model=e1000} parameter could even be omitted
>> here, too):
>> +@example
>> +qemu-system-i386 -netdev user,id=n1,ipv6=off -device
>> e1000,netdev=n1,mac=52:54:98:76:54:32
>> +qemu-system-i386 -nic user,ipv6=off,model=e1000,mac=52:54:98:76:54:32
>> +@end example
> 
> I'm not sure we need this since I believe we still prefer -netdev even
> if -nic is shorter?

[...]
>> @@ -2443,19 +2433,9 @@ Example:
>>   # launch vde switch
>>   vde_switch -F -sock /tmp/myswitch
>>   # launch QEMU instance
>> -qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
>> +qemu-system-i386 linux.img -nic vde,sock=/tmp/myswitch
> 
> I think we should use -netdev here?

I've had that in the original version of this patch, but Paolo suggested
to use -nic instead since this is more "user-friendly":

https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg05258.html

I personally don't mind whether we use "-netdev" or "-nic" in the
examples, as long as we finally get rid of "-net" there... Please let me
know which way you prefer, so I can respin the patch again if necessary.

 Thomas

  reply	other threads:[~2018-03-27 13:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 12:20 [Qemu-devel] [PATCH v3] qemu-doc: Rework the network options chapter to make "-net" less prominent Thomas Huth
2018-03-26 16:42 ` Thomas Huth
2018-03-27 13:02   ` Jason Wang
2018-03-27 13:01 ` Jason Wang
2018-03-27 13:16   ` Thomas Huth [this message]
2018-03-28  2:59     ` Jason Wang
2018-03-28  6:03       ` Thomas Huth
2018-03-28  6:27         ` Jason Wang

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=9d059301-fa9f-6303-5806-a2e6f7917ca5@redhat.com \
    --to=thuth@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).