Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Todd Fujinaka and committed by
Jeff Kirsher
784401bf f28ea083

+1 -2
+1 -2
drivers/net/ethernet/intel/igbvf/netdev.c
··· 1519 1519 rxdctl = er32(RXDCTL(0)); 1520 1520 ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE); 1521 1521 1522 + netif_carrier_off(netdev); 1522 1523 netif_stop_queue(netdev); 1523 1524 1524 1525 /* disable transmits in the hardware */ ··· 1535 1534 igbvf_irq_disable(adapter); 1536 1535 1537 1536 del_timer_sync(&adapter->watchdog_timer); 1538 - 1539 - netif_carrier_off(netdev); 1540 1537 1541 1538 /* record the stats before reset*/ 1542 1539 igbvf_update_stats(adapter);