[Qemu-devel] [PATCH for-2.9 V2 1/3] Migration: Don't load vmdesc when xen is enabled

2016-12-08 Thread Zhang Chen
Xen doesn't need this. Signed-off-by: Zhang Chen --- migration/savevm.c | 4 1 file changed, 4 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index 0363372..bec6c7e 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1973,6 +1973,10 @@ int qemu_loadvm_

[Qemu-devel] [PATCH for-2.9 V2 3/3] Add a new qmp command to do checkpoint, get replication error

2016-12-08 Thread Zhang Chen
We can call this qmp command to do checkpoint outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen --- docs/qmp-commands.txt | 24 migration/colo.c | 10 ++ qapi-schema.json | 22 ++ 3 files changed, 56

Re: [Qemu-devel] [PATCH for-2.8] net: fix sending of data with -net socket, listen backend

2016-11-06 Thread Zhang Chen
On 11/04/2016 11:46 PM, Daniel P. Berrange wrote: The use of -net socket,listen was broken in the following commit commit 16a3df403b10c4ac347159e39005fd520b2648bb Author: Zhang Chen Date: Fri May 13 15:35:19 2016 +0800 net/net: Add SocketReadState for reuse codes This

Re: [Qemu-devel] [PATCH] docs: fix COLO architecture diagram

2016-11-08 Thread Zhang Chen
Does anyone have any comments? Ping Thanks Zhang Chen On 11/01/2016 03:06 PM, Zhang Chen wrote: On 11/01/2016 02:25 PM, Hailiang Zhang wrote: Hmm, there are other contents in this file need to be updated, for example, we support blockdev-add command for nbd now, so we can convert

Re: [Qemu-devel] [PULL V2 0/3] Net patches

2016-11-13 Thread Zhang Chen
Hi~ Jason~ Can you pick up this patch? [PATCH] docs: fix COLO architecture diagram Thanks Zhang Chen On 11/14/2016 10:54 AM, Jason Wang wrote: The following changes since commit 83c83f9a5266ff113060f887f106a47920fa6974: Merge remote-tracking branch 'bonzini/tags/for-upstream&

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] qapi-schema: clarify 'colo' state for MigrationStatus

2016-11-15 Thread Zhang Chen
. If it is needed, I can also send a pull request through my trivial-patches branch. Laurent The pull request for this patch has been sent by Jason. Thanks for your attention, and thank Stefan. Zhang Chen -- Thanks zhangchen

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] qapi-schema: clarify 'colo' state for MigrationStatus

2016-11-15 Thread Zhang Chen
On 11/15/2016 05:03 PM, Hailiang Zhang wrote: On 2016/11/15 16:58, Zhang Chen wrote: On 11/15/2016 04:44 PM, Laurent Vivier wrote: Le 14/11/2016 à 14:54, Stefan Hajnoczi a écrit : On Mon, Nov 14, 2016 at 10:36:45AM +0800, Hailiang Zhang wrote: ping ? Anyone pick this up? The original

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-21 Thread Zhang Chen
On 02/22/2017 12:20 AM, Eric Blake wrote: On 02/21/2017 08:07 AM, Markus Armbruster wrote: Zhang Chen writes: On 02/21/2017 07:15 PM, Markus Armbruster wrote: Zhang Chen writes: We can call this qmp command to do checkpoint outside of qemu. Xen colo will need this function. I know

Re: [Qemu-devel] [PATCH v2 1/3] net/colo: fix memory double free error

2017-02-22 Thread Zhang Chen
liang Reviewed-by: Zhang Chen --- net/colo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/colo.c b/net/colo.c index 6a6eacd..8cc166b 100644 --- a/net/colo.c +++ b/net/colo.c @@ -147,9 +147,9 @@ void connection_destroy(void *opaque) Conne

Re: [Qemu-devel] [PATCH 02/15] colo-compare: implement the process of checkpoint

2017-02-22 Thread Zhang Chen
will have two notify mechanism. What do you think about this? Thanks Zhang Chen Cc: Jason Wang Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen --- net/colo-compare.c | 72 ++ net/colo-compare.h | 20 +++ 2 files change

Re: [Qemu-devel] [PATCH 02/15] colo-compare: implement the process of checkpoint

