From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWybq-00046q-1M for qemu-devel@nongnu.org; Thu, 04 Jan 2018 01:02:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWybp-0004WW-5l for qemu-devel@nongnu.org; Thu, 04 Jan 2018 01:02:34 -0500 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]:39500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWybp-0004Vm-0r for qemu-devel@nongnu.org; Thu, 04 Jan 2018 01:02:33 -0500 Received: by mail-pl0-x243.google.com with SMTP id bi12so512225plb.6 for ; Wed, 03 Jan 2018 22:02:32 -0800 (PST) From: Zhang Chen Date: Thu, 4 Jan 2018 14:01:14 +0800 Message-Id: <1515045675-6993-16-git-send-email-zhangckid@gmail.com> In-Reply-To: <1515045675-6993-1-git-send-email-zhangckid@gmail.com> References: <1515045675-6993-1-git-send-email-zhangckid@gmail.com> Subject: [Qemu-devel] [PATCH RESEND V3 15/16] COLO: notify net filters about checkpoint/failover event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu devel Cc: zhanghailiang , Jason Wang From: zhanghailiang Notify all net filters about the checkpoint and failover event. Cc: Jason Wang Signed-off-by: zhanghailiang --- migration/colo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index 9eab4a3..10bc80c 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -87,6 +87,11 @@ static void secondary_vm_do_failover(void) if (local_err) { error_report_err(local_err); } + /* Notify all filters of all NIC to do checkpoint */ + colo_notify_filters_event(COLO_EVENT_FAILOVER, &local_err); + if (local_err) { + error_report_err(local_err); + } if (!autostart) { error_report("\"-S\" qemu option will be ignored in secondary side"); @@ -766,6 +771,13 @@ void *colo_process_incoming_thread(void *opaque) goto out; } + /* Notify all filters of all NIC to do checkpoint */ + colo_notify_filters_event(COLO_EVENT_CHECKPOINT, &local_err); + if (local_err) { + qemu_mutex_unlock_iothread(); + goto out; + } + vmstate_loading = false; vm_start(); trace_colo_vm_state_change("stop", "run"); -- 2.7.4