On 7/6/20 11:37 AM, Stephen Hemminger wrote:
> On Tue, 07 Jul 2020 02:08:13 +0800
> "YU, Xiangning" <xiangning...@alibaba-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

Reply via email to