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

2016-01-26 Thread Zhang Chen
ht (c) 2016 FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Author: Zhang Chen + * + * 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 "net/ne

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 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 tap,id=hn0 -chardev sock

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

2016-01-26 Thread Zhang Chen
On 01/27/2016 03:46 AM, Dr. David Alan Gilbert wrote: * Yang Hongyang (hongyang.y...@easystack.cn) wrote: On 01/26/2016 04:59 PM, Zhang Chen wrote: From: ZhangChen Traffic-mirrorer is a plugin of netfilter. netfilter plugin fix It make qemu has ability to copy and mirror guest'

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

2016-01-26 Thread Zhang Chen
, LTD. + * Copyright (c) 2016 FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Author: Zhang Chen + * + * 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 "

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 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. +s

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 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,id=hn0 -chardev socket,id=mi

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 Traffic-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net p

[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 Jason's comments. v2: - Addres

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

2016-02-03 Thread Zhang Chen
+1,285 @@ +/* + * QTest testcase for filter-mirror + * + * Copyright (c) 2016 FUJITSU LIMITED + * Author: Zhang chen + * + * 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 +#include "libqtest.h"

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

2016-02-03 Thread Zhang Chen
UAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2016 FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Author: Zhang Chen + * + * 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&

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 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_primary,port=X,server,nowait -f

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 sti

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

2016-02-04 Thread Zhang Chen
ector.c b/net/filter-redirector.c new file mode 100644 index 000..364e463 --- /dev/null +++ b/net/filter-redirector.c @@ -0,0 +1,245 @@ +/* + * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2016 FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Autho

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

2016-02-14 Thread Zhang Chen
On 02/15/2016 01:23 PM, Jason Wang wrote: On 02/04/2016 05:00 PM, Zhang Chen wrote: On 02/04/2016 03:43 PM, Zhang Chen wrote: 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. To ma

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

2016-02-16 Thread Zhang Chen
On 02/15/2016 03:06 PM, Zhang Chen wrote: On 02/15/2016 01:23 PM, Jason Wang wrote: On 02/04/2016 05:00 PM, Zhang Chen wrote: On 02/04/2016 03:43 PM, Zhang Chen wrote: From: ZhangChen Filter-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net p

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

2016-02-16 Thread Zhang Chen
On 02/15/2016 01:54 PM, Jason Wang wrote: On 02/04/2016 03:43 PM, Zhang Chen wrote: From: ZhangChen Using qtest qmp interface to implement following cases: 1) add/remove filter-mirror 2) add a filter-mirror then delete the netdev 3) add/remove more than one filter-mirrors 4) add more than

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

2016-02-17 Thread Zhang Chen
On 02/18/2016 10:41 AM, Jason Wang wrote: On 02/05/2016 02:50 PM, Zhang Chen wrote: From: ZhangChen Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector can redirect filter's net packet to outdev. and redirect indev's packet

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

2016-02-18 Thread Zhang Chen
FUJITSU LIMITED + * Copyright (c) 2016 Intel Corporation + * + * Author: Zhang Chen + * + * 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 "net/net.h" +#in

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

2016-02-18 Thread Zhang Chen
From: ZhangChen Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. v4: - Address Jason's comments. v3: - Add filter-mirror unit test according to Jason's comments - Address zhanghailiang's comments. - Address Jason's comments. v2: - Address

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

2016-02-18 Thread Zhang Chen
@@ +/* + * QTest testcase for filter-mirror + * + * Copyright (c) 2016 FUJITSU LIMITED + * Author: Zhang chen + * + * 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 +#include "libqtest.h" +#include &

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

2015-11-27 Thread Zhang Chen
for Non-stop Service (COLO) + * (a.k.a. Fault Tolerance or Continuous Replication) + * + * Copyright (c) 2015 HUAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2015 FUJITSU LIMITED + * Copyright (c) 2015 Intel Corporation + * + * Author: Zhang Chen + * + * This work is licensed under the terms of the

[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 a/net/colo-proxy.c b/net/colo-proxy.c index a664e6d..5f1852a 1

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

2015-11-27 Thread Zhang Chen
TECHNOLOGIES CO., LTD. + * Copyright (c) 2015 FUJITSU LIMITED + * Copyright (c) 2015 Intel Corporation + * + * Author: Zhang Chen + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * later. See the COPYING file in the top-level directory. + */ + +#ifndef QEMU_JHASH_H__ +#define

[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 +++- net/colo-proxy.h | 61 +++

[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 b/qemu-options.hx index 949db7f..5e6f1e3 100644 --- a/qemu-options.hx +++ b/q

[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 changed, 114 insertions(+), 4 deletions(-) diff --git a/net/colo-

[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 a/net/colo-proxy.c b/net/colo-proxy.c index 89d9616..ece5661 100644 --- a

[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 ++- 1 file changed, 166 insertions(+), 1 de

[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 --- net/colo-proxy.c | 74 +++

[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 an

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 Colo-proxy is a plugin of qemu netfilter like filter-buffer and dump Signed-off-by: zhangchen --- net/Makefile.objs | 1 + net/colo-proxy.c | 139

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 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

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 add primary and secondary handler Signed-off-by: zhangchen --- net/colo-proxy.c | 105 +-- 1 file changed, 103 insertions(+), 2

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 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

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 Colo-proxy is a plugin of qemu netfilter like filter-buffer and dump Signed-off-by: zhangchen --- net/Makefile.objs | 1 + net/colo-proxy.c | 139

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 This used by colo-proxy to save and lookup connection info Signed-off-by: zhangchen --- include/qemu/jhash.h | 52

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 Secondary setup socket server for colo-forward primary setup connect to secondary for colo-forward add data structure will be uesed I wodner if it's pos

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 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

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 Add common packet handle function and enqueue packet distinguished connection,then we can lookup one connection packet to compare Signed-off-by: zhangchen

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 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 pa

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 co

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 Add common packet handle function and

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 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 Seconda

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 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

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 Jhash used by colo-proxy to save and lookup net connection

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 Hi,all This patch add an colo-proxy object, COLO-Proxy is a

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 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 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

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 possibl

[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 1 file changed, 61 insertions(+) create mode 100644 include/qemu/jhash.h

[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 Signed-off-by: zhanghailiang --- net/colo-proxy

[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 the packet difference,notify COLO

[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 vl.c| 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/

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

2015-12-22 Thread Zhang Chen
Virtual Machines for Non-stop Service (COLO) + * (a.k.a. Fault Tolerance or Continuous Replication) + * + * Copyright (c) 2015 HUAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2015 FUJITSU LIMITED + * Copyright (c) 2015 Intel Corporation + * + * Author: Zhang Chen + * + * This work is licensed under the

[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 --- net/colo-proxy.c | 148 ++- 1 file ch

[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 1 file changed, 66 insertions(+) diff --git a/net/colo-proxy.c b/net/colo-proxy.c index 2e3

[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 +++ 1 file changed, 130 insertions(+) diff --git a/net/colo-proxy.c b/net/colo-proxy.c index 5

[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 insertions(+) diff --git a/net/colo-proxy.c b/net/colo-proxy.c index abb289f..79b1b1b 100644 --

[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 1 file changed, 93 insertions(+) diff --git a/net/colo-proxy.

[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 Signed-off-by: zhanghailiang --- net/colo-proxy.c | 64 ++

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 Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and

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

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 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 norm

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 Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and

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 Hi,all This

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

2016-02-21 Thread Zhang Chen
On 02/20/2016 03:57 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen +static void colo_proxy_setup(NetFilterState *nf, Error **errp) +{ +COLOProxyState *s = FILTER_COLO_PROXY(nf); + +if (!s->addr) { +error_setg(e

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

2016-02-21 Thread Zhang Chen
On 02/20/2016 03:58 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: 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

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

2016-02-21 Thread Zhang Chen
On 02/20/2016 04:01 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: 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

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

2016-02-21 Thread Zhang Chen
On 02/20/2016 04:04 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: 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] [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 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

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 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=qtest-e0 -chardev socket,id=mirror0

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

2016-02-23 Thread Zhang Chen
ess 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:ad

[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 Signed-off-by: Wen

[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 Signed-off-by: Wen Congyang --- tests/.gitignore | 1 + tests

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 In here we will handle ip packet and connection Signed-off

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

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

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

2016-02-23 Thread Zhang Chen
ress 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-m

[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 Signed-off-by: Wen Congyang --- tests/.gitignore | 1 + tests

[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 Signed-off-by: Wen

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 Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector

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'

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

2016-02-26 Thread Zhang Chen
g to Jason's 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):

[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 Signed-off-by: Wen Congyang --- tests/.gitignore | 1 + tests

[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 Signed-off-by: Wen

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

2016-02-29 Thread Zhang Chen
filter | | 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-t

[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 Signed-off-by: Wen Congyang --- tests/.gitignore

[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 Signed-off-by: Wen Congyang --- net/filter-mirror.c | 70 +++ net/filter-traffic.h | 71 2

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

2016-02-29 Thread Zhang Chen
/rx/all,indev=s0,outdev=s1 Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- net/Makefile.objs | 1 + net/filter-redirector.c | 216 qemu-options.hx | 8 ++ vl.c| 3 +- 4 files changed, 227 insertion

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

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

2016-02-29 Thread Zhang Chen
On 03/01/2016 11:02 AM, Li Zhijian wrote: On 02/29/2016 08:23 PM, Zhang Chen wrote: We can reuse filter-traffic by filter-mirror, filter-redirector and so on. Is the main purpose to export filter_traffic_send() ? IMO, define it as a public API would be better. Using MirrorState and

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

2016-03-01 Thread Zhang Chen
On 03/02/2016 02:19 PM, Jason Wang wrote: On 02/29/2016 08:23 PM, Zhang Chen wrote: We can reuse filter-traffic by filter-mirror, filter-redirector and so on. I think we could share more than this. E.g just use filter-mirror.c to implement both mirror and redirector. OK, should we change

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

2016-03-01 Thread Zhang Chen
On 03/02/2016 02:31 PM, Jason Wang wrote: On 02/29/2016 08:23 PM, Zhang Chen wrote: Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector can redirect filter's net packet to outdev. and redirect indev's packet

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

2016-03-02 Thread Zhang Chen
On 03/03/2016 02:48 PM, Jason Wang wrote: On 03/02/2016 03:25 PM, Zhang Chen wrote: On 03/02/2016 02:19 PM, Jason Wang wrote: On 02/29/2016 08:23 PM, Zhang Chen wrote: We can reuse filter-traffic by filter-mirror, filter-redirector and so on. I think we could share more than this. E.g

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

2016-03-03 Thread Zhang Chen
On 03/03/2016 03:24 PM, Jason Wang wrote: On 03/03/2016 03:20 PM, Zhang Chen wrote: On 03/03/2016 02:48 PM, Jason Wang wrote: On 03/02/2016 03:25 PM, Zhang Chen wrote: On 03/02/2016 02:19 PM, Jason Wang wrote: On 02/29/2016 08:23 PM, Zhang Chen wrote: We can reuse filter-traffic by

[Qemu-devel] [PATCH V3 1/3] net/filter-mirror: Change filter_mirror_send interface

2016-03-04 Thread Zhang Chen
Change filter_mirror_send interface to make it easier to used by other filter Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- net/filter-mirror.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index ee13d94

[Qemu-devel] [PATCH V3 2/3] net/filter-mirror:Add filter-redirector func

2016-03-04 Thread Zhang Chen
r0,netdev=hn0,queue=tx/rx/all,indev=s0,outdev=s1 Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- net/filter-mirror.c | 211 qemu-options.hx | 8 ++ vl.c| 3 +- 3 files changed, 221 insertions(+), 1 deletion(-) dif

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

2016-03-04 Thread Zhang Chen
-> outdev || | || | || | +--+ | | v filter v3: -Address Jason's comments. v2: - Address Jason's comments. - Add filter-traffic.h to reuse parts of the codes - Add unit test case v1: initial patch.

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

2016-03-04 Thread Zhang Chen
ot; "-chardev socket,id=redirector2,path=%s,nowait " "-object filter-redirector,id=qtest-f0,netdev=qtest-bn0," "queue=rx,outdev=redirector0 " "-object filter-redirector,id=qtest-f1,netdev=qtest-bn0," "queue=rx,indev=redirector2 " "-object filter

Re: [Qemu-devel] [PATCH V3 1/3] net/filter-mirror: Change filter_mirror_send interface

2016-03-07 Thread Zhang Chen
On 03/07/2016 03:29 PM, Jason Wang wrote: On 03/04/2016 08:01 PM, Zhang Chen wrote: Change filter_mirror_send interface to make it easier to used by other filter Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- net/filter-mirror.c | 10 +- 1 file changed, 5 insertions

  1   2   3   4   5   6   7   8   9   10   >