Re: [Qemu-devel] [POC]colo-proxy in qemu

2015-11-10 Thread Zhang Chen
On 11/10/2015 06:54 PM, Dr. David Alan Gilbert wrote: * Tkid (zhangchen.f...@cn.fujitsu.com) wrote: Hi,all We are planning to reimplement colo proxy in userspace (Here is in qemu) to cache and compare net packets.This module is one of the important components of COLO project and now it is

Re: [Qemu-devel] [RFC PATCH 6/9] net/colo-proxy: add packet forward function

2015-12-02 Thread Zhang Chen
Hi,Dave On 12/01/2015 11:50 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> The packet recv by primary forward to secondary The packet send by secondary forward to primary Signed-off-by: zha

Re: [Qemu-devel] [RFC PATCH 0/9] Add colo-proxy based on netfilter

2015-12-02 Thread Zhang Chen
Hi,Dave On 12/02/2015 12:44 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM connect

Re: [Qemu-devel] [RFC PATCH 7/9] net/colo-proxy: add packet enqueue and handle function

2015-12-02 Thread Zhang Chen
Hi,Dave On 12/02/2015 12:12 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Add common packet handle function and enqueue packet distinguished connection,then we can lookup one connection packet to c

Re: [Qemu-devel] [RFC PATCH 4/9] colo-proxy: add colo-proxy setup work

2015-12-02 Thread Zhang Chen
Hi,Dave On 12/01/2015 11:35 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Secondary setup socket server for colo-forward primary setup connect to secondary for colo-forward add data str

Re: [Qemu-devel] [RFC PATCH 9/9] net/colo-proxy: add packet compare and notify checkpoint

2015-12-02 Thread Zhang Chen
Hi,Dave On 12/02/2015 12:37 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Lookup same connection's primary and secondary packet to compare,if same we will send primary packet and drop secondary

Re: [Qemu-devel] [RFC PATCH 7/9] net/colo-proxy: add packet enqueue and handle function

2015-12-03 Thread Zhang Chen
Hi,Dave On 12/03/2015 05:09 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: Hi,Dave On 12/02/2015 12:12 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Add

Re: [Qemu-devel] [RFC PATCH 2/9] jhash: add linux kernel jhashtable in qemu

2015-12-02 Thread Zhang Chen
Hi,Dave On 12/01/2015 07:23 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> This used by colo-proxy to save and lookup connection info Signed-off-by: zhangchen <zhangchen.f...@cn.fujitsu.com> -

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-04 Thread Zhang Chen
On 01/04/2016 05:46 PM, Jason Wang wrote: On 01/04/2016 04:16 PM, Zhang Chen wrote: On 01/04/2016 01:37 PM, Jason Wang wrote: On 12/31/2015 04:40 PM, Zhang Chen wrote: On 12/31/2015 10:36 AM, Jason Wang wrote: On 12/22/2015 06:42 PM, Zhang Chen wrote: From: zhangchen <zhangche

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-04 Thread Zhang Chen
On 01/04/2016 01:37 PM, Jason Wang wrote: On 12/31/2015 04:40 PM, Zhang Chen wrote: On 12/31/2015 10:36 AM, Jason Wang wrote: On 12/22/2015 06:42 PM, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Hi,all This patch add an colo-proxy object, COLO-Proxy is

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-31 Thread Zhang Chen
On 12/31/2015 10:36 AM, Jason Wang wrote: On 12/22/2015 06:42 PM, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the functio

[Qemu-devel] [RFC PATCH v2 04/10] Colo-proxy: add data structure and jhash func

2015-12-22 Thread Zhang Chen
From: zhangchen add data structure and hash func will be uesed Signed-off-by: zhangchen Signed-off-by: zhanghailiang --- net/colo-proxy.c | 66

[Qemu-devel] [RFC PATCH v2 07/10] net/colo-proxy: Add packet enqueue & handle func

2015-12-22 Thread Zhang Chen
From: zhangchen Add common packet handle function and enqueue packet distinguished connection,then we can lookup one connection packet to compare Signed-off-by: zhangchen Signed-off-by: zhanghailiang

[Qemu-devel] [RFC PATCH v2 03/10] Colo-proxy: add colo-proxy framework

2015-12-22 Thread Zhang Chen
D + * Copyright (c) 2015 Intel Corporation + * + * Author: Zhang Chen <zhangchen.f...@cn.fujitsu.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * later. See the COPYING file in the top-level directory. + */ + +#include "net/filter.h" +#include &quo

[Qemu-devel] [RFC PATCH v2 01/10] Init colo-proxy object based on netfilter

2015-12-22 Thread Zhang Chen
From: zhangchen add colo-proxy to vl.c and qemu-options.hx add trace-colo-proxy relation Signed-off-by: zhangchen Signed-off-by: zhanghailiang --- qemu-options.hx | 6 ++ trace-events| 8

[Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-22 Thread Zhang Chen
From: zhangchen Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM connect normal to Primary VM and compare packets sent by PVM to sent by SVM.if

[Qemu-devel] [RFC PATCH v2 05/10] net/colo-proxy: Add colo interface to use proxy

2015-12-22 Thread Zhang Chen
From: zhangchen Add interface used by migration/colo.c so colo framework can work with proxy Signed-off-by: zhangchen Signed-off-by: zhanghailiang --- net/colo-proxy.c | 93

[Qemu-devel] [RFC PATCH v2 09/10] net/colo-proxy: Compare pri pkt to sec pkt

2015-12-22 Thread Zhang Chen
From: zhangchen We will compare packet sent by primary guest to secondary guest,if same,send primary packet. else we will notify colo to do checkpoint to make secondary guset running same as primary Signed-off-by: zhangchen

[Qemu-devel] [RFC PATCH v2 06/10] net/colo-proxy: add socket used by forward func

2015-12-22 Thread Zhang Chen
From: zhangchen Colo need to forward packets we start socket server in secondary and primary connect to secondary in startup the packet recv by primary forward to secondary the packet send by secondary forward to primary Signed-off-by: zhangchen

[Qemu-devel] [RFC PATCH v2 02/10] Jhash: add linux kernel jhashtable in qemu

2015-12-22 Thread Zhang Chen
From: zhangchen Jhash used by colo-proxy to save and lookup net connection info Signed-off-by: zhangchen Signed-off-by: zhanghailiang --- include/qemu/jhash.h | 61

[Qemu-devel] [RFC PATCH v2 10/10] net/colo-proxy: Colo-proxy do checkpoint and clear

2015-12-22 Thread Zhang Chen
From: zhangchen Do checkpoint and flush Signed-off-by: zhangchen Signed-off-by: zhanghailiang --- net/colo-proxy.c | 88 1 file changed, 88

[Qemu-devel] [RFC PATCH v2 08/10] net/colo-proxy: Handle packet and connection

2015-12-22 Thread Zhang Chen
From: zhangchen In here we will handle ip packet and connection Signed-off-by: zhangchen Signed-off-by: zhanghailiang --- net/colo-proxy.c | 130

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-28 Thread Zhang Chen
Hi~ Just a small ping... No news for a week. Colo proxy is a part of COLO project, we need review and comments. Thanks zhangchen On 12/22/2015 06:42 PM, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Hi,all This patch add an colo-proxy object, COLO-Proxy is

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-28 Thread Zhang Chen
On 12/29/2015 02:58 PM, Jason Wang wrote: On 12/29/2015 02:31 PM, Zhang Chen wrote: Hi~ Just a small ping... No news for a week. Colo proxy is a part of COLO project, we need review and comments. Thanks zhangchen Hi, will find sometime to review this this week. Thanks Thanks very much

[Qemu-devel] [RFC PATCH 4/9] colo-proxy: add colo-proxy setup work

2015-11-27 Thread Zhang Chen
From: zhangchen Secondary setup socket server for colo-forward primary setup connect to secondary for colo-forward add data structure will be uesed Signed-off-by: zhangchen --- net/colo-proxy.c | 87

[Qemu-devel] [RFC PATCH 2/9] jhash: add linux kernel jhashtable in qemu

2015-11-27 Thread Zhang Chen
lt Tolerance or Continuous Replication) + * + * Copyright (c) 2015 HUAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2015 FUJITSU LIMITED + * Copyright (c) 2015 Intel Corporation + * + * Author: Zhang Chen <zhangchen.f...@cn.fujitsu.com> + * + * This work is licensed under the terms of the

[Qemu-devel] [RFC PATCH 1/9] Init colo-proxy object based on netfilter

2015-11-27 Thread Zhang Chen
From: zhangchen add colo-proxy in vl.c and qemu-options.hx Signed-off-by: zhangchen --- qemu-options.hx | 4 vl.c| 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx

[Qemu-devel] [RFC PATCH 5/9] net/colo-proxy: add colo packet handler

2015-11-27 Thread Zhang Chen
From: zhangchen add primary and secondary handler Signed-off-by: zhangchen --- net/colo-proxy.c | 105 +-- 1 file changed, 103 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [RFC PATCH 7/9] net/colo-proxy: add packet enqueue and handle function

2015-11-27 Thread Zhang Chen
From: zhangchen Add common packet handle function and enqueue packet distinguished connection,then we can lookup one connection packet to compare Signed-off-by: zhangchen --- net/colo-proxy.c | 167

[Qemu-devel] [RFC PATCH 9/9] net/colo-proxy: add packet compare and notify checkpoint

2015-11-27 Thread Zhang Chen
From: zhangchen Lookup same connection's primary and secondary packet to compare,if same we will send primary packet and drop secondary packet,else send all of primary packets be queued,drop secondary queue and notify colo to do checkpoint Signed-off-by: zhangchen

[Qemu-devel] [RFC PATCH 3/9] colo-proxy: add colo-proxy framework

2015-11-27 Thread Zhang Chen
* + * Author: Zhang Chen <zhangchen.f...@cn.fujitsu.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * later. See the COPYING file in the top-level directory. + */ + +#include "colo-proxy.h" + +#define __DEBUG__ + +#ifdef __DEBUG__ +#define DEBU

[Qemu-devel] [RFC PATCH 6/9] net/colo-proxy: add packet forward function

2015-11-27 Thread Zhang Chen
From: zhangchen The packet recv by primary forward to secondary The packet send by secondary forward to primary Signed-off-by: zhangchen --- net/colo-proxy.c | 118 +-- 1 file

[Qemu-devel] [RFC PATCH 0/9] Add colo-proxy based on netfilter

2015-11-27 Thread Zhang Chen
Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM connect normal to Primary VM and compare packets sent by PVM to sent by SVM.if the packet difference,notify COLO do checkpoint

[Qemu-devel] [RFC PATCH 8/9] net/colo-proxy: enqueue primary and secondary packet

2015-11-27 Thread Zhang Chen
From: zhangchen Enqueue packets sent by primary and packets sent by secondary Signed-off-by: zhangchen --- net/colo-proxy.c | 71 1 file changed, 71 insertions(+) diff --git

Re: [Qemu-devel] [RFC PATCH 4/9] colo-proxy: add colo-proxy setup work

2015-11-29 Thread Zhang Chen
On 11/28/2015 11:02 AM, Hailiang Zhang wrote: On 2015/11/27 20:27, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Secondary setup socket server for colo-forward primary setup connect to secondary for colo-forward add data structure will be uesed Signed-off-by: zha

Re: [Qemu-devel] [RFC PATCH 3/9] colo-proxy: add colo-proxy framework

2015-11-29 Thread Zhang Chen
On 11/28/2015 10:46 AM, Hailiang Zhang wrote: On 2015/11/27 20:27, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Colo-proxy is a plugin of qemu netfilter like filter-buffer and dump Signed-off-by: zhangchen <zhangchen.f...@cn.fujitsu.com> --- net/Makefil

Re: [Qemu-devel] [RFC PATCH 5/9] net/colo-proxy: add colo packet handler

2015-11-29 Thread Zhang Chen
On 11/28/2015 11:17 AM, Hailiang Zhang wrote: On 2015/11/27 20:27, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> add primary and secondary handler Signed-off-by: zhangchen <zhangchen.f...@cn.fujitsu.com> --- net/colo-p

Re: [Qemu-devel] [RFC PATCH 1/9] Init colo-proxy object based on netfilter

2015-11-29 Thread Zhang Chen
On 11/30/2015 10:50 AM, Wen Congyang wrote: On 11/27/2015 08:27 PM, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> add colo-proxy in vl.c and qemu-options.hx Signed-off-by: zhangchen <zhangchen.f...@cn.fujitsu.com> --- qemu-options.hx | 4 vl.c

Re: [Qemu-devel] [RFC PATCH 3/9] colo-proxy: add colo-proxy framework

2015-11-29 Thread Zhang Chen
On 11/30/2015 11:10 AM, Wen Congyang wrote: On 11/27/2015 08:27 PM, Zhang Chen wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Colo-proxy is a plugin of qemu netfilter like filter-buffer and dump Signed-off-by: zhangchen <zhangchen.f...@cn.fujitsu.com> --- net/Makefil

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-11 Thread Zhang Chen
On 01/11/2016 08:59 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: On 01/08/2016 07:19 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Hi,all This pat

Re: [Qemu-devel] [RFC PATCH v2 02/10] Jhash: add linux kernel jhashtable in qemu

2016-01-11 Thread Zhang Chen
On 01/11/2016 08:50 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: On 01/08/2016 08:08 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Jhash used by colo

Re: [Qemu-devel] [RFC PATCH v2 02/10] Jhash: add linux kernel jhashtable in qemu

2016-01-10 Thread Zhang Chen
On 01/08/2016 08:08 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Jhash used by colo-proxy to save and lookup net connection info Signed-off-by: zhangchen <zhangchen.f...@cn.fujitsu.com>

[Qemu-devel] [RFC PATCH V4 1/4] colo-compare: introduce colo compare initialization

2016-05-25 Thread Zhang Chen
-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 <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> ---

[Qemu-devel] [RFC PATCH V4 3/4] colo-compare: introduce packet comparison thread

2016-05-25 Thread Zhang Chen
if packets are same, we send primary packet and drop secondary packet, otherwise notify COLO do checkpoint. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --

[Qemu-devel] [RFC PATCH 2/3] filter-rewriter: track connection and parse packet

2016-06-14 Thread Zhang Chen
We use colo-base.h to track connection and parse packet Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- net/filt

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

2016-06-14 Thread Zhang Chen
Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's connection established successfully. Zhang Chen (3): filter-rewriter: introduce filter-rewriter initialization filter-rewriter: track connection and parse packet filter-rewriter

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

2016-06-14 Thread Zhang Chen
-object filter-rewriter,id=rew0,netdev=hn0,queue=all Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- net/Makefile.objs | 1 + net/filte

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

2016-06-14 Thread Zhang Chen
We will rewrite tcp packet secondary received and sent. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- net/filt

Re: [Qemu-devel] [RFC PATCH V4 0/4] Introduce COLO-compare

2016-05-30 Thread Zhang Chen
On 05/30/2016 11:19 AM, Jason Wang wrote: On 2016年05月25日 20:50, Zhang Chen wrote: COLO-compare is a part of COLO project. It is used to compare the network package to help COLO decide whether to do checkpoint. the full version in this github: https://github.com/zhangckid/qemu/tree/colo

Re: [Qemu-devel] [RFC PATCH V4 0/4] Introduce COLO-compare

2016-05-31 Thread Zhang Chen
On 05/31/2016 02:16 PM, Jason Wang wrote: On 2016年05月31日 11:54, Zhang Chen wrote: On 05/30/2016 11:19 AM, Jason Wang wrote: On 2016年05月25日 20:50, Zhang Chen wrote: COLO-compare is a part of COLO project. It is used to compare the network package to help COLO decide whether to do

Re: [Qemu-devel] [RFC PATCH V4 0/4] Introduce COLO-compare

2016-06-22 Thread Zhang Chen
On 06/22/2016 02:48 PM, Jason Wang wrote: On 2016年06月22日 14:24, Zhang Chen wrote: On 06/20/2016 01:24 PM, Jason Wang wrote: On 2016年06月20日 11:27, Zhang Chen wrote: On 06/20/2016 11:03 AM, Jason Wang wrote: On 2016年06月17日 10:25, Zhang Chen wrote: Hi~ jason. I tried a lot of ways

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

2016-06-21 Thread Zhang Chen
On 06/20/2016 08:14 PM, Dr. David Alan Gilbert wrote: * Jason Wang (jasow...@redhat.com) wrote: On 2016年06月14日 19:15, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. More verbose please. E.g which fields were rewrote and why. OK. Signed-off-by: Zhang Chen

Re: [Qemu-devel] [RFC PATCH V4 0/4] Introduce COLO-compare

2016-06-22 Thread Zhang Chen
On 06/20/2016 01:24 PM, Jason Wang wrote: On 2016年06月20日 11:27, Zhang Chen wrote: On 06/20/2016 11:03 AM, Jason Wang wrote: On 2016年06月17日 10:25, Zhang Chen wrote: Hi~ jason. I tried a lot of ways to make it run in compare thread, but it not work. Because that: void

[Qemu-devel] [RFC PATCH V2] qemu-char: Fix context for g_source_attach()

2016-06-22 Thread Zhang Chen
. Comments from jason. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- io/channel.c | 2 +- qemu-char.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/io/channel.c b/io/channel.c index 692e

Re: [Qemu-devel] [RFC PATCH V4 0/4] Introduce COLO-compare

2016-06-16 Thread Zhang Chen
On 05/31/2016 07:06 PM, Jason Wang wrote: On 2016年05月31日 16:28, Zhang Chen wrote: On 05/31/2016 02:16 PM, Jason Wang wrote: On 2016年05月31日 11:54, Zhang Chen wrote: On 05/30/2016 11:19 AM, Jason Wang wrote: On 2016年05月25日 20:50, Zhang Chen wrote: COLO-compare is a part of COLO

Re: [Qemu-devel] [RFC PATCH V4 0/4] Introduce COLO-compare

2016-06-19 Thread Zhang Chen
On 06/20/2016 11:03 AM, Jason Wang wrote: On 2016年06月17日 10:25, Zhang Chen wrote: Hi~ jason. I tried a lot of ways to make it run in compare thread, but it not work. Because that: void g_main_context_push_thread_default (GMainContext *context); Acquires context and sets it as the thread

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

2016-06-23 Thread Zhang Chen
On 06/22/2016 02:34 PM, Jason Wang wrote: On 2016年06月22日 11:12, Zhang Chen wrote: On 06/20/2016 08:14 PM, Dr. David Alan Gilbert wrote: * Jason Wang (jasow...@redhat.com) wrote: On 2016年06月14日 19:15, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. More

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

2016-06-23 Thread Zhang Chen
packet | |packet +|packet | |packet + ++ ++++ ++ Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- in

[Qemu-devel] [RFC PATCH V5 1/4] colo-compare: introduce colo compare initialization

2016-06-23 Thread Zhang Chen
-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 <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> ---

[Qemu-devel] [RFC PATCH V5 0/4] Introduce COLO-compare

2016-06-23 Thread Zhang Chen
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 (4): colo-compare: introduce colo compare initialization colo-compare: track connection and enqueue packet

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

2016-06-23 Thread Zhang Chen
Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- net/colo-compare.c | 171 +++-- trace-events | 6 ++ 2

[Qemu-devel] [RFC PATCH V5 3/4] colo-compare: introduce packet comparison thread

2016-06-23 Thread Zhang Chen
if packets are same, we send primary packet and drop secondary packet, otherwise notify COLO do checkpoint. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --

Re: [Qemu-devel] [RFC PATCH] Change g_source_attach(xx, NULL) to g_souce_attach(xx, g_main_context_get_thread_default())

2016-06-20 Thread Zhang Chen
On 06/21/2016 12:45 AM, Eric Blake wrote: On 06/20/2016 02:23 AM, Zhang Chen wrote: Subject line is too long, missing a 'topic:' prefix, and has a typo (souce). Suggest: qemu-char: Fix context for g_source_attach() OK~~ I will fix it in next version. We want to poll and handle chardev

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-10 Thread Zhang Chen
On 01/08/2016 07:19 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu net

Re: [Qemu-devel] [RFC PATCH v2 01/10] Init colo-proxy object based on netfilter

2016-01-17 Thread Zhang Chen
On 01/16/2016 02:21 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> add colo-proxy to vl.c and qemu-options.hx add trace-colo-proxy relation Signed-off-by: zhangchen <zhangchen.f...@cn.fujitsu.co

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-17 Thread Zhang Chen
On 01/06/2016 01:16 PM, Jason Wang wrote: On 01/04/2016 07:17 PM, Zhang Chen wrote: On 01/04/2016 05:46 PM, Jason Wang wrote: On 01/04/2016 04:16 PM, Zhang Chen wrote: On 01/04/2016 01:37 PM, Jason Wang wrote: On 12/31/2015 04:40 PM, Zhang Chen wrote: On 12/31/2015 10:36 AM, Jason Wang

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

2016-06-28 Thread Zhang Chen
On 06/24/2016 02:08 PM, Jason Wang wrote: On 2016年06月23日 18:48, Zhang Chen wrote: On 06/22/2016 02:34 PM, Jason Wang wrote: On 2016年06月22日 11:12, Zhang Chen wrote: On 06/20/2016 08:14 PM, Dr. David Alan Gilbert wrote: * Jason Wang (jasow...@redhat.com) wrote: On 2016年06月14日 19:15

Re: [Qemu-devel] [RFC PATCH V2] qemu-char: Fix context for g_source_attach()

2016-06-29 Thread Zhang Chen
On 06/22/2016 06:49 PM, Zhang Chen wrote: Hi~ Paolo~ Just a ping...no news for a week~ We want to poll and handle chardev in another thread other than main loop. But qemu_chr_add_handlers() can only work for global default context other than thread default context. So we use

[Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-04 Thread Zhang Chen
ight (c) 2016 FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Author: Zhang Chen <zhangchen.f...@cn.fujitsu.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * later. See the COPYING file in the top-level directory. + */ + +#include "ne

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-27 Thread Zhang Chen
On 01/28/2016 12:10 AM, Eric Blake wrote: On 01/26/2016 05:44 PM, Hailiang Zhang wrote: On 2016/1/26 16:59, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> Traffic-mirrorer is a plugin of netfilter. It make qemu has ability to copy and mirror guest's net packet. we

[Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-26 Thread Zhang Chen
mirrorer.c @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2016 FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Author: Zhang Chen <zhangchen.f...@cn.fujitsu.com> + * + * This work is licensed under the terms of the GNU GPL, vers

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-27 Thread Zhang Chen
On 01/28/2016 01:44 PM, Jason Wang wrote: On 01/27/2016 10:40 AM, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> Traffic-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-28 Thread Zhang Chen
On 01/28/2016 04:37 PM, Jason Wang wrote: On 01/28/2016 03:44 PM, Zhang Chen wrote: On 01/28/2016 01:44 PM, Jason Wang wrote: On 01/27/2016 10:40 AM, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> Traffic-mirror is a netfilter plugin. It gives qemu the ability t

[Qemu-devel] [PATCH V3 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-03 Thread Zhang Chen
or.c new file mode 100644 index 000..f8dd20b --- /dev/null +++ b/tests/test-filter-mirror.c @@ -0,0 +1,285 @@ +/* + * QTest testcase for filter-mirror + * + * Copyright (c) 2016 FUJITSU LIMITED + * Author: Zhang chen <zhangchen.f...@cn.fujitsu.com> + * + * This work is licensed under the terms o

[Qemu-devel] [PATCH V3 1/2] net/filter-mirror:Add filter-mirror

2016-02-03 Thread Zhang Chen
or.c b/net/filter-mirror.c new file mode 100644 index 000..87ccaf5 --- /dev/null +++ b/net/filter-mirror.c @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2016 FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Author: Zhang Chen

[Qemu-devel] [PATCH V3 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-03 Thread Zhang Chen
From: ZhangChen Filter-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net packet. we output packet to chardev. v3: - Add filter-mirror unit test according to Jason's comments - Address zhanghailiang's comments. - Address

Re: [Qemu-devel] [PATCH V3 1/2] net/filter-mirror:Add filter-mirror

2016-02-04 Thread Zhang Chen
On 02/04/2016 03:43 PM, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> Filter-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_p

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-24 Thread Zhang Chen
On 02/24/2016 11:39 AM, Jason Wang wrote: On 02/18/2016 03:50 PM, Zhang Chen wrote: On 02/18/2016 10:41 AM, Jason Wang wrote: On 02/05/2016 02:50 PM, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> Filter-redirector is a netfilter plugin. It gives qemu the a

[Qemu-devel] [PATCH V6 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-23 Thread Zhang Chen
comments. - Address Jason's comments. v2: - Address zhanghailiang's comments. - Address Eric Blake's comments. - Address Yang Hongyang's comments. - Address Dave's comments. v1: initial patch. Zhang Chen (2): net/filter-mirror:Add filter-mirror tests/test-filter-mirror:add filter-mirror

[Qemu-devel] [PATCH V6 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-23 Thread Zhang Chen
,queue=tx,outdev=mirror0 We inject packet to netdev socket id = qtest-bn0, filter-mirror will copy and mirror the packet to mirror0. we read packet from mirror0 and then compare to what we inject. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Wen Congya

[Qemu-devel] [PATCH V6 1/2] net/filter-mirror:Add filter-mirror

2016-02-23 Thread Zhang Chen
Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait -filter-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outdev=mirror0 Signed-off-by: Zhang Chen <zhangche

Re: [Qemu-devel] [RFC PATCH v2 08/10] net/colo-proxy: Handle packet and connection

2016-02-23 Thread Zhang Chen
On 02/24/2016 01:58 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: On 02/20/2016 04:04 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen <zhangchen.f...@cn.fujitsu.com> In here we will han

[Qemu-devel] [PATCH V5 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-23 Thread Zhang Chen
. v2: - Address zhanghailiang's comments. - Address Eric Blake's comments. - Address Yang Hongyang's comments. - Address Dave's comments. v1: initial patch. Zhang Chen (2): net/filter-mirror:Add filter-mirror tests/test-filter-mirror:add filter-mirror unit test net/Makefile.objs

[Qemu-devel] [PATCH V5 1/2] net/filter-mirror:Add filter-mirror

2016-02-23 Thread Zhang Chen
Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait -filter-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outdev=mirror0 Signed-off-by: Zhang Chen <zhangche

[Qemu-devel] [PATCH V5 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-23 Thread Zhang Chen
,queue=tx,outdev=mirror0 We inject packet to netdev socket id = qtest-bn0, filter-mirror will copy and mirror the packet to mirror0. we read packet from mirror0 and then compare to what we inject. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Wen Congya

Re: [Qemu-devel] [PATCH V5 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-23 Thread Zhang Chen
On 02/24/2016 11:24 AM, Jason Wang wrote: On 02/23/2016 08:00 PM, Zhang Chen wrote: In this unit test we will test the mirror function. start qemu with: -netdev socket,id=qtest-bn0,fd=sockfd -device e1000,netdev=qtest-bn0,id=qtest-e0 -chardev socket,id=mirror0,path=/tmp

Re: [Qemu-devel] [PATCH V5 1/2] net/filter-mirror:Add filter-mirror

2016-02-23 Thread Zhang Chen
On 02/24/2016 11:22 AM, Jason Wang wrote: On 02/23/2016 08:00 PM, Zhang Chen wrote: Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait -filter-mirror,id=m0

[Qemu-devel] [PATCH V7 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-26 Thread Zhang Chen
comments - Address zhanghailiang's comments. - Address Jason's comments. v2: - Address zhanghailiang's comments. - Address Eric Blake's comments. - Address Yang Hongyang's comments. - Address Dave's comments. v1: initial patch. Zhang Chen (2): net/filter-mirror:Add filter-mirror tests/test

[Qemu-devel] [PATCH V7 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-26 Thread Zhang Chen
,queue=tx,outdev=mirror0 We inject packet to netdev socket id = qtest-bn0, filter-mirror will copy and mirror the packet to mirror0. we read packet from mirror0 and then compare to what we inject. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Wen Congya

[Qemu-devel] [PATCH V7 1/2] net/filter-mirror:Add filter-mirror

2016-02-26 Thread Zhang Chen
Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait -filter-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outdev=mirror0 Signed-off-by: Zhang Chen <zhangche

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-29 Thread Zhang Chen
On 02/29/2016 03:11 PM, Jason Wang wrote: On 02/24/2016 05:03 PM, Zhang Chen wrote: If queue=rx, filter-redirector will get the packet that guest send, then redirect to outdev(if none, do nothing). but queue=rx/tx/all not related to indev. please look the flow chart below. queue=xxx just

[Qemu-devel] [PATCH V2 1/3] net/filter-traffic: add filter-traffic.h

2016-02-29 Thread Zhang Chen
We can reuse filter-traffic by filter-mirror, filter-redirector and so on. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- net/filter-mirror.c | 70 +++ net/filter-tr

[Qemu-devel] [PATCH V2 2/3] net/filter-redirector:Add filter-redirector

2016-02-29 Thread Zhang Chen
dev=s0,outdev=s1 Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- net/Makefile.objs | 1 + net/filter-redirector.c | 216 qemu-options.hx | 8 ++ vl.c

[Qemu-devel] [PATCH V2 3/3] tests/test-filter-redirector: Add unit test for filter-redirector

2016-02-29 Thread Zhang Chen
ect packet to -chardev redirector1,then filter-redirector will pass it to filter, another filter-redirector get it and redirect it to redirector0,we read packet from redirector0 and compare to what we inject. Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Wen Cong

[Qemu-devel] [PATCH V2 0/3] Introduce filter-redirector

2016-02-29 Thread Zhang Chen
ter | | v filter--> guest v2: - Address Jason's comments. - Add filter-traffic.h to reuse parts of the codes - Add unit test case v1: initial patch. Zhang Chen (3): net/filter-traffic: add filter-traffic.h net/

Re: [Qemu-devel] [PATCH V4 1/2] net/filter-mirror:Add filter-mirror

2016-02-22 Thread Zhang Chen
On 02/23/2016 10:03 AM, Jason Wang wrote: On 02/18/2016 04:10 PM, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror

Re: [Qemu-devel] [PATCH V6 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-25 Thread Zhang Chen
On 02/26/2016 03:06 PM, Jason Wang wrote: On 02/24/2016 04:08 PM, Jason Wang wrote: On 02/24/2016 02:54 PM, Zhang Chen wrote: Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. v6: - Address Jason's comments. v5: - Address Jason's comments

Re: [Qemu-devel] [PATCH V4 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-22 Thread Zhang Chen
On 02/23/2016 10:31 AM, Jason Wang wrote: On 02/18/2016 04:10 PM, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> In this unit test we will test the mirror function. start qemu with: -netdev socket,id=qtest-bn0,fd=%d -device e1000,netdev=qtest-bn0,id=qt

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-19 Thread Zhang Chen
Sure. Two main comments/suggestions: - TCP analysis is missed in current version, maybe you point a git tree (or another version of RFC) to me for a better understanding of the design. (Just a skeleton for TCP should be sufficient to discuss). - I prefer to make the code as reusable as

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-26 Thread Zhang Chen
On 01/27/2016 08:44 AM, Hailiang Zhang wrote: On 2016/1/26 16:59, Zhang Chen wrote: From: ZhangChen <zhangchen.f...@cn.fujitsu.com> Traffic-mirrorer is a plugin of netfilter. It make qemu has ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev

  1   2   3   4   5   6   7   8   9   10   >