1
0
Fork 0
alistair23-linux/drivers/net/ethernet
Jacob Keller e4b433f4a7 i40e: reset all VFs in parallel when rebuilding PF
When there are a lot of active VFs, it can take multiple seconds to
finish resetting all of them during certain flows., which can cause some
VFs to fail to wait long enough for the reset to occur. The user might
see messages like "Never saw reset" or "Reset never finished" and the VF
driver will stop functioning properly.

The naive solution would be to simply increase the wait timer. We can
get much more clever. Notice that i40e_reset_vf is run in a serialized
fashion, and includes lots of delays.

There are two prominent delays which take most of the time. First, when
we begin resetting VFs, we have multiple 10ms delays which accrue
because we reset each VF in a serial fashion. These delays accumulate to
almost 4 seconds when handling the maximum number of VFs (128).

Secondly, there is a massive 50ms delay for each time we disable queues
on a VSI. This delay is necessary to allow HW to finish disabling queues
before we restore functionality. However, just like with the first case,
we are paying the cost for each VF, rather than disabling all VFs and
waiting once.

Both of these can be fixed, but required some previous refactoring to
handle the special case. First, we will need the
i40e_vsi_wait_queues_disabled function which was previously DCB
specific. Second, we will need to implement our own
i40e_vsi_stop_rings_no_wait function which will handle the stopping of
rings without the delays.

Finally, implement an i40e_reset_all_vfs function, which will first
start the reset of all VFs, and pay the wait cost all at once, rather
than serially waiting for each VF before we start processing then next
one. After the VF has been reset, we'll disable all the VF queues, and
then wait for them to disable. Again, we'll organize the flow such that
we pay the wait cost only once.

Finally, after we've disabled queues we'll go ahead and begin restoring
VF functionality. The result is reducing the wait time by a large factor
and ensuring that VFs do not timeout when waiting in the VF driver.

Change-ID: Ia6e8cf8d98131b78aec89db78afb8d905c9b12be
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-04-19 17:45:07 -07:00
..
3com net: typhoon: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
8390 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
adaptec net: adaptec: starfire: add checks for dma mapping errors 2017-01-29 19:04:11 -05:00
adi net: bfin_mac: Remove unused stats member from struct bfin_mac_local 2017-03-27 16:01:59 -07:00
aeroflex net: greth: Utilize of_get_mac_address() 2017-03-22 12:00:39 -07:00
agere drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
alacritech net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
allwinner
alteon Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
altera drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
amazon net/ena: switch to pci_alloc_irq_vectors 2017-04-11 11:16:03 -04:00
amd net: nmlan_cs: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
apm drivers: net: xgene-v2: Extend ethtool statistics 2017-04-18 15:55:13 -04:00
apple
aquantia net:ethernet:aquantia: Reset is_gso flag when EOP reached. 2017-03-24 12:32:19 -07:00
arc drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
atheros net: alx: switch to pci_alloc_irq_vectors 2017-04-11 11:16:02 -04:00
aurora
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
brocade bna: avoid writing uninitialized data into hw registers 2017-03-24 12:49:12 -07:00
cadence net: macb: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
calxeda drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
cavium net: thunderx: Switch to pci_alloc_irq_vectors 2017-04-11 11:16:03 -04:00
chelsio cxgb4: save tid while creating server filter 2017-04-13 12:37:57 -04:00
cirrus net: cx89x0: move attribute declaration before struct keyword 2017-04-18 16:00:34 -04:00
cisco enic: add vxlan offload on tx path 2017-02-09 17:24:29 -05:00
davicom
dec net: tulip: de2104x: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
dlink net: dl2k: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
emulex be2net: VxLAN offload should be re-enabled when only 1 UDP port is left 2017-04-18 15:56:25 -04:00
ezchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
faraday ftgmac100: Fix potential ordering issue in NAPI poll 2017-04-18 14:11:09 -04:00
freescale net: fec: add ERR007885 for i.MX6ul enet IP 2017-04-11 14:36:28 -04:00
fujitsu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
hp
i825xx
ibm net: emac: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
intel i40e: reset all VFs in parallel when rebuilding PF 2017-04-19 17:45:07 -07:00
marvell sky2: Use seq_puts() in sky2_debug_show() 2017-04-18 13:55:11 -04:00
mediatek net-next: ethernet: mediatek: add device_node of GMAC pointing into the netdev instance 2017-04-07 13:50:55 -07:00
mellanox net/mlx5e: E-switch vport manager is valid for ethernet only 2017-04-17 11:08:32 -04:00
micrel net: ks8851: Added support for half-duplex SPI 2017-03-09 18:18:37 -08:00
microchip net: microchip: encx24j600: use new api ethtool_{get|set}_link_ksettings 2017-02-12 22:32:17 -05:00
moxa net: moxa: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
myricom net: myricom: myri10ge: use new api ethtool_{get|set}_link_ksettings 2017-02-12 22:32:17 -05:00
natsemi net: natsemi: ns83820: use new api ethtool_{get|set}_link_ksettings 2017-02-12 22:32:17 -05:00
neterion net: s2io: fix typo argumnet argument 2017-02-26 11:57:58 -05:00
netronome nfp: don't dereference a null nn->eth_port to print a warning 2017-04-08 08:15:34 -07:00
nuvoton net: nuvoton: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
nvidia forcedeth: Remove return from a void function 2017-02-23 10:55:07 -05:00
nxp drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
oki-semi net: oki-semi: pch_gbe: use new api ethtool_{get|set}_link_ksettings 2017-02-17 12:00:14 -05:00
packetengines net: hamachi: use new api ethtool_{get|set}_link_ksettings 2017-02-17 14:06:41 -05:00
pasemi drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
qlogic qede: Add aRFS support 2017-04-17 13:06:18 -04:00
qualcomm drivers: add explicit interrupt.h includes 2017-03-30 11:05:34 -07:00
rdc
realtek r8169: replace init_timer with setup_timer 2017-03-12 23:55:03 -07:00
renesas sh_eth: fix wakeup event reporting from MagicPacket 2017-02-01 12:53:59 -05:00
rocker Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
samsung drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
seeq drivers: net: ethernet: remove incorrect __exit markups 2017-03-02 14:33:49 -08:00
sfc sfc: don't insert mc_list on low-latency firmware if it's too long 2017-04-05 18:35:21 -07:00
sgi net: sgi: ioc3-eth: use new api ethtool_{get|set}_link_ksettings 2017-03-06 17:05:39 -08:00
silan net: silan: sc92031: use new api ethtool_{get|set}_link_ksettings 2017-03-06 17:05:39 -08:00
sis net: sis: sis900: use new api ethtool_{get|set}_link_ksettings 2017-03-06 17:05:39 -08:00
smsc net: smsc: smc91x: use new api ethtool_{get|set}_link_ksettings 2017-03-08 22:18:05 -08:00
stmicro net: stmmac: set total length of the packet to be transmitted in TDES3 2017-04-13 12:40:09 -04:00
sun net: sunhme: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
synopsys net: dwc-xlgmac: add the initial ethtool support 2017-04-13 13:46:38 -04:00
tehuti net: tehuti: use new api ethtool_{get|set}_link_ksettings 2017-03-27 16:00:07 -07:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
tile drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
toshiba net: toshiba: spider_net: use new api ethtool_{get|set}_link_ksettings 2017-03-08 22:18:05 -08:00
tundra net: tundra: tsi108: use new api ethtool_{get|set}_link_ksettings 2017-03-12 19:28:07 -07:00
via net: via: via-velocity: use new api ethtool_{get|set}_link_ksettings 2017-03-12 19:28:07 -07:00
wiznet net: ethernet: wiznet: avoid format string exposure 2017-04-06 13:38:11 -07:00
xilinx net: axienet: use eth_hw_addr_random() 2017-03-06 17:15:41 -08:00
xircom Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
xscale
Kconfig net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet 2017-03-09 13:29:27 -08:00
Makefile net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet 2017-03-09 13:29:27 -08:00
dnet.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
dnet.h
ec_bhf.c net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
ethoc.c net: ethoc: Use ether_addr_copy() 2017-03-21 17:16:56 -07:00
fealnx.c net: fealnx: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
jme.c net: jme: use new api ethtool_{get|set}_link_ksettings 2017-01-17 11:44:27 -05:00
jme.h net: jme: use new api ethtool_{get|set}_link_ksettings 2017-01-17 11:44:27 -05:00
korina.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
lantiq_etop.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
netx-eth.c