qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/9] netdev: Add a net filter


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 1/9] netdev: Add a net filter
Date: Mon, 27 Jul 2015 14:38:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

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 <address@hidden>

 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

 Thomas





reply via email to

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