net: intorduce qemu_del_nic()

To support multiqueue nic, this patch separate the nic destructor from
qemu_del_net_client() to a new helper qemu_del_nic() since the mapping bettween
NiCState and NetClientState were not 1:1 in multiqueue. The following patches
would refactor this function to support multiqueue nic.

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:24 +08:00 committed by Anthony Liguori
parent cc1f0f4542
commit 948ecf219c
10 changed files with 23 additions and 9 deletions

View file

@ -279,7 +279,7 @@ static void pci_pcnet_uninit(PCIDevice *dev)
memory_region_destroy(&d->io_bar);
qemu_del_timer(d->state.poll_timer);
qemu_free_timer(d->state.poll_timer);
qemu_del_net_client(qemu_get_queue(d->state.nic));
qemu_del_nic(d->state.nic);
}
static NetClientInfo net_pci_pcnet_info = {