From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKjZy-0003uW-Bn for qemu-devel@nongnu.org; Thu, 30 Jul 2015 04:52:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKjZt-0005JZ-1u for qemu-devel@nongnu.org; Thu, 30 Jul 2015 04:52:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKjZs-0005JT-T3 for qemu-devel@nongnu.org; Thu, 30 Jul 2015 04:52:36 -0400 Message-ID: <55B9E5CE.9080000@redhat.com> Date: Thu, 30 Jul 2015 16:52:30 +0800 From: Jason Wang MIME-Version: 1.0 References: <1438167116-29270-1-git-send-email-yanghy@cn.fujitsu.com> <1438167116-29270-10-git-send-email-yanghy@cn.fujitsu.com> <55B9B269.3030709@redhat.com> <55B9CBA5.7050103@cn.fujitsu.com> In-Reply-To: <55B9CBA5.7050103@cn.fujitsu.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/12] netfilter: add a netbuffer filter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yang Hongyang , qemu-devel@nongnu.org Cc: thuth@redhat.com, mrhines@linux.vnet.ibm.com, zhang.zhanghailiang@huawei.com, stefanha@redhat.com On 07/30/2015 03:00 PM, Yang Hongyang wrote: > On 07/30/2015 01:13 PM, Jason Wang wrote: > [...] >>> + if (sender->info->type == NET_CLIENT_OPTIONS_KIND_NIC) { >>> + /* we only buffer guest output packets */ >>> + qemu_net_queue_append(queue, sender, flags, data, size, >>> + packet_send_completed); >> >> This may brings some confusion for user. Since the name is 'netbuffer'. >> Maybe we can change the filter to be ingress or out or both? Like: >> >> -device virtio-net-pci,id=virtio0 >> -netfilter buffer,id=filter0,dev=virtio0,interval=1000,type=out >> >> Then we can just try to enqueue the packet when virtio-net-pci is >> sender? > > A good idea, I also thought about this, but a question, should we make > this type option a mandatory to netfilter object or optional? if it's > optional, the default will be "all" Yes, this should work.