OSDN Git Service

bnxt_en: Save ring statistics before reset.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 16 Dec 2018 23:46:29 +0000 (18:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:20:33 +0000 (09:20 +0100)
commit591d453768d62cbe778b388812f63c374f99afdf
treef8daed22c2c7395ef9471218db69d1c1c5b5fbf0
parent58fcfeaf26ed90bbb3e6a0c7071ec6ee8dbe9118
bnxt_en: Save ring statistics before reset.

[ Upstream commit b8875ca356f1c0b17ec68be6666269373a62288e ]

With the current driver, the statistics reported by .ndo_get_stats64()
are reset when the device goes down.  Store a snapshot of the
rtnl_link_stats64 before shutdown.  This snapshot is added to the
current counters in .ndo_get_stats64() so that the counters will not
get reset when the device is down.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h