netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 09/14] pkt_sched: Kill qdisc->ops->requeue() in sch_atm and sch_multiq.
Date: Tue, 14 Oct 2008 09:54:52 +0000	[thread overview]
Message-ID: <20081014095452.GJ10804@ff.dom.local> (raw)
In-Reply-To: <fe92ba9380e7da89b674cc58fcb5bc1dae69e0c6.1223973003.git.jarkao2@gmail.com>

It is only used by the qdisc->ops->requeue implementations themselves.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
 net/sched/sch_atm.c    |   18 ------------------
 net/sched/sch_multiq.c |   36 +-----------------------------------
 2 files changed, 1 insertions(+), 53 deletions(-)

diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index c8bc5fc..7a34e3e 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -522,23 +522,6 @@ static struct sk_buff *atm_tc_dequeue(struct Qdisc *sch)
 	return skb;
 }
 
-static int atm_tc_requeue(struct sk_buff *skb, struct Qdisc *sch)
-{
-	struct atm_qdisc_data *p = qdisc_priv(sch);
-	int ret;
-
-	pr_debug("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
-	ret = p->link.q->ops->requeue(skb, p->link.q);
-	if (!ret) {
-		sch->q.qlen++;
-		sch->qstats.requeues++;
-	} else if (net_xmit_drop_count(ret)) {
-		sch->qstats.drops++;
-		p->link.qstats.drops++;
-	}
-	return ret;
-}
-
 static unsigned int atm_tc_drop(struct Qdisc *sch)
 {
 	struct atm_qdisc_data *p = qdisc_priv(sch);
@@ -694,7 +677,6 @@ static struct Qdisc_ops atm_qdisc_ops __read_mostly = {
 	.priv_size	= sizeof(struct atm_qdisc_data),
 	.enqueue	= atm_tc_enqueue,
 	.dequeue	= atm_tc_dequeue,
-	.requeue	= atm_tc_requeue,
 	.drop		= atm_tc_drop,
 	.init		= atm_tc_init,
 	.reset		= atm_tc_reset,
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index df1857a..cf34f67 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -93,39 +93,6 @@ multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 }
 
 
-static int
-multiq_requeue(struct sk_buff *skb, struct Qdisc *sch)
-{
-	struct Qdisc *qdisc;
-	struct multiq_sched_data *q = qdisc_priv(sch);
-	int ret;
-
-	qdisc = multiq_classify(skb, sch, &ret);
-#ifdef CONFIG_NET_CLS_ACT
-	if (qdisc == NULL) {
-		if (ret & __NET_XMIT_BYPASS)
-			sch->qstats.drops++;
-		kfree_skb(skb);
-		return ret;
-	}
-#endif
-
-	ret = qdisc->ops->requeue(skb, qdisc);
-	if (ret == NET_XMIT_SUCCESS) {
-		sch->q.qlen++;
-		sch->qstats.requeues++;
-		if (q->curband)
-			q->curband--;
-		else
-			q->curband = q->bands - 1;
-		return NET_XMIT_SUCCESS;
-	}
-	if (net_xmit_drop_count(ret))
-		sch->qstats.drops++;
-	return ret;
-}
-
-
 static struct sk_buff *multiq_dequeue(struct Qdisc *sch)
 {
 	struct multiq_sched_data *q = qdisc_priv(sch);
@@ -140,7 +107,7 @@ static struct sk_buff *multiq_dequeue(struct Qdisc *sch)
 			q->curband = 0;
 
 		/* Check that target subqueue is available before
-		 * pulling an skb to avoid excessive requeues
+		 * pulling an skb to avoid head-of-line blocking.
 		 */
 		if (!__netif_subqueue_stopped(qdisc_dev(sch), q->curband)) {
 			qdisc = q->queues[q->curband];
@@ -451,7 +418,6 @@ static struct Qdisc_ops multiq_qdisc_ops __read_mostly = {
 	.priv_size	=	sizeof(struct multiq_sched_data),
 	.enqueue	=	multiq_enqueue,
 	.dequeue	=	multiq_dequeue,
-	.requeue	=	multiq_requeue,
 	.drop		=	multiq_drop,
 	.init		=	multiq_init,
 	.reset		=	multiq_reset,
-- 
1.5.6.5


  parent reply	other threads:[~2008-10-14  9:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fe92ba9380e7da89b674cc58fcb5bc1dae69e0c6.1223973003.git.jarkao2@gmail.com>
2008-10-14  9:53 ` [PATCH 01/14] pkt_sched: Add qdisc_dequeue() helper Jarek Poplawski
2008-10-14  9:53 ` [PATCH 02/14] pkt_sched: Replace all explitic ->dequeue() calls with qdisc_dequeue() Jarek Poplawski
2008-10-14 10:35   ` Jarek Poplawski
2008-10-14  9:53 ` [PATCH 03/14] pkt_sched: Replace explitic ->dequeue() call with qdisc_dequeue() in sch_multiq Jarek Poplawski
2008-10-14  9:53 ` [PATCH 04/14] sch_netem: Use requeue list instead of ops->requeue() Jarek Poplawski
2008-10-14 15:22   ` Stephen Hemminger
2008-10-14 18:04     ` Jarek Poplawski
2008-10-14  9:54 ` [PATCH 05/14] sch_tbf: Use ->requeue queue instead of ops Jarek Poplawski
2008-10-14  9:54 ` [PATCH 06/14] sch_atm: " Jarek Poplawski
2008-10-14  9:54 ` [PATCH 07/14] sch_hfsc: " Jarek Poplawski
2008-10-14  9:54 ` [PATCH 08/14] pkt_sched: Kill qdisc->ops->requeue() Jarek Poplawski
2008-10-14  9:54 ` Jarek Poplawski [this message]
2008-10-14  9:55 ` [PATCH 10/14] pkt_sched: Redo qdisc_dequeue() and bring back qdisc_requeue() Jarek Poplawski
2008-10-14  9:55 ` [PATCH 11/14] pkt_sched: Use qdisc_requeue() wrapper instead of open-coding Jarek Poplawski
2008-10-14  9:55 ` [PATCH 12/14] sch_htb: Fix a compiler warning in htb_enqueue() Jarek Poplawski
2008-10-14  9:55 ` [PATCH 13/14] sch_hfsc: Remove remains of the old requeue code Jarek Poplawski
2008-10-14  9:55 ` [PATCH 14/14] pkt_sched: sch_generic: Purge qdisc->requeue list in qdisc_reset() Jarek Poplawski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081014095452.GJ10804@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).