qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Jason Wang <jasowang@redhat.com>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.12 2/2] net: Remove the deprecated -tftp, -bootp, -redir and -smb options
Date: Thu, 14 Dec 2017 16:38:30 +0100	[thread overview]
Message-ID: <e5453a61-58d1-9b34-172b-fa4317d58573@redhat.com> (raw)
In-Reply-To: <CAFEAcA8D87rdcO6qVqfgS2G3N0fBzuj1uUsCRXcCv3m1KR6eyg@mail.gmail.com>

On 14.12.2017 14:16, Peter Maydell wrote:
> On 14 December 2017 at 12:28, Thomas Huth <thuth@redhat.com> wrote:
>> On 11.12.2017 23:04, Peter Maydell wrote:
>>> The deprecation message says:
>>>                error_report("The -redir option is deprecated. "
>>>                             "Please use '-netdev user,hostfwd=...' instead.");
>>>
>>> How does this work for systems which have embedded ethernet
>>> devices and can't use -netdev ?
>>
>> Of course it should work the same way as you currently can configure all
>> embedded ethernet devices:
>>
>>  -net nic -net user,hostfwd=...
> 
> Mmm, but the deprecation message doesn't say that.
> 
>> By the way, I think our documentation is really lacking some proper
>> description how to deal with on-board devices ...
>>
>>> This is one reason I haven't bothered to update my scripts yet
>>
>> -redir is likely not doing what you expect as soon as you are using two
>> or more (embedded or non-embedded) NICs on a machine, so you really
>> should not use that option anymore.
> 
> Two NICs on a machine is an obscure special case, though.
> Almost all setups will have just the one NIC.
> 
>>> The message also doesn't point out that if you were previously
>>> using -net + -redir you need to switch to -device + -netdev,
>>> since -net + -netdev doesn't work AFAIK.
>>
>> I haven't tried, but I think you can also use:
>>
>>  -netdev user,id=u1,hostfwd=... -net nic,netdev=u1
>>
>> Or did you run into problems here?
> 
> Nope. I just ignored the whole thing because the deprecation
> message didn't give me enough help and didn't actually stop
> anything working, and I knew that what the message did
> say was definitely wrong for my command line. I suspect I'm
> not an entirely atypical user here...
> 
> I think what we need to do to be able to actually remove
> this code is:
>  (1) make sure our documentation is clear and simple about
> how to move from an old command line to a new one
> (with examples, and covering all the conditions, not
> just the "let's assume everything's a PC with a
> pluggable PCI network card" case)
>  (2) make the deprecation warning be specific, and
> cover all the cases, and probably refer to a documentation
> URL
>  (3) make -redir in versions where we've removed the
> functionality print a message that specifically says
> "this option has been removed and is replaced by $FOO;
> see $URL for how to update your command line" (ie not
> just "-redir: unknown option", but retain the deprecation
> warning text for a bit).
> 
> (Sorry if this feels like unexpectedly raising the bar
> for deprecation&removal -- I should probably have
> raised the issue earlier, but it was only your
> patch doing the removal that reminded me.)

Well, you could have at least complained during the 2.10 development
cycle when we put all the deprecation stuff into place...
But it's ok, this just showed me that there's at least somebody still
around who uses the old parameters, and it also revealed that our
documentation about how to configure on-board NICs is really bad.

I'll try to come up with some patches that improve the documentation and
the deprecation message, and then we can remove these options in QEMU
v2.14 instead. The code for these options is rather simple anyway, so it
also should not hurt that much to carry it on a little bit longer.

@Jason: Could you please ignore this patch here, but queue at least the
"-net channel" patch? I'm pretty sure that nobody is using "-net
channel" anymore these days, so removing "-net channel" right now should
be fine.

 Thomas

      reply	other threads:[~2017-12-14 15:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 18:02 [Qemu-devel] [PATCH for-2.12 0/2] Remove deprecated net parameters Thomas Huth
2017-12-07 18:02 ` [Qemu-devel] [PATCH for-2.12 1/2] net: Remove the legacy "-net channel" parameter Thomas Huth
2017-12-11 21:53   ` Samuel Thibault
2017-12-07 18:02 ` [Qemu-devel] [PATCH for-2.12 2/2] net: Remove the deprecated -tftp, -bootp, -redir and -smb options Thomas Huth
2017-12-11 21:53   ` Samuel Thibault
2017-12-11 22:04   ` Peter Maydell
2017-12-14 12:28     ` Thomas Huth
2017-12-14 13:16       ` Peter Maydell
2017-12-14 15:38         ` Thomas Huth [this message]

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=e5453a61-58d1-9b34-172b-fa4317d58573@redhat.com \
    --to=thuth@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.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).