Hi Hongyang,
On 2016/2/2 11:11, Yang Hongyang wrote:
If we have to add a default filter, then I have a suggestion only
for this series:
1. Add a nop filter. filter-nop.c
I'm not quite sure if we really need to add a new type 'nop' filter,
because it is only a special case for buffer-filter, where
the process of releasing packets is not controlled by the timer.
(Maybe we can use this to distinguish if the buffer-filter is default or not.
If a buffer-filter is not attached with a timer, then it could be considered as
the default filter)
2. Add a "default-filter=xxx" property to -netdev, if not specified,
default to nop.
Hmm, yes, Jason also suggested that, export an option for the netdev
to control the type of default filter. I have added a 'TODO' tag in
patch 4, we will do that in the future.
Thanks,
Hailiang
On 02/01/2016 08:01 PM, zhanghailiang wrote:
This series is a prerequisite for COLO, here we add each netdev
a default buffer filter, it is disabled by default, and has
no side effect for delivering packets in net layer.
Note: this series is based on patch
'[PATCH v2] net/filter: Fix the output information for command 'info
network'
v3:
- Drop patch '[PATCH RFC v2 2/5] vl: Make object_create() public'
- Use object_new_with_props() instead of object_create() (Daniel)
v2:
- Drop the patch net/filter: prevent the default filter to be deleted' (Jason)
- Re-implement netdev_add_filter() by re-using object_object() (Jason)
- Send patch 'net/filter: Fix the output information for command 'info
network' as an independent one. (Jason)
zhanghailiang (4):
net/filter: Add a 'status' property for filter object
net/filter: Introduce a helper to add a filter to the netdev
filter-buffer: Accept zero interval
net/filter: Add a default filter to each netdev
include/net/filter.h | 12 ++++++++
net/filter-buffer.c | 10 -------
net/filter.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
net/net.c | 23 +++++++++++++++
4 files changed, 114 insertions(+), 10 deletions(-)