mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
net: Use hubs for the vlan feature
Stop using the special-case vlan code in net.c. Instead use the hub net client to implement the vlan feature. The next patch will remove vlan code from net.c completely. 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:
@ -673,7 +673,7 @@ static NetClientInfo net_tap_win32_info = {
|
||||
.cleanup = tap_cleanup,
|
||||
};
|
||||
|
||||
static int tap_win32_init(VLANState *vlan, const char *model,
|
||||
static int tap_win32_init(VLANClientState *peer, const char *model,
|
||||
const char *name, const char *ifname)
|
||||
{
|
||||
VLANClientState *nc;
|
||||
@ -685,7 +685,7 @@ static int tap_win32_init(VLANState *vlan, const char *model,
|
||||
return -1;
|
||||
}
|
||||
|
||||
nc = qemu_new_net_client(&net_tap_win32_info, vlan, NULL, model, name);
|
||||
nc = qemu_new_net_client(&net_tap_win32_info, NULL, peer, model, name);
|
||||
|
||||
s = DO_UPCAST(TAPState, nc, nc);
|
||||
|
||||
@ -700,7 +700,7 @@ static int tap_win32_init(VLANState *vlan, const char *model,
|
||||
}
|
||||
|
||||
int net_init_tap(const NetClientOptions *opts, const char *name,
|
||||
VLANState *vlan)
|
||||
VLANClientState *peer)
|
||||
{
|
||||
const NetdevTapOptions *tap;
|
||||
|
||||
@ -712,7 +712,7 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tap_win32_init(vlan, "tap", name, tap->ifname) == -1) {
|
||||
if (tap_win32_init(peer, "tap", name, tap->ifname) == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user