summaryrefslogtreecommitdiffstats
path: root/hw/core
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 /hw/core
parent3fb69aa1d127585fe9626c3d777a8ce2fc01a36d (diff)
downloadhqemu-575a1c0e42287f8342a7e93e03c53edeb152399d.zip
hqemu-575a1c0e42287f8342a7e93e03c53edeb152399d.tar.gz
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/core')
-rw-r--r--hw/core/qdev-properties-system.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index de433b2..52c2f8a 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -180,7 +180,6 @@ PropertyInfo qdev_prop_chr = {
static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
{
NICPeers *peers_ptr = (NICPeers *)ptr;
- NICConf *conf = container_of(peers_ptr, NICConf, peers);
NetClientState **ncs = peers_ptr->ncs;
NetClientState *peers[MAX_QUEUE_NUM];
int queues, i = 0;
@@ -219,7 +218,7 @@ static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
ncs[i]->queue_index = i;
}
- conf->queues = queues;
+ peers_ptr->queues = queues;
return 0;
OpenPOWER on IntegriCloud