aboutsummaryrefslogtreecommitdiff
path: root/net/tap.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-10-22 17:49:16 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-30 08:39:29 -0500
commit9c282718aafd021661f0fa0431322a7df75705b0 (patch)
tree931d70eb2bd7065f0185452ce2d85ce4e4b2d30e /net/tap.c
parent1faac1f7d48d3f7bfa2d168b1ad5680d3288f585 (diff)
downloadqemu-9c282718aafd021661f0fa0431322a7df75705b0.zip
qemu-9c282718aafd021661f0fa0431322a7df75705b0.tar.gz
qemu-9c282718aafd021661f0fa0431322a7df75705b0.tar.bz2
net: move UFO support detection to tap-linux.c
Only supported on Linux Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net/tap.c')
-rw-r--r--net/tap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/tap.c b/net/tap.c
index 9b11071..60354e4 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -271,7 +271,6 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
int vnet_hdr)
{
TAPState *s;
- unsigned int offload;
s = qemu_mallocz(sizeof(TAPState));
s->fd = fd;
@@ -281,11 +280,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
vlan, NULL, model, name, NULL,
tap_receive, tap_receive_raw,
tap_receive_iov, tap_cleanup, s);
- s->has_ufo = 0;
- /* Check if tap supports UFO */
- offload = TUN_F_CSUM | TUN_F_UFO;
- if (ioctl(s->fd, TUNSETOFFLOAD, offload) == 0)
- s->has_ufo = 1;
+ s->has_ufo = tap_probe_has_ufo(s->fd);
tap_set_offload(s->vc, 0, 0, 0, 0, 0);
tap_read_poll(s, 1);
return s;