Hi all: This series tries to do the announcing by guest through virito-net. This is done through inject the notificaiton interrupt to guest several times after migration and then guest driver will send the proper garp packets.
Recent Linux driver has already had this support. Tested with ping to guest with vlan during migration. Without the patch, lots of the packets were lost after migration. With the patch, could not notice packet loss after migration. Reference: V1: https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg02975.html RFC v2: https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg01750.html RFC v1: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg02648.html V7: https://lists.gnu.org/archive/html/qemu-devel/2013-03/msg01127.html Changes from V1: - check the guest feature and schedule the timer immediately on load() - drop the logic form QEMU_CLEAK_REALTIME - use timer_new_ms() instead of timer_new_ns() (which is a bug of V1) - export SELF_ANNOUNCE_ROUNDS - introduce self_announce_delay() - typos Changes from RFC v2: - use QEMU_CLOCK_VIRTUAL instead of QEMU_CLOCK_REALTIME - compat self announce for 2.0 machine type Changes from RFC v1: - clean VIRTIO_NET_S_ANNOUNCE bit during reset - free announce timer during clean - make announce work for non-vhost case Changes from V7: - Instead of introducing a global method for each kind of nic, this version limits the changes to virtio-net itself. Jason Wang (3): migration: export SELF_ANNOUNCE_ROUNDS migration: introduce self_announce_delay() virtio-net: announce self by guest hw/net/virtio-net.c | 42 ++++++++++++++++++++++++++++++++++++++++ include/hw/i386/pc.h | 5 ++++ include/hw/virtio/virtio-net.h | 17 ++++++++++++++++ include/migration/vmstate.h | 10 +++++++++ savevm.c | 3 +- 5 files changed, 75 insertions(+), 2 deletions(-)