public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] sch_netem: Replace ->requeue() method with open code
@ 2008-10-31 13:20 Jarek Poplawski
  0 siblings, 0 replies; only message in thread
From: Jarek Poplawski @ 2008-10-31 13:20 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David Miller, Stephen Hemminger, Herbert Xu, netdev

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>

diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 2ad0959..1aa4345 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -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)) {
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-31 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 13:20 [PATCH 2/2] sch_netem: Replace ->requeue() method with open code Jarek Poplawski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox