aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_cbq.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r--net/sched/sch_cbq.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 1afe3eece627..f1d2f8ec8b4c 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -370,7 +370,6 @@ static int
370cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch) 370cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
371{ 371{
372 struct cbq_sched_data *q = qdisc_priv(sch); 372 struct cbq_sched_data *q = qdisc_priv(sch);
373 int len = skb->len;
374 int uninitialized_var(ret); 373 int uninitialized_var(ret);
375 struct cbq_class *cl = cbq_classify(skb, sch, &ret); 374 struct cbq_class *cl = cbq_classify(skb, sch, &ret);
376 375
@@ -391,7 +390,7 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
391 if (ret == NET_XMIT_SUCCESS) { 390 if (ret == NET_XMIT_SUCCESS) {
392 sch->q.qlen++; 391 sch->q.qlen++;
393 sch->bstats.packets++; 392 sch->bstats.packets++;
394 sch->bstats.bytes+=len; 393 sch->bstats.bytes += qdisc_pkt_len(skb);
395 cbq_mark_toplevel(q, cl); 394 cbq_mark_toplevel(q, cl);
396 if (!cl->next_alive) 395 if (!cl->next_alive)
397 cbq_activate_class(cl); 396 cbq_activate_class(cl);
@@ -658,7 +657,6 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer)
658#ifdef CONFIG_NET_CLS_ACT 657#ifdef CONFIG_NET_CLS_ACT
659static int cbq_reshape_fail(struct sk_buff *skb, struct Qdisc *child) 658static int cbq_reshape_fail(struct sk_buff *skb, struct Qdisc *child)
660{ 659{
661 int len = skb->len;
662 struct Qdisc *sch = child->__parent; 660 struct Qdisc *sch = child->__parent;
663 struct cbq_sched_data *q = qdisc_priv(sch); 661 struct cbq_sched_data *q = qdisc_priv(sch);
664 struct cbq_class *cl = q->rx_class; 662 struct cbq_class *cl = q->rx_class;
@@ -675,7 +673,7 @@ static int cbq_reshape_fail(struct sk_buff *skb, struct Qdisc *child)
675 if (qdisc_enqueue(skb, cl->q) == 0) { 673 if (qdisc_enqueue(skb, cl->q) == 0) {
676 sch->q.qlen++; 674 sch->q.qlen++;
677 sch->bstats.packets++; 675 sch->bstats.packets++;
678 sch->bstats.bytes+=len; 676 sch->bstats.bytes += qdisc_pkt_len(skb);
679 if (!cl->next_alive) 677 if (!cl->next_alive)
680 cbq_activate_class(cl); 678 cbq_activate_class(cl);
681 return 0; 679 return 0;
@@ -881,7 +879,7 @@ cbq_dequeue_prio(struct Qdisc *sch, int prio)
881 if (skb == NULL) 879 if (skb == NULL)
882 goto skip_class; 880 goto skip_class;
883 881
884 cl->deficit -= skb->len; 882 cl->deficit -= qdisc_pkt_len(skb);
885 q->tx_class = cl; 883 q->tx_class = cl;
886 q->tx_borrowed = borrow; 884 q->tx_borrowed = borrow;
887 if (borrow != cl) { 885 if (borrow != cl) {
@@ -889,11 +887,11 @@ cbq_dequeue_prio(struct Qdisc *sch, int prio)
889 borrow->xstats.borrows++; 887 borrow->xstats.borrows++;
890 cl->xstats.borrows++; 888 cl->xstats.borrows++;
891#else 889#else
892 borrow->xstats.borrows += skb->len; 890 borrow->xstats.borrows += qdisc_pkt_len(skb);
893 cl->xstats.borrows += skb->len; 891 cl->xstats.borrows += qdisc_pkt_len(skb);
894#endif 892#endif
895 } 893 }
896 q->tx_len = skb->len; 894 q->tx_len = qdisc_pkt_len(skb);
897 895
898 if (cl->deficit <= 0) { 896 if (cl->deficit <= 0) {
899 q->active[prio] = cl; 897 q->active[prio] = cl;