• WANG Cong's avatar
    sch_htb: update backlog as well · 431e3a8e
    WANG Cong authored
    We saw qlen!=0 but backlog==0 on our production machine:
    
    qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 1 direct_packets_stat 0 ver 3.17
     Sent 172680457356 bytes 222469449 pkt (dropped 0, overlimits 123575834 requeues 0)
     backlog 0b 72p requeues 0
    
    The problem is we only count qlen for HTB qdisc but not backlog.
    We need to update backlog too when we update qlen, so that we
    can at least know the average packet length.
    
    Cc: Jamal Hadi Salim <jhs@mojatatu.com>
    Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    431e3a8e
sch_htb.c 42.8 KB