Re: [PATCH] net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int

2016-07-18 Thread David Miller
From: Konstantin Khlebnikov Date: Sat, 16 Jul 2016 17:08:56 +0300 > In kernel HTB keeps tokens in signed 64-bit in nanoseconds. In netlink > protocol these values are converted into pshed ticks (64ns for now) and > truncated to 32-bit. In struct tc_htb_xstats fields "tokens" and "ctokens" > are d

Re: [PATCH] net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int

2016-07-18 Thread Cong Wang
On Sat, Jul 16, 2016 at 7:08 AM, Konstantin Khlebnikov wrote: > In kernel HTB keeps tokens in signed 64-bit in nanoseconds. In netlink > protocol these values are converted into pshed ticks (64ns for now) and > truncated to 32-bit. In struct tc_htb_xstats fields "tokens" and "ctokens" > are declar

[PATCH] net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int

2016-07-16 Thread Konstantin Khlebnikov
In kernel HTB keeps tokens in signed 64-bit in nanoseconds. In netlink protocol these values are converted into pshed ticks (64ns for now) and truncated to 32-bit. In struct tc_htb_xstats fields "tokens" and "ctokens" are declared as unsigned 32-bit but they could be negative thus tool 'tc' prints