• Menglong Dong's avatar
    net: ipv6: remove redundant statistics in ipv6_hop_jumbo() · bba98083
    Menglong Dong authored
    There are two call chains for ipv6_hop_jumbo(). The first one is:
    
    ipv6_destopt_rcv() -> ip6_parse_tlv() -> ipv6_hop_jumbo()
    
    On this call chain, the drop statistics will be done in
    ipv6_destopt_rcv() with 'IPSTATS_MIB_INHDRERRORS' if ipv6_hop_jumbo()
    returns false.
    
    The second call chain is:
    
    ip6_rcv_core() -> ipv6_parse_hopopts() -> ip6_parse_tlv()
    
    And the drop statistics will also be done in ip6_rcv_core() with
    'IPSTATS_MIB_INHDRERRORS' if ipv6_hop_jumbo() returns false.
    
    Therefore, the statistics in ipv6_hop_jumbo() is redundant, which
    means the drop is counted twice. The statistics in ipv6_hop_jumbo()
    is almost the same as the outside, except the
    'IPSTATS_MIB_INTRUNCATEDPKTS', which seems that we have to ignore it.
    Signed-off-by: default avatarMenglong Dong <imagedong@tencent.com>
    Reviewed-by: default avatarJiang Biao <benbjiang@tencent.com>
    Reviewed-by: default avatarHao Peng <flyingpeng@tencent.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bba98083
exthdrs.c 32.3 KB