diff mbox

[RFC,5/7] filter-buffer: Accept zero interval

Message ID 1453451811-11860-6-git-send-email-zhang.zhanghailiang@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zhanghailiang Jan. 22, 2016, 8:36 a.m. UTC
We may want to accept zero interval when VM FT solutions like MC
or COLO use this filter to release packets on demand.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>
---
 net/filter-buffer.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Jason Wang Jan. 25, 2016, 5:19 a.m. UTC | #1
On 01/22/2016 04:36 PM, zhanghailiang wrote:
> We may want to accept zero interval when VM FT solutions like MC
> or COLO use this filter to release packets on demand.
>
> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
> Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>
> ---
>  net/filter-buffer.c | 10 ----------
>  1 file changed, 10 deletions(-)

Looks a independent patch of this rfc series.

>
> diff --git a/net/filter-buffer.c b/net/filter-buffer.c
> index 57be149..12e0c87 100644
> --- a/net/filter-buffer.c
> +++ b/net/filter-buffer.c
> @@ -103,16 +103,6 @@ static void filter_buffer_setup(NetFilterState *nf, Error **errp)
>  {
>      FilterBufferState *s = FILTER_BUFFER(nf);
>  
> -    /*
> -     * We may want to accept zero interval when VM FT solutions like MC
> -     * or COLO use this filter to release packets on demand.
> -     */
> -    if (!s->interval) {
> -        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "interval",
> -                   "a non-zero interval");
> -        return;
> -    }
> -
>      s->incoming_queue = qemu_new_net_queue(qemu_netfilter_pass_to_next, nf);
>      if (s->interval) {
>          timer_init_us(&s->release_timer, QEMU_CLOCK_VIRTUAL,
Zhanghailiang Jan. 25, 2016, 7:41 a.m. UTC | #2
On 2016/1/25 13:19, Jason Wang wrote:
>
>
> On 01/22/2016 04:36 PM, zhanghailiang wrote:
>> We may want to accept zero interval when VM FT solutions like MC
>> or COLO use this filter to release packets on demand.
>>
>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>> Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>
>> ---
>>   net/filter-buffer.c | 10 ----------
>>   1 file changed, 10 deletions(-)
>
> Looks a independent patch of this rfc series.
>

The interval of the default filter is zero, without this patch,
there will be an error report.

>>
>> diff --git a/net/filter-buffer.c b/net/filter-buffer.c
>> index 57be149..12e0c87 100644
>> --- a/net/filter-buffer.c
>> +++ b/net/filter-buffer.c
>> @@ -103,16 +103,6 @@ static void filter_buffer_setup(NetFilterState *nf, Error **errp)
>>   {
>>       FilterBufferState *s = FILTER_BUFFER(nf);
>>
>> -    /*
>> -     * We may want to accept zero interval when VM FT solutions like MC
>> -     * or COLO use this filter to release packets on demand.
>> -     */
>> -    if (!s->interval) {
>> -        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "interval",
>> -                   "a non-zero interval");
>> -        return;
>> -    }
>> -
>>       s->incoming_queue = qemu_new_net_queue(qemu_netfilter_pass_to_next, nf);
>>       if (s->interval) {
>>           timer_init_us(&s->release_timer, QEMU_CLOCK_VIRTUAL,
>
>
> .
>
diff mbox

Patch

diff --git a/net/filter-buffer.c b/net/filter-buffer.c
index 57be149..12e0c87 100644
--- a/net/filter-buffer.c
+++ b/net/filter-buffer.c
@@ -103,16 +103,6 @@  static void filter_buffer_setup(NetFilterState *nf, Error **errp)
 {
     FilterBufferState *s = FILTER_BUFFER(nf);
 
-    /*
-     * We may want to accept zero interval when VM FT solutions like MC
-     * or COLO use this filter to release packets on demand.
-     */
-    if (!s->interval) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "interval",
-                   "a non-zero interval");
-        return;
-    }
-
     s->incoming_queue = qemu_new_net_queue(qemu_netfilter_pass_to_next, nf);
     if (s->interval) {
         timer_init_us(&s->release_timer, QEMU_CLOCK_VIRTUAL,