History | View | Annotate | Download (18.3 kB)
Add support for net bridge
The most common use of -net tap is to connect a tap device to a bridge. Thisrequires the use of a script and running qemu as root in order to allocate atap device to pass to the script.
This model is great for portability and flexibility but it's incredibly...
network scripts: don't block SIGCHLD before forking
This patch fixes a bug where child processes of launch_script() canmisbehave due to SIGCHLD being blocked. In the case of `sudo`, thiscauses a permanent hang.
Previously a SIGCHLD handler was added to reap fork_exec()'d zombie...
Fix compilation warning due to missing header for sigaction (followup)
This patch removes all references to signal.h when qemu-common.h is includedas they become redundant.
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
vhost: force vhost off for non-MSI guests
When MSI is off, each interrupt needs to be bounced through the iothread when it's set/cleared, so vhost-net causes more context switches andhigher CPU utilization than userspace virtio which handles networking in...
tap: clear vhost_net backend on cleanup
Frontends calling tap_get_vhost_net get an invalid pointer after thepeer backend has been deleted. Jason Wang <jasowang@redhat.com> reportsthis leading to a crash in ack_features when we remove the vhost-netbakend of a virtio nic....
tap: make set_offload a nop after netdev cleanup
virtio-net expects set_offload to succeed afterpeer 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 <jasowang@redhat.com>...
tap: add APIs for vnet header length
Add APIs to control host header length. First userwill be vhost-net.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tap: generalize code for different vnet header len
Make host vnet header length a structure field inpreparation for using this support in linux kernel.
Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tap: add interface to get device fd
Will be used by vhost to attach/detach to backend.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tap: add vhost/vhostfd options
This adds vhost binary option to tap, to enable vhost net accelerator.Default is off for now, we'll be able to make default on long termwhen we know it's stable.
vhostfd option can be used by management, to pass in the fd. Assigning...
tap: add API to retrieve vhost net header
will be used by virtio-net for vhost net support
Revert "tap: invoke downscript when we exit abnormally"
This reverts commit 8af8ce4d6116e3d46ad298ca8fe50d3b515b1aac.
tap: invoke downscript when we exit abnormally
Right now, downscript is not invoked reliably. If you execute 'quit' from themonitor, it won't be invoked.
This fixes that by converting tap to use an exit_notifier to execute thedownscript. In this case, allowing an exit notifier to include state is...
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 bogus "Warning: vlan 0 with no nics" with -device
net_check_clients() prints this when an VLAN has host devices, but noguest devices. It uses VLANState members nb_guest_devs andnb_host_devs to keep track of these devices. However, -device does...
net: add API to disable/enable polling
When vhost is bound to a backend device, we need to stop polling it whenvhost is started, and restart polling when vhost is stopped.Add an API for that for use by vhost, and implement in tap backend.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
net: initialize vnet_hdr in net_init_tap()
net_tap_init() always sets vnet_hdr using qemu_opt_get_bool(), butinitialize it in net_init_tap() just to reduce confusion.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: remove VLANClientState members now in NetClientInfo
Add a NetClientInfo pointer to VLANClientState and use thatfor the typecode and function pointers.
net: convert tap to NetClientInfo
Avoid segfault on net_tap_init() failure
Check for fd == -1 there.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tap: disable draining queue in one go
If qemu_send_packet_async() returns zero, it means the packet has beenqueued and the sent callback will be invoked once it has been flushed.
This is only possible where the NIC's receive() handler returns zeroand promises to notify the networking core that room is available in its...
tap: drain queue in tap_send()
Okay, let's try re-enabling the drain-entire-queue behaviour, with adifference - before each subsequent packet, use qemu_can_send_packet()to check that we can send it. This is similar to how we check beforepolling the tap fd and avoids having to drop a packet if the receiver...
Unbreak tap compilation on OS X
Currently compiling the tap sources breaks on Mac OS X. This is because of:
1) tap-linux.h requiring Linux includes 2) typos 3) missing #includes
This patch adds what's necessary to compile tap happily on Mac OS X....
net: move UFO support detection to tap-linux.c
Only supported on Linux
net: move AIX code into net/tap-aix.c
Okay, this makes the tap options available on AIX even though there'sno support, but if we want to do it right we should have not compilethe tap code at all on AIX using e.g. CONFIG_TAP.
Signed-off-by: Mark McLoughlin <markmc@redhat.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
net: split all the tap code out into net/tap.c
net: split BSD tap_open() out into net/tap-bsd.c
net: move solaris code to net/tap-solaris.c