mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
net: introduce qemu_get_queue()
To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. 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:
parent
28a65891a0
commit
b356f76de3
28 changed files with 140 additions and 115 deletions
|
@ -259,7 +259,8 @@ static void stellaris_enet_write(void *opaque, hwaddr offset,
|
|||
memset(&s->tx_fifo[s->tx_frame_len], 0, 60 - s->tx_frame_len);
|
||||
s->tx_fifo_len = 60;
|
||||
}
|
||||
qemu_send_packet(&s->nic->nc, s->tx_fifo, s->tx_frame_len);
|
||||
qemu_send_packet(qemu_get_queue(s->nic), s->tx_fifo,
|
||||
s->tx_frame_len);
|
||||
s->tx_frame_len = -1;
|
||||
s->ris |= SE_INT_TXEMP;
|
||||
stellaris_enet_update(s);
|
||||
|
@ -412,7 +413,7 @@ static int stellaris_enet_init(SysBusDevice *dev)
|
|||
|
||||
s->nic = qemu_new_nic(&net_stellaris_enet_info, &s->conf,
|
||||
object_get_typename(OBJECT(dev)), dev->qdev.id, s);
|
||||
qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
|
||||
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
|
||||
|
||||
stellaris_enet_reset(s);
|
||||
register_savevm(&s->busdev.qdev, "stellaris_enet", -1, 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue