aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2015-10-07 19:47:32 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-11 07:49:33 -0400
commit6ac644a8ae2dabf884a1b01e82e32d96ffe6eee5 (patch)
treeb9a9bc685d2acf1f7d5a01350b051acfb7696b95 /net/sched
parentca7beb1fa776412ff80708ae98a8467fe4c52737 (diff)
sch_hhf: fix return value of hhf_drop()
Similar to commit c0afd9ce4d6a ("fq_codel: fix return value of fq_codel_drop()") ->drop() is supposed to return the number of bytes it dropped, but hhf_drop () returns the id of the bucket where it drops a packet from. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: Terry Lam <vtlam@google.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_hhf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index 9d15cb6b8cb1..86b04e31e60b 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -368,6 +368,15 @@ static unsigned int hhf_drop(struct Qdisc *sch)
368 return bucket - q->buckets; 368 return bucket - q->buckets;
369} 369}
370 370
371static unsigned int hhf_qdisc_drop(struct Qdisc *sch)
372{
373 unsigned int prev_backlog;
374
375 prev_backlog = sch->qstats.backlog;
376 hhf_drop(sch);
377 return prev_backlog - sch->qstats.backlog;
378}
379
371static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch) 380static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch)
372{ 381{
373 struct hhf_sched_data *q = qdisc_priv(sch); 382 struct hhf_sched_data *q = qdisc_priv(sch);
@@ -696,7 +705,7 @@ static struct Qdisc_ops hhf_qdisc_ops __read_mostly = {
696 .enqueue = hhf_enqueue, 705 .enqueue = hhf_enqueue,
697 .dequeue = hhf_dequeue, 706 .dequeue = hhf_dequeue,
698 .peek = qdisc_peek_dequeued, 707 .peek = qdisc_peek_dequeued,
699 .drop = hhf_drop, 708 .drop = hhf_qdisc_drop,
700 .init = hhf_init, 709 .init = hhf_init,
701 .reset = hhf_reset, 710 .reset = hhf_reset,
702 .destroy = hhf_destroy, 711 .destroy = hhf_destroy,