mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
net: Drop vlan argument to qemu_new_net_client()
Since hubs are now used to implement the 'vlan' feature and the vlan argument is always NULL, remove the argument entirely and update all net clients that use qemu_new_net_client(). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
81017645e4
commit
ab5f3f84c4
9 changed files with 18 additions and 26 deletions
27
net.c
27
net.c
|
@ -197,7 +197,6 @@ static ssize_t qemu_deliver_packet_iov(VLANClientState *sender,
|
|||
void *opaque);
|
||||
|
||||
VLANClientState *qemu_new_net_client(NetClientInfo *info,
|
||||
VLANState *vlan,
|
||||
VLANClientState *peer,
|
||||
const char *model,
|
||||
const char *name)
|
||||
|
@ -216,22 +215,16 @@ VLANClientState *qemu_new_net_client(NetClientInfo *info,
|
|||
vc->name = assign_name(vc, model);
|
||||
}
|
||||
|
||||
if (vlan) {
|
||||
assert(!peer);
|
||||
vc->vlan = vlan;
|
||||
QTAILQ_INSERT_TAIL(&vc->vlan->clients, vc, next);
|
||||
} else {
|
||||
if (peer) {
|
||||
assert(!peer->peer);
|
||||
vc->peer = peer;
|
||||
peer->peer = vc;
|
||||
}
|
||||
QTAILQ_INSERT_TAIL(&non_vlan_clients, vc, next);
|
||||
|
||||
vc->send_queue = qemu_new_net_queue(qemu_deliver_packet,
|
||||
qemu_deliver_packet_iov,
|
||||
vc);
|
||||
if (peer) {
|
||||
assert(!peer->peer);
|
||||
vc->peer = peer;
|
||||
peer->peer = vc;
|
||||
}
|
||||
QTAILQ_INSERT_TAIL(&non_vlan_clients, vc, next);
|
||||
|
||||
vc->send_queue = qemu_new_net_queue(qemu_deliver_packet,
|
||||
qemu_deliver_packet_iov,
|
||||
vc);
|
||||
|
||||
return vc;
|
||||
}
|
||||
|
@ -248,7 +241,7 @@ NICState *qemu_new_nic(NetClientInfo *info,
|
|||
assert(info->type == NET_CLIENT_OPTIONS_KIND_NIC);
|
||||
assert(info->size >= sizeof(NICState));
|
||||
|
||||
nc = qemu_new_net_client(info, conf->vlan, conf->peer, model, name);
|
||||
nc = qemu_new_net_client(info, conf->peer, model, name);
|
||||
|
||||
nic = DO_UPCAST(NICState, nc, nc);
|
||||
nic->conf = conf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue