qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yang Hongyang <yanghy@cn.fujitsu.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: jasowang@redhat.com, mrhines@linux.vnet.ibm.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/9] netdev: Add a net filter
Date: Mon, 27 Jul 2015 21:15:28 +0800	[thread overview]
Message-ID: <55B62EF0.9040408@cn.fujitsu.com> (raw)
In-Reply-To: <55B62638.7000201@redhat.com>



On 07/27/2015 08:38 PM, Thomas Huth wrote:
> On 24/07/15 12:55, Yang Hongyang wrote:
>> This patch add a net filter between network backend and NIC devices.
>> All packets will pass by this filter.
>> TODO:
>>    multiqueue support.
>>
>>                  +--------------+       +-------------+
>>    +----------+  |    filter    |       |frontend(NIC)|
>>    |      peer+-->              |       |             |
>>    | network  <--+backend       <-------+ peer        |
>>    | backend  |  |         peer +------->             |
>>    +----------+  +--------------+       +-------------+
>>
>> Usage:
>>    -netdev tap,id=bn0  # you can use whatever backend as needed
>>    -netdev filter,id=f0,backend=bn0
>>    -netdev filter-<plugin>,id=p0,filter=f0
>>    -device e1000,netdev=f0
>> NOTE:
>>    You can attach multiple plugins to the filter, dynamically add/remove
>> filter and filter-<plugin>.
>>    A filter without plugin supplied will do nothing except pass by all
>> packets, a plugin like dump for example, will dump all packets into a
>> file. Or other plugins like a netbuffer plugin, will simply buffer the
>> packets, release the packets when needed.
>>    You can also implement whatever plugin you needed based on this filter.
>>
>> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
>
>   Hi,
>
> just a quick comment: Please make sure to check your patches with
> scripts/checkpatch.pl first before sending them for review - at least
> for this patch, the script complains:
>
> ERROR: do not use C99 // comments
> #59: FILE: include/net/filter.h:12:
> +//#include "qapi-types.h"
>
> WARNING: braces {} are necessary for all arms of this statement
> #424: FILE: net/filter.c:311:
> +        if (plug->plugin == plugin)
> [...]
>
> total: 1 errors, 1 warnings, 463 lines checked

Sorry for not done so this time, will check next time.
Thank you!

>
>   Thomas
>
>
> .
>

-- 
Thanks,
Yang.

  reply	other threads:[~2015-07-27 13:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 10:55 [Qemu-devel] [PATCH 0/9] For QEMU 2.5: Add a net filter and a netbuffer plugin based on the filter Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 1/9] netdev: Add a net filter Yang Hongyang
2015-07-27 12:38   ` Thomas Huth
2015-07-27 13:15     ` Yang Hongyang [this message]
2015-07-24 10:55 ` [Qemu-devel] [PATCH 2/9] virtio-net: add filter support Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 3/9] filter: remove plugins when remove filter Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 4/9] filter: remove filter before remove network backend Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 5/9] filter: add netbuffer plugin Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 6/9] introduce qemu_find_net_clients_by_model Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 7/9] net/queue: export qemu_net_queue_append Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 8/9] move out net queue structs define Yang Hongyang
2015-07-24 10:55 ` [Qemu-devel] [PATCH 9/9] add a public api to release buffer Yang Hongyang
2015-07-25  5:06 ` [Qemu-devel] [PATCH 0/9] For QEMU 2.5: Add a net filter and a netbuffer plugin based on the filter zhanghailiang
2015-07-26 14:13   ` Yang Hongyang
2015-07-27 10:32     ` Daniel P. Berrange
2015-07-27 13:23       ` Yang Hongyang
2015-07-27  4:53 ` Jason Wang
2015-07-27  5:01   ` Yang Hongyang
2015-07-29 10:34 ` Yang Hongyang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55B62EF0.9040408@cn.fujitsu.com \
    --to=yanghy@cn.fujitsu.com \
    --cc=jasowang@redhat.com \
    --cc=mrhines@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).