mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06: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
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue