From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 11/14] pkt_sched: Use qdisc_requeue() wrapper instead of open-coding.
Date: Tue, 14 Oct 2008 09:55:13 +0000 [thread overview]
Message-ID: <20081014095513.GL10804@ff.dom.local> (raw)
In-Reply-To: <fe92ba9380e7da89b674cc58fcb5bc1dae69e0c6.1223973003.git.jarkao2@gmail.com>
Replace __skb_queue_head() and __skb_queue_tail() to sch->requeue list
with qdisc_requeue(). This change adds btw. updates of sch->q.qlen and
other stats, and uses __skb_queue_head() everywhere, which is proper
replacement for qdisc->ops->requeue() previously used here.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/sch_atm.c | 2 +-
net/sched/sch_hfsc.c | 2 +-
net/sched/sch_netem.c | 4 ++--
net/sched/sch_tbf.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 7a34e3e..7f9e884 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -482,7 +482,7 @@ static void sch_atm_dequeue(unsigned long data)
*/
while ((skb = qdisc_dequeue(flow->q))) {
if (!atm_may_send(flow->vcc, skb->truesize)) {
- __skb_queue_tail(&flow->q->requeue, skb);
+ qdisc_requeue(flow->q, skb);
break;
}
pr_debug("atm_tc_dequeue: sending on class %p\n", flow);
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 5598e73..53153ba 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -896,7 +896,7 @@ qdisc_peek_len(struct Qdisc *sch)
return 0;
}
len = qdisc_pkt_len(skb);
- __skb_queue_head(&sch->requeue, skb);
+ qdisc_requeue(sch, skb);
return len;
}
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 17d161b..0fc86b7 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -233,7 +233,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
*/
cb->time_to_send = psched_get_time();
q->counter = 0;
- __skb_queue_tail(&q->qdisc->requeue, skb);
+ qdisc_requeue(q->qdisc, skb);
ret = NET_XMIT_SUCCESS;
}
@@ -282,7 +282,7 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
return skb;
}
- __skb_queue_tail(&q->qdisc->requeue, skb);
+ qdisc_requeue(q->qdisc, skb);
qdisc_watchdog_schedule(&q->watchdog, cb->time_to_send);
}
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 708e1eb..9f1a9ce 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -201,7 +201,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch)
(cf. CSZ, HPFQ, HFSC)
*/
- __skb_queue_tail(&q->qdisc->requeue, skb);
+ qdisc_requeue(q->qdisc, skb);
sch->qstats.overlimits++;
}
return NULL;
--
1.5.6.5
next prev parent reply other threads:[~2008-10-14 9:55 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 ` [PATCH 09/14] pkt_sched: Kill qdisc->ops->requeue() in sch_atm and sch_multiq Jarek Poplawski
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 ` Jarek Poplawski [this message]
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=20081014095513.GL10804@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).