Received: from eggs.gnu.org ([2001:4830:134:3::10]:54527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgT1S-0001V6-CI for qemu-devel@nongnu.org; Mon, 28 Sep 2015 03:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgT1P-00061x-0I for qemu-devel@nongnu.org; Mon, 28 Sep 2015 03:38:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgT1O-00061s-RF for qemu-devel@nongnu.org; Mon, 28 Sep 2015 03:38:50 -0400 From: Markus Armbruster 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> <5608DA68.2050200@redhat.com> Date: Mon, 28 Sep 2015 09:38:47 +0200 In-Reply-To: <5608DA68.2050200@redhat.com> (Jason Wang's message of "Mon, 28 Sep 2015 14:12:56 +0800") Message-ID: <87r3ljm1rs.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Jason Wang Cc: thuth@redhat.com, zhang.zhanghailiang@huawei.com, lizhijian@cn.fujitsu.com, qemu-devel@nongnu.org, stefanha@redhat.com, Yang Hongyang Jason Wang writes: > 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. Good enough for me. Make it FIXME if purging packets is actually wrong, else TODO.