On 12/13/2016 06:42 AM, Jon Maloy wrote:
>  void link_prepare_wakeup(struct tipc_link *l)
>  {
> -     int pnd[TIPC_SYSTEM_IMPORTANCE + 1] = {0,};
> -     int imp, lim;
>       struct sk_buff *skb, *tmp;
> +     int imp, i = 0;
>
>       skb_queue_walk_safe(&l->wakeupq, skb, tmp) {
>               imp = TIPC_SKB_CB(skb)->chain_imp;
> -             lim = l->backlog[imp].limit;
> -             pnd[imp] += TIPC_SKB_CB(skb)->chain_sz;
> -             if ((pnd[imp] + l->backlog[imp].len) >= lim)
> +             if (l->backlog[imp].len < l->backlog[imp].limit) {
> +                     skb_unlink(skb, &l->wakeupq);
> +                     skb_queue_tail(l->inputq, skb);
> +             } else if (i++ > 10) {

About wakeup skb number, probably we can make it smarter, for example, 
its value can be decided by link window size and the size of available 
backlog queue or something else. As the value is an important factor for 
us, I suggest it's worth considering more.

Regards,
Ying


>                       break;
> -             skb_unlink(skb, &l->wakeupq);
> -             skb_queue_tail(l->inputq, skb);
> +             }
>       }
>  }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to