From: Cong Wang <xiyou.wangc...@gmail.com>
Date: Thu, 21 Sep 2017 16:43:00 -0700

> @@ -421,27 +427,6 @@ static int cls_bpf_set_parms(struct net *net, struct 
> tcf_proto *tp,
>       return 0;
>  }
>  
> -static u32 cls_bpf_grab_new_handle(struct tcf_proto *tp,
> -                                struct cls_bpf_head *head)
> -{
> -     unsigned int i = 0x80000000;
> -     u32 handle;
> -
> -     do {
> -             if (++head->hgen == 0x7FFFFFFF)
> -                     head->hgen = 1;
> -     } while (--i > 0 && cls_bpf_get(tp, head->hgen));
> -
> -     if (unlikely(i == 0)) {
> -             pr_err("Insufficient number of handles\n");
> -             handle = 0;
> -     } else {
> -             handle = head->hgen;
> -     }
> -
> -     return handle;
> -}
> -

If I read the code properly, the existing code allows IDs from '1' to
and including '0x7ffffffe', whereas the new code allows up to and
including '0x7ffffffff'.

Whether intentional or not this is a change in behavior.  If it's OK,
it should be at least documented either in a comment or in the
commit log itself.

Similarly for your other scheduler IDR changes.

Thanks.

Reply via email to