From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuGwg-0000wF-RB for qemu-devel@nongnu.org; Thu, 05 Nov 2015 04:35:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuGwd-0007c6-6H for qemu-devel@nongnu.org; Thu, 05 Nov 2015 04:35:02 -0500 Received: from [59.151.112.132] (port=16958 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuGwc-0007bg-LP for qemu-devel@nongnu.org; Thu, 05 Nov 2015 04:34:59 -0500 References: <1446551816-15768-1-git-send-email-zhang.zhanghailiang@huawei.com> <1446551816-15768-36-git-send-email-zhang.zhanghailiang@huawei.com> <563973C9.8000607@redhat.com> <563B08A0.7030802@huawei.com> <563B18DA.4090001@cn.fujitsu.com> <563B1FB7.5080002@redhat.com> From: Wen Congyang Message-ID: <563B2278.6090609@cn.fujitsu.com> Date: Thu, 5 Nov 2015 17:33:44 +0800 MIME-Version: 1.0 In-Reply-To: <563B1FB7.5080002@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH COLO-Frame v10 35/38] netfilter: Introduce a API to automatically add filter-buffer for each netdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang , zhanghailiang , qemu-devel@nongnu.org Cc: lizhijian@cn.fujitsu.com, quintela@redhat.com, yunhong.jiang@intel.com, eddie.dong@intel.com, dgilbert@redhat.com, peter.huangpeng@huawei.com, arei.gonglei@huawei.com, stefanha@redhat.com, amit.shah@redhat.com On 11/05/2015 05:21 PM, Jason Wang wrote: > > > On 11/05/2015 04:52 PM, Wen Congyang wrote: >> On 11/05/2015 03:43 PM, zhanghailiang wrote: >>>> Hi Jason, >>>> >>>> On 2015/11/4 10:56, Jason Wang wrote: >>>>>> >>>>>> >>>>>> On 11/03/2015 07:56 PM, zhanghailiang wrote: >>>>>>>> Signed-off-by: zhanghailiang >>>>>>>> Cc: Jason Wang >>>>>> >>>>>> Commit log please. >>>>>> >>>>>>>> --- >>>>>>>> v10: new patch >>>>>>>> --- > > [...] > >>>>>>>> +} >>>>>>>> +/* >>>>>>>> +* This will be used by COLO or MC FT, for which they will need >>>>>>>> +* to buffer all the packets of all VM's net devices, Here we check >>>>>>>> +* and automatically add netfilter for netdev that doesn't attach any buffer >>>>>>>> +* netfilter. >>>>>>>> +*/ >>>>>>>> +void qemu_auto_add_filter_buffer(NetFilterDirection direction, Error **errp) >>>>>>>> +{ >>>>>>>> + char *queue = g_strdup(NetFilterDirection_lookup[direction]); >>>>>>>> + >>>>>>>> + qemu_foreach_netdev(netdev_add_filter_buffer, queue, >>>>>>>> + errp); >>>>>>>> + g_free(queue); >>>>>>>> +} >>>>>>>> + >>>>>> >>>>>> This make me think for following questions: >>>>>> >>>>>> - What if a nic is hot added after this "automatically" filter add? >> IIRC, we don't allow the user to hotplug a device when colo is running. >> >> Thanks >> Wen Congyang >> > > Even in the future? And how could forbid the user to do this, management? If we allow the user to hotplug a device, we need to auto hotplug the same device in the secondary qemu. It is hard to implement it now. We can add a new flag(for example: MONITOR_CMD_COLO_UNSUPPORTED), and do the check in handle_user_command() and handle_qmp_command(). Thanks Wen Congyang > > Thanks > . >