History | View | Annotate | Download (4.4 kB)
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...
error: Replace qemu_error() by error_report()
error_report() terminates the message with a newline. Strip it itfrom its arguments.
This fixes a few error messages lacking a newline:net_handle_fd_param()'s "No file descriptor named %s found", andtap_open()'s "vnet_hdr=1 requested, but no kernel support for...
error: Move qemu_error & friends into their own header
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 ifthe kernel doesn't support IFF_VNET_HDR.
Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr>Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
net: check for TUNSETOFFLOAD support before trying to enable offload features
This avoids the "TUNSETOFFLOAD ioctl() failed: Invalid argument" messageon kernels without TUNSETOFFLOAD support.
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>
net: move linux code into net/tap-linux.c
net: move tap_set_sndbuf() to tap-linux.c
TUNSETSNDBUF is only available on linux
net: move tap_probe_vnet_hdr() to tap-linux.c
Only Linux has support for IFF_VNET_HDR
net: move tap_set_offload() code into tap-linux.c
TUNSETOFFLOAD is only available on Linux