summary refs log tree commit diff stats
path: root/net/net.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-05-26 12:04:08 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-27 11:19:31 +0200
commit575a1c0e42287f8342a7e93e03c53edeb152399d (patch)
treedeaace3f44b7fefa5fdf19d0a69d6f77db87a40c /net/net.c
parent3fb69aa1d127585fe9626c3d777a8ce2fc01a36d (diff)
downloadfocaccia-qemu-575a1c0e42287f8342a7e93e03c53edeb152399d.tar.gz
focaccia-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 'net/net.c')
-rw-r--r--net/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/net.c b/net/net.c
index e636071f0b..0869c60bee 100644
--- a/net/net.c
+++ b/net/net.c
@@ -250,7 +250,7 @@ NICState *qemu_new_nic(NetClientInfo *info,
 {
     NetClientState **peers = conf->peers.ncs;
     NICState *nic;
-    int i, queues = MAX(1, conf->queues);
+    int i, queues = MAX(1, conf->peers.queues);
 
     assert(info->type == NET_CLIENT_OPTIONS_KIND_NIC);
     assert(info->size >= sizeof(NICState));
@@ -363,7 +363,7 @@ void qemu_del_net_client(NetClientState *nc)
 
 void qemu_del_nic(NICState *nic)
 {
-    int i, queues = MAX(nic->conf->queues, 1);
+    int i, queues = MAX(nic->conf->peers.queues, 1);
 
     /* If this is a peer NIC and peer has already been deleted, free it now. */
     if (nic->peer_deleted) {