qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 03/11] netfilter: add netfilter_{add|del} com


From: Yang Hongyang
Subject: Re: [Qemu-devel] [PATCH v8 03/11] netfilter: add netfilter_{add|del} commands
Date: Mon, 31 Aug 2015 17:01:04 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 08/31/2015 03:08 PM, Markus Armbruster wrote:
Yang Hongyang <address@hidden> writes:

On 08/28/2015 07:37 PM, Markus Armbruster wrote:
[...]
To make progress, I suggest you try the following:

1. Make NetFilter a flat union, as I suggested in my review of PATCH 2.

2. Use Eric's idea above, because it avoids the dependency on code
     that's still under review.

Drawback: extra layer of nesting.  Ugly, but not the end of the world,
and we still have a chance to peel it off before the next release.

Thanks for the explanation, I will try to see if I can fully understand
your point.

If you have questions on the QAPI part, Eric and I will be happy to
answer them.

Thanks a lot for the help!

Sorry that I don't know much about the QAPI part, I have a question, in
previous reply, Eric suggested:
  >
  > Then this becomes something like:
  >
  >     { 'command': 'netfilter-add', 'data': 'NetFilter' }

  or use NetFilter as a union, but have the command be:

  { 'command': 'netfilter-add',
    'data': { 'data': 'NetFilter' } }

  where you have to pass an extra layer of nesting at the QMP layer.

What do you mean by pass an extra layer of nesting?

I've already switched to flat union as you suggested:

{ 'struct': 'NetFilterDummyOptions',
  'data': { } }

{ 'enum': 'NetFilterType',
  'data': ['dummy'] }

{ 'struct': 'NetFilterBase',
  'data': {
    'id':   'str',
    'netdev': 'str',
    '*chain': 'str',
    'type': 'NetFilterType' } }

{ 'union': 'NetFilter',
  'base': 'NetFilterBase',
  'discriminator': 'type',
  'data': {
    'dummy': 'NetFilterDummyOptions' } }

.


--
Thanks,
Yang.



reply via email to

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