diff options
Diffstat (limited to 'net/sched/sch_drr.c')
-rw-r--r-- | net/sched/sch_drr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index 37e6ab99bbea..e7a7e87b141a 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c | |||
@@ -373,11 +373,13 @@ static struct sk_buff *drr_dequeue(struct Qdisc *sch) | |||
373 | struct sk_buff *skb; | 373 | struct sk_buff *skb; |
374 | unsigned int len; | 374 | unsigned int len; |
375 | 375 | ||
376 | while (!list_empty(&q->active)) { | 376 | if (list_empty(&q->active)) |
377 | goto out; | ||
378 | while (1) { | ||
377 | cl = list_first_entry(&q->active, struct drr_class, alist); | 379 | cl = list_first_entry(&q->active, struct drr_class, alist); |
378 | skb = cl->qdisc->ops->peek(cl->qdisc); | 380 | skb = cl->qdisc->ops->peek(cl->qdisc); |
379 | if (skb == NULL) | 381 | if (skb == NULL) |
380 | goto skip; | 382 | goto out; |
381 | 383 | ||
382 | len = qdisc_pkt_len(skb); | 384 | len = qdisc_pkt_len(skb); |
383 | if (len <= cl->deficit) { | 385 | if (len <= cl->deficit) { |
@@ -390,9 +392,9 @@ static struct sk_buff *drr_dequeue(struct Qdisc *sch) | |||
390 | } | 392 | } |
391 | 393 | ||
392 | cl->deficit += cl->quantum; | 394 | cl->deficit += cl->quantum; |
393 | skip: | ||
394 | list_move_tail(&cl->alist, &q->active); | 395 | list_move_tail(&cl->alist, &q->active); |
395 | } | 396 | } |
397 | out: | ||
396 | return NULL; | 398 | return NULL; |
397 | } | 399 | } |
398 | 400 | ||