提交 6a73b571 编写于 作者: W WANG Cong 提交者: David S. Miller

sch_drr: update backlog as well

Fixes: 2ccccf5f ("net_sched: update hierarchical backlog too")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6529d75a
无相关合并请求
...@@ -375,6 +375,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch) ...@@ -375,6 +375,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch)
cl->deficit = cl->quantum; cl->deficit = cl->quantum;
} }
qdisc_qstats_backlog_inc(sch, skb);
sch->q.qlen++; sch->q.qlen++;
return err; return err;
} }
...@@ -407,6 +408,7 @@ static struct sk_buff *drr_dequeue(struct Qdisc *sch) ...@@ -407,6 +408,7 @@ static struct sk_buff *drr_dequeue(struct Qdisc *sch)
bstats_update(&cl->bstats, skb); bstats_update(&cl->bstats, skb);
qdisc_bstats_update(sch, skb); qdisc_bstats_update(sch, skb);
qdisc_qstats_backlog_dec(sch, skb);
sch->q.qlen--; sch->q.qlen--;
return skb; return skb;
} }
...@@ -428,6 +430,7 @@ static unsigned int drr_drop(struct Qdisc *sch) ...@@ -428,6 +430,7 @@ static unsigned int drr_drop(struct Qdisc *sch)
if (cl->qdisc->ops->drop) { if (cl->qdisc->ops->drop) {
len = cl->qdisc->ops->drop(cl->qdisc); len = cl->qdisc->ops->drop(cl->qdisc);
if (len > 0) { if (len > 0) {
sch->qstats.backlog -= len;
sch->q.qlen--; sch->q.qlen--;
if (cl->qdisc->q.qlen == 0) if (cl->qdisc->q.qlen == 0)
list_del(&cl->alist); list_del(&cl->alist);
...@@ -463,6 +466,7 @@ static void drr_reset_qdisc(struct Qdisc *sch) ...@@ -463,6 +466,7 @@ static void drr_reset_qdisc(struct Qdisc *sch)
qdisc_reset(cl->qdisc); qdisc_reset(cl->qdisc);
} }
} }
sch->qstats.backlog = 0;
sch->q.qlen = 0; sch->q.qlen = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部