]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
sch_netem: Replace ->requeue() method with open code
authorJarek Poplawski <jarkao2@gmail.com>
Sun, 2 Nov 2008 07:36:03 +0000 (00:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Nov 2008 07:36:03 +0000 (00:36 -0700)
After removing netem classful functionality we are sure its inner
qdisc is tfifo, so we can replace qdisc->ops->requeue() method with
open code. After this patch there are no more ops->requeue() users.

The idea of this patch is by Patrick McHardy.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c

index 2ad09594c8bc13f5f505476ffdec76000930e5c0..1aa43453705cc1a8e8bdba71a98891d5216f951a 100644 (file)
@@ -233,7 +233,11 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
                 */
                cb->time_to_send = psched_get_time();
                q->counter = 0;
-               ret = q->qdisc->ops->requeue(skb, q->qdisc);
+
+               __skb_queue_head(&q->qdisc->q, skb);
+               q->qdisc->qstats.backlog += qdisc_pkt_len(skb);
+               q->qdisc->qstats.requeues++;
+               ret = NET_XMIT_SUCCESS;
        }
 
        if (likely(ret == NET_XMIT_SUCCESS)) {