summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_htb.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-01-12 06:47:21 +0100
committerPaul Mundt <lethal@linux-sh.org>2011-01-12 06:47:21 +0100
commit53582c4c508a95ece9f7c907edef9911c7eb79eb (patch)
treec099e9880f7bf7d60e87dfa6a19cb4e8780ec860 /net/sched/sch_htb.c
parentARM: mach-shmobile: mackerel: Add touchscreen ST1232 support (diff)
parentARM: mach-shmobile: sh7372 Enable SDIO IRQs for Mackerel (diff)
downloadlinux-53582c4c508a95ece9f7c907edef9911c7eb79eb.tar.xz
linux-53582c4c508a95ece9f7c907edef9911c7eb79eb.zip
Merge branch 'rmobile/sdio' into rmobile-latest
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r--net/sched/sch_htb.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 01b519d6c52d..984c1b0c6836 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -569,15 +569,12 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
}
return ret;
} else {
- cl->bstats.packets +=
- skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
- cl->bstats.bytes += qdisc_pkt_len(skb);
+ bstats_update(&cl->bstats, skb);
htb_activate(q, cl);
}
sch->q.qlen++;
- sch->bstats.packets += skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
- sch->bstats.bytes += qdisc_pkt_len(skb);
+ qdisc_bstats_update(sch, skb);
return NET_XMIT_SUCCESS;
}
@@ -648,12 +645,10 @@ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl,
htb_add_to_wait_tree(q, cl, diff);
}
- /* update byte stats except for leaves which are already updated */
- if (cl->level) {
- cl->bstats.bytes += bytes;
- cl->bstats.packets += skb_is_gso(skb)?
- skb_shinfo(skb)->gso_segs:1;
- }
+ /* update basic stats except for leaves which are already updated */
+ if (cl->level)
+ bstats_update(&cl->bstats, skb);
+
cl = cl->parent;
}
}