From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMUM7-0003Dx-Aj for qemu-devel@nongnu.org; Fri, 22 Jan 2016 00:33:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMUM4-00035K-4H for qemu-devel@nongnu.org; Fri, 22 Jan 2016 00:33:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMUM3-00035G-SM for qemu-devel@nongnu.org; Fri, 22 Jan 2016 00:33:52 -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> <569F5844.1080807@cn.fujitsu.com> <569F5B7D.2050900@redhat.com> <569F62D2.2040307@cn.fujitsu.com> From: Jason Wang Message-ID: <56A1BF2E.1050901@redhat.com> Date: Fri, 22 Jan 2016 13:33:34 +0800 MIME-Version: 1.0 In-Reply-To: <569F62D2.2040307@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" , Huang peng , "Dr. David Alan Gilbert" , Gong lei , Stefan Hajnoczi , jan.kiszka@siemens.com, Yang Hongyang On 01/20/2016 06:34 PM, Wen Congyang wrote: > On 01/20/2016 06:03 PM, Jason Wang wrote: >> >> On 01/20/2016 05:49 PM, Wen Congyang wrote: >>> 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 >> Interesting question. >> >> Two redirectors sounds ok or maybe we can go through rx filters in a >> reverse order? > netdev <---> filter1 <----> filter2 <----> .... <----> emulated device <----> guest > So I think we can go through rx filters in a reverse order. But it changes > the behavior. So I am not sure if we can do it. I think we can. Both dump and buffer filter does not require strict order, so it's a good time and change to do this. > > Thanks > Wen Congyang > >> >> . >> > >