[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a949a956-637b-90e1-991a-52991397278b@alibaba-inc.com>
Date: Tue, 07 Jul 2020 03:56:11 +0800
From: "YU, Xiangning" <xiangning.yu@...baba-inc.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: sched: Lockless Token Bucket (LTB)
Qdisc
On 7/6/20 11:37 AM, Stephen Hemminger wrote:
> On Tue, 07 Jul 2020 02:08:13 +0800
> "YU, Xiangning" <xiangning.yu@...baba-inc.com> wrote:
>
>> +static inline int ltb_drain(struct ltb_class *cl)
>> +{
>> + typeof(&cl->drain_queue) queue;
>> + struct sk_buff *skb;
>> + int npkts, bytes;
>> + unsigned long now = NOW();
>> + int cpu;
>> + struct ltb_sched *ltb = qdisc_priv(cl->root_qdisc);
>> + struct ltb_pcpu_sched *pcpu_q;
>> + s64 timestamp;
>> + bool need_watchdog = false;
>> + struct cpumask cpumask;
>> +
>> + npkts = 0;
>> + bytes = 0;
>
> It would be safer to use unsigned int for npkts and bytes.
> These should never be negative.
>
Thank you Stephen. I will make these changes, including those mentioned in your previous email.
- Xiangning
Powered by blists - more mailing lists