From: Alexander Duyck Date: Sun, 21 Sep 2008 05:07:34 +0000 (-0700) Subject: multiq: requeue should rewind the current_band X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a574420ff46cff0245e6b0fce2e961aa2717743d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c index 5d9cd68e91d1..915f3149dde2 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))