Statistics
| Branch: | Revision:

root / net / tap-linux.c @ a5fd2c34

History | View | Annotate | Download (5.2 kB)

# Date Author Comment
445d892f 09/07/2010 08:27 pm Michael S. Tsirkin

tap: add APIs for vnet header length

Add APIs to control host header length. First user
will be vhost-net.

Signed-off-by: Michael S. Tsirkin <>

91ca60e0 06/22/2010 11:15 pm Michael Tokarev

give some useful error messages when tap open

In net/tap-linux.c, when manipulation of /dev/net/tun fails, it prints
(with fprintf) something like this:

warning: could not open /dev/net/tun: no virtual network emulation

this has 2 issues:
1) it is not a warning really, it's a fatal error (kvm exits after...

1ecda02b 03/16/2010 05:58 pm Markus Armbruster

error: Replace qemu_error() by error_report()

error_report() terminates the message with a newline. Strip it it
from its arguments.

This fixes a few error messages lacking a newline:
net_handle_fd_param()'s "No file descriptor named %s found", and
tap_open()'s "vnet_hdr=1 requested, but no kernel support for...

2f792016 03/16/2010 05:55 pm Markus Armbruster

error: Move qemu_error & friends into their own header

6720b35b 12/03/2009 05:41 pm Pierre Riteau

net: fix TAP networking on host kernels without IFF_VNET_HDR support

vnet_hdr is initialized at 1 by default. We need to reset it to 0 if
the kernel doesn't support IFF_VNET_HDR.

Signed-off-by: Pierre Riteau <>
Signed-off-by: Mark McLoughlin <>...

2e50326c 12/03/2009 05:41 pm Pierre Riteau

net: check for TUNSETOFFLOAD support before trying to enable offload features

This avoids the "TUNSETOFFLOAD ioctl() failed: Invalid argument" message
on kernels without TUNSETOFFLOAD support.

Signed-off-by: Pierre Riteau <>
Signed-off-by: Mark McLoughlin <>...

9c282718 10/30/2009 03:39 pm Mark McLoughlin

net: move UFO support detection to tap-linux.c

Only supported on Linux

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

c28b1c10 10/30/2009 03:39 pm Mark McLoughlin

net: move linux code into net/tap-linux.c

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

15ac913b 10/30/2009 03:39 pm Mark McLoughlin

net: move tap_set_sndbuf() to tap-linux.c

TUNSETSNDBUF is only available on linux

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

dc69004c 10/30/2009 03:39 pm Mark McLoughlin

net: move tap_probe_vnet_hdr() to tap-linux.c

Only Linux has support for IFF_VNET_HDR

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

1faac1f7 10/30/2009 03:39 pm Mark McLoughlin

net: move tap_set_offload() code into tap-linux.c

TUNSETOFFLOAD is only available on Linux

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>