string: factorize skip_spaces and export it to be generally available
[safe/jmp/linux-2.6] / net / sched / sch_ingress.c
index 956c80a..a9e646b 100644 (file)
@@ -22,12 +22,6 @@ struct ingress_qdisc_data {
 
 /* ------------------------- Class/flow operations ------------------------- */
 
-static int ingress_graft(struct Qdisc *sch, unsigned long arg,
-                        struct Qdisc *new, struct Qdisc **old)
-{
-       return -EOPNOTSUPP;
-}
-
 static struct Qdisc *ingress_leaf(struct Qdisc *sch, unsigned long arg)
 {
        return NULL;
@@ -48,12 +42,6 @@ static void ingress_put(struct Qdisc *sch, unsigned long cl)
 {
 }
 
-static int ingress_change(struct Qdisc *sch, u32 classid, u32 parent,
-                         struct nlattr **tca, unsigned long *arg)
-{
-       return 0;
-}
-
 static void ingress_walk(struct Qdisc *sch, struct qdisc_walker *walker)
 {
        return;
@@ -77,7 +65,7 @@ static int ingress_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        result = tc_classify(skb, p->filter_list, &res);
 
        sch->bstats.packets++;
-       sch->bstats.bytes += skb->len;
+       sch->bstats.bytes += qdisc_pkt_len(skb);
        switch (result) {
        case TC_ACT_SHOT:
                result = TC_ACT_SHOT;
@@ -123,11 +111,9 @@ nla_put_failure:
 }
 
 static const struct Qdisc_class_ops ingress_class_ops = {
-       .graft          =       ingress_graft,
        .leaf           =       ingress_leaf,
        .get            =       ingress_get,
        .put            =       ingress_put,
-       .change         =       ingress_change,
        .walk           =       ingress_walk,
        .tcf_chain      =       ingress_find_tcf,
        .bind_tcf       =       ingress_bind_filter,