Skip to content

Commit f28ea08

Browse files
Todd FujinakaJeff Kirsher
authored andcommitted
igb: 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: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 152c0a9 commit f28ea08

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,7 @@ void igb_down(struct igb_adapter *adapter)
17761776
wr32(E1000_RCTL, rctl & ~E1000_RCTL_EN);
17771777
/* flush and sleep below */
17781778

1779+
netif_carrier_off(netdev);
17791780
netif_tx_stop_all_queues(netdev);
17801781

17811782
/* disable transmits in the hardware */
@@ -1797,12 +1798,9 @@ void igb_down(struct igb_adapter *adapter)
17971798
}
17981799
}
17991800

1800-
18011801
del_timer_sync(&adapter->watchdog_timer);
18021802
del_timer_sync(&adapter->phy_info_timer);
18031803

1804-
netif_carrier_off(netdev);
1805-
18061804
/* record the stats before reset*/
18071805
spin_lock(&adapter->stats64_lock);
18081806
igb_update_stats(adapter, &adapter->stats64);

0 commit comments

Comments
 (0)