net_sched: remove internal use of TC_POLICE_*
[cascardo/linux.git] / net / sched / sch_atm.c
index 1911af3..e04ea69 100644 (file)
@@ -363,10 +363,10 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        struct atm_flow_data *flow;
        struct tcf_result res;
        int result;
-       int ret = NET_XMIT_POLICED;
+       int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
 
        pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
-       result = TC_POLICE_OK;  /* be nice to gcc */
+       result = TC_ACT_OK;     /* be nice to gcc */
        flow = NULL;
        if (TC_H_MAJ(skb->priority) != sch->handle ||
            !(flow = (struct atm_flow_data *)atm_tc_get(sch, skb->priority))) {
@@ -403,7 +403,7 @@ done:
                case TC_ACT_SHOT:
                        kfree_skb(skb);
                        goto drop;
-               case TC_POLICE_RECLASSIFY:
+               case TC_ACT_RECLASSIFY:
                        if (flow->excess)
                                flow = flow->excess;
                        else
@@ -519,20 +519,6 @@ static struct sk_buff *atm_tc_peek(struct Qdisc *sch)
        return p->link.q->ops->peek(p->link.q);
 }
 
-static unsigned int atm_tc_drop(struct Qdisc *sch)
-{
-       struct atm_qdisc_data *p = qdisc_priv(sch);
-       struct atm_flow_data *flow;
-       unsigned int len;
-
-       pr_debug("atm_tc_drop(sch %p,[qdisc %p])\n", sch, p);
-       list_for_each_entry(flow, &p->flows, list) {
-               if (flow->q->ops->drop && (len = flow->q->ops->drop(flow->q)))
-                       return len;
-       }
-       return 0;
-}
-
 static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt)
 {
        struct atm_qdisc_data *p = qdisc_priv(sch);
@@ -637,7 +623,8 @@ atm_tc_dump_class_stats(struct Qdisc *sch, unsigned long arg,
 {
        struct atm_flow_data *flow = (struct atm_flow_data *)arg;
 
-       if (gnet_stats_copy_basic(d, NULL, &flow->bstats) < 0 ||
+       if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch),
+                                 d, NULL, &flow->bstats) < 0 ||
            gnet_stats_copy_queue(d, NULL, &flow->qstats, flow->q->q.qlen) < 0)
                return -1;
 
@@ -671,7 +658,6 @@ static struct Qdisc_ops atm_qdisc_ops __read_mostly = {
        .enqueue        = atm_tc_enqueue,
        .dequeue        = atm_tc_dequeue,
        .peek           = atm_tc_peek,
-       .drop           = atm_tc_drop,
        .init           = atm_tc_init,
        .reset          = atm_tc_reset,
        .destroy        = atm_tc_destroy,