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 <zhang.zhanghaili...@huawei.com> >>>>>>>> Cc: Jason Wang <jasow...@redhat.com> >>>>>> >>>>>> 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 > . >