]> err.no Git - linux-2.6/blobdiff - net/sched/sch_htb.c
[NET]: Move Qdisc_class_ops and Qdisc_ops in appropriate sections.
[linux-2.6] / net / sched / sch_htb.c
index b417a95df3223e4880f5b654abe7e98c5f424d09..72beb66cec9c2ad1a6e95f05f97c612972f7a6bc 100644 (file)
@@ -132,10 +132,8 @@ struct htb_class {
 static inline long L2T(struct htb_class *cl, struct qdisc_rate_table *rate,
                           int size)
 {
-       int slot = size >> rate->rate.cell_log;
-       if (slot > 255)
-               return (rate->data[255]*(slot >> 8) + rate->data[slot & 0xFF]);
-       return rate->data[slot];
+       long result = qdisc_l2t(rate, size);
+       return result;
 }
 
 struct htb_sched {
@@ -249,9 +247,6 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,
                case TC_ACT_SHOT:
                        return NULL;
                }
-#elif defined(CONFIG_NET_CLS_POLICE)
-               if (result == TC_POLICE_SHOT)
-                       return HTB_DIRECT;
 #endif
                if ((cl = (void *)res.class) == NULL) {
                        if (res.classid == sch->handle)
@@ -1534,7 +1529,7 @@ static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg)
        }
 }
 
-static struct Qdisc_class_ops htb_class_ops = {
+static const struct Qdisc_class_ops htb_class_ops = {
        .graft          =       htb_graft,
        .leaf           =       htb_leaf,
        .qlen_notify    =       htb_qlen_notify,
@@ -1550,7 +1545,7 @@ static struct Qdisc_class_ops htb_class_ops = {
        .dump_stats     =       htb_dump_class_stats,
 };
 
-static struct Qdisc_ops htb_qdisc_ops = {
+static struct Qdisc_ops htb_qdisc_ops __read_mostly = {
        .next           =       NULL,
        .cl_ops         =       &htb_class_ops,
        .id             =       "htb",