From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 02/14] pkt_sched: Replace all explitic ->dequeue() calls with qdisc_dequeue().
Date: Tue, 14 Oct 2008 09:53:25 +0000 [thread overview]
Message-ID: <20081014095324.GC10804@ff.dom.local> (raw)
In-Reply-To: <fe92ba9380e7da89b674cc58fcb5bc1dae69e0c6.1223973003.git.jarkao2@gmail.com>
-------- Original Message --------
Subject: [PATCH 4/9]: pkt_sched: Replace all explitic ->dequeue() calls with qdisc_dequeue().
Date: Mon, 18 Aug 2008 01:36:58 -0700 (PDT)
From: David Miller <davem@davemloft.net>
----------->
From: David Miller <davem@davemloft.net>
pkt_sched: Replace all explitic ->dequeue() calls with qdisc_dequeue().
This spotted a bug in sch_dsmark, it was using qdisc->ops->dequeue()
instead of qdisc->dequeue().
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/sch_atm.c | 4 ++--
net/sched/sch_cbq.c | 2 +-
net/sched/sch_dsmark.c | 2 +-
net/sched/sch_hfsc.c | 4 ++--
net/sched/sch_htb.c | 2 +-
net/sched/sch_netem.c | 2 +-
net/sched/sch_prio.c | 2 +-
net/sched/sch_red.c | 2 +-
net/sched/sch_tbf.c | 2 +-
9 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 43d3725..ca3467b 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -480,7 +480,7 @@ static void sch_atm_dequeue(unsigned long data)
* If traffic is properly shaped, this won't generate nasty
* little bursts. Otherwise, it may ... (but that's okay)
*/
- while ((skb = flow->q->dequeue(flow->q))) {
+ while ((skb = qdisc_dequeue(flow->q))) {
if (!atm_may_send(flow->vcc, skb->truesize)) {
(void)flow->q->ops->requeue(skb, flow->q);
break;
@@ -516,7 +516,7 @@ static struct sk_buff *atm_tc_dequeue(struct Qdisc *sch)
pr_debug("atm_tc_dequeue(sch %p,[qdisc %p])\n", sch, p);
tasklet_schedule(&p->task);
- skb = p->link.q->dequeue(p->link.q);
+ skb = qdisc_dequeue(p->link.q);
if (skb)
sch->q.qlen--;
return skb;
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 8b06fa9..c68e09c 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -881,7 +881,7 @@ cbq_dequeue_prio(struct Qdisc *sch, int prio)
goto next_class;
}
- skb = cl->q->dequeue(cl->q);
+ skb = qdisc_dequeue(cl->q);
/* Class did not give us any skb :-(
It could occur even if cl->q->q.qlen != 0
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index ba43aab..c29e9c2 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -279,7 +279,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
pr_debug("dsmark_dequeue(sch %p,[qdisc %p])\n", sch, p);
- skb = p->q->ops->dequeue(p->q);
+ skb = qdisc_dequeue(p->q);
if (skb == NULL)
return NULL;
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index c1e77da..67aa3ea 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -889,7 +889,7 @@ qdisc_peek_len(struct Qdisc *sch)
struct sk_buff *skb;
unsigned int len;
- skb = sch->dequeue(sch);
+ skb = qdisc_dequeue(sch);
if (skb == NULL) {
if (net_ratelimit())
printk("qdisc_peek_len: non work-conserving qdisc ?\n");
@@ -1642,7 +1642,7 @@ hfsc_dequeue(struct Qdisc *sch)
}
}
- skb = cl->qdisc->dequeue(cl->qdisc);
+ skb = qdisc_dequeue(cl->qdisc);
if (skb == NULL) {
if (net_ratelimit())
printk("HFSC: Non-work-conserving qdisc ?\n");
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index d14f020..34c0caf 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -840,7 +840,7 @@ next:
goto next;
}
- skb = cl->un.leaf.q->dequeue(cl->un.leaf.q);
+ skb = qdisc_dequeue(cl->un.leaf.q);
if (likely(skb != NULL))
break;
if (!cl->warned) {
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index a119599..cc4d057 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -283,7 +283,7 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
if (sch->flags & TCQ_F_THROTTLED)
return NULL;
- skb = q->qdisc->dequeue(q->qdisc);
+ skb = qdisc_dequeue(q->qdisc);
if (skb) {
const struct netem_skb_cb *cb = netem_skb_cb(skb);
psched_time_t now = psched_get_time();
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 504a78c..d527732 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -128,7 +128,7 @@ static struct sk_buff *prio_dequeue(struct Qdisc* sch)
for (prio = 0; prio < q->bands; prio++) {
struct Qdisc *qdisc = q->queues[prio];
- struct sk_buff *skb = qdisc->dequeue(qdisc);
+ struct sk_buff *skb = qdisc_dequeue(qdisc);
if (skb) {
sch->q.qlen--;
return skb;
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 5da0583..3709720 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -131,7 +131,7 @@ static struct sk_buff * red_dequeue(struct Qdisc* sch)
struct red_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
- skb = child->dequeue(child);
+ skb = qdisc_dequeue(child);
if (skb)
sch->q.qlen--;
else if (!red_is_idling(&q->parms))
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 94c6159..a99529d 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -169,7 +169,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch)
struct tbf_sched_data *q = qdisc_priv(sch);
struct sk_buff *skb;
- skb = q->qdisc->dequeue(q->qdisc);
+ skb = qdisc_dequeue(q->qdisc);
if (skb) {
psched_time_t now;
--
1.5.6.5
next prev parent reply other threads:[~2008-10-14 9:53 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 ` Jarek Poplawski [this message]
2008-10-14 10:35 ` [PATCH 02/14] pkt_sched: Replace all explitic ->dequeue() calls with qdisc_dequeue() 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 ` [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=20081014095324.GC10804@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).