diff options
author | Yufeng Mo <moyufeng@huawei.com> | 2019-06-28 19:50:15 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-28 09:39:49 -0700 |
commit | 8b552079325df9a832d95711ec4c26f0bf1b10c4 (patch) | |
tree | 403ebb07f5f16e6648a542f89c6572e379c1808c /drivers/net/ethernet/hisilicon | |
parent | 9bc6ac918c7176fcc306f3e57a34e7bc51ae470c (diff) |
net: hns3: fix a statistics issue about l3l4 checksum error
The frame column is based on rx_crc_errors and rx_frame_errors. So
l3l4 checksum error should not be counted by rx_crc_errors. Instead,
l3l4 checksum error should be counted in ifconfig error column.
Fixes: d3ec4ef66937 ("net: hns3: refactor the statistics updating for netdev")
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index a5d46f0a50cc..37f28bdaf950 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1494,8 +1494,8 @@ static void hns3_nic_get_stats64(struct net_device *netdev, rx_drop += ring->stats.l2_err; rx_errors += ring->stats.non_vld_descs; rx_errors += ring->stats.l2_err; + rx_errors += ring->stats.l3l4_csum_err; rx_crc_errors += ring->stats.l2_err; - rx_crc_errors += ring->stats.l3l4_csum_err; rx_multicast += ring->stats.rx_multicast; rx_length_errors += ring->stats.err_pkt_len; } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); |