[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 5/7] qdev: add qdev_foreach()

From: Mark McLoughlin
Subject: [Qemu-devel] Re: [PATCH 5/7] qdev: add qdev_foreach()
Date: Fri, 20 Nov 2009 14:20:16 +0000

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

I've pushed a series of patches to the fix-announce-self-rfc.v2 branch
on my tree:


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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]