aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index fd61ed6ee1e7..0ae7d19dcba8 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -895,7 +895,7 @@ qdisc_peek_len(struct Qdisc *sch)
895 printk("qdisc_peek_len: non work-conserving qdisc ?\n"); 895 printk("qdisc_peek_len: non work-conserving qdisc ?\n");
896 return 0; 896 return 0;
897 } 897 }
898 len = skb->len; 898 len = qdisc_pkt_len(skb);
899 if (unlikely(sch->ops->requeue(skb, sch) != NET_XMIT_SUCCESS)) { 899 if (unlikely(sch->ops->requeue(skb, sch) != NET_XMIT_SUCCESS)) {
900 if (net_ratelimit()) 900 if (net_ratelimit())
901 printk("qdisc_peek_len: failed to requeue\n"); 901 printk("qdisc_peek_len: failed to requeue\n");
@@ -1574,7 +1574,6 @@ static int
1574hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch) 1574hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
1575{ 1575{
1576 struct hfsc_class *cl; 1576 struct hfsc_class *cl;
1577 unsigned int len;
1578 int err; 1577 int err;
1579 1578
1580 cl = hfsc_classify(skb, sch, &err); 1579 cl = hfsc_classify(skb, sch, &err);
@@ -1585,7 +1584,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
1585 return err; 1584 return err;
1586 } 1585 }
1587 1586
1588 len = skb->len;
1589 err = qdisc_enqueue(skb, cl->qdisc); 1587 err = qdisc_enqueue(skb, cl->qdisc);
1590 if (unlikely(err != NET_XMIT_SUCCESS)) { 1588 if (unlikely(err != NET_XMIT_SUCCESS)) {
1591 cl->qstats.drops++; 1589 cl->qstats.drops++;
@@ -1594,12 +1592,12 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
1594 } 1592 }
1595 1593
1596 if (cl->qdisc->q.qlen == 1) 1594 if (cl->qdisc->q.qlen == 1)
1597 set_active(cl, len); 1595 set_active(cl, qdisc_pkt_len(skb));
1598 1596
1599 cl->bstats.packets++; 1597 cl->bstats.packets++;
1600 cl->bstats.bytes += len; 1598 cl->bstats.bytes += qdisc_pkt_len(skb);
1601 sch->bstats.packets++; 1599 sch->bstats.packets++;
1602 sch->bstats.bytes += len; 1600 sch->bstats.bytes += qdisc_pkt_len(skb);
1603 sch->q.qlen++; 1601 sch->q.qlen++;
1604 1602
1605 return NET_XMIT_SUCCESS; 1603 return NET_XMIT_SUCCESS;
@@ -1649,9 +1647,9 @@ hfsc_dequeue(struct Qdisc *sch)
1649 return NULL; 1647 return NULL;
1650 } 1648 }
1651 1649
1652 update_vf(cl, skb->len, cur_time); 1650 update_vf(cl, qdisc_pkt_len(skb), cur_time);
1653 if (realtime) 1651 if (realtime)
1654 cl->cl_cumul += skb->len; 1652 cl->cl_cumul += qdisc_pkt_len(skb);
1655 1653
1656 if (cl->qdisc->q.qlen != 0) { 1654 if (cl->qdisc->q.qlen != 0) {
1657 if (cl->cl_flags & HFSC_RSC) { 1655 if (cl->cl_flags & HFSC_RSC) {