History | View | Annotate | Download (7.5 kB)
tap-linux: Get features once and use it many times
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tap: set IFF_ONE_QUEUE per default
historically the kernel queues packets two times. onceat the device and second in qdisc. this is believed to causeinterface stalls if one of these queues overruns.
setting IFF_ONE_QUEUE is the default in kernels >= 3.8. the...
tap: introduce a helper to get the name of an interface
This patch introduces a helper tap_get_ifname() to get the device name of tapdevice. This is needed when ifname is unspecified in the command line and qemuwere asked to create tap device by itself. In this situation, the name were...
tap: multiqueue support
Recently, linux support multiqueue tap which could let userspace call TUNSETIFFfor a signle device many times to create multiple file descriptors asindependent queues. User could also enable/disabe a specific queue throughTUNSETQUEUE....
tap: add Linux multiqueue support
This patch add basic multiqueue support for Linux. When multiqueue is needed, wewill first check whether kernel support multiqueue tap before creating morequeues. Two new functions tap_fd_enable() and tap_fd_disable() were introduced...
net: tap: use abort() instead of assert(0)
Signed-off-by: Jason Wang <jasowang@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
tap: reset vnet header size on open
For tap, we currently assume the vnet header size is 10(the default value) but that might not be the caseif tap is persistent and has been used by qemu previously.To fix, set vnet header size correctly on open.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
convert net_init_tap() to NetClientOptions
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
net: tap-linux: Fix unhelpful error message
I'm getting:
could not configure /dev/net/tun (tap%d): Operation not permitted
When the ioctl() fails, ifr.ifr_name will most likely not be overwritten.So we better only use it when ifname contains a string....
tap: safe sndbuf default
With current sndbuf default value, a blockedtarget guest can prevent another guest fromtransmitting any packets. While currentsndbuf value (1M) is reported to help someUDP based workloads, the default shouldbe safe (0).
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
tap: add APIs for vnet header length
Add APIs to control host header length. First userwill be vhost-net.
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