From: Amit Shah <amit.shah@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
qemu list <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2] net: Fix hotplug with pci_add
Date: Tue, 15 Jun 2010 13:35:35 +0530 [thread overview]
Message-ID: <20100615080535.GB20578@amit-laptop.redhat.com> (raw)
In-Reply-To: <20100609095811.GB20595@amit-laptop.redhat.com>
On (Wed) Jun 09 2010 [15:28:11], Amit Shah wrote:
> > Let me rephrase: Behavior changes for -net types without an init()
> > method. The only one without an init() method is "none". Before,
> > net_client_init() succeeded for it. Now it fails. What's the impact of
> > that change? And why does it make sense?
>
> It makes sense because we don't actually initialise anything. We don't
> place anything in the nd_table[] array. That means callers shouldn't
> poke in the array for any values. Returning -1 makes sense for that
> reason. If we continued to return 0, callers might just assume that init
> was successful and that nd_table[0] was set up for use appropriately.
>
> The thing is that the code doesn't go this far in case of '-net none'
> anyway. This was just a potential bug lurking around for any new -net
> method which didn't have an init.
Hm, I only tested -net none from the monitor, using pci_add. Looks like
I skipped testing it from the cmd line. I did that today and found out
the VM doesn't start. I've sent a patch to revert to the original
behaviour of returning 0, and we'll have to find another way of fixing
the 'success or index' return problem.
Amit
next prev parent reply other threads:[~2010-06-15 8:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-08 15:43 [Qemu-devel] [PATCH v2] net: Fix hotplug with pci_add Amit Shah
2010-06-08 15:55 ` [Qemu-devel] " Juan Quintela
2010-06-08 16:33 ` [Qemu-devel] " Markus Armbruster
2010-06-08 17:26 ` Amit Shah
2010-06-09 6:37 ` Markus Armbruster
2010-06-09 7:59 ` [Qemu-devel] " Juan Quintela
2010-06-09 10:28 ` Amit Shah
2010-06-09 9:58 ` [Qemu-devel] " Amit Shah
2010-06-09 11:31 ` Markus Armbruster
2010-06-15 8:05 ` Amit Shah [this message]
2010-06-09 9:58 ` [Qemu-devel] " Michael S. Tsirkin
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=20100615080535.GB20578@amit-laptop.redhat.com \
--to=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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).