675b9b53 | 12-Feb-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
build-sys: link with slirp as an external project
Use the "system" libslirp if its present or requested.
Else build with a static libslirp.a if slirp/ is checked out ("internal") or a submodule ("g
build-sys: link with slirp as an external project
Use the "system" libslirp if its present or requested.
Else build with a static libslirp.a if slirp/ is checked out ("internal") or a submodule ("git").
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-7-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
c2d63650 | 12-Feb-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: move sources to src/ subdirectory
Prepare for making slirp/ a standalone project.
Remove some useless includes while at it.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Me
slirp: move sources to src/ subdirectory
Prepare for making slirp/ a standalone project.
Remove some useless includes while at it.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-5-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
d8903441 | 12-Feb-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: use libslirp migration code
slirp migration code uses QEMU vmstate so far, when building WITH_QEMU.
Introduce slirp_state_{load,save,version}() functions to move the state saving handling to
slirp: use libslirp migration code
slirp migration code uses QEMU vmstate so far, when building WITH_QEMU.
Introduce slirp_state_{load,save,version}() functions to move the state saving handling to libslirp side.
So far, the bitstream compatibility should remain equal with current QEMU, as this is effectively using the same code, with the same format etc. When libslirp is made standalone, we will need some mechanism to ensure bitstream compatibility regardless of the libslirp version installed. See the FIXME note in the code.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-3-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
ffe02f55 | 31-Mar-2016 |
Samuel Thibault <samuel.thibault@ens-lyon.org> |
slirp: Mark pieces missing IPv6 support
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> |
a06cd488 | 27-Feb-2019 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
qmp: Add announce-self command
Add a qmp command that can trigger guest announcements.
It uses its own announce-timer instance, and parameters passed to it explicitly in the command.
Like most qmp
qmp: Add announce-self command
Add a qmp command that can trigger guest announcements.
It uses its own announce-timer instance, and parameters passed to it explicitly in the command.
Like most qmp commands, it's in the main thread/bql, so there's no racing with any outstanding timer.
Based on work of Germano Veit Michel <germano@redhat.com> and Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
44b416ad | 27-Feb-2019 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
net: Add a network device specific self-announcement ability
Some network devices have a capability to do self announcements (ex: virtio-net). Add infrastructure that would allow devices to expose
net: Add a network device specific self-announcement ability
Some network devices have a capability to do self announcements (ex: virtio-net). Add infrastructure that would allow devices to expose this ability.
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
7659505c | 27-Feb-2019 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
migration: Switch to using announce timer
Switch the announcements to using the new announce timer. Move the code that does it to announce.c rather than savevm because it really has nothing to do wi
migration: Switch to using announce timer
Switch the announcements to using the new announce timer. Move the code that does it to announce.c rather than savevm because it really has nothing to do with the actual migration.
Migration starts the announce from bh's and so they're all in the main thread/bql, and so there's never any racing with the timers themselves.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
50510ea2 | 27-Feb-2019 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
net: Introduce announce timer
The 'announce timer' will be used by migration, and explicit requests for qemu to perform network announces.
Based on the work by Germano Veit Michel <germano@redhat.c
net: Introduce announce timer
The 'announce timer' will be used by migration, and explicit requests for qemu to perform network announces.
Based on the work by Germano Veit Michel <germano@redhat.com> and Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
4875bf14 | 06-Dec-2018 |
Vincenzo Maffione <v.maffione@gmail.com> |
net: netmap: improve netmap_receive_iov()
Changes: - Save CPU cycles by computing the return value while scanning the input iovec, rather than calling iov_size() at the end. - Remove check f
net: netmap: improve netmap_receive_iov()
Changes: - Save CPU cycles by computing the return value while scanning the input iovec, rather than calling iov_size() at the end. - Remove check for s->tx != NULL, because it cannot happen. - Cache ring->tail in a local variable and use it to check for space in the TX ring. The use of nm_ring_empty() was invalid, because nobody is updating ring->cur and ring->head at that point. - In case we run out of netmap slots in the middle of a packet, move the wake-up point by advancing ring->cur, but do not expose the incomplete packet (i.e., by updating also ring->head).
Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
c7cbb6b4 | 06-Dec-2018 |
Vincenzo Maffione <v.maffione@gmail.com> |
net: netmap: simplify netmap_receive()
Improve code reuse by implementing netmap_receive() with a call to netmap_receive_iov().
Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by
net: netmap: simplify netmap_receive()
Improve code reuse by implementing netmap_receive() with a call to netmap_receive_iov().
Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
cc599ed6 | 06-Dec-2018 |
Vincenzo Maffione <v.maffione@gmail.com> |
net: netmap: small improvements netmap_send()
This change improves the handling of incomplete multi-slot packets (e.g. with the NS_MOREFRAG set), by advancing ring->head only on complete packets. Th
net: netmap: small improvements netmap_send()
This change improves the handling of incomplete multi-slot packets (e.g. with the NS_MOREFRAG set), by advancing ring->head only on complete packets. The ring->cur pointer is advanced in any case in order to acknowledge the kernel and move the wake-up point (thus avoiding repeated wake-ups). Also don't be verbose when incomplete packets are found.
Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
6d3aaa5b | 14-Jan-2019 |
Zhang Chen <chen.zhang@intel.com> |
net/colo-compare.c: Remove duplicated code
Fix duplicated code: https://bugs.launchpad.net/qemu/+bug/1811499
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@
net/colo-compare.c: Remove duplicated code
Fix duplicated code: https://bugs.launchpad.net/qemu/+bug/1811499
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
ba288898 | 14-Feb-2019 |
Paolo Bonzini <pbonzini@redhat.com> |
vhost-user: support cross-endian vnet headers
vhost-user already has a way to communicate the endianness of the guest via the vring endianness messages. The vring endianness always matches the vnet
vhost-user: support cross-endian vnet headers
vhost-user already has a way to communicate the endianness of the guest via the vring endianness messages. The vring endianness always matches the vnet header endianness so there is no need to do anything else in the backend.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1543851204-41186-9-git-send-email-pbonzini@redhat.com> Message-Id: <1550165756-21617-5-git-send-email-pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
56f41de7 | 14-Feb-2019 |
Paolo Bonzini <pbonzini@redhat.com> |
vhost-net-user: add stubs for when no virtio-net device is present
hw/net/vhost_net.c needs functions that are declared in net/vhost-user.c: the vhost-user code is always compiled into QEMU, only th
vhost-net-user: add stubs for when no virtio-net device is present
hw/net/vhost_net.c needs functions that are declared in net/vhost-user.c: the vhost-user code is always compiled into QEMU, only the constructor net_init_vhost_user is unreachable. Also, net/vhost-user.c needs functions declared in hw/virtio/vhost-stub.c even if no virtio device exists.
Break this dependency. First, add a minimal version of net/vhost-user.c, with no functionality and no dependency on vhost code. Second, #ifdef out the calls back to net/vhost-user.c from hw/net/vhost_net.c.
While at it, this patch fixes the CONFIG_VHOST_NET_USE*D* typo.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1543851204-41186-3-git-send-email-pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1550165756-21617-3-git-send-email-pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
4ad6f6cb | 13-Feb-2019 |
Paolo Bonzini <pbonzini@redhat.com> |
char: allow specifying a GMainContext at opening time
This will be needed by vhost-user-test, when each test switches to its own GMainLoop and GMainContext. Otherwise, for a reconnecting socket the
char: allow specifying a GMainContext at opening time
This will be needed by vhost-user-test, when each test switches to its own GMainLoop and GMainContext. Otherwise, for a reconnecting socket the initial connection will happen on the default GMainContext, and no one will be listening on it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20190202110834.24880-1-pbonzini@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|
3e0fad3a | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: pass opaque to all callbacks
This is friendlier for FFI bindings.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> |
deaeb3f7 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: use polling callbacks, drop glib requirement
It would be legitimate to use libslirp without glib. Let's add_poll/get_revents pair of callbacks to provide the same functionality.
Signed-off-b
slirp: use polling callbacks, drop glib requirement
It would be legitimate to use libslirp without glib. Let's add_poll/get_revents pair of callbacks to provide the same functionality.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
1ab67b98 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: replace global polling with per-instance & notifier
Remove hard-coded dependency on slirp in main-loop, and use a "poll" notifier instead. The notifier is registered per slirp instance.
Sign
slirp: replace global polling with per-instance & notifier
Remove hard-coded dependency on slirp in main-loop, and use a "poll" notifier instead. The notifier is registered per slirp instance.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
625a526b | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: improve send_packet() callback
Use a more descriptive name for the callback.
Reuse the SlirpWriteCb type. Wrap it to check that all data has been written.
Return a ssize_t for potential err
slirp: improve send_packet() callback
Use a more descriptive name for the callback.
Reuse the SlirpWriteCb type. Wrap it to check that all data has been written.
Return a ssize_t for potential error handling and data-loss reporting.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
c21d9594 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: replace qemu_notify_event() with a callback
Introduce a SlirpCb callback to kick the main io-thread.
Add an intermediary sodrop() function that will call SlirpCb.notify callback when sbdrop(
slirp: replace qemu_notify_event() with a callback
Introduce a SlirpCb callback to kick the main io-thread.
Add an intermediary sodrop() function that will call SlirpCb.notify callback when sbdrop() returns true.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
f6e5aa36 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: add unregister_poll_fd() callback
Add a counter-part to register_poll_fd() for completeness.
(so far, register_poll_fd() is called only on struct socket fd)
Suggested-by: Paolo Bonzini <pbo
slirp: add unregister_poll_fd() callback
Add a counter-part to register_poll_fd() for completeness.
(so far, register_poll_fd() is called only on struct socket fd)
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
848c7092 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: replace qemu_set_nonblock()
Replace qemu_set_nonblock() with slirp_set_nonblock()
qemu_set_nonblock() does some event registration with the main loop. Add a new callback register_poll_fd() f
slirp: replace qemu_set_nonblock()
Replace qemu_set_nonblock() with slirp_set_nonblock()
qemu_set_nonblock() does some event registration with the main loop. Add a new callback register_poll_fd() for that reason.
Always build the fd-register stub, to avoid #if WIN32.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
show more ...
|
07abf6d4 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: add callbacks for timer
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> |
8e207c32 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
net/slirp: fix leaks on forwarding rule registration error
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> |
8d45a3b9 | 17-Jan-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
net/slirp: free forwarding rules on cleanup
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> |