From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgRgK-0007FF-8x for qemu-devel@nongnu.org; Mon, 28 Sep 2015 02:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgRgH-0007L2-3f for qemu-devel@nongnu.org; Mon, 28 Sep 2015 02:13:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgRgG-0007Kr-VI for qemu-devel@nongnu.org; Mon, 28 Sep 2015 02:12:57 -0400 References: <1442405768-23019-1-git-send-email-yanghy@cn.fujitsu.com> <1442405768-23019-10-git-send-email-yanghy@cn.fujitsu.com> <87si64qiyr.fsf@blackfin.pond.sub.org> <5604F54F.1000509@cn.fujitsu.com> <87bncqy1tn.fsf@blackfin.pond.sub.org> From: Jason Wang Message-ID: <5608DA68.2050200@redhat.com> Date: Mon, 28 Sep 2015 14:12:56 +0800 MIME-Version: 1.0 In-Reply-To: <87bncqy1tn.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Yang Hongyang Cc: thuth@redhat.com, stefanha@redhat.com, zhang.zhanghailiang@huawei.com, lizhijian@cn.fujitsu.com, qemu-devel@nongnu.org On 09/25/2015 11:07 PM, Markus Armbruster wrote: > Yang Hongyang writes: > >> On 09/24/2015 05:12 PM, Markus Armbruster wrote: >>> Yang Hongyang writes: >>> >>>> This filter is to buffer/release packets, this feature can be used >>>> when using MicroCheckpointing, or other Remus like VM FT solutions, you >>> What's "Remus"? [...] >>> >>>> + >>>> +static void filter_buffer_release_timer(void *opaque) >>>> +{ >>>> + NetFilterState *nf = opaque; >>>> + FilterBufferState *s = FILTER_BUFFER(nf); >>> Style nit: blank line between declarations and statements, please. >>> >>>> + filter_buffer_flush(nf); >>> Is purging correct here? > When the timer expires, we flush as many buffered packets as we can, > then throw away the rest. Why throw them away? Shouldn't we leave them > in the buffer, and only throw away packets when the buffer is full? May need a "FIXME" or "TODO" here. I think this is for simplicity. We could queue the packet if the receiver or next filter could not receive packets. But currently there's no way for the next filter or recivier to notify us that it can receive more packet. This could be done in the future.