Skip to content

Commit

Permalink
igbvf: use netif_carrier_off earlier when bringing if down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Todd Fujinaka authored and Jeff Kirsher committed Mar 21, 2015
1 parent f28ea08 commit 784401b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/intel/igbvf/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,7 @@ void igbvf_down(struct igbvf_adapter *adapter)
rxdctl = er32(RXDCTL(0));
ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);

netif_carrier_off(netdev);
netif_stop_queue(netdev);

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

del_timer_sync(&adapter->watchdog_timer);

netif_carrier_off(netdev);

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

Expand Down

0 comments on commit 784401b

Please sign in to comment.