]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_api.c
lne390: convert to net_device_ops
[linux-2.6-omap-h63xx.git] / net / sched / sch_api.c
index e5646614e88d83733acf9ccd105885358fe0a12e..3fcfd4ef11d1d9bca8d3ce4670404e4ae5af9df7 100644 (file)
@@ -97,11 +97,6 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n,
 
    Auxiliary routines:
 
-   ---requeue
-
-   requeues once dequeued packet. It is used for non-standard or
-   just buggy devices, which can defer output even if netif_queue_stopped()=0.
-
    ---peek
 
    like dequeue but without removing a packet from the queue
@@ -151,8 +146,6 @@ int register_qdisc(struct Qdisc_ops *qops)
 
        if (qops->enqueue == NULL)
                qops->enqueue = noop_qdisc_ops.enqueue;
-       if (qops->requeue == NULL)
-               qops->requeue = noop_qdisc_ops.requeue;
        if (qops->peek == NULL) {
                if (qops->dequeue == NULL) {
                        qops->peek = noop_qdisc_ops.peek;
@@ -211,28 +204,16 @@ struct Qdisc *qdisc_match_from_root(struct Qdisc *root, u32 handle)
        return NULL;
 }
 
-/*
- * This lock is needed until some qdiscs stop calling qdisc_tree_decrease_qlen()
- * without rtnl_lock(); currently hfsc_dequeue(), netem_dequeue(), tbf_dequeue()
- */
-static DEFINE_SPINLOCK(qdisc_list_lock);
-
 static void qdisc_list_add(struct Qdisc *q)
 {
-       if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS)) {
-               spin_lock_bh(&qdisc_list_lock);
+       if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS))
                list_add_tail(&q->list, &qdisc_root_sleeping(q)->list);
-               spin_unlock_bh(&qdisc_list_lock);
-       }
 }
 
 void qdisc_list_del(struct Qdisc *q)
 {
-       if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS)) {
-               spin_lock_bh(&qdisc_list_lock);
+       if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS))
                list_del(&q->list);
-               spin_unlock_bh(&qdisc_list_lock);
-       }
 }
 EXPORT_SYMBOL(qdisc_list_del);
 
@@ -241,22 +222,17 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)
        unsigned int i;
        struct Qdisc *q;
 
-       spin_lock_bh(&qdisc_list_lock);
-
        for (i = 0; i < dev->num_tx_queues; i++) {
                struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
                struct Qdisc *txq_root = txq->qdisc_sleeping;
 
                q = qdisc_match_from_root(txq_root, handle);
                if (q)
-                       goto unlock;
+                       goto out;
        }
 
        q = qdisc_match_from_root(dev->rx_queue.qdisc_sleeping, handle);
-
-unlock:
-       spin_unlock_bh(&qdisc_list_lock);
-
+out:
        return q;
 }
 
@@ -429,6 +405,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab)
        struct nlattr *nest;
 
        nest = nla_nest_start(skb, TCA_STAB);
+       if (nest == NULL)
+               goto nla_put_failure;
        NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts);
        nla_nest_end(skb, nest);