From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLpOh-0006VG-DX for qemu-devel@nongnu.org; Wed, 20 Jan 2016 04:49:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLpOc-0002NV-EJ for qemu-devel@nongnu.org; Wed, 20 Jan 2016 04:49:51 -0500 Received: from [59.151.112.132] (port=12812 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLpOb-0002N4-ND for qemu-devel@nongnu.org; Wed, 20 Jan 2016 04:49:46 -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> <569F515B.20400@redhat.com> From: Wen Congyang Message-ID: <569F5844.1080807@cn.fujitsu.com> Date: Wed, 20 Jan 2016 17:49:56 +0800 MIME-Version: 1.0 In-Reply-To: <569F515B.20400@redhat.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: Jason Wang , 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 05:20 PM, Jason Wang wrote: > > > 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) Thanks. I have another question: IIRC, both rx and tx packets walk through all netfilter objects in the same order. tx packet(sent to the guest): we want that redirector hanldes it first rx packet(sent from the guest): we want that colo-rewriter handles it first Change the order or use two traffic-redirectors? Thanks Wen Congyang > >> >> If not, how to get the packet from the netdev, and send back the packet to >> the netdev? >> >> Thanks >> Wen Congyang >> > > > > . >