aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_htb.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-01-24 17:09:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-24 17:09:35 -0500
commit5bdc22a56549e7983c6b443298672641952ea035 (patch)
treefbfd4e7453e4fd23dfef826d4610ed2aae47b36c /net/sched/sch_htb.c
parentb6f4098897f30b7ea90a1c1edf35e9b20a9d828a (diff)
parente92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/sched/sch_hfsc.c net/sched/sch_htb.c net/sched/sch_tbf.c
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r--net/sched/sch_htb.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 39db75cd8c17..e1429a85091f 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -581,7 +581,6 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
581 } 581 }
582 582
583 sch->q.qlen++; 583 sch->q.qlen++;
584 qdisc_bstats_update(sch, skb);
585 return NET_XMIT_SUCCESS; 584 return NET_XMIT_SUCCESS;
586} 585}
587 586
@@ -856,7 +855,7 @@ next:
856 855
857static struct sk_buff *htb_dequeue(struct Qdisc *sch) 856static struct sk_buff *htb_dequeue(struct Qdisc *sch)
858{ 857{
859 struct sk_buff *skb = NULL; 858 struct sk_buff *skb;
860 struct htb_sched *q = qdisc_priv(sch); 859 struct htb_sched *q = qdisc_priv(sch);
861 int level; 860 int level;
862 psched_time_t next_event; 861 psched_time_t next_event;
@@ -865,6 +864,8 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
865 /* try to dequeue direct packets as high prio (!) to minimize cpu work */ 864 /* try to dequeue direct packets as high prio (!) to minimize cpu work */
866 skb = __skb_dequeue(&q->direct_queue); 865 skb = __skb_dequeue(&q->direct_queue);
867 if (skb != NULL) { 866 if (skb != NULL) {
867ok:
868 qdisc_bstats_update(sch, skb);
868 qdisc_unthrottled(sch); 869 qdisc_unthrottled(sch);
869 sch->q.qlen--; 870 sch->q.qlen--;
870 return skb; 871 return skb;
@@ -899,11 +900,8 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
899 900
900 m |= 1 << prio; 901 m |= 1 << prio;
901 skb = htb_dequeue_tree(q, prio, level); 902 skb = htb_dequeue_tree(q, prio, level);
902 if (likely(skb != NULL)) { 903 if (likely(skb != NULL))
903 sch->q.qlen--; 904 goto ok;
904 qdisc_unthrottled(sch);
905 goto fin;
906 }
907 } 905 }
908 } 906 }
909 sch->qstats.overlimits++; 907 sch->qstats.overlimits++;