[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object
Date: Wed, 16 Sep 2015 15:09:30 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/16/2015 06:15 AM, 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 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 <address@hidden>
> ---

Interface review:

> +++ b/qapi-schema.json
> @@ -2551,6 +2551,24 @@
>      'opts': 'NetClientOptions' } }
>  ##
> +# @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):


Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]