From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbPZD-0006gV-0c for qemu-devel@nongnu.org; Mon, 14 Sep 2015 04:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbPZ9-0001MZ-OF for qemu-devel@nongnu.org; Mon, 14 Sep 2015 04:56:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbPZ9-0001MT-Iv for qemu-devel@nongnu.org; Mon, 14 Sep 2015 04:56:47 -0400 Date: Mon, 14 Sep 2015 09:56:41 +0100 From: "Daniel P. Berrange" Message-ID: <20150914085641.GB7611@redhat.com> References: <1441783481-17698-1-git-send-email-yanghy@cn.fujitsu.com> <1441783481-17698-3-git-send-email-yanghy@cn.fujitsu.com> <20150914085442.GA7611@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150914085442.GA7611@redhat.com> Subject: Re: [Qemu-devel] [PATCH v10 02/10] init/cleanup of netfilter object Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yang Hongyang Cc: thuth@redhat.com, zhang.zhanghailiang@huawei.com, lizhijian@cn.fujitsu.com, jasowang@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, Sep 14, 2015 at 09:54:42AM +0100, Daniel P. Berrange wrote: > On Wed, Sep 09, 2015 at 03:24:33PM +0800, Yang Hongyang wrote: > > Add a netfilter object based on QOM. > > > > A netfilter is attached to a netdev, captures all network packets > > that pass through the netdev. When we delete the netdev, we also > > delete the netfilter object attached to it, because if the netdev is > > removed, the filter which attached to it is useless. > > > > QTAILQ_ENTRY global_list but used by filter layer, so that we can > > manage all filters together. > > QTAILQ_ENTRY next used by netdev, filter belongs to the specific netdev is > > in this queue. > > > > Also init delayed object after net_init_clients, because netfilters need > > to be initialized after net clients initialized. > > > > Signed-off-by: Yang Hongyang > > diff --git a/vl.c b/vl.c > > index 584ca88..672f8b2 100644 > > --- a/vl.c > > +++ b/vl.c > > @@ -2783,6 +2783,7 @@ static bool object_create_initial(const char *type) > > if (g_str_equal(type, "rng-egd")) { > > return false; > > } > > + /* TODO: reture false for concrete netfilters */ > > return true; > > } > > Don't you want to be adding your object type here, alongside rng-egd > since IIRC, you said it needed to be created later Oh ignore this comment, I forgot this particular object is just an abstract base Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|