2017-02-22 Thread Zhang Chen
On 02/23/2017 09:02 AM, Hailiang Zhang wrote: Hi, On 2017/2/22 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM, zhanghailiang wrote: While do checkpoint, we need to flush all the unhandled packets, By using the filter notifier mechanism, we can easily to notify every compare object to do

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-22 Thread Zhang Chen
On 02/22/2017 11:23 PM, Eric Blake wrote: On 02/22/2017 01:54 AM, Zhang Chen wrote: if (err) { result->status = REPLICATION_STATUS_ERROR; result->has_desc = true; result->desc = ...extract string from err } else { result->status = REPLICATION_STATUS_NORMAL; }

[Qemu-devel] [PATCH V8 1/2] Add a new qmp command to start/stop replication

2017-02-22 Thread Zhang Chen
We can call this qmp command to start/stop replication outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini Reviewed-by: zhanghailiang --- migration/colo.c | 23

[Qemu-devel] [PATCH V8 0/2] Add new qmp commands to suppurt Xen COLO

2017-02-22 Thread Zhang Chen
a0ddc0b359375b2418213966dfbdbfab593ecc6f tools/libxl: introduction of libxl__qmp_restore to load qemu state note: V8 address Zhanghailiang, Eric Blake and Markus Armbruster's comments. Zhang Chen (2): Add a new qmp command to start/stop replication Add a new qmp command to do checkpoint, quer

[Qemu-devel] [PATCH V8 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-22 Thread Zhang Chen
We can call this qmp command to do checkpoint outside of qemu. Xen colo will need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake --- migration/colo.c | 23 +++ qapi-schema.json | 48

Re: [Qemu-devel] [PATCH V8 1/2] Add a new qmp command to start/stop replication

2017-02-23 Thread Zhang Chen
On 02/23/2017 11:31 PM, Eric Blake wrote: On 02/23/2017 01:14 AM, Zhang Chen wrote: We can call this qmp command to start/stop replication outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake Reviewed-by: Stefano

Re: [Qemu-devel] [PATCH V8 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-23 Thread Zhang Chen
On 02/23/2017 11:34 PM, Eric Blake wrote: On 02/23/2017 01:14 AM, Zhang Chen wrote: We can call this qmp command to do checkpoint outside of qemu. Xen colo will need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake You made a substantial change

[Qemu-devel] [PATCH V9 1/2] Add a new qmp command to start/stop replication

2017-02-23 Thread Zhang Chen
We can call this qmp command to start/stop replication outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini Reviewed-by: zhanghailiang --- migration/colo.c | 26

[Qemu-devel] [PATCH V9 0/2] Add new qmp commands to suppurt Xen COLO

2017-02-23 Thread Zhang Chen
a0ddc0b359375b2418213966dfbdbfab593ecc6f tools/libxl: introduction of libxl__qmp_restore to load qemu state Zhang Chen (2): Add a new qmp command to start/stop replication Add a new qmp command to do checkpoint, query xen replication status migration/colo.c | 49

[Qemu-devel] [PATCH V9 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-23 Thread Zhang Chen
We can call this qmp command to do checkpoint outside of qemu. Xen colo will need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- migration/colo.c | 23 +++ qapi-schema.json | 49 + 2 files changed, 72

Re: [Qemu-devel] [PATCH v2 3/3] filter-rewriter: skip net_checksum_calculate() while offset = 0

2017-02-24 Thread Zhang Chen
nl(ntohl(tcp_pkt->th_seq) - conn->offset); +/* Only need to adjust seq while offset is Non-zero */ +if (conn->offset) { Refer to the above comments. Thanks Zhang Chen +/* handle packets to the primary from the secondary*/ +tcp_pkt->th_seq

Re: [Qemu-devel] [PATCH v2 3/3] filter-rewriter: skip net_checksum_calculate() while offset = 0

2017-02-24 Thread Zhang Chen
On 02/24/2017 04:08 PM, Zhang Chen wrote: On 02/22/2017 11:46 AM, zhanghailiang wrote: While the offset of packets's sequence for primary side and secondary side is zero, it is unnecessary to call net_checksum_calculate() to recalculate the checksume value of packets. Signed-o

Re: [Qemu-devel] [PATCH V9 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-24 Thread Zhang Chen
On 02/25/2017 01:27 AM, Eric Blake wrote: On 02/24/2017 01:22 AM, Zhang Chen wrote: We can call this qmp command to do checkpoint outside of qemu. Xen colo will need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- migration/colo.c | 23

Re: [Qemu-devel] [PATCH V9 0/2] Add new qmp commands to suppurt Xen COLO

2017-02-24 Thread Zhang Chen
On 02/25/2017 01:24 AM, Eric Blake wrote: On 02/24/2017 01:22 AM, Zhang Chen wrote: Xen COLO depend on qemu COLO replication function. So, We need new qmp commands for Xen to use qemu replication. Corresponding libxl patches already in xen.git. Commit ID

[Qemu-devel] [PATCH V10 0/2] Add new qmp commands to suppurt Xen COLO

2017-02-24 Thread Zhang Chen
a0ddc0b359375b2418213966dfbdbfab593ecc6f tools/libxl: introduction of libxl__qmp_restore to load qemu state V10: - Fix ReplicationStatus error comments. - Fix query-xen-replication-status example. Zhang Chen (2): Add a new qmp command to start/stop replication Add a new qmp command to do checkpoint

[Qemu-devel] [PATCH V10 1/2] Add a new qmp command to start/stop replication

2017-02-24 Thread Zhang Chen
We can call this qmp command to start/stop replication outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini Reviewed-by: zhanghailiang --- migration/colo.c | 26

[Qemu-devel] [PATCH V10 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-24 Thread Zhang Chen
We can call this qmp command to do checkpoint outside of qemu. Xen colo will need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake --- migration/colo.c | 23 +++ qapi-schema.json | 48

[Qemu-devel] [PATCH 0/3] COLO-compare: Optimize the code and fix some bug

2017-02-24 Thread Zhang Chen
This series we will Optimize the code and fix some bug. Patch1: Add packet minimum size check in compare tcp/udp like compare icmp. Patch2: Optimize compare_common and increase compare performance. Patch3: Fix debug info always print bug. V1: - init patch. Zhang Chen (3): COLO-compare: Add

[Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-24 Thread Zhang Chen
Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/net

[Qemu-devel] [PATCH 3/3] COLO-compare: Make qemu_hexdump() print data when trace-event ON

2017-02-24 Thread Zhang Chen
Signed-off-by: Zhang Chen --- net/colo-compare.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 9853232..5ffc4a3 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -288,9 +288,13 @@ static int

[Qemu-devel] [PATCH 1/3] COLO-compare: Add minimum packet size check and some fix

2017-02-24 Thread Zhang Chen
Add packet minimum size check in colo_packet_compare_udp() and colo_packet_compare_udp() like colo_packet_compare_icmp(), rename function colo_packet_compare() to colo_packet_compare_common() that we will reuse it later. Signed-off-by: Zhang Chen --- net/colo-compare.c | 30

[Qemu-devel] [PATCH 1/3] COLO-compare: Add packet size check and some fix

2017-02-24 Thread Zhang Chen
Add packet size check in colo_packet_compare_udp() and colo_packet_compare_udp(), rename function colo_packet_compare() to colo_packet_compare_common() that we will reuse it later. Signed-off-by: Zhang Chen --- net/colo-compare.c | 30 ++ 1 file changed, 22

Re: [Qemu-devel] [PATCH 1/3] COLO-compare: Add packet size check and some fix

2017-02-24 Thread Zhang Chen
Sorry, This patch has been renamed. please ignore this patch. Thanks Zhang Chen On 02/25/2017 11:32 AM, Zhang Chen wrote: Add packet size check in colo_packet_compare_udp() and colo_packet_compare_udp(), rename function colo_packet_compare() to colo_packet_compare_common() that we will

Re: [Qemu-devel] [PATCH v2 3/3] filter-rewriter: skip net_checksum_calculate() while offset = 0

2017-02-26 Thread Zhang Chen
On 02/27/2017 09:36 AM, Hailiang Zhang wrote: On 2017/2/24 16:08, Zhang Chen wrote: On 02/22/2017 11:46 AM, zhanghailiang wrote: While the offset of packets's sequence for primary side and secondary side is zero, it is unnecessary to call net_checksum_calculate() to recalculat

Re: [Qemu-devel] [PATCH 1/3] COLO-compare: Add minimum packet size check and some fix

2017-02-26 Thread Zhang Chen
On 02/25/2017 02:43 PM, Hailiang Zhang wrote: Hi, On 2017/2/25 11:32, Zhang Chen wrote: Add packet minimum size check in colo_packet_compare_udp() and colo_packet_compare_udp() like colo_packet_compare_icmp(), rename function colo_packet_compare() to colo_packet_compare_common() that we will

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-26 Thread Zhang Chen
On 02/25/2017 02:58 PM, Hailiang Zhang wrote: On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-26 Thread Zhang Chen
On 02/25/2017 03:26 PM, Hailiang Zhang wrote: On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-26 Thread Zhang Chen
On 02/27/2017 03:28 PM, Hailiang Zhang wrote: On 2017/2/27 15:03, Zhang Chen wrote: On 02/25/2017 02:58 PM, Hailiang Zhang wrote: On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-27 Thread Zhang Chen
On 02/27/2017 04:43 PM, Hailiang Zhang wrote: On 2017/2/27 15:34, Zhang Chen wrote: On 02/27/2017 03:28 PM, Hailiang Zhang wrote: On 2017/2/27 15:03, Zhang Chen wrote: On 02/25/2017 02:58 PM, Hailiang Zhang wrote: On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for

Re: [Qemu-devel] [PATCH 1/3] COLO-compare: Add packet size check and some fix

2017-02-27 Thread Zhang Chen
On 02/28/2017 11:22 AM, Jason Wang wrote: On 2017年02月25日 11:43, Zhang Chen wrote: Sorry, This patch has been renamed. please ignore this patch. Thanks Zhang Chen Want to repost to just withdraw this series (patch 2 does not apply)? I have repost this patch, and will send V2 about

[Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Zhang Chen
Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly, this function can get better performance. Signed-off-by: Zhang Chen --- net/colo

[Qemu-devel] [PATCH V2 0/3] COLO-compare: Optimize the code and fix some bug

2017-02-27 Thread Zhang Chen
This series we will Optimize the code and fix some bug. Patch1: Rename colo_packet_compare() and remove duplicate check in compare icmp. Patch2: Optimize compare_common and increase compare performance. Patch3: Fix debug info always print bug. Zhang Chen (3): COLO-compare: Rename compare

[Qemu-devel] [PATCH V2 3/3] COLO-compare: Fix icmp and udp compare different packet always dump bug

2017-02-27 Thread Zhang Chen
Signed-off-by: Zhang Chen --- net/colo-compare.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 61fcdf2..6b38723 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -275,9 +275,13 @@ static int

[Qemu-devel] [PATCH V2 1/3] COLO-compare: Rename compare function and remove duplicate codes

2017-02-27 Thread Zhang Chen
Rename colo_packet_compare() to colo_packet_compare_common() that make tcp_compare udp_compare icmp_compare reuse this function. Remove minimum packet size check in icmp_compare, because we have check this in parse_packet_early(). Signed-off-by: Zhang Chen --- net/colo-compare.c | 18

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Zhang Chen
On 02/28/2017 01:47 PM, Jason Wang wrote: On 2017年02月28日 13:18, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly

[Qemu-devel] [PATCH 2/3] COLO-compare: Add Xen notify chardev socket handler frame

2017-02-28 Thread Zhang Chen
Add chardev handler to get Xen colo-frame's notify. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 1 file changed, 28 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index 57d336b..947a9e2 100644 --- a/net/colo-compare.c +++ b/net

[Qemu-devel] [PATCH 3/3] COLO-compare: Add colo-compare Xen notify

2017-02-28 Thread Zhang Chen
This patch have some TODO job. Depend on patch: https://lists.nongnu.org/archive/html/qemu-devel/2017-02/msg05055.html Signed-off-by: Zhang Chen --- net/colo-compare.c | 29 + 1 file changed, 29 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c

[Qemu-devel] [PATCH 0/3] COLO-compare: Make COLO-compare support Xen

2017-02-28 Thread Zhang Chen
://lists.nongnu.org/archive/html/qemu-devel/2017-02/msg05055.html Zhang Chen (3): COLO-compare: Add new parameter for communicate with Xen colo-frame COLO-compare: Add Xen notify chardev socket handler frame COLO-compare: Add colo-compare Xen notify net/colo-compare.c | 77

[Qemu-devel] [PATCH 1/3] COLO-compare: Add new parameter for communicate with Xen colo-frame

2017-02-28 Thread Zhang Chen
We add the "notify_dev=chardevID" parameter. colo-compare can connect with Xen colo-frame through chardev socket.like notify colo-frame do checkpoint events. Signed-off-by: Zhang Chen --- net/colo-compare.c | 20 qemu-options.

[Qemu-devel] [PATCH] net/filter-mirror: Follow CODING_STYLE

2017-03-01 Thread Zhang Chen
Signed-off-by: Zhang Chen --- net/filter-mirror.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index aa0aa98..72fa7c2 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirror.c @@ -49,7 +49,7 @@ static int filter_mirror_send

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-03-02 Thread Zhang Chen
On 03/02/2017 03:51 PM, Jason Wang wrote: On 2017年02月28日 14:11, Zhang Chen wrote: OK, How about this? +/* + * Because of ppkt and spkt are both in the same connection, + * The ppkt's src ip, dst ip, src port, dst port, ip_proto all are + * same with spkt. In additio

[Qemu-devel] [PATCH V3 3/3] COLO-compare: Fix icmp and udp compare different packet always dump bug

2017-03-02 Thread Zhang Chen
Signed-off-by: Zhang Chen --- net/colo-compare.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 9f5968d..282727b 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -279,9 +279,13 @@ static int

[Qemu-devel] [PATCH V3 0/3] COLO-compare: Optimize the code and fix some bug

2017-03-02 Thread Zhang Chen
This series we will Optimize the code and fix some bug. Patch1: Rename colo_packet_compare() and remove duplicate check in compare icmp. Patch2: Optimize compare_common and increase compare performance. Patch3: Fix debug info always print bug. Zhang Chen (3): COLO-compare: Rename compare

[Qemu-devel] [PATCH V3 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-03-02 Thread Zhang Chen
Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly, this function can get better performance. Signed-off-by: Zhang Chen --- net/colo

[Qemu-devel] [PATCH V3 1/3] COLO-compare: Rename compare function and remove duplicate codes

2017-03-02 Thread Zhang Chen
Rename colo_packet_compare() to colo_packet_compare_common() that make tcp_compare udp_compare icmp_compare reuse this function. Remove minimum packet size check in icmp_compare, because we have check this in parse_packet_early(). Signed-off-by: Zhang Chen --- net/colo-compare.c | 18

Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()

2016-10-09 Thread Zhang Chen
es, fix this helper function to return -1 while some errors happen. Signed-off-by: zhanghailiang This patch looks fine to me. Reviewed-by: Zhang Chen Thanks Zhang Chen --- net/colo-compare.c | 54 -- 1 file changed, 8 insertions(+), 46 deleti

Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()

2016-10-09 Thread Zhang Chen
On 10/10/2016 11:13 AM, Hailiang Zhang wrote: Hi, On 2016/10/10 10:52, Zhang Chen wrote: On 09/30/2016 12:06 PM, zhanghailiang wrote: find_and_check_chardev() uses 'opts' member of CharDriverState to check if the chardev is 'socket' chardev or not, which the opts wi

[Qemu-devel] [PATCH] colo-proxy: fix memory leak

2016-10-10 Thread Zhang Chen
Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity. Signed-off-by: Zhang Chen --- net/colo-compare.c| 4 ++-- net/filter-rewriter.c | 9 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 22b1da1

Re: [Qemu-devel] [PATCH] colo-proxy: fix memory leak

2016-10-10 Thread Zhang Chen
On 10/11/2016 04:23 AM, Eric Blake wrote: On 10/10/2016 04:46 AM, Zhang Chen wrote: Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity. Signed-off-by: Zhang Chen --- net/colo-compare.c| 4 ++-- net/filter-rewriter.c | 9 + 2 files changed, 7

[Qemu-devel] [PATCH V2] colo-proxy: fix memory leak

2016-10-11 Thread Zhang Chen
Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity. v2: - use traces instead of fprintf in colo-compare.c v1: - initial patch Signed-off-by: Zhang Chen --- net/colo-compare.c| 11 +++ net/filter-rewriter.c | 17 + trace-events

Re: [Qemu-devel] [PATCH V2] colo-proxy: fix memory leak

2016-10-11 Thread Zhang Chen
On 10/11/2016 10:32 PM, Eric Blake wrote: On 10/11/2016 02:33 AM, Zhang Chen wrote: Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity. This part is fine. v2: - use traces instead of fprintf in colo-compare.c v1: - initial patch ...but this part should live

[Qemu-devel] [PATCH V3] colo-proxy: fix memory leak

2016-10-11 Thread Zhang Chen
Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity and add some comments. Signed-off-by: Zhang Chen --- net/colo-compare.c| 34 +++--- net/filter-rewriter.c | 17 + trace-events | 1 + 3 files changed, 21

Re: [Qemu-devel] [PATCH] colo-compare: remove unused struct CompareChardevProps and 'props' variable

2016-10-13 Thread Zhang Chen
On 10/13/2016 02:57 PM, zhanghailiang wrote: After commit 0a73336d, 'props' variable in find_and_check_chardev() is unused. Remove it, togther with struct CompareChardevProps. Signed-off-by: zhanghailiang Reviewed-by: Zhang Chen Thanks Zhang Chen --- net/colo-com

[Qemu-devel] [PATCH V4] colo-proxy: fix memory leak

2016-10-17 Thread Zhang Chen
Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity and add some comments. v3: - rebase this patch for upstream codes v2: - use traces instead of fprintf in colo-compare.c v1: - initial patch Zhang Chen (1): colo-proxy: fix memory leak net/colo-compare.c

[Qemu-devel] [PATCH V4] colo-proxy: fix memory leak

2016-10-17 Thread Zhang Chen
Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity and add some comments. Signed-off-by: Zhang Chen --- net/colo-compare.c| 34 +++--- net/filter-rewriter.c | 17 + net/trace-events | 1 + 3 files changed, 21

Re: [Qemu-devel] [PATCH V4] colo-proxy: fix memory leak

2016-10-23 Thread Zhang Chen
Anyone have some comments? this bug report by paolo ping... On 10/17/2016 05:23 PM, Zhang Chen wrote: Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity and add some comments. Signed-off-by: Zhang Chen --- net/colo-compare.c| 34

[Qemu-devel] [RFC PATCH V8 1/7] colo-compare: introduce colo compare initialization

2016-07-21 Thread Zhang Chen
ctor,id=f1,netdev=hn0,queue=tx,indev=red0 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1 Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-compare.c | 222 +

[Qemu-devel] [RFC PATCH V8 0/7] Introduce COLO-compare

2016-07-21 Thread Zhang Chen
P,UDP,ICMP and other packet comparison - add trace-event - add some comments - other bug fix - add RFC index - add usage in patch 1/4 v2: - add jhash.h v1: - initial patch Zhang Chen (7): colo-compare: introduce colo compare initialization colo-base: add colo-base to defi

[Qemu-devel] [RFC PATCH V8 4/7] colo-compare: track connection and enqueue packet

2016-07-21 Thread Zhang Chen
;s own conn. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c| 108 + net/colo-base.h| 30 +++ net/colo-compare.c | 70 +- 3 files c

[Qemu-devel] [RFC PATCH V8 2/7] colo-base: add colo-base to define and handle packet

2016-07-21 Thread Zhang Chen
COLO-base used by colo-compare and filter-rewriter. this can share common data structure like:net packet, and share other functions. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-base.c| 74

[Qemu-devel] [RFC PATCH V8 5/7] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-21 Thread Zhang Chen
Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Cc: Daniel P . Berrange Cc: Paolo Bonzini Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen

[Qemu-devel] [RFC PATCH V8 7/7] colo-compare: add TCP, UDP, ICMP packet comparison

2016-07-21 Thread Zhang Chen
We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. less checkpoint more efficiency. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-compare.c | 174

[Qemu-devel] [RFC PATCH V8 3/7] Jhash: add linux kernel jhashtable in qemu

2016-07-21 Thread Zhang Chen
Jhash used by colo-compare and filter-rewriter to save and lookup net connection info Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- include/qemu/jhash.h | 61 1 file changed, 61 insertions(+) create

[Qemu-devel] [RFC PATCH V8 6/7] colo-compare: introduce packet comparison thread

2016-07-21 Thread Zhang Chen
checkpoint. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c| 1 + net/colo-base.h| 3 + net/colo-compare.c | 212 + trace-events | 2 + 4 files changed, 218 insertions(+) diff

Re: [Qemu-devel] [RFC PATCH V8 5/7] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-21 Thread Zhang Chen
On 07/21/2016 05:00 PM, Daniel P. Berrange wrote: On Thu, Jul 21, 2016 at 04:26:11PM +0800, Zhang Chen wrote: Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Cc

[Qemu-devel] [RFC PATCH V9 0/7] Introduce COLO-compare

2016-07-21 Thread Zhang Chen
ison - add trace-event - add some comments - other bug fix - add RFC index - add usage in patch 1/4 v2: - add jhash.h v1: - initial patch Zhang Chen (7): colo-compare: introduce colo compare initialization colo-base: add colo-base to define and handle packet Jhash: add linux k

[Qemu-devel] [RFC PATCH V9 3/7] Jhash: add linux kernel jhashtable in qemu

2016-07-21 Thread Zhang Chen
Jhash used by colo-compare and filter-rewriter to save and lookup net connection info Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- include/qemu/jhash.h | 61 1 file changed, 61 insertions(+) create

[Qemu-devel] [RFC PATCH V9 4/7] colo-compare: track connection and enqueue packet

2016-07-21 Thread Zhang Chen
;s own conn. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c| 108 + net/colo-base.h| 30 +++ net/colo-compare.c | 70 +- 3 files c

[Qemu-devel] [RFC PATCH V9 1/7] colo-compare: introduce colo compare initialization

2016-07-21 Thread Zhang Chen
ctor,id=f1,netdev=hn0,queue=tx,indev=red0 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1 Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-compare.c | 222 +

[Qemu-devel] [RFC PATCH V9 7/7] colo-compare: add TCP, UDP, ICMP packet comparison

2016-07-21 Thread Zhang Chen
We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. less checkpoint more efficiency. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-compare.c | 174

[Qemu-devel] [RFC PATCH V9 6/7] colo-compare: introduce packet comparison thread

2016-07-21 Thread Zhang Chen
checkpoint. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c| 1 + net/colo-base.h| 3 + net/colo-compare.c | 212 + trace-events | 2 + 4 files changed, 218 insertions(+) diff

[Qemu-devel] [RFC PATCH V9 5/7] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-21 Thread Zhang Chen
Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Cc: Daniel P . Berrange Cc: Paolo Bonzini Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen

[Qemu-devel] [RFC PATCH V9 2/7] colo-base: add colo-base to define and handle packet

2016-07-21 Thread Zhang Chen
COLO-base used by colo-compare and filter-rewriter. this can share common data structure like:net packet, and share other functions. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-base.c| 74

Re: [Qemu-devel] [RFC PATCH V9 5/7] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-21 Thread Zhang Chen
On 07/22/2016 02:45 PM, Li Zhijian wrote: On 07/22/2016 01:38 PM, Zhang Chen wrote: Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Cc: Daniel P . Berrange Cc

Re: [Qemu-devel] [RFC PATCH V9 5/7] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-22 Thread Zhang Chen
add to: Daniel P . Berrange On 07/22/2016 02:56 PM, Zhang Chen wrote: On 07/22/2016 02:45 PM, Li Zhijian wrote: On 07/22/2016 01:38 PM, Zhang Chen wrote: Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop

[Qemu-devel] [RFC PATCH V10 2/7] colo-base: add colo-base to define and handle packet

2016-07-25 Thread Zhang Chen
COLO-base used by colo-compare and filter-rewriter. this can share common data structure like:net packet, and share other functions. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-base.c| 74

[Qemu-devel] [RFC PATCH V10 0/7] Introduce COLO-compare

2016-07-25 Thread Zhang Chen
ompare to colo-frame v2.7 - fix most of Dave's comments (except RCU) - add TCP,UDP,ICMP and other packet comparison - add trace-event - add some comments - other bug fix - add RFC index - add usage in patch 1/4 v2: - add jhash.h v1: - initial patch Zhang Chen (7): colo-

[Qemu-devel] [RFC PATCH V10 3/7] Jhash: add linux kernel jhashtable in qemu

2016-07-25 Thread Zhang Chen
Jhash used by colo-compare and filter-rewriter to save and lookup net connection info Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- include/qemu/jhash.h | 61 1 file changed, 61 insertions(+) create

[Qemu-devel] [RFC PATCH V10 1/7] colo-compare: introduce colo compare initialization

2016-07-25 Thread Zhang Chen
ctor,id=f1,netdev=hn0,queue=tx,indev=red0 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1 Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-compare.c | 222 +

[Qemu-devel] [RFC PATCH V10 6/7] colo-compare: introduce packet comparison thread

2016-07-25 Thread Zhang Chen
checkpoint. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c| 1 + net/colo-base.h| 3 + net/colo-compare.c | 212 + trace-events | 2 + 4 files changed, 218 insertions(+) diff

[Qemu-devel] [RFC PATCH V10 7/7] colo-compare: add TCP, UDP, ICMP packet comparison

2016-07-25 Thread Zhang Chen
We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. less checkpoint more efficiency. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-compare.c | 174

[Qemu-devel] [RFC PATCH V10 4/7] colo-compare: track connection and enqueue packet

2016-07-25 Thread Zhang Chen
;s own conn. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c| 108 + net/colo-base.h| 30 +++ net/colo-compare.c | 70 +- 3 files c

[Qemu-devel] [RFC PATCH V10 5/7] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-25 Thread Zhang Chen
Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Cc: Daniel P . Berrange Cc: Paolo Bonzini Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen

Re: [Qemu-devel] [RFC PATCH V3 0/3] filter-rewriter: introduce filter-rewriter

2016-07-26 Thread Zhang Chen
Hi~ all~~ Anyone have some comments for this series? We need more comments to improve COLO codes. Thanks Zhang Chen On 07/05/2016 06:29 PM, Zhang Chen wrote: Filter-rewriter is a part of COLO project. So this patch set depend on colo-compare. It will rewrite some of secondary packet to

Re: [Qemu-devel] [RFC PATCH V3 0/3] filter-rewriter: introduce filter-rewriter

2016-07-26 Thread Zhang Chen
On 07/27/2016 10:50 AM, Jason Wang wrote: On 2016年07月27日 10:32, Zhang Chen wrote: Hi~ all~~ Anyone have some comments for this series? Will have a look at this. Btw. I wonder how this is tested, do we need a unit test for this? COLO-compare and filter-rewriter works normal depend on

Re: [Qemu-devel] [RFC PATCH V3 1/3] filter-rewriter: introduce filter-rewriter initialization

2016-07-27 Thread Zhang Chen
On 07/27/2016 03:02 PM, Jason Wang wrote: On 2016年07月05日 18:29, Zhang Chen wrote: Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's tcp connection established successfully. In this module we will rewrite tcp packet's

Re: [Qemu-devel] [RFC PATCH V3 0/3] filter-rewriter: introduce filter-rewriter

2016-07-27 Thread Zhang Chen
On 07/27/2016 03:05 PM, Jason Wang wrote: On 2016年07月27日 13:49, Zhang Chen wrote: On 07/27/2016 10:50 AM, Jason Wang wrote: On 2016年07月27日 10:32, Zhang Chen wrote: Hi~ all~~ Anyone have some comments for this series? Will have a look at this. Btw. I wonder how this is tested, do

Re: [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-27 Thread Zhang Chen
On 07/27/2016 03:03 PM, Jason Wang wrote: On 2016年07月05日 18:29, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pk

[Qemu-devel] [PATCH V3] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-28 Thread Zhang Chen
Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- include/sysemu/char.h | 11

[Qemu-devel] [PATCH V11 7/9] filter-rewriter: introduce filter-rewriter initialization

2016-07-28 Thread Zhang Chen
condary. usage: colo secondary: -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1 -object filter-rewriter,id=rew0,netdev=hn0,queue=all Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Con

<    1   2   3   4   5   6   7   8   9   10   >