Skip to content

Commit 784401b

Browse files
Todd FujinakaJeff Kirsher
authored andcommitted
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: 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 f28ea08 commit 784401b

File tree

1 file changed

+1
-2
lines changed
  • drivers/net/ethernet/intel/igbvf

1 file changed

+1
-2
lines changed

drivers/net/ethernet/intel/igbvf/netdev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,7 @@ void igbvf_down(struct igbvf_adapter *adapter)
15191519
rxdctl = er32(RXDCTL(0));
15201520
ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);
15211521

1522+
netif_carrier_off(netdev);
15221523
netif_stop_queue(netdev);
15231524

15241525
/* disable transmits in the hardware */
@@ -1535,8 +1536,6 @@ void igbvf_down(struct igbvf_adapter *adapter)
15351536

15361537
del_timer_sync(&adapter->watchdog_timer);
15371538

1538-
netif_carrier_off(netdev);
1539-
15401539
/* record the stats before reset*/
15411540
igbvf_update_stats(adapter);
15421541

0 commit comments

Comments
 (0)