]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_tbf.c
via-velocity: velocity_init_{rd/tx}_ring use kcalloc(..., GFP_KERNEL).
[linux-2.6-omap-h63xx.git] / net / sched / sch_tbf.c
index 444c227fcb6b089e911765fa83595681564282d1..b296672f76326c9f07a7cbaf1d3343f41e4ceafa 100644 (file)
@@ -123,7 +123,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
        struct tbf_sched_data *q = qdisc_priv(sch);
        int ret;
 
-       if (skb->len > q->max_size) {
+       if (qdisc_pkt_len(skb) > q->max_size) {
                sch->qstats.drops++;
 #ifdef CONFIG_NET_CLS_ACT
                if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch))
@@ -133,13 +133,14 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
                return NET_XMIT_DROP;
        }
 
-       if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) {
+       ret = qdisc_enqueue(skb, q->qdisc);
+       if (ret != 0) {
                sch->qstats.drops++;
                return ret;
        }
 
        sch->q.qlen++;
-       sch->bstats.bytes += skb->len;
+       sch->bstats.bytes += qdisc_pkt_len(skb);
        sch->bstats.packets++;
        return 0;
 }
@@ -180,7 +181,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch)
                psched_time_t now;
                long toks;
                long ptoks = 0;
-               unsigned int len = skb->len;
+               unsigned int len = qdisc_pkt_len(skb);
 
                now = psched_get_time();
                toks = psched_tdiff_bounded(now, q->t_c, q->buffer);