From: Yang Hongyang <yanghy@cn.fujitsu.com>
To: Jason Wang <jasowang@redhat.com>, qemu-devel@nongnu.org
Cc: thuth@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter
Date: Tue, 28 Jul 2015 17:41:15 +0800 [thread overview]
Message-ID: <55B74E3B.7090705@cn.fujitsu.com> (raw)
In-Reply-To: <55B74BC3.9060708@redhat.com>
On 07/28/2015 05:30 PM, Jason Wang wrote:
> On 07/28/2015 05:19 PM, Yang Hongyang wrote:
>> On 07/28/2015 12:00 PM, Yang Hongyang wrote:
>>> On 07/28/2015 11:28 AM, Jason Wang wrote:
>>>> On 07/27/2015 06:03 PM, Yang Hongyang wrote:
>>>>> On 07/27/2015 05:16 PM, Jason Wang wrote:
>>>>> [...]
>>>>>>>>>>> I think this won't work for the buffer case? If we want the
>>>>>>>>>>> buffer
>>>>>>>>>>> case
>>>>>>>>>>> to work under this, we should modify the generic netdev layer
>>>>>>>>>>> code, to
>>>>>>>>>>> check the return value of the filter function call.
>>>>>>>>>>
>>>>>>>>>> But checking return value is rather simpler than a new netdev
>>>>>>>>>> type,
>>>>>>>>>> isn't it?
>>>>>>>>>
>>>>>>>>> But how to implement a plugin which suppose to do the actual
>>>>>>>>> work on
>>>>>>>>> the packets?
>>>>>>>>
>>>>>>>> Well, the filter get the packets, so it can do everything it wants.
>>>>>>>>
>>>>>>>>> how to configure params related to the plugin? different
>>>>>>>>> plugins may need different params, implement as another netdev?
>>>>>>>>
>>>>>>>> I belive qmp can do this? something like -filter
>>>>>>>> dump,id=f0,len=10000?
>>>>>>>
>>>>>>> So you mean implement another object filter?
>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>>> and the structure is like netdev?
>>>>>>
>>>>>> No, it is embedded in netdev.
>>>>>
>>>>> Ah, I see what you mean, thank you for the patience...
>>>>> does the command line looks like:
>>>>> -filter dump,id=f0,len=10000
>>>>> -netdev tap,XXX,filter=dump
>>>>>
>>>>> If I need both dump and packets buffering, how will the qmp be?
>>>>> -filter dump,id=f0,len=10000
>>>>> -filter buffer,XXX
>>>>> -netdev tap,XXX,filter=dump:buffer:XXX ?
>>>>
>>>> This is ok but we have several choices, e.g you may want to have a next
>>>> field like:
>>>>
>>>> - filter buffer,id=f0
>>>> - filter dump,id=f1,len=1000,next=f0
>>>> - netdev tap,XXX,filter_root=f1
>>>
>>> This seems better, thank you!
>>
>> Sorry, when try to implement it, I found this qmp is not that good
>> when it
>> comes to dynamically add/remove filters, can I use below instead:
>> -netdev tap,id=bn0
>> -netfilter dump,id=f0,netdev=bn0
>> -netfilter buffer,id=f1,netdev=bn0
>>
>> by this, I can introduce a QTAILQ of filters to NetClentState and
>> netdev_{add|del}_filter to dynamically add/remove filters.
>
> This looks good.
Thank you.
>
> Thanks
> .
>
--
Thanks,
Yang.
prev parent reply other threads:[~2015-07-28 9:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-13 7:39 [Qemu-devel] [PATCH v2 0/5] For QEMU 2.5: Network traffic dumping for -netdev devices Thomas Huth
2015-07-13 7:39 ` [Qemu-devel] [PATCH v2 1/5] net/dump: Add support for receive_iov function Thomas Huth
2015-07-13 7:39 ` [Qemu-devel] [PATCH v2 2/5] net/dump: Move DumpState into NetClientState Thomas Huth
2015-07-13 7:39 ` [Qemu-devel] [PATCH v2 3/5] net/dump: Rework net-dump init functions Thomas Huth
2015-07-13 7:39 ` [Qemu-devel] [PATCH v2 4/5] net/dump: Add dump option for netdev devices Thomas Huth
2015-07-13 7:39 ` [Qemu-devel] [PATCH v2 5/5] qemu options: Add information about dumpfile to help text Thomas Huth
2015-07-22 6:35 ` [Qemu-devel] [PATCH v2 0/5] For QEMU 2.5: Network traffic dumping for -netdev devices Jason Wang
2015-07-22 10:52 ` Yang Hongyang
2015-07-22 10:55 ` [Qemu-devel] [PATCH] RFC/net: Add a net filter Yang Hongyang
2015-07-22 11:06 ` Daniel P. Berrange
2015-07-22 15:16 ` Yang Hongyang
2015-07-22 13:05 ` Thomas Huth
2015-07-22 15:06 ` Yang Hongyang
2015-07-22 13:26 ` Stefan Hajnoczi
2015-07-22 14:57 ` Yang Hongyang
2015-07-23 11:57 ` Stefan Hajnoczi
2015-07-23 5:59 ` Jason Wang
2015-07-27 5:27 ` Yang Hongyang
2015-07-27 6:02 ` Yang Hongyang
2015-07-27 6:39 ` Jason Wang
2015-07-27 7:00 ` Yang Hongyang
2015-07-27 7:31 ` Jason Wang
2015-07-27 7:45 ` Yang Hongyang
2015-07-27 8:01 ` Jason Wang
2015-07-27 8:39 ` Yang Hongyang
2015-07-27 9:16 ` Jason Wang
2015-07-27 10:03 ` Yang Hongyang
2015-07-28 3:28 ` Jason Wang
2015-07-28 4:00 ` Yang Hongyang
2015-07-28 8:52 ` Yang Hongyang
2015-07-28 9:19 ` Yang Hongyang
2015-07-28 9:30 ` Jason Wang
2015-07-28 9:41 ` Yang Hongyang [this message]
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=55B74E3B.7090705@cn.fujitsu.com \
--to=yanghy@cn.fujitsu.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.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.