aboutsummaryrefslogtreecommitdiff
path: root/net/vde.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-07-24 16:35:05 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-08-01 12:28:51 +0100
commitd33d93b2c40b820c2cfab1e2e6da631f12091957 (patch)
treea63f93f8c768b451774c11b59c41dc074d2d22a0 /net/vde.c
parentf6c874e3002b944f83d887b84051654e5c5b7821 (diff)
downloadqemu-d33d93b2c40b820c2cfab1e2e6da631f12091957.zip
qemu-d33d93b2c40b820c2cfab1e2e6da631f12091957.tar.gz
qemu-d33d93b2c40b820c2cfab1e2e6da631f12091957.tar.bz2
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>
Diffstat (limited to 'net/vde.c')
-rw-r--r--net/vde.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/vde.c b/net/vde.c
index ee19f5c..302a022 100644
--- a/net/vde.c
+++ b/net/vde.c
@@ -75,7 +75,7 @@ static NetClientInfo net_vde_info = {
.cleanup = vde_cleanup,
};
-static int net_vde_init(VLANState *vlan, const char *model,
+static int net_vde_init(VLANClientState *peer, const char *model,
const char *name, const char *sock,
int port, const char *group, int mode)
{
@@ -96,7 +96,7 @@ static int net_vde_init(VLANState *vlan, const char *model,
return -1;
}
- nc = qemu_new_net_client(&net_vde_info, vlan, NULL, model, name);
+ nc = qemu_new_net_client(&net_vde_info, NULL, peer, model, name);
snprintf(nc->info_str, sizeof(nc->info_str), "sock=%s,fd=%d",
sock, vde_datafd(vde));
@@ -111,7 +111,7 @@ static int net_vde_init(VLANState *vlan, const char *model,
}
int net_init_vde(const NetClientOptions *opts, const char *name,
- VLANState *vlan)
+ VLANClientState *peer)
{
const NetdevVdeOptions *vde;
@@ -119,7 +119,7 @@ int net_init_vde(const NetClientOptions *opts, const char *name,
vde = opts->vde;
/* missing optional values have been initialized to "all bits zero" */
- if (net_vde_init(vlan, "vde", name, vde->sock, vde->port, vde->group,
+ if (net_vde_init(peer, "vde", name, vde->sock, vde->port, vde->group,
vde->has_mode ? vde->mode : 0700) == -1) {
return -1;
}