From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKRaX-0006GD-2Q for qemu-devel@nongnu.org; Wed, 29 Jul 2015 09:40:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKRaS-0006gk-9C for qemu-devel@nongnu.org; Wed, 29 Jul 2015 09:40:05 -0400 Received: from [59.151.112.132] (port=59455 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKRaQ-0006fa-0a for qemu-devel@nongnu.org; Wed, 29 Jul 2015 09:40:00 -0400 Message-ID: <55B8D7A1.5090402@cn.fujitsu.com> Date: Wed, 29 Jul 2015 21:39:45 +0800 From: Yang Hongyang MIME-Version: 1.0 References: <1438167116-29270-1-git-send-email-yanghy@cn.fujitsu.com> <412637221.335850.1438174568926.JavaMail.zimbra@redhat.com> In-Reply-To: <412637221.335850.1438174568926.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 00/12] For QEMU 2.5: Add a netfilter object and netbuffer filter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: zhang zhanghailiang , jasowang@redhat.com, qemu-devel@nongnu.org, mrhines@linux.vnet.ibm.com, stefanha@redhat.com Hi Thomas, On 07/29/2015 08:56 PM, Thomas Huth wrote: > On Wednesday, July 29, 2015 12:51:44 PM, > "Yang Hongyang" wrote: >> >> I do not take this as v2 because the design of this has been changed, >> and code is rewritten. according to thread: >> http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg05445.html >> >> This patch add a new object netfilter, capture all network packets. >> Also implement a netbuffer based on this object. >> the "buffer" netfilter could be used by VM FT solutions like >> Macrocheckpointing, to buffer/release packets. Or to simulate >> packet delay. >> >> Usage: >> -netdev tap,id=bn0 >> -netfilter buffer,id=f0,netdev=bn0,interval=1000 >> -device e1000,netdev=bn0 > > What if I want to use multiple filters at once? Is there a way to > determine the order in which the filters are run through? The filters are in an QTAILQ list, so it's order is what appears first will be first. for example: -netfilter dump,... -netfilter buffer,... dump will be the first filter. > >> dynamically add/remove netfilters: >> netfilter_add buffer,id=f0,netdev=bn0,interval=1000 >> netfilter_del f0 > > Same here ... let's assume there are already two filters - can I > somehow add a third filter inbetween the two? It's not possiable in this series, but it can be supported later, we can add an order option to the netfilter, so that it can be the order whatever you want. > > Thomas > . > -- Thanks, Yang.