mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
htb: initialize cl->tokens and cl->ctokens correctly
These are in ns so convert from ticks to ns. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bdd6998b1e
commit
b9a7afdefd
@ -1459,8 +1459,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
|
||||
cl->parent = parent;
|
||||
|
||||
/* set class to be in HTB_CAN_SEND state */
|
||||
cl->tokens = hopt->buffer;
|
||||
cl->ctokens = hopt->cbuffer;
|
||||
cl->tokens = PSCHED_TICKS2NS(hopt->buffer);
|
||||
cl->ctokens = PSCHED_TICKS2NS(hopt->cbuffer);
|
||||
cl->mbuffer = 60 * PSCHED_TICKS_PER_SEC; /* 1min */
|
||||
cl->t_c = psched_get_time();
|
||||
cl->cmode = HTB_CAN_SEND;
|
||||
|
Loading…
Reference in New Issue
Block a user