From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: [patch net-next v2 04/11] htb: initialize cl->tokens and cl->ctokens correctly Date: Fri, 8 Feb 2013 19:59:34 +0100 Message-ID: <1360349981-27801-5-git-send-email-jiri@resnulli.us> References: <1360349981-27801-1-git-send-email-jiri@resnulli.us> Cc: davem@davemloft.net, edumazet@google.com, jhs@mojatatu.com, kuznet@ms2.inr.ac.ru, j.vimal@gmail.com To: netdev@vger.kernel.org Return-path: Received: from mail-ee0-f54.google.com ([74.125.83.54]:44293 "EHLO mail-ee0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946783Ab3BHS77 (ORCPT ); Fri, 8 Feb 2013 13:59:59 -0500 Received: by mail-ee0-f54.google.com with SMTP id c41so2168083eek.27 for ; Fri, 08 Feb 2013 10:59:58 -0800 (PST) In-Reply-To: <1360349981-27801-1-git-send-email-jiri@resnulli.us> Sender: netdev-owner@vger.kernel.org List-ID: These are in ns so convert from ticks to ns. Signed-off-by: Jiri Pirko Acked-by: Eric Dumazet --- net/sched/sch_htb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 547912e9..2b22544 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -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; -- 1.8.1.2