diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-10-22 17:49:16 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-30 08:39:29 -0500 |
commit | 9c282718aafd021661f0fa0431322a7df75705b0 (patch) | |
tree | 931d70eb2bd7065f0185452ce2d85ce4e4b2d30e /net/tap.c | |
parent | 1faac1f7d48d3f7bfa2d168b1ad5680d3288f585 (diff) |
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.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -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; |