aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hhf.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2014-09-28 14:53:29 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-30 01:02:26 -0400
commit25331d6ce42bcf4b34b6705fce4da15c3fabe62f (patch)
tree1c2d92a220f90f155de62a435753f09ff0c9ce91 /net/sched/sch_hhf.c
parent22e0f8b9322cb1a48b1357e8f4ae6f5a9eca8cfa (diff)
net: sched: implement qstat helper routines
This adds helpers to manipulate qstats logic and replaces locations that touch the counters directly. This simplifies future patches to push qstats onto per cpu counters. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_hhf.c')
-rw-r--r--net/sched/sch_hhf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index d85b6812a7d4..15d3aabfe250 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -376,8 +376,8 @@ static unsigned int hhf_drop(struct Qdisc *sch)
376 struct sk_buff *skb = dequeue_head(bucket); 376 struct sk_buff *skb = dequeue_head(bucket);
377 377
378 sch->q.qlen--; 378 sch->q.qlen--;
379 sch->qstats.drops++; 379 qdisc_qstats_drop(sch);
380 sch->qstats.backlog -= qdisc_pkt_len(skb); 380 qdisc_qstats_backlog_dec(sch, skb);
381 kfree_skb(skb); 381 kfree_skb(skb);
382 } 382 }
383 383
@@ -395,7 +395,7 @@ static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch)
395 395
396 bucket = &q->buckets[idx]; 396 bucket = &q->buckets[idx];
397 bucket_add(bucket, skb); 397 bucket_add(bucket, skb);
398 sch->qstats.backlog += qdisc_pkt_len(skb); 398 qdisc_qstats_backlog_inc(sch, skb);
399 399
400 if (list_empty(&bucket->bucketchain)) { 400 if (list_empty(&bucket->bucketchain)) {
401 unsigned int weight; 401 unsigned int weight;
@@ -457,7 +457,7 @@ begin:
457 if (bucket->head) { 457 if (bucket->head) {
458 skb = dequeue_head(bucket); 458 skb = dequeue_head(bucket);
459 sch->q.qlen--; 459 sch->q.qlen--;
460 sch->qstats.backlog -= qdisc_pkt_len(skb); 460 qdisc_qstats_backlog_dec(sch, skb);
461 } 461 }
462 462
463 if (!skb) { 463 if (!skb) {