From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcJxW-0007IL-5J for qemu-devel@nongnu.org; Wed, 16 Sep 2015 17:09:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcJxS-0006Lo-3p for qemu-devel@nongnu.org; Wed, 16 Sep 2015 17:09:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcJxR-0006Lk-Tg for qemu-devel@nongnu.org; Wed, 16 Sep 2015 17:09:38 -0400 References: <1442405768-23019-1-git-send-email-yanghy@cn.fujitsu.com> <1442405768-23019-3-git-send-email-yanghy@cn.fujitsu.com> From: Eric Blake Message-ID: <55F9DA8A.1090306@redhat.com> Date: Wed, 16 Sep 2015 15:09:30 -0600 MIME-Version: 1.0 In-Reply-To: <1442405768-23019-3-git-send-email-yanghy@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="67Axc6h7iDXLQpIC0RPu1bK4uWCCMfxno" Subject: Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yang Hongyang , qemu-devel@nongnu.org Cc: thuth@redhat.com, zhang.zhanghailiang@huawei.com, lizhijian@cn.fujitsu.com, jasowang@redhat.com, armbru@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --67Axc6h7iDXLQpIC0RPu1bK4uWCCMfxno Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/16/2015 06:15 AM, Yang Hongyang wrote: > Add a netfilter object based on QOM. >=20 > 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. >=20 > QTAILQ_ENTRY next used by netdev, filter belongs to the specific netdev= is > in this queue. >=20 > Also init delayed object after net_init_clients, because netfilters nee= d > to be initialized after net clients initialized. >=20 > Signed-off-by: Yang Hongyang > --- Interface review: > +++ b/qapi-schema.json > @@ -2551,6 +2551,24 @@ > 'opts': 'NetClientOptions' } } > =20 > ## > +# @NetFilterChain > +# > +# netfilter chain, a netfilter is attached to a netdev, captures the > +# network packets of the netdev. Grammar. Maybe: This enum describes which packets are being tracked by a netfilter chain attached as a filter to a netdev object. > +# > +# @all: the filter will receive packets both sent to/from the netdev, = this > +# is the default chain. > +# > +# @in: the filter will receive packets sent to the netdev. > +# > +# @out: the filter will receive packets sent from the netdev. > +# > +# Since 2.5 > +## > +{ 'enum': 'NetFilterChain', > + 'data': [ 'all', 'in', 'out' ] } I don't see any other QMP usage of this enum anywhere in the series. Are you planning on supporting QMP? If so, let's get that design discussion started. If not, why not? In particular, you may want to base things on top of my work to make QMP 'netdev_add' a full-fledged introspectible command (still pending some qapi commits landing upstream): https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02602.html --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --67Axc6h7iDXLQpIC0RPu1bK4uWCCMfxno Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV+dqKAAoJEKeha0olJ0NqSYQH/2QKIB8hHHBYQx8mJt8jZbh9 KHS2MK/pbda3m3K/U4bbEwRO0O46SpqQtTGxKSHIm3/lRCRCT01KiFu2STRswZyi +6XCMOLYK2BwadIIYITXEYhr2lCIvThjySMqMm4+UYGb+DJKOfwFfZsen6tpZFQ7 q0buekbMNoUdgvviQJBLZRbktQoKAjuEV6uvg/No5/rsIX/lFfrcmZuwah5J91sg FnaSQJkjCprjlAX6rOA1DG5YGFDOiIFj0o1RG02rJy0WCdKVyNmK5+IUMlSyi7sn OCyv/9uTbBCu5UA0Q4ZHEe5zZw87RVgc2BlKfBHOBUr4c3OT9dRdQC1B0IMcQxc= =j1C9 -----END PGP SIGNATURE----- --67Axc6h7iDXLQpIC0RPu1bK4uWCCMfxno--