Netdev List
 help / color / mirror / Atom feed
* [PATCH] multiq: requeue should rewind the current_band
@ 2008-09-19  0:43 Alexander Duyck
  2008-09-21  5:08 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Duyck @ 2008-09-19  0:43 UTC (permalink / raw)
  To: netdev; +Cc: davem

Currently dequeueing a packet and requeueing the same packet will cause a
different packet to be pulled on the next dequeue.  This change forces
requeue to rewind the current_band.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---

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

diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index 5d9cd68..915f314 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -97,6 +97,7 @@ 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);
@@ -113,6 +114,10 @@ multiq_requeue(struct sk_buff *skb, struct Qdisc *sch)
 	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))


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] multiq: requeue should rewind the current_band
  2008-09-19  0:43 [PATCH] multiq: requeue should rewind the current_band Alexander Duyck
@ 2008-09-21  5:08 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-09-21  5:08 UTC (permalink / raw)
  To: alexander.h.duyck; +Cc: netdev

From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Thu, 18 Sep 2008 17:43:22 -0700

> Currently dequeueing a packet and requeueing the same packet will cause a
> different packet to be pulled on the next dequeue.  This change forces
> requeue to rewind the current_band.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>

Applied to net-next-2.6, thanks Alexander.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-21  5:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19  0:43 [PATCH] multiq: requeue should rewind the current_band Alexander Duyck
2008-09-21  5:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox