From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY27w-0003eF-UV for qemu-devel@nongnu.org; Mon, 22 Feb 2016 20:51:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aY27s-0005tr-OP for qemu-devel@nongnu.org; Mon, 22 Feb 2016 20:51:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY27s-0005th-Im for qemu-devel@nongnu.org; Mon, 22 Feb 2016 20:50:56 -0500 References: <1454571834-18021-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> <1454571834-18021-2-git-send-email-zhangchen.fnst@cn.fujitsu.com> <56B3133A.9060809@cn.fujitsu.com> <56C160D9.305@redhat.com> <56C17903.7030809@cn.fujitsu.com> <56C3EEA3.1060703@cn.fujitsu.com> From: Jason Wang Message-ID: <56CBBAF2.40506@redhat.com> Date: Tue, 23 Feb 2016 09:50:42 +0800 MIME-Version: 1.0 In-Reply-To: <56C3EEA3.1060703@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V3 1/2] net/filter-mirror:Add filter-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhang Chen , qemu devel Cc: zhanghailiang , "Dr. David Alan Gilbert" , Li Zhijian , Yang Hongyang On 02/17/2016 11:53 AM, Zhang Chen wrote: > > > 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 packet. we output packet to chardev. >>> To make it compact, how about "It gives qemu the ability to mirror >>> packets to a chardev."? >> >> OK, will fix it in next version. >> >>>>> 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 >>> An issue with mirror (and dump) is that it can not work correctly with >>> the netdev that has a vnet header. Need to fix this, a possible >>> solution >>> is to checksum the buffer and strip the header before passing it to a >>> chardev. >>> >> >> Thanks, I don't consider about vnet, we will fix it in next version. >> > > We have discussed for vnet in our team. we think filter-mirror no > need to > do some analysis packet job, just do mirror job. and other job put it on > other plugin like filter-writer and filter-compare. If we have two guest > that both have vnet header, mirror one guest's packet to anther one. > strip the header then mirror packet will result in errors. so let's strip > vnet header in other plugin. keep filter-mirror simple.the > filter-redirector > is same as filter-mirror. Ok, I'm also fine with this.