summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2008-09-20 22:07:34 -0700
committerDavid S. Miller <davem@davemloft.net>2008-09-20 22:07:34 -0700
commita574420ff46cff0245e6b0fce2e961aa2717743d (patch)
tree5baf2134ac902803152c92733f8ed580dd9c7b75 /net
parent618d9f25548ba6fc3a9cd2ce5cd56f4f015b0635 (diff)
downloadop-kernel-dev-a574420ff46cff0245e6b0fce2e961aa2717743d.zip
op-kernel-dev-a574420ff46cff0245e6b0fce2e961aa2717743d.tar.gz
multiq: requeue should rewind the current_band
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_multiq.c5
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))
OpenPOWER on IntegriCloud