qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH COLO-Frame v14 31/40] net/filter: Add a 'status'


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH COLO-Frame v14 31/40] net/filter: Add a 'status' property for filter object
Date: Tue, 23 Feb 2016 16:34:54 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1


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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]