Commit b9a7afde authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

htb: initialize cl->tokens and cl->ctokens correctly

These are in ns so convert from ticks to ns.
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bdd6998b
...@@ -1459,8 +1459,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, ...@@ -1459,8 +1459,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
cl->parent = parent; cl->parent = parent;
/* set class to be in HTB_CAN_SEND state */ /* set class to be in HTB_CAN_SEND state */
cl->tokens = hopt->buffer; cl->tokens = PSCHED_TICKS2NS(hopt->buffer);
cl->ctokens = hopt->cbuffer; cl->ctokens = PSCHED_TICKS2NS(hopt->cbuffer);
cl->mbuffer = 60 * PSCHED_TICKS_PER_SEC; /* 1min */ cl->mbuffer = 60 * PSCHED_TICKS_PER_SEC; /* 1min */
cl->t_c = psched_get_time(); cl->t_c = psched_get_time();
cl->cmode = HTB_CAN_SEND; cl->cmode = HTB_CAN_SEND;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment