From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKRik-0002tj-F5 for qemu-devel@nongnu.org; Wed, 29 Jul 2015 09:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKRig-0002ze-Tl for qemu-devel@nongnu.org; Wed, 29 Jul 2015 09:48:34 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:54592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKRig-0002zL-MY for qemu-devel@nongnu.org; Wed, 29 Jul 2015 09:48:30 -0400 Date: Wed, 29 Jul 2015 09:48:14 -0400 (EDT) From: Thomas Huth Message-ID: <1746840658.374278.1438177694325.JavaMail.zimbra@redhat.com> In-Reply-To: <55B8D7A1.5090402@cn.fujitsu.com> References: <1438167116-29270-1-git-send-email-yanghy@cn.fujitsu.com> <412637221.335850.1438174568926.JavaMail.zimbra@redhat.com> <55B8D7A1.5090402@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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: Yang Hongyang Cc: zhang zhanghailiang , jasowang@redhat.com, qemu-devel@nongnu.org, mrhines@linux.vnet.ibm.com, stefanha@redhat.com On Wednesday, July 29, 2015 3:39:45 PM, "Yang Hongyang" wrote: > > 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. Ok, thanks for the clarification. You're right, that's something that also can be added later if needed. Thomas