Patchwork [07/14] sch_hfsc: Use ->requeue queue instead of ops.

login
register
mail settings
Submitter Jarek Poplawski
Date Oct. 14, 2008, 9:54 a.m.
Message ID <20081014095423.GH10804@ff.dom.local>
Download mbox | patch
Permalink /patch/4432/
State RFC
Delegated to: David Miller
Headers show

Comments

Jarek Poplawski - Oct. 14, 2008, 9:54 a.m.
-------- Original Message --------
Subject: [PATCH 8/9]: sch_hfsc: Use ->requeue queue instead of ops.
Date: Mon, 18 Aug 2008 01:37:15 -0700 (PDT)
From: David Miller <davem@davemloft.net>

------------------>
From: David Miller <davem@davemloft.net>
sch_hfsc: Use ->requeue queue instead of ops.

In fact this "peek head SKB for len" sequence could be
optimized even further.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
 net/sched/sch_hfsc.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

Patch

diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 67aa3ea..87da751 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -896,12 +896,7 @@  qdisc_peek_len(struct Qdisc *sch)
 		return 0;
 	}
 	len = qdisc_pkt_len(skb);
-	if (unlikely(sch->ops->requeue(skb, sch) != NET_XMIT_SUCCESS)) {
-		if (net_ratelimit())
-			printk("qdisc_peek_len: failed to requeue\n");
-		qdisc_tree_decrease_qlen(sch, 1);
-		return 0;
-	}
+	__skb_queue_head(&sch->requeue, skb);
 	return len;
 }