[Qemu-devel] [PATCH] net/colo-compare.c: Add no-need-checkpoint period to optimize performance

2017-06-07 Thread Zhang Chen
If colo-compare find out the first different packet that means the following packet almost is different. we needn't do a lot of checkpoint in one second, so we set the no-need-checkpoint period, default just set 3 second. Signed-off-by: Zhang Chen --- net/colo-compare.c | 9 - 1

Re: [Qemu-devel] [PATCH V6 02/10] net/filter-mirror.c: Make filter mirror support vnet support.

2017-06-12 Thread Zhang Chen
On 06/09/2017 02:08 PM, Jason Wang wrote: On 2017年06月07日 17:55, Zhang Chen wrote: We add the vnet_hdr_support option for filter-mirror, default is disable. s/disable/disabled/ If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id

Re: [Qemu-devel] [PATCH 1/3] colo-compare: reconstruct the mutex lock usage

2017-02-06 Thread Zhang Chen
eries' goal. This series is preparing work for integrating COLO compare with COLO frame and it is prerequisite. So, we may consider implementing it later in another series. Zhang Chen, what's your opinion ? I agree, The current situation of COLO is not a complete HA solution. So, We shou

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

2017-02-06 Thread Zhang Chen
Hi~ Eric. If you have time, please give me some comments. This series has been sent for a long time. Thanks Zhang Chen On 02/06/2017 09:13 PM, Dr. David Alan Gilbert wrote: * Jason Wang (jasow...@redhat.com) wrote: On 2017年01月26日 11:04, Zhang Chen wrote: Hi~ No news for a week. We

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

2017-02-07 Thread Zhang Chen
On 02/07/2017 11:50 PM, Eric Blake wrote: On 01/05/2017 12:08 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 --- docs/qmp-commands.txt | 24

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

2017-02-07 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 | 17 qapi-schema.json | 60 2 files changed, 77

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

2017-02-07 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 | 40 ++ qapi

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

2017-02-07 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 --- migration/colo.c | 23 +++ qapi-schema.json | 25

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

2017-02-08 Thread Zhang Chen
On 02/09/2017 05:35 AM, Eric Blake wrote: On 02/07/2017 11:24 PM, 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 | 17 qapi

Re: [Qemu-devel] [PATCH V3 04/10] net/filter-mirror.c: Add filter-mirror and filter-redirector vnet support.

2017-05-05 Thread Zhang Chen
On 05/03/2017 06:19 PM, Jason Wang wrote: On 2017年05月03日 11:18, Zhang Chen wrote: On 05/02/2017 12:47 PM, Jason Wang wrote: On 2017年04月28日 17:47, Zhang Chen wrote: In this patch, we change the send packet format from struct {int size; const uint8_t buf[];} to {int size; int

Re: [Qemu-devel] [PATCH V3 04/10] net/filter-mirror.c: Add filter-mirror and filter-redirector vnet support.

2017-05-05 Thread Zhang Chen
On 05/05/2017 05:25 PM, Jason Wang wrote: On 2017年05月05日 16:44, Zhang Chen wrote: On 05/03/2017 06:19 PM, Jason Wang wrote: On 2017年05月03日 11:18, Zhang Chen wrote: On 05/02/2017 12:47 PM, Jason Wang wrote: On 2017年04月28日 17:47, Zhang Chen wrote: In this patch, we change the send

Re: [Qemu-devel] [PATCH V3 05/10] net/net.c: Add vnet header length to SocketReadState

2017-05-07 Thread Zhang Chen
On 05/03/2017 06:42 PM, Jason Wang wrote: On 2017年05月03日 11:43, Zhang Chen wrote: On 05/02/2017 12:53 PM, Jason Wang wrote: On 2017年04月28日 17:47, Zhang Chen wrote: Address Jason Wang's comments add vnet header length to SocketReadState. Instead of saying this, you can add "

Re: [Qemu-devel] [PATCH V3 05/10] net/net.c: Add vnet header length to SocketReadState

2017-05-08 Thread Zhang Chen
On 05/09/2017 10:40 AM, Jason Wang wrote: On 2017年05月08日 11:47, Zhang Chen wrote: On 05/03/2017 06:42 PM, Jason Wang wrote: On 2017年05月03日 11:43, Zhang Chen wrote: On 05/02/2017 12:53 PM, Jason Wang wrote: On 2017年04月28日 17:47, Zhang Chen wrote: Address Jason Wang's comment

Re: [Qemu-devel] [PATCH V3 05/10] net/net.c: Add vnet header length to SocketReadState

2017-05-09 Thread Zhang Chen
On 05/09/2017 01:36 PM, Jason Wang wrote: On 2017年05月09日 12:03, Zhang Chen wrote: On 05/09/2017 10:40 AM, Jason Wang wrote: On 2017年05月08日 11:47, Zhang Chen wrote: On 05/03/2017 06:42 PM, Jason Wang wrote: On 2017年05月03日 11:43, Zhang Chen wrote: On 05/02/2017 12:53 PM, Jason

[Qemu-devel] [PATCH 0/3] Optimize filter-mirror and filter-rewriter

2017-05-11 Thread Zhang Chen
Fix some duplicate codes and remove unused codes. Zhang Chen (3): net/filter-mirror.c: Remove duplicate check code. net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle net/filter-rewriter: Remove unused option in filter-rewirter net/filter-mirror.c | 35

[Qemu-devel] [PATCH 3/3] net/filter-rewriter: Remove unused option in filter-rewirter

2017-05-11 Thread Zhang Chen
Signed-off-by: Zhang Chen --- qemu-options.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 70c0ded..f5e088e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4038,7 +4038,8 @@ Create a filter-redirector we need to differ

[Qemu-devel] [PATCH 1/3] net/filter-mirror.c: Remove duplicate check code.

2017-05-11 Thread Zhang Chen
The s->outdev have checked in filter_mirror_set_outdev(). Signed-off-by: Zhang Chen --- net/filter-mirror.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 72fa7c2..fd0322f 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirro

[Qemu-devel] [PATCH 2/3] net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle

2017-05-11 Thread Zhang Chen
Because filter_mirror_receive_iov() and filter_redirector_receive_iov() both use the filter_mirror_send() to send packet, so I change filter_mirror_send() to filter_send() that looks more common. And fix some codestyle. Signed-off-by: Zhang Chen --- net/filter-mirror.c | 29

[Qemu-devel] [PATCH V4 00/12] Add COLO-proxy virtio-net support

2017-05-11 Thread Zhang Chen
vnet_hdr option for filter-mirror, filter-redirector, filter-rewriter,colo-compare. - Use new design to impliment virtio-net support for colo-proxy. - Fix codestyle. - Remove unused option for filter-rewriter. - Add filter-rewriter virtio-net support. - Address other comments. Zhang Chen (

[Qemu-devel] [PATCH V4 01/12] net: Add vnet_hdr_len related arguments in NetClientState

2017-05-11 Thread Zhang Chen
Add vnet_hdr_len and using_vnet_hdr arguments in NetClientState that make othermodule get real vnet_hdr_len easily. Signed-off-by: Zhang Chen --- include/net/net.h | 2 ++ net/net.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index

[Qemu-devel] [PATCH V4 03/12] net/filter-mirror.c: Make filter_mirror_send support vnet support.

2017-05-11 Thread Zhang Chen
In this patch, if vnet_hdr=on we change the send packet format from struct {int size; const uint8_t buf[];} to {int size; int vnet_hdr_len; const uint8_t buf[];}. make other module(like colo-compare) know how to parse net packet correctly. Signed-off-by: Zhang Chen --- net/filter-mirror.c | 35

[Qemu-devel] [PATCH V4 08/12] net/colo-compare.c: Make colo-compare support vnet_hdr_len

2017-05-11 Thread Zhang Chen
COLO-compare can get vnet header length from filter, Add vnet_hdr_len to struct packet and output packet with the vnet_hdr_len. Signed-off-by: Zhang Chen --- net/colo-compare.c | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a

[Qemu-devel] [PATCH V4 04/12] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for filter-redirector, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-redirector,id=r0,netdev=hn0,queue=tx,outdev=red0,vnet_hdr=on Signed-off-by: Zhang Chen --- net/filter-mirror.c | 33

[Qemu-devel] [PATCH V4 05/12] net/net.c: Add vnet_hdr support in SocketReadState

2017-05-11 Thread Zhang Chen
Address Jason Wang's comments add vnet header length to SocketReadState. We add a flag to dicide whether net_fill_rstate() to read struct {int size; int vnet_hdr_len; const uint8_t buf[];} or not. Signed-off-by: Zhang Chen --- include/net/net.h | 9 +++-- net/colo-compare.c

[Qemu-devel] [PATCH V4 06/12] net/colo-compare.c: Add new option to enable vnet support for colo-compare

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for colo-compare, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,vnet_hdr=on Signed-off-by: Zhang Chen --- net/colo

[Qemu-devel] [PATCH V4 02/12] net/filter-mirror.c: Add new option to enable vnet support for filter-mirror

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0,vnet_hdr=on Signed-off-by: Zhang Chen --- net/filter-mirror.c | 34

[Qemu-devel] [PATCH V4 09/12] net/colo.c: Add vnet packet parse feature in colo-proxy

2017-05-11 Thread Zhang Chen
Make colo-compare and filter-rewriter can parse vnet packet. Signed-off-by: Zhang Chen --- net/colo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/colo.c b/net/colo.c index 180eaed..28ce7c8 100644 --- a/net/colo.c +++ b/net/colo.c @@ -43,11 +43,11 @@ int

[Qemu-devel] [PATCH V4 07/12] net/colo.c: Make vnet_hdr_len as packet property

2017-05-11 Thread Zhang Chen
We can use this property flush and send packet with vnet_hdr_len. Signed-off-by: Zhang Chen --- net/colo-compare.c| 8 ++-- net/colo.c| 3 ++- net/colo.h| 4 +++- net/filter-rewriter.c | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/net

[Qemu-devel] [PATCH V4 11/12] net/filter-rewriter.c: Add new option to enable vnet support for filter-rewriter

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for filter-rewriter, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-rewriter,id=rew0,netdev=hn0,queue=all,vnet_hdr=on Signed-off-by: Zhang Chen --- net/filter-rewriter.c | 38

[Qemu-devel] [PATCH V4 10/12] net/colo-compare.c: Add vnet packet's tcp/udp/icmp compare

2017-05-11 Thread Zhang Chen
COLO-Proxy just focus on packet payload, So we skip vnet header. Signed-off-by: Zhang Chen --- net/colo-compare.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index cb0b04e..bf565f3 100644 --- a/net/colo-compare.c +++ b

[Qemu-devel] [PATCH V4 12/12] net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len

2017-05-11 Thread Zhang Chen
We get the vnet_hdr_len from NetClientState that make us parse net packet correctly. Signed-off-by: Zhang Chen --- net/filter-rewriter.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c index bc6d12a..be129c7

Re: [Qemu-devel] [PATCH V4 02/12] net/filter-mirror.c: Add new option to enable vnet support for filter-mirror

2017-05-14 Thread Zhang Chen
On 05/13/2017 09:49 AM, Hailiang Zhang wrote: Hi, On 2017/5/12 9:41, Zhang Chen wrote: We add the vnet_hdr option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev

Re: [Qemu-devel] [PATCH 3/3] net/filter-rewriter: Remove unused option in filter-rewirter

2017-05-14 Thread Zhang Chen
On 05/13/2017 01:43 AM, Eric Blake wrote: On 05/11/2017 08:35 PM, Zhang Chen wrote: Signed-off-by: Zhang Chen In the subject: s/rewirter/rewriter/ OK. --- qemu-options.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index

[Qemu-devel] [PATCH V2 0/3] Optimize filter-mirror and filter-rewriter

2017-05-14 Thread Zhang Chen
Fix some duplicate codes and remove unused codes. v2: Address Eric's comment on patch 3. Zhang Chen (3): net/filter-mirror.c: Remove duplicate check code. net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle net/filter-rewriter: Remove unused option in filter-rewriter

[Qemu-devel] [PATCH V2 1/3] net/filter-mirror.c: Remove duplicate check code.

2017-05-14 Thread Zhang Chen
The s->outdev have checked in filter_mirror_set_outdev(). Signed-off-by: Zhang Chen --- net/filter-mirror.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 72fa7c2..fd0322f 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirro

[Qemu-devel] [PATCH V2 3/3] net/filter-rewriter: Remove unused option in filter-rewriter

2017-05-14 Thread Zhang Chen
Signed-off-by: Zhang Chen --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index f806af9..85cf0f5 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4038,7 +4038,7 @@ Create a filter-redirector we need to differ outdev

[Qemu-devel] [PATCH V2 2/3] net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle

2017-05-14 Thread Zhang Chen
Because filter_mirror_receive_iov() and filter_redirector_receive_iov() both use the filter_mirror_send() to send packet, so I change filter_mirror_send() to filter_send() that looks more common. And fix some codestyle. Signed-off-by: Zhang Chen --- net/filter-mirror.c | 29

[Qemu-devel] [PATCH RESEND V2 3/3] net/filter-rewriter: Remove unused option in filter-rewriter

2017-05-14 Thread Zhang Chen
Signed-off-by: Zhang Chen --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index f806af9..cbec279 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4038,7 +4038,7 @@ Create a filter-redirector we need to differ outdev

[Qemu-devel] [PATCH RESEND V2 1/3] net/filter-mirror.c: Remove duplicate check code.

2017-05-14 Thread Zhang Chen
The s->outdev have checked in filter_mirror_set_outdev(). Signed-off-by: Zhang Chen --- net/filter-mirror.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 72fa7c2..fd0322f 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirro

[Qemu-devel] [PATCH RESEND V2 0/3] Optimize filter-mirror and filter-rewriter

2017-05-14 Thread Zhang Chen
Fix some duplicate codes and remove unused codes. v2: Address Eric's comment on patch 3. Zhang Chen (3): net/filter-mirror.c: Remove duplicate check code. net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle net/filter-rewriter: Remove unused option in filter-rewriter

[Qemu-devel] [PATCH RESEND V2 2/3] net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle

2017-05-14 Thread Zhang Chen
Because filter_mirror_receive_iov() and filter_redirector_receive_iov() both use the filter_mirror_send() to send packet, so I change filter_mirror_send() to filter_send() that looks more common. And fix some codestyle. Signed-off-by: Zhang Chen --- net/filter-mirror.c | 29

Re: [Qemu-devel] [PATCH V4 01/12] net: Add vnet_hdr_len related arguments in NetClientState

2017-05-14 Thread Zhang Chen
On 05/15/2017 11:24 AM, Jason Wang wrote: On 2017年05月14日 05:24, Philippe Mathieu-Daudé wrote: Hi Zhang On 05/11/2017 10:41 PM, Zhang Chen wrote: Add vnet_hdr_len and using_vnet_hdr arguments in NetClientState that make othermodule get real vnet_hdr_len easily. Signed-off-by: Zhang Chen

Re: [Qemu-devel] [PATCH V4 02/12] net/filter-mirror.c: Add new option to enable vnet support for filter-mirror

2017-05-14 Thread Zhang Chen
On 05/15/2017 11:26 AM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: We add the vnet_hdr option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev

Re: [Qemu-devel] [PATCH V4 03/12] net/filter-mirror.c: Make filter_mirror_send support vnet support.

2017-05-15 Thread Zhang Chen
On 05/15/2017 11:28 AM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: In this patch, if vnet_hdr=on we change the send packet format from struct {int size; const uint8_t buf[];} to {int size; int vnet_hdr_len; const uint8_t buf[];}. make other module(like colo-compare) know how

Re: [Qemu-devel] [PATCH V4 04/12] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector

2017-05-15 Thread Zhang Chen
On 05/15/2017 11:31 AM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: We add the vnet_hdr option for filter-redirector, default is disable. If you use virtio-net-pci net driver, please enable it. We need a better commit log here to explain e.g why we need this option. OK. I

Re: [Qemu-devel] [PATCH V4 05/12] net/net.c: Add vnet_hdr support in SocketReadState

2017-05-15 Thread Zhang Chen
On 05/15/2017 12:02 PM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: Address Jason Wang's comments add vnet header length to SocketReadState. Better to use "Suggested-by" instead of this :). I got it~ We add a flag to dicide whether net_fill_rstate()

Re: [Qemu-devel] [PATCH V4 06/12] net/colo-compare.c: Add new option to enable vnet support for colo-compare

2017-05-15 Thread Zhang Chen
On 05/15/2017 12:03 PM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: We add the vnet_hdr option for colo-compare, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object colo-compare,id=comp0,primary_in=compare0-0

Re: [Qemu-devel] [PATCH V4 07/12] net/colo.c: Make vnet_hdr_len as packet property

2017-05-15 Thread Zhang Chen
On 05/15/2017 12:05 PM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: We can use this property flush and send packet with vnet_hdr_len. Signed-off-by: Zhang Chen Then I think it's not necessary to store vnet_hdr_len in SocketReadState? Do you means we keep the patch

Re: [Qemu-devel] [PATCH V4 10/12] net/colo-compare.c: Add vnet packet's tcp/udp/icmp compare

2017-05-15 Thread Zhang Chen
On 05/15/2017 12:11 PM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: COLO-Proxy just focus on packet payload, So we skip vnet header. Signed-off-by: Zhang Chen --- net/colo-compare.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/net/colo

Re: [Qemu-devel] [PATCH V4 11/12] net/filter-rewriter.c: Add new option to enable vnet support for filter-rewriter

2017-05-15 Thread Zhang Chen
On 05/15/2017 12:12 PM, Jason Wang wrote: On 2017年05月12日 09:41, Zhang Chen wrote: We add the vnet_hdr option for filter-rewriter, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-rewriter,id=rew0,netdev=hn0,queue=all

Re: [Qemu-devel] [PATCH V4 01/12] net: Add vnet_hdr_len related arguments in NetClientState

2017-05-15 Thread Zhang Chen
On 05/15/2017 04:06 PM, Jason Wang wrote: On 2017年05月15日 14:56, Zhang Chen wrote: On 05/15/2017 11:24 AM, Jason Wang wrote: On 2017年05月14日 05:24, Philippe Mathieu-Daudé wrote: Hi Zhang On 05/11/2017 10:41 PM, Zhang Chen wrote: Add vnet_hdr_len and using_vnet_hdr arguments in

Re: [Qemu-devel] [PATCH RESEND V2 0/3] Optimize filter-mirror and filter-rewriter

2017-05-16 Thread Zhang Chen
On 05/16/2017 02:48 PM, Jason Wang wrote: On 2017年05月15日 14:18, Zhang Chen wrote: Fix some duplicate codes and remove unused codes. v2: Address Eric's comment on patch 3. Zhang Chen (3): net/filter-mirror.c: Remove duplicate check code. net/filter-mirror.c: Rename filter_mirror

Re: [Qemu-devel] [PATCH RESEND V2 0/3] Optimize filter-mirror and filter-rewriter

2017-05-16 Thread Zhang Chen
On 05/16/2017 10:42 PM, Eric Blake wrote: On 05/16/2017 03:22 AM, Zhang Chen wrote: What's the difference compared with V2? I think I should apply this series? In V2 I forgot remove "," in patch 3/3, Yes, please apply this series. If you changed the patches, even just to

[Qemu-devel] [PATCH V3 1/3] net/filter-mirror.c: Remove duplicate check code.

2017-05-16 Thread Zhang Chen
The s->outdev have checked in filter_mirror_set_outdev(). Signed-off-by: Zhang Chen --- net/filter-mirror.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 72fa7c2..fd0322f 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirro

[Qemu-devel] [PATCH V3 0/3] Optimize filter-mirror and filter-rewriter

2017-05-16 Thread Zhang Chen
Fix some duplicate codes and remove unused codes. v3: - Remove the ',' in patch 3/3 v2: - Address Eric's comment fix typo and keep a long lien on patch 3. Zhang Chen (3): net/filter-mirror.c: Remove duplicate check code. net/filter-mirror.c: Rename filter_mirror_send() an

[Qemu-devel] [PATCH V3 3/3] net/filter-rewriter: Remove unused option in filter-rewriter

2017-05-16 Thread Zhang Chen
Signed-off-by: Zhang Chen --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index f806af9..cbec279 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4038,7 +4038,7 @@ Create a filter-redirector we need to differ outdev

[Qemu-devel] [PATCH V3 2/3] net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle

2017-05-16 Thread Zhang Chen
Because filter_mirror_receive_iov() and filter_redirector_receive_iov() both use the filter_mirror_send() to send packet, so I change filter_mirror_send() to filter_send() that looks more common. And fix some codestyle. Signed-off-by: Zhang Chen --- net/filter-mirror.c | 29

Re: [Qemu-devel] [PATCH 2/5] colo-compare: kick compare thread to exit while finalize

2017-02-15 Thread Zhang Chen
d release all queued secondary packets here, so combine this patch with 3/5 patch as one patch is a better choose. Thanks Zhang Chen + + g_queue_free(&s->conn_list); g_free(s->pri_indev); g_free(s->sec_indev); -- Thanks Zhang Chen

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Zhang Chen
;colo-compare and filter-rewriter work with colo-frame " Named 'colo_flush_connection', I think use 'flush' instead of 'release' is better, Thanks Zhang Chen +static void colo_release_packets(void *opaque, void *user_data) +{ +CompareState *s = u

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

2017-02-15 Thread Zhang Chen
Ping... No new for a long time. Who can pick up this patch? Thanks Zhang Chen On 02/14/2017 04:28 AM, Stefano Stabellini wrote: On Wed, 8 Feb 2017, Eric Blake wrote: On 02/07/2017 11:24 PM, Zhang Chen wrote: We can call this qmp command to do checkpoint outside of qemu. Xen colo will

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

2017-02-15 Thread Zhang Chen
On 02/16/2017 01:08 PM, Jason Wang wrote: On 2017年02月16日 11:25, Zhang Chen wrote: Ping... No new for a long time. Who can pick up this patch? I believe you'd better cc migration maintainers (cced), have you tried scripts/get_maintainer ? Thanks Jason. Add cc Markus Armbr

Re: [Qemu-devel] [PATCH v3 2/4] colo-compare: kick compare thread to exit after some cleanup in finalization

2017-02-16 Thread Zhang Chen
is_self(&s->thread))' branch. Before compare thead exits, some cleanup works need to be done, All unhandled packets need to be released and connection_track_table needs to be freed, or there will be memory leak. Signed-off-by: zhanghailiang Reviewed-by: Zhang Chen --- n

Re: [Qemu-devel] [PATCH v3 4/4] colo-compare: Fix removing fds been watched incorrectly in finalization

2017-02-16 Thread Zhang Chen
ed while call qemu_chr_fe_set_handlers(); Fix it by pass the worker_context parameter to qemu_chr_fe_set_handlers(). Signed-off-by: zhanghailiang Reviewed-by: Zhang Chen --- net/colo-compare.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) -- Thanks Zhang Chen

Re: [Qemu-devel] [PATCH v3 1/4] colo-compare: use g_timeout_source_new() to process the stale packets

2017-02-17 Thread Zhang Chen
safe to remove the timer_check_lock. Signed-off-by: zhanghailiang Reviewed-by: Zhang Chen --- net/colo-compare.c | 62 +++--- 1 file changed, 22 insertions(+), 40 deletions(-) -- Thanks Zhang Chen

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

2017-02-20 Thread Zhang Chen
he elements in queue . If queue elements contain dynamically-allocated memory, they should be freed first. Thanks Zhang Chen g_slice_free(Connection, conn); } -- Thanks Zhang Chen

[Qemu-devel] [PATCH] net/colo-compare: Fix memory free error

2017-02-20 Thread Zhang Chen
We use g_queue_init() to init s->conn_list, so we should use g_queue_clear() to instead of g_queue_free(). Signed-off-by: Zhang Chen --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 162fd6a..cf8c4c9 100

Re: [Qemu-devel] [PULL 0/2] QAPI patches for 2017-02-20

2017-02-20 Thread Zhang Chen
Hi~ Markus. This patch set has been reviewed for a long time, can you pick up it? [PATCH V7 0/2] Add new qmp commands to suppurt Xen COLO Thanks Zhang Chen On 02/20/2017 09:33 PM, Markus Armbruster wrote: The following changes since commit d514cfd763b271b4e97a9fc6adaabc8fd50084ab

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/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 nothing about "Xen colo", but I'll try anyway. I *guess* "Xen colo" is a long-running activ

Re: [Qemu-devel] [PULL 0/2] QAPI patches for 2017-02-20

2017-02-21 Thread Zhang Chen
On 02/21/2017 07:21 PM, Markus Armbruster wrote: Zhang Chen writes: Hi~ Markus. This patch set has been reviewed for a long time, can you pick up it? [PATCH V7 0/2] Add new qmp commands to suppurt Xen COLO I think this should go through a COLO maintainer chain, or perhaps the Xen

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/21/2017 09:01 PM, Hailiang Zhang wrote: On 2017/2/8 13:24, 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 | 17 qapi

Re: [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error

2017-02-21 Thread Zhang Chen
On 02/22/2017 11:15 AM, Jason Wang wrote: On 2017年02月22日 11:09, Jason Wang wrote: On 2017年02月22日 09:47, Hailiang Zhang wrote: On 2017/2/21 10:44, Zhang Chen wrote: We use g_queue_init() to init s->conn_list, so we should use g_queue_clear() to instead of g_queue_free(). Signed-off

[Qemu-devel] [PATCH V2] net/colo-compare: Fix memory free error

2017-02-21 Thread Zhang Chen
We use g_queue_init() to init s->conn_list, so we should use g_queue_clear() to instead of g_queue_free(). Signed-off-by: Zhang Chen Reviewed-by: zhanghailiang --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compar

Re: [Qemu-devel] [RFC PATCH] configure: remove --enable-replication/--disable-replication

2017-03-06 Thread Zhang Chen
or: ld returned 1 exit status make[1]: *** [Makefile:208: qemu-system-aarch64] Error 1 make: *** [Makefile:322: subdir-aarch64-softmmu] Error 2 We should fix that. COLO needs replication enable. So, should I add a new option enable/disable COLO ? Then, If you disable replication, colo will be dis

Re: [Qemu-devel] [RFC PATCH] configure: remove --enable-replication/--disable-replication

2017-03-06 Thread Zhang Chen
On 03/06/2017 08:54 PM, Paolo Bonzini wrote: On 06/03/2017 11:03, Zhang Chen wrote: On 03/06/2017 05:08 PM, Dr. David Alan Gilbert wrote: * Bruce Rogers (brog...@suse.com) wrote: On 2/6/2017 at 4:57 AM, wrote: * Paolo Bonzini (pbonz...@redhat.com) wrote: On 03/02/2017 07:00, Stefan

[Qemu-devel] [PATCH] COLO-compare: Fix trace_event print bug

2017-03-08 Thread Zhang Chen
Because of inet_ntoa() return a statically allocated buffer, subsequent calls will overwrite, So we fix this bug. Signed-off-by: Zhang Chen --- net/colo-compare.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/net/colo-compare.c b/net/colo

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

2017-03-12 Thread Zhang Chen
Hi~~~ All~ No news for a long time, anyone can give me some comments? Thanks Zhang Chen On 02/28/2017 06:48 PM, Zhang Chen wrote: This series focus on COLO Xen support. We add a new chardev socket in colo-compare as the way of communicate with Xen COLO-frame. Xen part: https

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

2017-03-13 Thread Zhang Chen
On 03/13/2017 02:28 PM, Jason Wang wrote: On 2017年03月13日 14:18, Zhang Chen wrote: Hi~~~ All~ No news for a long time, anyone can give me some comments? Hi, A question is why use two kinds of colo-frames? This seems not good as lots of the code were duplicated. Because Xen colo-frame

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

2017-03-13 Thread Zhang Chen
On 03/13/2017 03:10 PM, Zhang Chen wrote: On 03/13/2017 02:28 PM, Jason Wang wrote: On 2017年03月13日 14:18, Zhang Chen wrote: Hi~~~ All~ No news for a long time, anyone can give me some comments? Hi, A question is why use two kinds of colo-frames? This seems not good as lots of the

[Qemu-devel] [PATCH] hw/net/virtio-net.c: Follow CODING_STYLE

2017-03-14 Thread Zhang Chen
Signed-off-by: Zhang Chen --- hw/net/virtio-net.c | 53 + 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index c321680..ede618e 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio

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

2017-03-14 Thread Zhang Chen
On 03/14/2017 03:37 PM, Jason Wang wrote: On 2017年03月13日 15:21, Zhang Chen wrote: On 03/13/2017 03:10 PM, Zhang Chen wrote: On 03/13/2017 02:28 PM, Jason Wang wrote: On 2017年03月13日 14:18, Zhang Chen wrote: Hi~~~ All~ No news for a long time, anyone can give me some comments? Hi

Re: [Qemu-devel] [PATCH V3 0/3] Several fixes for virito region caches

2017-03-14 Thread Zhang Chen
On 03/14/2017 11:01 AM, Jason Wang wrote: Hi: This series contains several fixes for virito region caches, please review. Title and comments typo: S/virito/virtio Thanks Zhang Chen Thanks. Jason Wang (3): virtio: guard against NULL pfn virtio: destroy region cache during reset

Re: [Qemu-devel] COLO failover hang

2017-03-15 Thread Zhang Chen
of patch we pushing. Has anyone ever run it successfully? Any help is appreciated! In our internal version can run it successfully, The failover detail you can ask Zhanghailiang for help. Next time if you have some question about COLO, please cc me and zhanghailiang . Thanks Zhan

[Qemu-devel] [PATCH 1/3] COLO-proxy: Add virtio-net packet parse function

2017-03-16 Thread Zhang Chen
Change parse_packet_early(Packet *pkt) to parse_packet_early(Packet *pkt, int offset) that we can skip virtio-net header. Signed-off-by: Zhang Chen --- net/colo-compare.c| 11 +++ net/colo.c| 8 net/colo.h| 5 - net/filter-rewriter.c | 15

[Qemu-devel] [PATCH 3/3] COLO-compare: Add virtio-net packet compare support

2017-03-16 Thread Zhang Chen
If packet is virtio-net packet we will skip the virtio-net header compare packet's payload. Signed-off-by: Zhang Chen --- net/colo-compare.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index ce

[Qemu-devel] [PATCH 0/3] Add COLO-proxy virtio-net support

2017-03-16 Thread Zhang Chen
If user use -device virtio-net-pci, virtio-net driver will add a header to raw net packet that colo-proxy can't handle it. COLO-proxy just focus on the packet payload, so we skip the virtio-net header to compare the sent packet that primary guest's to secondary guest's. Zhang C

[Qemu-devel] [PATCH 2/3] COLO-proxy: Add a tag to mark virtio-net packet

2017-03-16 Thread Zhang Chen
Add this tag that compare can recognize virtio-net packet. Signed-off-by: Zhang Chen --- net/colo.c | 6 ++ net/colo.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/net/colo.c b/net/colo.c index 060e822..d2b3683 100644 --- a/net/colo.c +++ b/net/colo.c @@ -79,6 +79,12 @@ int

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

2016-08-10 Thread Zhang Chen
Hi~ paolo~~ Just a ping... Have any comments for this patch? Thanks Zhang Chen On 08/04/2016 04:49 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

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

2016-08-14 Thread Zhang Chen
On 08/10/2016 10:57 PM, Paolo Bonzini wrote: On 10/08/2016 10:16, Zhang Chen wrote: Hi~ paolo~~ Just a ping... Have any comments for this patch? Same as before: the patch is pointless alone, it makes sense to include it as part of CoLo, if CoLo needs it. OK, I will move this patch to

[Qemu-devel] [PATCH V12 05/10] colo-compare: track connection and enqueue packet

2016-08-17 Thread Zhang Chen
;s own conn. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-compare.c | 51 ++- net/colo.c | 117 + net/colo.h | 27 + 3 files changed, 185 insert

[Qemu-devel] [PATCH V12 04/10] Jhash: add linux kernel jhashtable in qemu

2016-08-17 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 | 59 1 file changed, 59 insertions(+) create

[Qemu-devel] [PATCH V12 01/10] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-08-17 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 Reviewed-by: Daniel P. Berrange Cc

[Qemu-devel] [PATCH V12 07/10] colo-compare: add TCP, UDP, ICMP packet comparison

2016-08-17 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 | 152

[Qemu-devel] [PATCH V12 00/10] Introduce COLO-compare and filter-rewriter

2016-08-17 Thread Zhang Chen
- add some comments - other bug fix - add RFC index - add usage in patch 1/4 v2: - add jhash.h v1: - initial patch Zhang Chen (10): qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext colo-compare: introduce colo compare initialization net/colo.c: add colo.c to define and handl

[Qemu-devel] [PATCH V12 03/10] net/colo.c: add colo.c to define and handle packet

2016-08-17 Thread Zhang Chen
The net/colo.c is used by colo-compare and filter-rewriter. this can share common data structure like net packet, and other functions. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/colo-compare.c | 113

[Qemu-devel] [PATCH V12 08/10] filter-rewriter: introduce filter-rewriter initialization

2016-08-17 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

[Qemu-devel] [PATCH V12 06/10] colo-compare: introduce packet comparison thread

2016-08-17 Thread Zhang Chen
checkpoint. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-compare.c | 216 + net/colo.c | 1 + net/colo.h | 3 + trace-events | 2 + 4 files changed, 222 insertions

[Qemu-devel] [PATCH V12 02/10] colo-compare: introduce colo compare initialization

2016-08-17 Thread Zhang Chen
,id=red0,host=3.3.3.3,port=9003 -chardev socket,id=red1,host=3.3.3.3,port=9004 -object filter-redirector,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

[Qemu-devel] [PATCH V12 10/10] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-08-17 Thread Zhang Chen
ction kept good. In code We use offset( = secondary_seq - primary_seq ) to rewrite seq or ack. handle_primary_tcp_pkt: tcp_pkt->th_ack += offset; handle_secondary_tcp_pkt: tcp_pkt->th_seq -= offset; Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang

[Qemu-devel] [PATCH V12 09/10] filter-rewriter: track connection and parse packet

2016-08-17 Thread Zhang Chen
We use net/colo.h to track connection and parse packet Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo.c| 14 ++ net/colo.h| 1 + net/filter-rewriter.c | 50 ++ 3

[Qemu-devel] [PATCH] net/net: Bugfix for net_fill_rstate()

2016-08-17 Thread Zhang Chen
When network is busy, we will receive multiple packets at one time. this bug will lost packets that comes late. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian --- net/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index a8e2e6b..8f3237e

<    3   4   5   6   7   8   9   10   11   12   >