]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/multiq-requeue-should-rewind-current_band
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / multiq-requeue-should-rewind-current_band
CommitLineData
00e5a55c
BS
1Subject: multiq: requeue should rewind the current_band
2From: Alexander Duyck <alexander.h.duyck@intel.com>
3References: bnc#438954
4
5Currently dequeueing a packet and requeueing the same packet will cause a
6different packet to be pulled on the next dequeue. This change forces
7requeue to rewind the current_band.
8
9Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
10Signed-off-by: Hannes Reinecke <hare@suse.de>
11---
12
13 net/sched/sch_multiq.c | 5 +++++
14 1 files changed, 5 insertions(+), 0 deletions(-)
15
16diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
17index ce00df4..7f4dbf0 100644
18--- a/net/sched/sch_multiq.c
19+++ b/net/sched/sch_multiq.c
20@@ -97,6 +97,7 @@ static int
21 multiq_requeue(struct sk_buff *skb, struct Qdisc *sch)
22 {
23 struct Qdisc *qdisc;
24+ struct multiq_sched_data *q = qdisc_priv(sch);
25 int ret;
26
27 qdisc = multiq_classify(skb, sch, &ret);
28@@ -113,6 +114,10 @@ multiq_requeue(struct sk_buff *skb, struct Qdisc *sch)
29 if (ret == NET_XMIT_SUCCESS) {
30 sch->q.qlen++;
31 sch->qstats.requeues++;
32+ if (q->curband)
33+ q->curband--;
34+ else
35+ q->curband = q->bands - 1;
36 return NET_XMIT_SUCCESS;
37 }
38 if (net_xmit_drop_count(ret))