mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -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
|
@ -257,7 +257,7 @@ static void minimac2_tx(MilkymistMinimac2State *s)
|
|||
trace_milkymist_minimac2_tx_frame(txcount - 12);
|
||||
|
||||
/* send packet, skipping preamble and sfd */
|
||||
qemu_send_packet_raw(&s->nic->nc, buf + 8, txcount - 12);
|
||||
qemu_send_packet_raw(qemu_get_queue(s->nic), buf + 8, txcount - 12);
|
||||
|
||||
s->regs[R_TXCOUNT] = 0;
|
||||
|
||||
|
@ -480,7 +480,7 @@ static int milkymist_minimac2_init(SysBusDevice *dev)
|
|||
qemu_macaddr_default_if_unset(&s->conf.macaddr);
|
||||
s->nic = qemu_new_nic(&net_milkymist_minimac2_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);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue