From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLowk-00037i-Di for qemu-devel@nongnu.org; Wed, 20 Jan 2016 04:20:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLowh-0003dw-7r for qemu-devel@nongnu.org; Wed, 20 Jan 2016 04:20:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLowh-0003ds-2U for qemu-devel@nongnu.org; Wed, 20 Jan 2016 04:20:55 -0500 References: <1450780978-19123-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> <568494B8.4080105@redhat.com> <5684E9EB.3070002@cn.fujitsu.com> <568A0527.9040001@redhat.com> <568A2A5F.3090608@cn.fujitsu.com> <568A3F80.8000806@redhat.com> <568A54C2.8050300@cn.fujitsu.com> <568CA327.4020103@redhat.com> <569C8EB7.3060507@cn.fujitsu.com> <569CB08F.4030607@redhat.com> <569EFF25.2020804@cn.fujitsu.com> <569F2F27.9000806@redhat.com> <569F3ACD.7040806@cn.fujitsu.com> From: Jason Wang Message-ID: <569F515B.20400@redhat.com> Date: Wed, 20 Jan 2016 17:20:27 +0800 MIME-Version: 1.0 In-Reply-To: <569F3ACD.7040806@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang , Zhang Chen , qemu devel Cc: zhanghailiang , Li Zhijian , Gui jianfeng , "eddie.dong" , "Dr. David Alan Gilbert" , Huang peng , Gong lei , Stefan Hajnoczi , jan.kiszka@siemens.com, Yang Hongyang On 01/20/2016 03:44 PM, Wen Congyang wrote: >> > >> > ... >> > -chardev socket,id=comparer0,host=ip_primary,port=X,server,nowait >> > -chardev socket,id=comparer1,host=ip_primary,port=Y,server,nowait >> > -chardev socket,id=mirrorer0,host=ip_primary,port=Z,server,nowait >> > -netdev tap,id=hn0 >> > -traffic-mirrorer netdev=hn0,id=t0,indev=comparer0,outdev=mirrorer0 >> > -colo-comparer primary_traffic=comparer0,secondary_traffic=comparer1 >> > ... >> > >> > packet comparer compares the packets from two chardev: comparer0 and >> > comparer1. >> > traffic-mirrorer mirror tx to secondary node through chardev mirrorer0, >> > and mirror rx to packet comparer through chardev comparer0. >> > >> > In secondary node: >> > >> > ... >> > -chardev socket,id=redirector0,host=ip_primary,port=Y >> > -chardev socket,id=redirector1,host=ip_primary,port=Z >> > -netdev tap,id=hn0 >> > -traffic-redirector netdev=hn0,id,r0,indev=redirector0,outdev=redirector1 >> > -colo-rewriter netdev=hn0,id=c0 >> > ... >> > >> > traffic-redirector redirect the rx traffic from primary node through >> > redirector0 and redirect the tx traffic to promary node through redirector1. >> > colo-rewriter rewrite seq number as a normal netfilter. > What are traffic-mirrorer and colo-comparer, traffic-redirector, colo-rewriter? > A netfilter driver? traffic-mirrorer/redirector is a type of netfilter that just mirror/redirect packets between netdev and chardev (just the mirror client/sever and redirect client/sever in the above graph) colo-rewriter is a type of netfilter that did ack/seq adjust (just the TCP rewriter in the above graph) colo-comparer is a thread object that did packet comparing (similar to "compare" in the above graph but not a netfiler) > > If not, how to get the packet from the netdev, and send back the packet to > the netdev? > > Thanks > Wen Congyang >