Commit 217e288c authored by Jian Shen's avatar Jian Shen Committed by David S. Miller

net: hns3: don't update packet statistics for packets dropped by hardware

Packet statistics for netdev should not include the packets dropped
by hardware.
Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 45e8fddd
...@@ -1425,9 +1425,7 @@ static void hns3_nic_get_stats64(struct net_device *netdev, ...@@ -1425,9 +1425,7 @@ static void hns3_nic_get_stats64(struct net_device *netdev,
start = u64_stats_fetch_begin_irq(&ring->syncp); start = u64_stats_fetch_begin_irq(&ring->syncp);
tx_bytes += ring->stats.tx_bytes; tx_bytes += ring->stats.tx_bytes;
tx_pkts += ring->stats.tx_pkts; tx_pkts += ring->stats.tx_pkts;
tx_drop += ring->stats.tx_busy;
tx_drop += ring->stats.sw_err_cnt; tx_drop += ring->stats.sw_err_cnt;
tx_errors += ring->stats.tx_busy;
tx_errors += ring->stats.sw_err_cnt; tx_errors += ring->stats.sw_err_cnt;
} while (u64_stats_fetch_retry_irq(&ring->syncp, start)); } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
...@@ -1438,7 +1436,6 @@ static void hns3_nic_get_stats64(struct net_device *netdev, ...@@ -1438,7 +1436,6 @@ static void hns3_nic_get_stats64(struct net_device *netdev,
rx_bytes += ring->stats.rx_bytes; rx_bytes += ring->stats.rx_bytes;
rx_pkts += ring->stats.rx_pkts; rx_pkts += ring->stats.rx_pkts;
rx_drop += ring->stats.non_vld_descs; rx_drop += ring->stats.non_vld_descs;
rx_drop += ring->stats.err_pkt_len;
rx_drop += ring->stats.l2_err; rx_drop += ring->stats.l2_err;
rx_errors += ring->stats.non_vld_descs; rx_errors += ring->stats.non_vld_descs;
rx_errors += ring->stats.l2_err; rx_errors += ring->stats.l2_err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment