mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
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>
This commit is contained in:
parent
3fb69aa1d1
commit
575a1c0e42
4 changed files with 5 additions and 6 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue