提交 04fe6358 编写于 作者: A Alexander Duyck 提交者: David S. Miller

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: NAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 450c87c8
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册