[PKT_SCHED] HTB: initialize upper bound properly
[powerpc.git] / net / sched / sch_htb.c
index 558cc08..cd0a973 100644 (file)
@@ -27,7 +27,6 @@
  *
  * $Id: sch_htb.c,v 1.25 2003/12/07 11:08:25 devik Exp devik $
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -197,7 +196,7 @@ struct htb_class
     struct qdisc_rate_table *rate;     /* rate table of the class itself */
     struct qdisc_rate_table *ceil;     /* ceiling rate (limits borrows too) */
     long buffer,cbuffer;               /* token bucket depth/rate */
-    long mbuffer;                      /* max wait time */
+    psched_tdiff_t mbuffer;            /* max wait time */
     long tokens,ctokens;               /* current number of tokens */
     psched_time_t t_c;                 /* checkpoint time */
 };
@@ -321,7 +320,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, in
        if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) 
                return cl;
 
-       *qerr = NET_XMIT_DROP;
+       *qerr = NET_XMIT_BYPASS;
        tcf = q->filter_list;
        while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) {
 #ifdef CONFIG_NET_CLS_ACT
@@ -724,7 +723,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        }
 #ifdef CONFIG_NET_CLS_ACT
     } else if (!cl) {
-       if (ret == NET_XMIT_DROP)
+       if (ret == NET_XMIT_BYPASS)
                sch->qstats.drops++;
        kfree_skb (skb);
        return ret;
@@ -1602,7 +1601,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
                /* set class to be in HTB_CAN_SEND state */
                cl->tokens = hopt->buffer;
                cl->ctokens = hopt->cbuffer;
-               cl->mbuffer = 60000000; /* 1min */
+               cl->mbuffer = PSCHED_JIFFIE2US(HZ*60) /* 1min */
                PSCHED_GET_TIME(cl->t_c);
                cl->cmode = HTB_CAN_SEND;