From nobody Wed May 15 22:56:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559447614; cv=none; d=zoho.com; s=zohoarc; b=hDJyYGzkgbJkB9Tjw8VJ4CdtxFGFfa84qXPKjoOZy6VYjoYFG/g5ABLsPEH6fssMHkKyp85Tnm6mG4LKerkJ6ZUTF9vwaWupvnBwcqjtm5LTEX393frIdazFC+V0GEw7TxHbXfGesJZhiqY6jEztKPGS/nULwLhDsA5wSIyeT5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559447614; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8mI7xHX1tWW399lLiuYebxzGQS3A4NH4O4sTp9ekwSI=; b=cpdItL8pBB6sUQRUKJpvniqLquel56xh0zMViqVwP82v0QLDBVgp+kMXDEzwQqJIoAEehGQc8pkvorzheUCvoK2FGu4ON1YfLNW/M70qPFrqsXLZxIidTzX7U3x3sg9xOjxUy5bD218tjfU3xTzskLDRtC9t6WeeMKyPV4CFjXc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559447614771991.213982921206; Sat, 1 Jun 2019 20:53:34 -0700 (PDT) Received: from localhost ([127.0.0.1]:44515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHYo-0002vh-Q7 for importer@patchew.org; Sat, 01 Jun 2019 23:53:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHSp-0007Dy-MC for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXHSn-00039n-W2 for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:19 -0400 Received: from mga12.intel.com ([192.55.52.136]:51834) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXHSn-00032p-Mo for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:17 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2019 20:47:11 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga005.jf.intel.com with ESMTP; 01 Jun 2019 20:47:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Zhang Chen To: Li Zhijian , "Dr. David Alan Gilbert" , Juan Quintela , zhanghailiang , Jason Wang , qemu-dev Date: Sun, 2 Jun 2019 11:42:34 +0800 Message-Id: <20190602034239.23225-2-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT In-Reply-To: <20190602034239.23225-1-chen.zhang@intel.com> References: <20190602034239.23225-1-chen.zhang@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.136 Subject: [Qemu-devel] [PATCH 1/6] COLO-compare: Add new parameter to communicate with remote colo-frame X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen We add the "notify_dev=3DchardevID" parameter. After that colo-compare can = connect with remote(currently just for Xen, KVM-COLO didn't need it.) colo-frame through= chardev socket, it can notify remote(Xen) colo-frame to handle checkpoint event. Signed-off-by: Zhang Chen --- net/colo-compare.c | 21 +++++++++++++++++++++ qemu-options.hx | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index fcb491121b..21849748b6 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -83,6 +83,7 @@ typedef struct CompareState { char *pri_indev; char *sec_indev; char *outdev; + char *notify_dev; CharBackend chr_pri_in; CharBackend chr_sec_in; CharBackend chr_out; @@ -897,6 +898,21 @@ static void compare_set_vnet_hdr(Object *obj, s->vnet_hdr =3D value; } =20 +static char *compare_get_notify_dev(Object *obj, Error **errp) +{ + CompareState *s =3D COLO_COMPARE(obj); + + return g_strdup(s->notify_dev); +} + +static void compare_set_notify_dev(Object *obj, const char *value, Error *= *errp) +{ + CompareState *s =3D COLO_COMPARE(obj); + + g_free(s->notify_dev); + s->notify_dev =3D g_strdup(value); +} + static void compare_pri_rs_finalize(SocketReadState *pri_rs) { CompareState *s =3D container_of(pri_rs, CompareState, pri_rs); @@ -1057,6 +1073,10 @@ static void colo_compare_init(Object *obj) (Object **)&s->iothread, object_property_allow_set_link, OBJ_PROP_LINK_STRONG, NULL); + /* This parameter just for Xen COLO */ + object_property_add_str(obj, "notify_dev", + compare_get_notify_dev, compare_set_notify_dev, + NULL); =20 s->vnet_hdr =3D false; object_property_add_bool(obj, "vnet_hdr_support", compare_get_vnet_hdr, @@ -1103,6 +1123,7 @@ static void colo_compare_finalize(Object *obj) g_free(s->pri_indev); g_free(s->sec_indev); g_free(s->outdev); + g_free(s->notify_dev); } =20 static const TypeInfo colo_compare_info =3D { diff --git a/qemu-options.hx b/qemu-options.hx index 7ae3373a00..30e1ca754f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4475,7 +4475,7 @@ Dump the network traffic on netdev @var{dev} to the f= ile specified by The file format is libpcap, so it can be analyzed with tools such as tcpdu= mp or Wireshark. =20 -@item -object colo-compare,id=3D@var{id},primary_in=3D@var{chardevid},seco= ndary_in=3D@var{chardevid},outdev=3D@var{chardevid},iothread=3D@var{id}[,vn= et_hdr_support] +@item -object colo-compare,id=3D@var{id},primary_in=3D@var{chardevid},seco= ndary_in=3D@var{chardevid},outdev=3D@var{chardevid},iothread=3D@var{id}[,vn= et_hdr_support][,notify_dev=3D@var{id}] =20 Colo-compare gets packet from primary_in@var{chardevid} and secondary_in@v= ar{chardevid}, than compare primary packet with secondary packet. If the packets are same, we will output primary @@ -4484,11 +4484,15 @@ do checkpoint and send primary packet to outdev@var= {chardevid}. In order to improve efficiency, we need to put the task of comparison in another thread. If it has the vnet_hdr_support flag, colo compare will send/recv packet with vnet_hdr_len. +If you want to use Xen COLO, will need the notify_dev to notify Xen +colo-frame to do checkpoint. =20 we must use it with the help of filter-mirror and filter-redirector. =20 @example =20 +KVM COLO + primary: -netdev tap,id=3Dhn0,vhost=3Doff,script=3D/etc/qemu-ifup,downscript=3D/etc= /qemu-ifdown -device e1000,id=3De0,netdev=3Dhn0,mac=3D52:a4:00:12:78:66 @@ -4512,6 +4516,33 @@ secondary: -object filter-redirector,id=3Df1,netdev=3Dhn0,queue=3Dtx,indev=3Dred0 -object filter-redirector,id=3Df2,netdev=3Dhn0,queue=3Drx,outdev=3Dred1 =20 + +Xen COLO + +primary: +-netdev tap,id=3Dhn0,vhost=3Doff,script=3D/etc/qemu-ifup,downscript=3D/etc= /qemu-ifdown +-device e1000,id=3De0,netdev=3Dhn0,mac=3D52:a4:00:12:78:66 +-chardev socket,id=3Dmirror0,host=3D3.3.3.3,port=3D9003,server,nowait +-chardev socket,id=3Dcompare1,host=3D3.3.3.3,port=3D9004,server,nowait +-chardev socket,id=3Dcompare0,host=3D3.3.3.3,port=3D9001,server,nowait +-chardev socket,id=3Dcompare0-0,host=3D3.3.3.3,port=3D9001 +-chardev socket,id=3Dcompare_out,host=3D3.3.3.3,port=3D9005,server,nowait +-chardev socket,id=3Dcompare_out0,host=3D3.3.3.3,port=3D9005 +-chardev socket,id=3Dnotify_way,host=3D3.3.3.3,port=3D9009,server,nowait +-object filter-mirror,id=3Dm0,netdev=3Dhn0,queue=3Dtx,outdev=3Dmirror0 +-object filter-redirector,netdev=3Dhn0,id=3Dredire0,queue=3Drx,indev=3Dcom= pare_out +-object filter-redirector,netdev=3Dhn0,id=3Dredire1,queue=3Drx,outdev=3Dco= mpare0 +-object iothread,id=3Diothread1 +-object colo-compare,id=3Dcomp0,primary_in=3Dcompare0-0,secondary_in=3Dcom= pare1,outdev=3Dcompare_out0,notify_dev=3Dnofity_way,iothread=3Diothread1 + +secondary: +-netdev tap,id=3Dhn0,vhost=3Doff,script=3D/etc/qemu-ifup,down script=3D/et= c/qemu-ifdown +-device e1000,netdev=3Dhn0,mac=3D52:a4:00:12:78:66 +-chardev socket,id=3Dred0,host=3D3.3.3.3,port=3D9003 +-chardev socket,id=3Dred1,host=3D3.3.3.3,port=3D9004 +-object filter-redirector,id=3Df1,netdev=3Dhn0,queue=3Dtx,indev=3Dred0 +-object filter-redirector,id=3Df2,netdev=3Dhn0,queue=3Drx,outdev=3Dred1 + @end example =20 If you want to know the detail of above command line, you can read --=20 2.17.GIT From nobody Wed May 15 22:56:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559447344; cv=none; d=zoho.com; s=zohoarc; b=cmnfcvwATKiYAsJLRQd5iluMnyEQEkfRh+ay2tGcN/A6xAVyxdTpjshQA771ptCUAdjJN7lr0Oo8wgSJ7VBJkuF/vguqT9Saw5QInL1Kni6AAfiI9PPGENRoAVOopTCXgrANVLcqkwUjeRRiqagu8O102lbnxHJPWqaii2z2glE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559447344; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=nilCCOfsnP5plPeey0VJxJ3cZdn47B8jMAICQX7U8XI=; b=icEGlzKeJGZhi31Zd1PfYBdcWo7jnRiS0El7gmmPppVFxS/0gV1pJUGwRIgLVRkIpg+8i+yVDHhnIz8S7qwRywiLNVsdt99ndsr1yRZnxg0n/LIJp0O4xrz4pL6hzM0WIiKxrKe9ius3xwT0i29k4i93KbRQ644QnEDhHqXAycw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559447344184256.97071986731567; Sat, 1 Jun 2019 20:49:04 -0700 (PDT) Received: from localhost ([127.0.0.1]:44454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHUS-000865-6S for importer@patchew.org; Sat, 01 Jun 2019 23:49:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHSp-0007Dw-3g for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXHSn-00039f-R5 for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:19 -0400 Received: from mga12.intel.com ([192.55.52.136]:51836) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXHSn-00035L-I5 for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:17 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2019 20:47:13 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga005.jf.intel.com with ESMTP; 01 Jun 2019 20:47:11 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Zhang Chen To: Li Zhijian , "Dr. David Alan Gilbert" , Juan Quintela , zhanghailiang , Jason Wang , qemu-dev Date: Sun, 2 Jun 2019 11:42:35 +0800 Message-Id: <20190602034239.23225-3-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT In-Reply-To: <20190602034239.23225-1-chen.zhang@intel.com> References: <20190602034239.23225-1-chen.zhang@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.136 Subject: [Qemu-devel] [PATCH 2/6] COLO-compare: Add remote notification chardev handler frame X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen Add chardev handler to send notification to remote(current from Xen) colo-f= rame. Signed-off-by: Zhang Chen --- net/colo-compare.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index 21849748b6..8b7bd9f0c7 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -87,8 +87,10 @@ typedef struct CompareState { CharBackend chr_pri_in; CharBackend chr_sec_in; CharBackend chr_out; + CharBackend chr_notify_dev; SocketReadState pri_rs; SocketReadState sec_rs; + SocketReadState notify_rs; bool vnet_hdr; =20 /* @@ -745,6 +747,19 @@ static void compare_sec_chr_in(void *opaque, const uin= t8_t *buf, int size) } } =20 +static void compare_notify_chr(void *opaque, const uint8_t *buf, int size) +{ + CompareState *s =3D COLO_COMPARE(opaque); + int ret; + + ret =3D net_fill_rstate(&s->notify_rs, buf, size); + if (ret =3D=3D -1) { + qemu_chr_fe_set_handlers(&s->chr_notify_dev, NULL, NULL, NULL, NUL= L, + NULL, NULL, true); + error_report("colo-compare notify_dev error"); + } +} + /* * Check old packet regularly so it can watch for any packets * that the secondary hasn't produced equivalents of. @@ -832,6 +847,11 @@ static void colo_compare_iothread(CompareState *s) qemu_chr_fe_set_handlers(&s->chr_sec_in, compare_chr_can_read, compare_sec_chr_in, NULL, NULL, s, s->worker_context, true); + if (s->notify_dev) { + qemu_chr_fe_set_handlers(&s->chr_notify_dev, compare_chr_can_read, + compare_notify_chr, NULL, NULL, + s, s->worker_context, true); + } =20 colo_compare_timer_init(s); s->event_bh =3D qemu_bh_new(colo_compare_handle_event, s); @@ -943,6 +963,10 @@ static void compare_sec_rs_finalize(SocketReadState *s= ec_rs) } } =20 +static void compare_notify_rs_finalize(SocketReadState *notify_rs) +{ + /* Get Xen colo-frame's notify and handle the message */ +} =20 /* * Return 0 is success. @@ -1013,6 +1037,17 @@ static void colo_compare_complete(UserCreatable *uc,= Error **errp) net_socket_rs_init(&s->pri_rs, compare_pri_rs_finalize, s->vnet_hdr); net_socket_rs_init(&s->sec_rs, compare_sec_rs_finalize, s->vnet_hdr); =20 + /* Try to enable remote notify chardev, currently just for Xen COLO */ + if (s->notify_dev) { + if (find_and_check_chardev(&chr, s->notify_dev, errp) || + !qemu_chr_fe_init(&s->chr_notify_dev, chr, errp)) { + return; + } + + net_socket_rs_init(&s->notify_rs, compare_notify_rs_finalize, + s->vnet_hdr); + } + QTAILQ_INSERT_TAIL(&net_compares, s, next); =20 g_queue_init(&s->conn_list); @@ -1091,6 +1126,10 @@ static void colo_compare_finalize(Object *obj) qemu_chr_fe_deinit(&s->chr_pri_in, false); qemu_chr_fe_deinit(&s->chr_sec_in, false); qemu_chr_fe_deinit(&s->chr_out, false); + if (s->notify_dev) { + qemu_chr_fe_deinit(&s->chr_notify_dev, false); + } + if (s->iothread) { colo_compare_timer_del(s); } --=20 2.17.GIT From nobody Wed May 15 22:56:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559447580; cv=none; d=zoho.com; s=zohoarc; b=ocb4o/amLae4qyNLDOlIxDpmt3XcAzksrpA5G1Vw61CrS/c+dxgWJVdhjFtOEbtoB7EO4Ff2msaMaWE5tmuBruWCMUot3Mw2BVMu6gzU5Wl+H6wKdAbHLrTA4ABQ9vokqhd4kyzEmx9rxHRoE3qRfBmrxdHal3vAas9cjVrOn1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559447580; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=1bDt4xHyyB2I2djaufhx4zFHTnDlalRNxuTu21ili64=; b=bOWiRJ5RYldAJ5qPKYTm8FIXYs0LbuvNymMrVjoZ0rpn3oZklP0+7HYBmelbAqZD0ii5wYouMtiqbzbl20ianNs0WDqAUdRQlNA+30aVWCeycshP2dB/+ZMd3FyAsYGmeymfe0ZXtD4UI0Oy3VOExE8rwGLZBU8sy508Ofru8d4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559447580132713.686743306138; Sat, 1 Jun 2019 20:53:00 -0700 (PDT) Received: from localhost ([127.0.0.1]:44509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHXg-0002LH-0s for importer@patchew.org; Sat, 01 Jun 2019 23:52:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHSp-0007Dz-OL for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXHSo-0003AG-Bi for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:19 -0400 Received: from mga12.intel.com ([192.55.52.136]:51833) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXHSo-00030z-1H for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:18 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2019 20:47:15 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga005.jf.intel.com with ESMTP; 01 Jun 2019 20:47:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Zhang Chen To: Li Zhijian , "Dr. David Alan Gilbert" , Juan Quintela , zhanghailiang , Jason Wang , qemu-dev Date: Sun, 2 Jun 2019 11:42:36 +0800 Message-Id: <20190602034239.23225-4-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT In-Reply-To: <20190602034239.23225-1-chen.zhang@intel.com> References: <20190602034239.23225-1-chen.zhang@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.136 Subject: [Qemu-devel] [PATCH 3/6] COLO-compare: Make the compare_chr_send() can send notification message. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen We need use this function to send notification message for remote colo-fram= e(Xen). So we add new parameter for this job. Signed-off-by: Zhang Chen --- net/colo-compare.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 8b7bd9f0c7..16285f4a96 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -129,7 +129,8 @@ static void colo_compare_inconsistency_notify(void) static int compare_chr_send(CompareState *s, const uint8_t *buf, uint32_t size, - uint32_t vnet_hdr_len); + uint32_t vnet_hdr_len, + bool notify_remote_frame); =20 static gint seq_sorter(Packet *a, Packet *b, gpointer data) { @@ -241,7 +242,8 @@ static void colo_release_primary_pkt(CompareState *s, P= acket *pkt) ret =3D compare_chr_send(s, pkt->data, pkt->size, - pkt->vnet_hdr_len); + pkt->vnet_hdr_len, + false); if (ret < 0) { error_report("colo send primary packet failed"); } @@ -671,7 +673,8 @@ static void colo_compare_connection(void *opaque, void = *user_data) static int compare_chr_send(CompareState *s, const uint8_t *buf, uint32_t size, - uint32_t vnet_hdr_len) + uint32_t vnet_hdr_len, + bool notify_remote_frame) { int ret =3D 0; uint32_t len =3D htonl(size); @@ -680,7 +683,14 @@ static int compare_chr_send(CompareState *s, return 0; } =20 - ret =3D qemu_chr_fe_write_all(&s->chr_out, (uint8_t *)&len, sizeof(len= )); + if (notify_remote_frame) { + ret =3D qemu_chr_fe_write_all(&s->chr_notify_dev, + (uint8_t *)&len, + sizeof(len)); + } else { + ret =3D qemu_chr_fe_write_all(&s->chr_out, (uint8_t *)&len, sizeof= (len)); + } + if (ret !=3D sizeof(len)) { goto err; } @@ -691,13 +701,26 @@ static int compare_chr_send(CompareState *s, * know how to parse net packet correctly. */ len =3D htonl(vnet_hdr_len); - ret =3D qemu_chr_fe_write_all(&s->chr_out, (uint8_t *)&len, sizeof= (len)); + + if (!notify_remote_frame) { + ret =3D qemu_chr_fe_write_all(&s->chr_out, + (uint8_t *)&len, + sizeof(len)); + } + if (ret !=3D sizeof(len)) { goto err; } } =20 - ret =3D qemu_chr_fe_write_all(&s->chr_out, (uint8_t *)buf, size); + if (notify_remote_frame) { + ret =3D qemu_chr_fe_write_all(&s->chr_notify_dev, + (uint8_t *)buf, + size); + } else { + ret =3D qemu_chr_fe_write_all(&s->chr_out, (uint8_t *)buf, size); + } + if (ret !=3D size) { goto err; } @@ -943,7 +966,8 @@ static void compare_pri_rs_finalize(SocketReadState *pr= i_rs) compare_chr_send(s, pri_rs->buf, pri_rs->packet_len, - pri_rs->vnet_hdr_len); + pri_rs->vnet_hdr_len, + false); } else { /* compare packet in the specified connection */ colo_compare_connection(conn, s); @@ -1075,7 +1099,8 @@ static void colo_flush_packets(void *opaque, void *us= er_data) compare_chr_send(s, pkt->data, pkt->size, - pkt->vnet_hdr_len); + pkt->vnet_hdr_len, + false); packet_destroy(pkt, NULL); } while (!g_queue_is_empty(&conn->secondary_list)) { --=20 2.17.GIT From nobody Wed May 15 22:56:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559447462; cv=none; d=zoho.com; s=zohoarc; b=KgBe3+lUwo3EKmXqnTDxnRJ4QqrEqA/BPRsrSXGvoTcY27PeYr74Tc6aPr/oGzbXc0pC+x11BqcCaapW0qfME2tn8TZwew5IFh/m31Qaid1QT82YZ/14pabqZOyo9GRuy2uJ+JnlxrMIOhDAixT27Y7Nv2FUdIX8NO6Z10eeeoU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559447462; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=hV2NDytBHDZVODm0n3fB5UhOJ7dL+fl042hW05wb0DE=; b=TY7UZsNONLPwrSWkgI3VvkQNRJyXJd+TCW3ocJ8LaiTWypUoLmLHmLy3WbO6tzE7xBcSUoHRJmpPkQixtMk4oyBzgXMkVktiUpF8G5M5KZ5MM+LkaPWcj5Jq3YtNdQyAa4m9jNNttmNoB4enzXcsRCPmxnzWrjul27ZqR7VFhz8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559447462951654.1876589891871; Sat, 1 Jun 2019 20:51:02 -0700 (PDT) Received: from localhost ([127.0.0.1]:44499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHWK-0001D0-W8 for importer@patchew.org; Sat, 01 Jun 2019 23:50:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHSp-0007Dx-MF for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXHSo-0003A2-7b for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:19 -0400 Received: from mga12.intel.com ([192.55.52.136]:51836) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXHSo-00035L-1x for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:18 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2019 20:47:17 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga005.jf.intel.com with ESMTP; 01 Jun 2019 20:47:15 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Zhang Chen To: Li Zhijian , "Dr. David Alan Gilbert" , Juan Quintela , zhanghailiang , Jason Wang , qemu-dev Date: Sun, 2 Jun 2019 11:42:37 +0800 Message-Id: <20190602034239.23225-5-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT In-Reply-To: <20190602034239.23225-1-chen.zhang@intel.com> References: <20190602034239.23225-1-chen.zhang@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.136 Subject: [Qemu-devel] [PATCH 4/6] COLO-compare: Add colo-compare remote notify support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen This patch make colo-compare can send message to remote COLO frame(Xen) whe= n occur checkpoint. Signed-off-by: Zhang Chen --- net/colo-compare.c | 51 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 16285f4a96..19075c7a66 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -251,6 +251,17 @@ static void colo_release_primary_pkt(CompareState *s, = Packet *pkt) packet_destroy(pkt, NULL); } =20 +static void notify_remote_frame(CompareState *s) +{ + char msg[] =3D "DO_CHECKPOINT"; + int ret =3D 0; + + ret =3D compare_chr_send(s, (uint8_t *)msg, strlen(msg), 0, true); + if (ret < 0) { + error_report("Notify Xen COLO-frame failed"); + } +} + /* * The IP packets sent by primary and secondary * will be compared in here @@ -435,7 +446,11 @@ sec: qemu_hexdump((char *)spkt->data, stderr, "colo-compare spkt", spkt->size); =20 - colo_compare_inconsistency_notify(); + if (s->notify_dev) { + notify_remote_frame(s); + } else { + colo_compare_inconsistency_notify(); + } } } =20 @@ -577,7 +592,7 @@ void colo_compare_unregister_notifier(Notifier *notify) } =20 static int colo_old_packet_check_one_conn(Connection *conn, - void *user_data) + CompareState *s) { GList *result =3D NULL; int64_t check_time =3D REGULAR_PACKET_CHECK_MS; @@ -588,7 +603,11 @@ static int colo_old_packet_check_one_conn(Connection *= conn, =20 if (result) { /* Do checkpoint will flush old packet */ - colo_compare_inconsistency_notify(); + if (s->notify_dev) { + notify_remote_frame(s); + } else { + colo_compare_inconsistency_notify(); + } return 0; } =20 @@ -608,7 +627,7 @@ static void colo_old_packet_check(void *opaque) * If we find one old packet, stop finding job and notify * COLO frame do checkpoint. */ - g_queue_find_custom(&s->conn_list, NULL, + g_queue_find_custom(&s->conn_list, s, (GCompareFunc)colo_old_packet_check_one_conn); } =20 @@ -637,7 +656,12 @@ static void colo_compare_packet(CompareState *s, Conne= ction *conn, */ trace_colo_compare_main("packet different"); g_queue_push_head(&conn->primary_list, pkt); - colo_compare_inconsistency_notify(); + + if (s->notify_dev) { + notify_remote_frame(s); + } else { + colo_compare_inconsistency_notify(); + } break; } } @@ -989,7 +1013,24 @@ static void compare_sec_rs_finalize(SocketReadState *= sec_rs) =20 static void compare_notify_rs_finalize(SocketReadState *notify_rs) { + CompareState *s =3D container_of(notify_rs, CompareState, notify_rs); + /* Get Xen colo-frame's notify and handle the message */ + char *data =3D g_memdup(notify_rs->buf, notify_rs->packet_len); + char msg[] =3D "COLO_COMPARE_GET_XEN_INIT"; + int ret; + + if (!strcmp(data, "COLO_USERSPACE_PROXY_INIT")) { + ret =3D compare_chr_send(s, (uint8_t *)msg, strlen(msg), 0, true); + if (ret < 0) { + error_report("Notify Xen COLO-frame INIT failed"); + } + } + + if (!strcmp(data, "COLO_CHECKPOINT")) { + /* colo-compare do checkpoint, flush pri packet and remove sec pac= ket */ + g_queue_foreach(&s->conn_list, colo_flush_packets, s); + } } =20 /* --=20 2.17.GIT From nobody Wed May 15 22:56:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559447460; cv=none; d=zoho.com; s=zohoarc; b=KY9VZ/DpnMoaLZLK99u0GIcUW3H7WrNtgSnVC31JekEMfXnceb+l637P7j17VK+d6+DlgoAO3DtW7Mx34BG0pGx7tLqeYJ4bBuSTz/HngBrNmMmGUGpKYFUmFncvh0rCiIVKffx2cvTA4etIa9aUeR8ZIiigAo61w09YoEZC6r8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559447460; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=GOu7jjlGkqpFsWISWhzS/lthlQ6jbhPtCPRbxqZJIaQ=; b=UEaIqN9/vY545mqFCAdfPPm5ZCC3pKsv124VimWOpd3joI8kD6SYw2Vmp4Na9TUZdpPvRdt2qZ0rTx+Dp+jbssTc6QcMoq4nJihxhlYSTSaNn6QrG9K9FQN8fnIsMz4YTRc7e1uR7ZU0iU9Y3HePmocAAKX1hyNuieipW1/1EFc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559447460644248.41475231362847; Sat, 1 Jun 2019 20:51:00 -0700 (PDT) Received: from localhost ([127.0.0.1]:44501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHWL-0001DO-Mb for importer@patchew.org; Sat, 01 Jun 2019 23:50:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHSr-0007EC-1I for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXHSq-0003Cu-0F for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:20 -0400 Received: from mga12.intel.com ([192.55.52.136]:51833) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXHSp-00030z-Ns for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:19 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2019 20:47:19 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga005.jf.intel.com with ESMTP; 01 Jun 2019 20:47:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Zhang Chen To: Li Zhijian , "Dr. David Alan Gilbert" , Juan Quintela , zhanghailiang , Jason Wang , qemu-dev Date: Sun, 2 Jun 2019 11:42:38 +0800 Message-Id: <20190602034239.23225-6-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT In-Reply-To: <20190602034239.23225-1-chen.zhang@intel.com> References: <20190602034239.23225-1-chen.zhang@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.136 Subject: [Qemu-devel] [PATCH 5/6] COLO-compare: Rename the colo_compare_inconsistency_notify X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen We have add the notify_remote_frame function for Xen, so we rename the colo_compare_inconsistency_notify to notify_native_frame(KVM-qemu COLO frame) looks better. Signed-off-by: Zhang Chen --- net/colo-compare.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 19075c7a66..101c1f477e 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -120,7 +120,7 @@ enum { SECONDARY_IN, }; =20 -static void colo_compare_inconsistency_notify(void) +static void notify_native_frame(void) { notifier_list_notify(&colo_compare_notifiers, migrate_get_current()); @@ -449,7 +449,7 @@ sec: if (s->notify_dev) { notify_remote_frame(s); } else { - colo_compare_inconsistency_notify(); + notify_native_frame(); } } } @@ -606,7 +606,7 @@ static int colo_old_packet_check_one_conn(Connection *c= onn, if (s->notify_dev) { notify_remote_frame(s); } else { - colo_compare_inconsistency_notify(); + notify_native_frame(); } return 0; } @@ -660,7 +660,7 @@ static void colo_compare_packet(CompareState *s, Connec= tion *conn, if (s->notify_dev) { notify_remote_frame(s); } else { - colo_compare_inconsistency_notify(); + notify_native_frame(); } break; } --=20 2.17.GIT From nobody Wed May 15 22:56:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559447346; cv=none; d=zoho.com; s=zohoarc; b=ZAnhDScEsprRwPlXGi1PeOH43nKr6kkEx908DNQXvHeCxR6Y7Dlk2CUMEmbWHKKQ0f5lK/1rcFOih/8rhlV1KpmKma7Ml+UV/G1o1vOp5Z/VbD+nFFKHsWtRHiP8uGBggUTEHC6fiT0OxGg/mBQQjNQutVfVj7Ly9D5MoFn+V+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559447346; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=IRuV4yYGISsrLG92vPUjaMvrQiMFHpKfueZknO1gHiU=; b=IbTaAXLo03Bbti6S+y2BFegBkVaMYgbaM/Gl/hm4Plp6GW8SfBZppwup54fT40qAWrNmZ+TdYfJED2tgK0jLnr0ecoz4Pu1ZGMltbFWeXprHOK02Aegcwb8as1Ejj1p8Gz79PWUHlabtSCGhJY/ASNSLt91DvvluifobvY0phFM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559447346159881.9952553815504; Sat, 1 Jun 2019 20:49:06 -0700 (PDT) Received: from localhost ([127.0.0.1]:44456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHUW-00089e-6M for importer@patchew.org; Sat, 01 Jun 2019 23:49:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXHSs-0007Gf-QT for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXHSr-0003FJ-RF for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:22 -0400 Received: from mga12.intel.com ([192.55.52.136]:51833) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXHSr-00030z-Ji for qemu-devel@nongnu.org; Sat, 01 Jun 2019 23:47:21 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2019 20:47:21 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga005.jf.intel.com with ESMTP; 01 Jun 2019 20:47:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Zhang Chen To: Li Zhijian , "Dr. David Alan Gilbert" , Juan Quintela , zhanghailiang , Jason Wang , qemu-dev Date: Sun, 2 Jun 2019 11:42:39 +0800 Message-Id: <20190602034239.23225-7-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT In-Reply-To: <20190602034239.23225-1-chen.zhang@intel.com> References: <20190602034239.23225-1-chen.zhang@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.136 Subject: [Qemu-devel] [PATCH 6/6] migration/colo.c: Add missed filter notify for Xen COLO. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen We need to notify net filter to do checkpoint for Xen COLO, like KVM side. Signed-off-by: Zhang Chen --- migration/colo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index 8c1644091f..9f84b1fa3c 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -259,6 +259,8 @@ ReplicationStatus *qmp_query_xen_replication_status(Err= or **errp) void qmp_xen_colo_do_checkpoint(Error **errp) { replication_do_checkpoint_all(errp); + /* Notify all filters of all NIC to do checkpoint */ + colo_notify_filters_event(COLO_EVENT_CHECKPOINT, errp); } #endif =20 --=20 2.17.GIT