From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaN0T-00065N-78 for qemu-devel@nongnu.org; Mon, 29 Feb 2016 07:33:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaN0O-0007Jt-6B for qemu-devel@nongnu.org; Mon, 29 Feb 2016 07:32:57 -0500 Received: from [59.151.112.132] (port=4948 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaN0N-0007HD-9I for qemu-devel@nongnu.org; Mon, 29 Feb 2016 07:32:52 -0500 References: <1454655023-29701-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> <56C52F61.1070702@redhat.com> <56C577BC.4060901@cn.fujitsu.com> <56CD2606.7030102@redhat.com> <56CD71DD.6040900@cn.fujitsu.com> <56D3EF0F.6040306@redhat.com> From: Zhang Chen Message-ID: <56D43A9F.7070600@cn.fujitsu.com> Date: Mon, 29 Feb 2016 20:33:35 +0800 MIME-Version: 1.0 In-Reply-To: <56D3EF0F.6040306@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang , qemu devel Cc: zhanghailiang , Li Zhijian , Gui jianfeng , "eddie.dong" , "Dr. David Alan Gilbert" , Yang Hongyang 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 work for one >> way(filter->outdev). >> >> filter >> + >> | >> | >> redirector | >> +-------------------------+ >> | | | >> | | | >> | | | >> indev +----------------+ +----------------> outdev >> | | | >> | | | >> | | | >> +-------------------------+ >> | >> | >> v >> filter >> >> | >> >> | >> >> v >> filter ........ filter ...... guest >> > This looks a violation on the assumption of current filter behavior. > Each filter should only talk to the 'next' or 'prev' filter on the chain > (depends on the direction) or netdev when queue=rx or netdev's peer when > queue=tx. > > And in fact there's subtle differences with your patch: > > When queue='all' since you force nf->netdev as sender, direction is > NET_FILTER_DIRECTION_TX, the packet will be passed to 'next' filter on > the chain. > When queue='rx', direction is NET_FILTER_DIRECTION_RX, the packet will > be pass to 'prev' filter on the chain. > > So as you can see, 'all' is ambiguous here. I think we should keep > current behavior by redirecting traffic to netdev when queue='rx'. For > queue='all', maybe we need redirect the traffic to both netdev and > netdev's peer. > > OK, I will change usage to : -filter-redirector,id=r0,netdev=hn0,queue=tx/rx/all,outdev=s1,indev=s0,in_direction=tx/rx How about this? I will fix it in V3. Thanks zhangchen > > > . > -- Thanks zhangchen