From 0a2ee4b692bf079260bc7a97a561ee213b7e4991 Mon Sep 17 00:00:00 2001 From: moyufeng Date: Sun, 5 May 2019 17:26:25 +0800 Subject: [PATCH] net: hns3: modify ifconfig frame column not to count l3l4 checksum error driver inclusion category: bugfix bugzilla: NA CVE: NA Ifconfig 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. Feature or Bugfix:Bugfix Signed-off-by: moyufeng Reviewed-by: lipeng Reviewed-by: Yang Yingliang Signed-off-by: Yang Yingliang --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 3ee9dd33c8de..f34e5d3dde45 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1519,8 +1519,8 @@ static struct rtnl_link_stats64 *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)); -- GitLab