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