diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-07-24 16:35:05 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-08-01 12:28:51 +0100 |
commit | d33d93b2c40b820c2cfab1e2e6da631f12091957 (patch) | |
tree | a63f93f8c768b451774c11b59c41dc074d2d22a0 /net/tap.c | |
parent | f6c874e3002b944f83d887b84051654e5c5b7821 (diff) |
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/tap.c')
-rw-r--r-- | net/tap.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -322,7 +322,7 @@ static NetClientInfo net_tap_info = { .cleanup = tap_cleanup, }; -static TAPState *net_tap_fd_init(VLANState *vlan, +static TAPState *net_tap_fd_init(VLANClientState *peer, const char *model, const char *name, int fd, @@ -331,7 +331,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan, VLANClientState *nc; TAPState *s; - nc = qemu_new_net_client(&net_tap_info, vlan, NULL, model, name); + nc = qemu_new_net_client(&net_tap_info, NULL, peer, model, name); s = DO_UPCAST(TAPState, nc, nc); @@ -514,7 +514,7 @@ static int net_bridge_run_helper(const char *helper, const char *bridge) } int net_init_bridge(const NetClientOptions *opts, const char *name, - VLANState *vlan) + VLANClientState *peer) { const NetdevBridgeOptions *bridge; const char *helper, *br; @@ -537,7 +537,7 @@ int net_init_bridge(const NetClientOptions *opts, const char *name, vnet_hdr = tap_probe_vnet_hdr(fd); - s = net_tap_fd_init(vlan, "bridge", name, fd, vnet_hdr); + s = net_tap_fd_init(peer, "bridge", name, fd, vnet_hdr); if (!s) { close(fd); return -1; @@ -587,7 +587,7 @@ static int net_tap_init(const NetdevTapOptions *tap, int *vnet_hdr, } int net_init_tap(const NetClientOptions *opts, const char *name, - VLANState *vlan) + VLANClientState *peer) { const NetdevTapOptions *tap; @@ -650,7 +650,7 @@ int net_init_tap(const NetClientOptions *opts, const char *name, model = "tap"; } - s = net_tap_fd_init(vlan, model, name, fd, vnet_hdr); + s = net_tap_fd_init(peer, model, name, fd, vnet_hdr); if (!s) { close(fd); return -1; |