Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04fe6358 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

igb: update stats before doing reset in igb_down



It was seen with repeated interface up/down testing that there was a large
stray between the stats reported by the queues and the stats reported by the
HW.  It was found to be an issue in that hw stats were being reset without
first being recorded.  This change records the stats before wiping them from
the system via the reset.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 450c87c8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -858,6 +858,10 @@ void igb_down(struct igb_adapter *adapter)

	netdev->tx_queue_len = adapter->tx_queue_len;
	netif_carrier_off(netdev);

	/* record the stats before reset*/
	igb_update_stats(adapter);

	adapter->link_speed = 0;
	adapter->link_duplex = 0;