From: Mark McLoughlin <markmc@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: [Qemu-devel] Re: [PATCH 5/7] qdev: add qdev_foreach()
Date: Fri, 20 Nov 2009 14:20:16 +0000 [thread overview]
Message-ID: <1258726816.11496.7.camel@blaa> (raw)
In-Reply-To: <4B011B40.2080800@redhat.com>
Hi Gerd,
Thanks for looking, you're absolutely right that this approach just
isn't right with e.g. -device
On Mon, 2009-11-16 at 10:28 +0100, Gerd Hoffmann wrote:
> On 11/12/09 21:29, Mark McLoughlin wrote:
> > No doubt this is the worst idea ever, but the requirement is simple -
> > some way to iterate all NICs in the system.
>
> Doesn't have net.c a list of all vlanclientstates it could use instead?
It does, but there's currently no way of getting at each NIC's MAC
address.
I've pushed a series of patches to the fix-announce-self-rfc.v2 branch
on my tree:
http://repo.or.cz/w/qemu/markmc.git
The idea is to have a NICState struct:
struct NICState {
VLANClientState nc;
MACAddr *macaddr;
void *opaque;
};
and similar structs for each net backend.
This way we can have a qemu_foreach_nic() which iterates over each
client, checks whether it's a NIC and upcast to NICState.
Still a WIP, but how does that sound?
Thanks,
Mark.
next prev parent reply other threads:[~2009-11-20 14:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 20:28 [Qemu-devel] [RFC PATCH 0/7] Fix qemu_announce_self() properly Mark McLoughlin
2009-11-12 20:28 ` [Qemu-devel] [PATCH 1/7] net: remove NICInfo::vc Mark McLoughlin
2009-11-12 20:28 ` [Qemu-devel] [PATCH 2/7] qdev: add "net-client" property Mark McLoughlin
2009-11-16 9:03 ` [Qemu-devel] " Gerd Hoffmann
2009-11-12 20:28 ` [Qemu-devel] [PATCH 3/7] net: create the VLANClientState for NICs early Mark McLoughlin
2009-11-16 9:26 ` [Qemu-devel] " Gerd Hoffmann
2009-11-12 20:28 ` [Qemu-devel] [PATCH 4/7] net: kill off NICInfo/NICConf::vlan/netdev Mark McLoughlin
2009-11-12 20:29 ` [Qemu-devel] [PATCH 5/7] qdev: add qdev_foreach() Mark McLoughlin
2009-11-16 9:28 ` [Qemu-devel] " Gerd Hoffmann
2009-11-20 14:20 ` Mark McLoughlin [this message]
2009-11-23 9:55 ` Gerd Hoffmann
2009-11-12 20:29 ` [Qemu-devel] [PATCH 6/7] qdev: add qdev_prop_get_{macaddr, net_client}() Mark McLoughlin
2009-11-12 20:29 ` [Qemu-devel] [PATCH 7/7] net: fix qemu_announce_self() Mark McLoughlin
2009-11-13 7:41 ` Mark McLoughlin
2009-11-13 8:14 ` Markus Armbruster
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=1258726816.11496.7.camel@blaa \
--to=markmc@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).