From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDafP-0003oR-00 for qemu-devel@nongnu.org; Wed, 24 May 2017 14:05:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDafL-0001JP-0D for qemu-devel@nongnu.org; Wed, 24 May 2017 14:05:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34800) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDafK-0001JB-NG for qemu-devel@nongnu.org; Wed, 24 May 2017 14:05:46 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 82ECC19C32C for ; Wed, 24 May 2017 18:05:44 +0000 (UTC) From: Vladislav Yasevich Date: Wed, 24 May 2017 14:05:16 -0400 Message-Id: <1495649128-10529-1-git-send-email-vyasevic@redhat.com> Subject: [Qemu-devel] [PATCH 00/12] self-announce updates List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, dgilbert@redhat.com, quintela@redhat.com Cc: germano@redhat.com, lvivier@redhat.com, jasowang@redhat.com, jdenemar@redhat.com, kashyap@redhat.com, armbru@redhat.com, mst@redhat.com, Vladislav Yasevich This work a consolidation of the work by David Gilbert, Germano Veit Michel and myself. It started out with David wanting to parametirize self-announcments so that the user may control how often annoucment packets (RARPs) were generated by Qemu. At about the same time, Germano wanted to expose qemu_announce_self() through a QMP command, to solve the issues of running qemu with a bond device as an uplink in the bridge. In this case, when there was failover event in the bond, we want a way to trigger qemu to announce itslef to make traffic flow to a different port in the bond. As an extension of this work, I propsed a expose annoucement capabilities in devices (like virtio-net) and consolidate the announcemnts. This series is all of the above wraped together with a bunch of modifications. To begin with, I've separated the annocement parameters from migration as they are now not migration specific. I am also providing a way to set and retrieve current annoucemet values (like initial and max timeouts, number of annoucments, etc..) The series converts migration annoucement (including virito-net) to use the new parameters, but allows virtio-net to manage its own timer mainly due to the fact that it's running on a different clock and finding a new place to call qemu_announce_self() didn't yeild good results. We expose qemu-announce-self() through QMP and HMP and add unit tests for all new commands. And finally, this series limites the number of timers that can be created through the new commands, and have the ability to reset currently runing timers. Thanks Vladislav Yasevich (12): migration: Introduce announce parameters migration: Introduce announcement timer migration: Switch to using announcement timer net: Add a network device specific self-announcement ability virtio-net: Allow qemu_announce_self to trigger virtio announcements qmp: Expose qemu_announce_self as a qmp command migration: Allow for a limited number of announce timers announce_timer: Add ability to reset an existing timer hmp: add announce paraters info/set hmp: Add hmp_announce_self tests/test-hmp: Add announce parameter tests tests: Add a test for qemu self announcments hmp-commands-info.hx | 13 +++ hmp-commands.hx | 28 ++++++ hmp.c | 91 +++++++++++++++++++ hmp.h | 5 + hw/net/virtio-net.c | 58 +++++++++--- include/hw/virtio/virtio-net.h | 3 +- include/migration/vmstate.h | 32 +++++-- include/net/net.h | 2 + include/sysemu/sysemu.h | 16 +++- migration/migration.c | 2 +- migration/savevm.c | 201 ++++++++++++++++++++++++++++++++++++++--- monitor.c | 18 ++++ qapi-schema.json | 103 +++++++++++++++++++++ tests/Makefile.include | 2 + tests/test-announce-self.c | 78 ++++++++++++++++ tests/test-hmp.c | 2 + 16 files changed, 617 insertions(+), 37 deletions(-) create mode 100644 tests/test-announce-self.c -- 2.7.4