mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
net_sched: update hierarchical backlog too
When the bottom qdisc decides to, for example, drop some packet, it calls qdisc_tree_decrease_qlen() to update the queue length for all its ancestors, we need to update the backlog too to keep the stats on root qdisc accurate. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
86a7996cc8
commit
2ccccf5fb4
21 changed files with 91 additions and 49 deletions
|
@ -162,12 +162,14 @@ struct codel_vars {
|
|||
* struct codel_stats - contains codel shared variables and stats
|
||||
* @maxpacket: largest packet we've seen so far
|
||||
* @drop_count: temp count of dropped packets in dequeue()
|
||||
* @drop_len: bytes of dropped packets in dequeue()
|
||||
* ecn_mark: number of packets we ECN marked instead of dropping
|
||||
* ce_mark: number of packets CE marked because sojourn time was above ce_threshold
|
||||
*/
|
||||
struct codel_stats {
|
||||
u32 maxpacket;
|
||||
u32 drop_count;
|
||||
u32 drop_len;
|
||||
u32 ecn_mark;
|
||||
u32 ce_mark;
|
||||
};
|
||||
|
@ -308,6 +310,7 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
|
|||
vars->rec_inv_sqrt);
|
||||
goto end;
|
||||
}
|
||||
stats->drop_len += qdisc_pkt_len(skb);
|
||||
qdisc_drop(skb, sch);
|
||||
stats->drop_count++;
|
||||
skb = dequeue_func(vars, sch);
|
||||
|
@ -330,6 +333,7 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
|
|||
if (params->ecn && INET_ECN_set_ce(skb)) {
|
||||
stats->ecn_mark++;
|
||||
} else {
|
||||
stats->drop_len += qdisc_pkt_len(skb);
|
||||
qdisc_drop(skb, sch);
|
||||
stats->drop_count++;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue