]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | Subject: multiq: requeue should rewind the current_band |
2 | From: Alexander Duyck <alexander.h.duyck@intel.com> | |
3 | References: bnc#438954 | |
4 | ||
5 | Currently dequeueing a packet and requeueing the same packet will cause a | |
6 | different packet to be pulled on the next dequeue. This change forces | |
7 | requeue to rewind the current_band. | |
8 | ||
9 | Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> | |
10 | Signed-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 | ||
16 | diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c | |
17 | index 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)) |