提交 784401bf 编写于 作者: T Todd Fujinaka 提交者: Jeff Kirsher

igbvf: use netif_carrier_off earlier when bringing if down

Use netif_carrier_off() first, since that will prevent the stack from
queuing more packets to this IF. This operation is fast, and should
behave much nicer when trying to bring down an interface under load.
Reported-by: NEliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: NTodd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 f28ea083
...@@ -1519,6 +1519,7 @@ void igbvf_down(struct igbvf_adapter *adapter) ...@@ -1519,6 +1519,7 @@ void igbvf_down(struct igbvf_adapter *adapter)
rxdctl = er32(RXDCTL(0)); rxdctl = er32(RXDCTL(0));
ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE); ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);
netif_carrier_off(netdev);
netif_stop_queue(netdev); netif_stop_queue(netdev);
/* disable transmits in the hardware */ /* disable transmits in the hardware */
...@@ -1535,8 +1536,6 @@ void igbvf_down(struct igbvf_adapter *adapter) ...@@ -1535,8 +1536,6 @@ void igbvf_down(struct igbvf_adapter *adapter)
del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->watchdog_timer);
netif_carrier_off(netdev);
/* record the stats before reset*/ /* record the stats before reset*/
igbvf_update_stats(adapter); igbvf_update_stats(adapter);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册