All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
To: Jason Wang <jasowang@redhat.com>, qemu devel <qemu-devel@nongnu.org>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>,
	Gui jianfeng <guijianfeng@cn.fujitsu.com>,
	"eddie.dong" <eddie.dong@intel.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Yang Hongyang <hongyang.yang@easystack.cn>
Subject: Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector
Date: Mon, 29 Feb 2016 20:33:35 +0800	[thread overview]
Message-ID: <56D43A9F.7070600@cn.fujitsu.com> (raw)
In-Reply-To: <56D3EF0F.6040306@redhat.com>



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

  reply	other threads:[~2016-02-29 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  6:50 [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector Zhang Chen
2016-02-18  2:41 ` Jason Wang
2016-02-18  7:50   ` Zhang Chen
2016-02-24  3:39     ` Jason Wang
2016-02-24  9:03       ` Zhang Chen
2016-02-29  7:11         ` Jason Wang
2016-02-29 12:33           ` Zhang Chen [this message]
2016-03-02  5:41             ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D43A9F.7070600@cn.fujitsu.com \
    --to=zhangchen.fnst@cn.fujitsu.com \
    --cc=dgilbert@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=hongyang.yang@easystack.cn \
    --cc=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.