Patchwork Re: pkt_sched: add DRR scheduler

login
register
mail settings
Submitter Jarek Poplawski
Date Nov. 21, 2008, 12:19 p.m.
Message ID <20081121121949.GA13892@ff.dom.local>
Download mbox | patch
Permalink /patch/9997/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jarek Poplawski - Nov. 21, 2008, 12:19 p.m.
A small oversight:
----------------->
pkt_sched: sch_drr: Fix qlen in drr_drop()

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---

 net/sched/sch_drr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Patrick McHardy - Nov. 21, 2008, 12:36 p.m.
Jarek Poplawski wrote:
> A small oversight:
> ----------------->
> pkt_sched: sch_drr: Fix qlen in drr_drop()
>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>

Good catch, thanks.

Acked-by: Patrick McHardy <kaber@trash.net>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 21, 2008, 12:37 p.m.
From: Patrick McHardy <kaber@trash.net>
Date: Fri, 21 Nov 2008 13:36:21 +0100

> Jarek Poplawski wrote:
> > A small oversight:
> > ----------------->
> > pkt_sched: sch_drr: Fix qlen in drr_drop()
> >
> > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
> 
> Good catch, thanks.
> 
> Acked-by: Patrick McHardy <kaber@trash.net>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index 8d523d9..37e6ab9 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -406,6 +406,7 @@  static unsigned int drr_drop(struct Qdisc *sch)
 		if (cl->qdisc->ops->drop) {
 			len = cl->qdisc->ops->drop(cl->qdisc);
 			if (len > 0) {
+				sch->q.qlen--;
 				if (cl->qdisc->q.qlen == 0)
 					list_del(&cl->alist);
 				return len;