net: introduce qemu_get_nic()

To support multiqueue, this patch introduces a helper qemu_get_nic() to get
NICState from a NetClientState. The following patches would refactor this helper
to support multiqueue.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Jason Wang 2013-01-30 19:12:23 +08:00 committed by Anthony Liguori
parent b356f76de3
commit cc1f0f4542
28 changed files with 92 additions and 78 deletions

View file

@ -87,7 +87,7 @@ static const MemoryRegionOps lance_mem_ops = {
static void lance_cleanup(NetClientState *nc)
{
PCNetState *d = DO_UPCAST(NICState, nc, nc)->opaque;
PCNetState *d = qemu_get_nic_opaque(nc);
pcnet_common_cleanup(d);
}