summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDr. David Alan Gilbert2019-02-27 14:24:07 +0100
committerJason Wang2019-03-05 04:27:41 +0100
commit9d8c6a258c70d8ff494489140a4fcb3a965909b2 (patch)
tree6f010782b5b2b58d90aa7111e89e850a4d50a64b /include
parentmigration: Add announce parameters (diff)
downloadqemu-9d8c6a258c70d8ff494489140a4fcb3a965909b2.tar.gz
qemu-9d8c6a258c70d8ff494489140a4fcb3a965909b2.tar.xz
qemu-9d8c6a258c70d8ff494489140a4fcb3a965909b2.zip
virtio-net: Switch to using announce timer
Switch virtio's self announcement to use the AnnounceTimer. It keeps it's own AnnounceTimer (per device), and starts running it using a migration post-load and a virtual clock; that way the announce happens once the guest is actually running. The timer uses the migration parameters to set the timing of the repeats. Based on earlier patches by myself 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>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index a1a0be3bea..b96f0c643f 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -17,6 +17,7 @@
#include "qemu/units.h"
#include "standard-headers/linux/virtio_net.h"
#include "hw/virtio/virtio.h"
+#include "net/announce.h"
#define TYPE_VIRTIO_NET "virtio-net-device"
#define VIRTIO_NET(obj) \
@@ -181,8 +182,7 @@ struct VirtIONet {
char *netclient_name;
char *netclient_type;
uint64_t curr_guest_offloads;
- QEMUTimer *announce_timer;
- int announce_counter;
+ AnnounceTimer announce_timer;
bool needs_vnet_hdr_swap;
bool mtu_bypass_backend;
};