Skip to content

Commit

Permalink
multiq: requeue should rewind the current_band
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Sep 21, 2008
1 parent 618d9f2 commit a574420
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/sched/sch_multiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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))
Expand Down

0 comments on commit a574420

Please sign in to comment.