Statistics
| Branch: | Revision:

root / net / tap-linux.c @ feature-archipelago

History | View | Annotate | Download (7.5 kB)

# Date Author Comment
1f149e72 01/27/2014 04:44 pm Kusanagi Kouichi

tap-linux: Get features once and use it many times

Signed-off-by: Kusanagi Kouichi <>
Signed-off-by: Stefan Hajnoczi <>

d26e445c 02/27/2013 05:10 pm Peter Lieven

tap: set IFF_ONE_QUEUE per default

historically the kernel queues packets two times. once
at the device and second in qdisc. this is believed to cause
interface stalls if one of these queues overruns.

setting IFF_ONE_QUEUE is the default in kernels >= 3.8. the...

e5dc0b40 02/01/2013 07:03 pm Jason Wang

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 tap
device. This is needed when ifname is unspecified in the command line and qemu
were asked to create tap device by itself. In this situation, the name were...

264986e2 02/01/2013 07:03 pm Jason Wang

tap: multiqueue support

Recently, linux support multiqueue tap which could let userspace call TUNSETIFF
for a signle device many times to create multiple file descriptors as
independent queues. User could also enable/disabe a specific queue through
TUNSETQUEUE....

94fdc6d0 02/01/2013 07:03 pm Jason Wang

tap: add Linux multiqueue support

This patch add basic multiqueue support for Linux. When multiqueue is needed, we
will first check whether kernel support multiqueue tap before creating more
queues. Two new functions tap_fd_enable() and tap_fd_disable() were introduced...

28a65891 02/01/2013 06:50 pm Jason Wang

net: tap: use abort() instead of assert(0)

Signed-off-by: Jason Wang <>
Signed-off-by: Anthony Liguori <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

1422e32d 12/19/2012 09:31 am Paolo Bonzini

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 copies
that existed. Leave include/net/tap.h as the interface for NICs, and
net/tap_int.h as the interface for OS-specific parts of the tap backend....

89e6d68e 12/12/2012 11:36 pm Michael S. Tsirkin

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 case
if 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 <>

08c573a8 07/23/2012 01:55 pm Laszlo Ersek

convert net_init_tap() to NetClientOptions

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Stefan Hajnoczi <>

93a7320e 11/01/2011 08:23 am Luiz Capitulino

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....

f157ed20 02/02/2011 12:50 am Michael S. Tsirkin

tap: safe sndbuf default

With current sndbuf default value, a blocked
target guest can prevent another guest from
transmitting any packets. While current
sndbuf value (1M) is reported to help some
UDP based workloads, the default should
be safe (0).

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

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 <>