On 02/18/2016 11:27 AM, Hailiang Zhang wrote: >>> +static void netfilter_set_status(Object *obj, const char *str, >>> Error **errp) >>> +{ >>> + NetFilterState *nf = NETFILTER(obj); >>> + >>> + if (!strcmp(str, "enable")) { >>> + nf->enabled = true; >>> + } else if (!strcmp(str, "disable")) { >>> + nf->enabled = false; >> >> Do we need a filter specific callback here to drain filter's queue? E.g >> for filter-buffer ,need to release all the packets that has been >> buffered. >> > > I don't think we need to do that here, we drain the filter's queue > explicitly > when we try to change the filter's status .
I think we don't do this. E.g what happens if we disable a filter buffer? > Besides, it seems that, we didn't have a callback in filter layer to > process > the queued packets for different types of filters. Just need a type specific callback, no?