From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQaC7-0001y2-4z for qemu-devel@nongnu.org; Tue, 02 Feb 2016 07:36:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQaC1-0008RP-OF for qemu-devel@nongnu.org; Tue, 02 Feb 2016 07:36:30 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:63742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQaC1-0008Qd-1L for qemu-devel@nongnu.org; Tue, 02 Feb 2016 07:36:25 -0500 References: <1454328077-18820-1-git-send-email-zhang.zhanghailiang@huawei.com> <56B01E53.6060306@easystack.cn> From: Hailiang Zhang Message-ID: <56B0A24F.4050406@huawei.com> Date: Tue, 2 Feb 2016 20:34:23 +0800 MIME-Version: 1.0 In-Reply-To: <56B01E53.6060306@easystack.cn> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/4] Netfilter: Add each netdev a default filter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yang Hongyang , qemu-devel@nongnu.org Cc: jasowang@redhat.com, peter.huangpeng@huawei.com, zhangchen.fnst@cn.fujitsu.com, dgilbert@redhat.com 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(-) >> >