mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -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
|
@ -555,7 +555,7 @@ static int eth_tx_push(void *opaque, unsigned char *buf, int len, bool eop)
|
|||
struct fs_eth *eth = opaque;
|
||||
|
||||
D(printf("%s buf=%p len=%d\n", __func__, buf, len));
|
||||
qemu_send_packet(ð->nic->nc, buf, len);
|
||||
qemu_send_packet(qemu_get_queue(eth->nic), buf, len);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,8 @@ static int fs_eth_init(SysBusDevice *dev)
|
|||
qemu_macaddr_default_if_unset(&s->conf.macaddr);
|
||||
s->nic = qemu_new_nic(&net_etraxfs_info, &s->conf,
|
||||
object_get_typename(OBJECT(s)), 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);
|
||||
|
||||
|
||||
tdk_init(&s->phy);
|
||||
mdio_attach(&s->mdio_bus, &s->phy, s->phyaddr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue