Statistics
| Branch: | Revision:

root / net @ 9c17d615

# Date Author Comment
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 <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

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

f8fe7964 12/19/2012 09:29 am Paolo Bonzini

janitor: do not include qemu-char everywhere

Touching char/char.h basically causes the whole of QEMU to
be rebuilt. Avoid this, it is usually unnecessary.

Signed-off-by: Paolo Bonzini <>

fd9400b3 12/19/2012 09:29 am Paolo Bonzini

net: move net.c to net/

Signed-off-by: Paolo Bonzini <>

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

eac29d87 12/07/2012 01:34 pm Stefan Weil

Fix spelling (prefered -> preferred)

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

58ddcd50 11/20/2012 04:38 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 host header size in tap device on open.
...

63d2960b 11/15/2012 11:27 am Klaus Stengel

slirp: Add domain-search option to slirp's DHCP server

This patch will allow the user to include the domain-search option in
replies from the built-in DHCP server. The domain suffixes can be
specified by adding dnssearch= entries to the "-net user" parameter....

f0e3ac70 11/01/2012 12:00 pm Lei Li

net: use "socket" model name for UDP sockets

Fix the problem that can not delete the udp socket.
It's caused by passing "udp" model to net_socket_udp_init,
but we do not have "udp" model in our model list.
Pass the right model "socket" to init function.
...

aee0bf7d 10/30/2012 09:18 pm Michael S. Tsirkin

tap-win32: stubs to fix win32 build

Add missing stubs to win32 to fix link failure.

Signed-off-by: Michael S. Tsirkin <>
Reported-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

08778b39 10/19/2012 11:39 am Stefan Weil

net/tap-win32: Fix compiler warning caused by missing include statement

The include file for net_init_tap was missing:

net/tap-win32.c:703:
warning: no previous prototype for ‘net_init_tap’

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

a245fc18 10/08/2012 02:59 pm Paolo Bonzini

net: consolidate NetClientState header files into one

This patch doesn't seem much useful alone, I must admit. However,
it makes sense as part of the upcoming directory reorganization,
where I want to have include/net/tap.h as the net<->hw interface
for tap. Then having both net/tap.h and include/net/tap.h does...

73062dfe 09/23/2012 09:37 am Stefan Weil

net/socket: Fix compiler warning (regression for MinGW)

Commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf removed a type cast
which is needed for MinGW:

net/socket.c:136: warning:
pointer targets in passing argument 2 of ‘sendto’ differ in signedness
/usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/winsock2.h:1313: note:...

61518a74 09/14/2012 10:40 am Stefan Hajnoczi

net: broadcast hub packets if at least one port can receive

In commit 60c07d933c66c4b30a83b7ccbc8a0cb3df1b2d0e ("net: fix
qemu_can_send_packet logic") the "VLAN" broadcast behavior was changed
to queue packets if any net client cannot receive. It turns out that...

863f678f 09/14/2012 10:40 am Stefan Hajnoczi

net: asynchronous send/receive infrastructure for net/socket.c

The net/socket.c net client is not truly asynchronous. This patch
borrows the qemu_set_fd_handler2() code from net/tap.c as the basis for
proper asynchronous send/receive.

Only read packets from the socket when the peer is able to receive....

213fd508 09/14/2012 10:40 am Stefan Hajnoczi

net: EAGAIN handling for net/socket.c UDP

Implement asynchronous send for UDP (or other SOCK_DGRAM) sockets. If
send fails with EAGAIN we wait for the socket to become writable again.

Signed-off-by: Stefan Hajnoczi <>

45a7f54a 09/14/2012 10:40 am Stefan Hajnoczi

net: EAGAIN handling for net/socket.c TCP

Replace spinning send_all() with a proper non-blocking send. When the
socket write buffer limit is reached, we should stop trying to send and
wait for the socket to become writable again.

Non-blocking TCP sockets can return in two different ways when the write...

06b5f36d 09/14/2012 10:40 am Stefan Hajnoczi

net: do not report queued packets as sent

Net send functions have a return value where 0 means the packet has not
been sent and will be queued. A non-zero value means the packet was
sent or an error caused the packet to be dropped.

This patch fixes two instances where packets are queued but we return...

987a9b48 09/14/2012 10:40 am Paolo Bonzini

net: notify iothread after flushing queue

virtio-net has code to flush the queue and notify the iothread
whenever new receive buffers are added by the guest. That is
fine, and indeed we need to do the same in all other drivers.
However, notifying the iothread should be work for the network...

a96ed02f 09/07/2012 09:15 am Nicholas Bellinger

monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param

This patch renames+moves the net_handle_fd_param() caller used to
obtain a file descriptor from either qemu_parse_fd() (the normal case)
or from monitor_get_fd() (migration case) into a generically prefixed...

427a1a2c 08/09/2012 09:34 pm Blue Swirl

qapi: avoid reserved keywords

Clang compiler complained about use of reserved word 'restrict' in SLIRP
and QAPI.

Prefix C keywords with "q_", adjust SLIRP accordingly.

Reviewed-by: Markus Armbruster <>
Signed-off-by: Blue Swirl <>

1a859593 08/01/2012 03:32 pm Zhi Yong Wu

net: Make "info network" output more readable info

Reviewed-by: Jan Kiszka <>
Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Laszlo Ersek <>

86a77c38 08/01/2012 03:32 pm Zhi Yong Wu

net: cleanup deliver/deliver_iov func pointers

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Laszlo Ersek <>

691a4f3a 08/01/2012 03:32 pm Zhi Yong Wu

net: determine if packets can be sent before net queue deliver packets

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Laszlo Ersek <>

52a3cb86 08/01/2012 03:32 pm Zhi Yong Wu

hub: add the support for hub own flow control

Only when all other hub port's peer .can_receive() all return 1,
the source hub port .can_receive() return 1.

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Zhi Yong Wu <>...

e34cde35 08/01/2012 03:32 pm Zhi Yong Wu

net: fix the coding style

Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Laszlo Ersek <>

011de2b5 08/01/2012 03:32 pm Zhi Yong Wu

net: add the support for -netdev socket, listen

The -net socket,listen option does not work with the newer -netdev
syntax:
http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg01508.html

This patch makes it work now.

For the case where one vlan has multiple listenning sockets,...

4e68f7a0 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename VLANClientState to NetClientState

The vlan feature is no longer part of net core. Rename VLANClientState
to NetClientState because net clients are not explicitly associated with
a vlan at all, instead they have a peer net client to which they are...

35277d14 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename vc local variables to nc

Now that VLANClientState has been renamed to NetClientState all 'vc'
local variables should be 'nc'. Much of the code already used 'nc' but
there are places where 'vc' needs to be renamed.

Signed-off-by: Stefan Hajnoczi <>...

b20c6b9e 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename qemu_del_vlan_client() to qemu_del_net_client()

Another step in moving the vlan feature out of net core. Users only
deal with NetClientState and therefore qemu_del_vlan_client() should be
named qemu_del_net_client().

Signed-off-by: Stefan Hajnoczi <>...

f6c874e3 08/01/2012 02:28 pm Stefan Hajnoczi

net: Add a hub net client

The vlan feature can be implemented in terms of hubs. By introducing a
hub net client it becomes possible to remove the special case vlan code
from net.c and push the vlan feature out of generic networking code.

Signed-off-by: Stefan Hajnoczi <>...

d33d93b2 08/01/2012 02:28 pm Stefan Hajnoczi

net: Use hubs for the vlan feature

Stop using the special-case vlan code in net.c. Instead use the hub net
client to implement the vlan feature. The next patch will remove vlan
code from net.c completely.

Signed-off-by: Stefan Hajnoczi <>...

90d87a33 08/01/2012 02:28 pm Stefan Hajnoczi

net: Look up 'vlan' net clients using hubs

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Zhi Yong Wu <>
Reviewed-by: Laszlo Ersek <>

81017645 08/01/2012 02:28 pm Stefan Hajnoczi

hub: Check that hubs are configured correctly

Checks can be performed to make sure that hubs have at least one NIC and
one host device, warning the user if this is not the case.
Configurations which do not meet this rule tend to be broken but just
emit a warning. This patch preserves compatibility with the checks...

ab5f3f84 08/01/2012 02:28 pm Stefan Hajnoczi

net: Drop vlan argument to qemu_new_net_client()

Since hubs are now used to implement the 'vlan' feature and the vlan
argument is always NULL, remove the argument entirely and update all net
clients that use qemu_new_net_client().

Signed-off-by: Stefan Hajnoczi <>...

606c10e2 08/01/2012 02:28 pm Zhi Yong Wu

net: Convert qdev_prop_vlan to peer with hub

Instead of using VLANState use net/hub.h to support the vlan qdev
property. The vlan qdev property becomes an alias for the peer qdev
property but is represented as a VLAN ID number. When a VLAN ID is
selected the device will really peer with a hub port....

2be64a68 07/23/2012 01:55 pm Laszlo Ersek

hw, net: "net_client_type" -> "NetClientOptionsKind" (qapi-generated)

NET_CLIENT_TYPE_ -> NET_CLIENT_OPTIONS_KIND_

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

6687b79d 07/23/2012 01:55 pm Laszlo Ersek

convert net_client_init() to OptsVisitor

The net_client_init() prototype is kept intact.

Based on "is_netdev", the QemuOpts-rooted QemuOpt-list is parsed as a
Netdev or a NetLegacy. The original meat of net_client_init() is moved to
and simplified in net_client_init1():...

848040d1 07/23/2012 01:55 pm Laszlo Ersek

convert net_init_dump() to NetClientOptions

v1->v2:
- NetdevDumpOptions::len is of type 'size', whose C type was changed to
uint64_t. Adapt the printf() format specifier macro.

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

094f15c5 07/23/2012 01:55 pm Laszlo Ersek

convert net_init_slirp() to NetClientOptions

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

bef8e8fe 07/23/2012 01:55 pm Laszlo Ersek

convert net_init_socket() to NetClientOptions

I "reverse engineered" the following permissions between the -socket
sub-options:

fd  listen  connect  mcast  udp | localaddr
fd x . . . . | .
listen . x . . . | ....
4a917c39 07/23/2012 01:55 pm Laszlo Ersek

convert net_init_vde() to NetClientOptions

v1->v2:
- NetdevVdeOptions::port and ::mode are of type uint16. Remove superfluous
range checks.

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

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

f79b51b0 07/23/2012 01:55 pm Laszlo Ersek

convert net_init_bridge() to NetClientOptions

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

1a0c0958 07/23/2012 01:55 pm Laszlo Ersek

remove unused QemuOpts parameter from net init functions

v1->v2:
- unchanged

v2->v3:
- keep "qemu-option.h" included in "net/slirp.h"

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

22a61f36 07/09/2012 06:39 pm Jan Kiszka

slirp: Improve error reporting of inaccessible smb directories

Instead of guessing, print the error code returned by access.

Signed-off-by: Jan Kiszka <>

1cb1c5d1 07/09/2012 06:38 pm Jan Kiszka

slirp: Enforce host-side user of smb share

Windows 7 (and possibly other versions) cannot connect to the samba
share if the exported host directory is not world-readable. This can be
resolved by forcing the username used for access checks to the one
under which QEMU and smbd are running....

b412eb61 07/09/2012 06:38 pm Alexander Graf

slirp: add 'cmd:' target for guestfwd

When using guestfwd=, Qemu only connects the virtual server's TCP port
to a single chardev. This is useless in most cases, as we usually want
to have more than a single connection from the guest to the outside world....

927d811b 07/09/2012 06:38 pm Dunrong Huang

slirp: Ensure smbd and shared directory exist when enable smb

Users may pass the following parameters to qemu:
$ qemu-kvm -net nic -net user,smb= ...
$ qemu-kvm -net nic -net user,smb ...
$ qemu-kvm -net nic -net user,smb=bad_directory ...

In these cases, qemu started successfully while samba server...

37003adf 06/15/2012 04:41 pm Paolo Bonzini

qmp: include monitor.h when needed

This is needed to get file descriptors from SCM_RIGHTS.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Luiz Capitulino <>

3294ce18 06/09/2012 01:30 pm Michael Tokarev

do not include <libutil.h> needlessly or if it doesn't exist

<libutil.h> and <util.h> on *BSD (some have one, some another)
were #included just for openpty() declaration. The only file
where this function is actually used is qemu-char.c.

In vl.c and net/tap-bsd.c, none of functions declared in libutil.h...

d8469de6 06/07/2012 10:21 am Paolo Bonzini

build: move net/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

42dcc547 06/04/2012 07:49 pm Luiz Capitulino

net: purge the monitor object from all init functions

The only backend that really uses it is the socket one, which calls
monitor_get_fd(). But it can use 'cur_mon' instead.

Signed-off-by: Luiz Capitulino <>
Reviewed-By: Laszlo Ersek <>

de305b13 05/02/2012 01:08 am Nikolaus Rath

slirp: don't use "smb ports = 0" option

The "smb ports = 0" option causes recent samba versions to crash. It was
introduced in commit 157777ef3e with log message "Samba 3 support".
However, a value of 0 has never been officially supported by smb and is
also not necessary: if stdin is a socket, smb does not try to listen on...

276eda57 05/02/2012 01:08 am Nikolaus Rath

Declare state directory in smb.conf

The smb.conf generated by the userspace networking does not include a state directory
directive. Samba therefore falls back to the default value. Since the user generally
does not have write access to this path, smbd immediately crashes....

da8d6057 02/10/2012 12:44 pm Benjamin MARSILI

net: remove extra spaces in help messages

Signed-off-by: Benjamin MARSILI <>
Signed-off-by: Stefan Hajnoczi <>

4c32fe66 02/02/2012 12:24 am Stefan Weil

Change license from GPLv2 to GPLv2+

This file only contains code from Red Hat, so it can use GPLv2+.
Tested with `git blame -M -C net/checksum.c`.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

a7c36ee4 02/02/2012 12:24 am Corey Bryant

Add support for net bridge

The most common use of -net tap is to connect a tap device to a bridge. This
requires the use of a script and running qemu as root in order to allocate a
tap device to pass to the script.

This model is great for portability and flexibility but it's incredibly...

6b620ca3 01/13/2012 06:55 pm Paolo Bonzini

prepare for future GPLv2+ relicensing

All files under GPLv2 will get GPLv2+ changes starting tomorrow.
event_notifier.c and exec-obsolete.h were only ever touched by Red Hat
employees and can be relicensed now.

Signed-off-by: Paolo Bonzini <>...

0e0e7fac 01/12/2012 06:34 pm Benjamin

Support for UDP unicast network backend

Signed-off-by: Benjamin MARSILI <>
Signed-off-by: Anthony Liguori <>

a46667ea 01/06/2012 05:07 pm Peter Maydell

net/socket.c: Fix fd leak in net_socket_listen_init() error paths

Fix a leak of a file descriptor due to missing closesocket() calls
in error paths in net_socket_listen_init().

Signed-off-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

0fa29915 12/20/2011 11:44 pm Hervé Poussineau

net: store guest timestamp in dump file instead of time since guest startup

Stored dates are no more 1970-01-01 (+ run time), but have a real meaning.
If someone wants to have comparable timestamps accross boots, it is
possible to start qemu with -rtc to give the startup date....

6514ed52 12/20/2011 11:44 pm Hervé Poussineau

net: truncate output file when using dump backend

This prevents data of a previous run to be seen in the new dump file.

Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Hervé Poussineau <>
Signed-off-by: Anthony Liguori <>

b15ba6c9 12/19/2011 12:42 pm Geoffrey Thomas

slirp: Fix typo in net_slirp_hostfwd_remove

Report an error when err is nonzero, not when it is zero.

Signed-off-by: Geoffrey Thomas <>
Signed-off-by: Stefan Hajnoczi <>

885660bd 12/15/2011 06:22 pm Michael Roth

network scripts: don't block SIGCHLD before forking

This patch fixes a bug where child processes of launch_script() can
misbehave due to SIGCHLD being blocked. In the case of `sudo`, this
causes a permanent hang.

Previously a SIGCHLD handler was added to reap fork_exec()'d zombie...

9423a2e8 12/14/2011 03:59 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging

842480d4 12/13/2011 01:06 am Stefan Hajnoczi

net: expand tabs in net/socket.c

In order to make later patches sane, expand the tab characters and
conform to QEMU coding style now.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Anthony Liguori <>

e5d1fca0 12/13/2011 01:06 am Stefan Hajnoczi

net: take ownership of fd in socket init functions

Today net/socket.c has no consistent policy for closing the socket file
descriptor when initialization fails. This means we leak the file
descriptor in some cases or we could also try to close it twice....

c7ee8f68 12/06/2011 11:56 am Zhi Hui Li

net/socket.c : fix memory leak

Signed-off-by: Li Zhi Hui <>
Signed-off-by: Stefan Hajnoczi <>

3a93113a 12/06/2011 11:56 am Dong Xu Wang

fix typo: delete redundant semicolon

Double semicolons should be single.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

e30e5eb6 11/22/2011 01:11 pm Markus Armbruster

slirp: Clean up net_slirp_hostfwd_remove()'s use of get_str_sep()

get_str_sep() can fail, but net_slirp_hostfwd_remove() doesn't check.
Works, because it initializes buf[] to "", which get_str_sep() doesn't
touch when it fails. Coverity doesn't like it, and neither do I....

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

e2d8830e 09/03/2011 08:45 pm Brad

Allow overriding the location of Samba's smbd.

Allow overriding the location of Samba's smbd.

Pretty much every OS I look at has some means of
changing this path (patching) so lets just make
it easier for OS developers creating packages
and/or end users to override the location....

27143a44 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_open() -> qemu_chr_new()

Signed-off-by: Anthony Liguori <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

23ddf2bb 08/07/2011 02:06 pm Brad

Fix forcing multicast msgs to loopback on OpenBSD.

Fix forcing multicast msgs to loopback on OpenBSD.
e.g.
$ sudo qemu -m 128 -no-fd-bootchk \
-hda virtual.img -boot n -nographic \
-net nic,vlan=0,model=rtl8139,macaddr=52:54:00:12:34:03 \...

45c245bf 08/07/2011 12:48 pm Manuel Bouyer

Fix network interface tap backend

Fix network interface tap backend work on NetBSD.
It uses an ioctl to get the tap name.

Signed-off-by: Christoph Egger<>
Signed-off-by: Blue Swirl <>

00aa0040 07/25/2011 05:38 pm Blue Swirl

Wrap recv to avoid warnings

Avoid warnings like these by wrapping recv():
CC slirp/ip_icmp.o
/src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
/src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]...

6f7b3b1b 07/23/2011 06:19 pm Jan Kiszka

net: Refactor net_client_types

Position entries of net_client_types according to the corresponding
values of NET_CLIENT_TYPE_*. The array size is now defined by
NET_CLIENT_TYPE_MAX. This will allow to obtain entries based on type
value in later patches.
...

c54ed5bc 07/23/2011 06:19 pm Jan Kiszka

slirp: Canonicalize restrict syntax

All other boolean arguments accept on|off - except for slirp's restrict.
Fix that while still accepting the formerly allowed yes|y|no|n, but
reject everything else. This avoids accidentally allowing external
connections because syntax errors were so far interpreted as...

6daf194d 06/24/2011 11:13 am Markus Armbruster

Strip trailing '\n' from error_report()'s first argument

error_report() prepends location, and appends a newline. The message
constructed from the arguments should not contain a newline. Fix the
obvious offenders.

Signed-off-by: Markus Armbruster <>...

9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

a9899996 06/08/2011 11:04 am Alexander Graf

slirp: fix guestfwd id

When using -net user,guestfwd=... Qemu immediately complains about the id
being in invalid format. This is because we pass in an id that contains a
colon, while the id restrictions don't allow colons.

This patch changes the colon into a dot, making guestfwd work again....

d8dfad9c 04/15/2011 09:25 pm Blue Swirl

Use qemu-common.h or qemu-timer.h in place of sysemu.h

In some cases qemu-common.h or qemu-timer.h can be used in place
of sysemu.h.

Signed-off-by: Blue Swirl <>

a08784dd 04/15/2011 09:25 pm Blue Swirl

Remove unused sysemu.h include directives

Remove unused sysemu.h include directives to speed up build
with the following patches.

Signed-off-by: Blue Swirl <>

74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

This was done with:

sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )...
c3febae6 02/25/2011 05:14 pm Pavel Dovgaluk

Fixing tap adapter for win32

This fix allows connection of internal VLAN to the external TAP interface.
If tap_win32_write function always returns 0, the TAP network interface
in QEMU is disabled.

Signed-off-by: Pavel Dovgalyuk <>...

c7eb1f02 02/25/2011 05:13 pm Pavel Dovgaluk

Fixing network over sockets implementation for win32

MSDN includes the following in WSAEALREADY error description for connect()
function: "To preserve backward compatibility, this error is reported as
WSAEINVAL to Winsock applications that link to either Winsock.dll or...
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 <>...

5430a28f 02/02/2011 12:50 am mst@redhat.com

vhost: force vhost off for non-MSI guests

When MSI is off, each interrupt needs to be bounced through the io
thread when it's set/cleared, so vhost-net causes more context switches and
higher CPU utilization than userspace virtio which handles networking in...

5f668643 12/21/2010 09:44 pm Brad

Add support for OpenBSD to QEMU's tap driver.

Signed-off-by: Brad Smith <>
Signed-off-by: Blue Swirl <>

4d22c6c2 12/17/2010 11:03 pm Blue Swirl

Fix warning on mingw32

Avoid this warning like other uses of setsockopt:
/src/qemu/net/socket.c: In function 'net_socket_mcast_create':
/src/qemu/net/socket.c:210: warning: passing argument 4 of 'setsockopt' from incompatible pointer type

Signed-off-by: Blue Swirl <>

3a75e74c 12/09/2010 12:45 pm Mike Ryan

net/sock: option to specify local address

Add an option to specify the host IP to send multicast packets from,
when using a multicast socket for networking. The option takes an IP
address and sets the IP_MULTICAST_IF socket option, which causes the
packets to use that IP's interface as an egress....

43849424 11/16/2010 04:40 pm Michael S. Tsirkin

tap: clear vhost_net backend on cleanup

Frontends calling tap_get_vhost_net get an invalid pointer after the
peer backend has been deleted. Jason Wang <> reports
this leading to a crash in ack_features when we remove the vhost-net
bakend of a virtio nic....

27a6375d 11/16/2010 04:40 pm Michael S. Tsirkin

tap: make set_offload a nop after netdev cleanup

virtio-net expects set_offload to succeed after
peer cleanup.
Since we don't have an open fd anymore, make it so.
Fixes warning about the failure of offload setting.

Reported-by: Jason Wang <>...

49a2942d 10/13/2010 09:41 pm Blue Swirl

Delete write only variables

Compiling with GCC 4.6.0 20100925 produced warnings like:
/src/qemu/net/tap-win32.c: In function 'tap_win32_open':
/src/qemu/net/tap-win32.c:582:12: error: variable 'hThread' set but not used [-Werror=unused-but-set-variable]
...

3ee66dfa 10/03/2010 09:31 am Andreas Färber

tap: Add stub for Haiku

Adapted from AIX code.

Signed-off-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>