|
|
@@ -574,7 +574,6 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
|
|
}
|
|
|
|
|
|
sch->q.qlen++;
|
|
|
- qdisc_bstats_update(sch, skb);
|
|
|
return NET_XMIT_SUCCESS;
|
|
|
}
|
|
|
|
|
|
@@ -842,7 +841,7 @@ static struct sk_buff *htb_dequeue_tree(struct htb_sched *q, int prio,
|
|
|
|
|
|
static struct sk_buff *htb_dequeue(struct Qdisc *sch)
|
|
|
{
|
|
|
- struct sk_buff *skb = NULL;
|
|
|
+ struct sk_buff *skb;
|
|
|
struct htb_sched *q = qdisc_priv(sch);
|
|
|
int level;
|
|
|
psched_time_t next_event;
|
|
|
@@ -851,6 +850,8 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
|
|
|
/* try to dequeue direct packets as high prio (!) to minimize cpu work */
|
|
|
skb = __skb_dequeue(&q->direct_queue);
|
|
|
if (skb != NULL) {
|
|
|
+ok:
|
|
|
+ qdisc_bstats_update(sch, skb);
|
|
|
sch->flags &= ~TCQ_F_THROTTLED;
|
|
|
sch->q.qlen--;
|
|
|
return skb;
|
|
|
@@ -884,11 +885,8 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
|
|
|
int prio = ffz(m);
|
|
|
m |= 1 << prio;
|
|
|
skb = htb_dequeue_tree(q, prio, level);
|
|
|
- if (likely(skb != NULL)) {
|
|
|
- sch->q.qlen--;
|
|
|
- sch->flags &= ~TCQ_F_THROTTLED;
|
|
|
- goto fin;
|
|
|
- }
|
|
|
+ if (likely(skb != NULL))
|
|
|
+ goto ok;
|
|
|
}
|
|
|
}
|
|
|
sch->qstats.overlimits++;
|