diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-05-26 12:04:08 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-27 11:19:31 +0200 |
commit | 575a1c0e42287f8342a7e93e03c53edeb152399d (patch) | |
tree | deaace3f44b7fefa5fdf19d0a69d6f77db87a40c /hw/net/virtio-net.c | |
parent | 3fb69aa1d127585fe9626c3d777a8ce2fc01a36d (diff) | |
download | qemu-575a1c0e42287f8342a7e93e03c53edeb152399d.zip |
net: move queue number into NICPeers
It indicates the number of elements in ncs field and makes sense to have
int inside NICPeers. Also in parse_netdev we do not need to access
container and work with NICPeers only.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
-rw-r--r-- | hw/net/virtio-net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 00b5e07ddd..e51d753cee 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1542,7 +1542,7 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp) virtio_init(vdev, "virtio-net", VIRTIO_ID_NET, n->config_size); - n->max_queues = MAX(n->nic_conf.queues, 1); + n->max_queues = MAX(n->nic_conf.peers.queues, 1); n->vqs = g_malloc0(sizeof(VirtIONetQueue) * n->max_queues); n->vqs[0].rx_vq = virtio_add_queue(vdev, 256, virtio_net_handle_rx); n->curr_queues = 1; |