linux_dsm_epyc7002/drivers/net/ethernet
Jack Morgenstein 95646373c9 net/mlx4_core: Fix SRIOV free-pool management when enforcing resource quotas
The Hypervisor driver tracks free slots and reserved slots at the global level
and tracks allocated slots and guaranteed slots per VF.

Guaranteed slots are treated as reserved by the driver, so the total
reserved slots is the sum of all guaranteed slots over all the VFs.

As VFs allocate resources, free (global) is decremented and allocated (per VF)
is incremented for those resources. However, reserved (global) is never changed.

This means that effectively, when a VF allocates a resource from its
guaranteed pool, it is actually reducing that resource's free pool (since
the global reserved count was not also reduced).

The fix for this problem is the following: For each resource, as long as a
VF's allocated count is <= its guaranteed number, when allocating for that
VF, the reserved count (global) should be reduced by the allocation as well.

When the global reserved count reaches zero, the remaining global free count
is still accessible as the free pool for that resource.

When the VF frees resources, the reverse happens: the global reserved count
for a resource is incremented only once the VFs allocated number falls below
its guaranteed number.

This fix was developed by Rick Kready <kready@us.ibm.com>

Reported-by: Rick Kready <kready@us.ibm.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-11 00:32:46 -07:00
..
3com net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
8390 net: 8390: use time_after() for time comparison 2014-05-18 21:24:52 -04:00
adaptec net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
adi bfin_mac: remove empty MDIO bus reset function 2014-03-28 01:38:02 -04:00
aeroflex net: greth: remove empty MDIO bus reset function 2014-03-28 01:38:01 -04:00
allwinner net: sun4i-emac: add promiscuous support 2014-04-12 01:59:38 -04:00
alteon net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
altera Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
amd amd-xgbe: Remove unnecessary include 2014-06-06 13:09:50 -07:00
apple
arc arc_emac: add netpoll support 2014-05-13 18:02:24 -04:00
atheros net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
broadcom net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
brocade net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
cadence net: macb: Fix race between HW and driver 2014-05-05 17:11:18 -04:00
calxeda net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
chelsio cxgb4: Change default Interrupt Holdoff Packet Count Threshold 2014-06-10 22:49:55 -07:00
cirrus cs89x0: Call dev_consume_skb_any instead of dev_kfree_skb. 2014-03-24 21:18:58 -07:00
cisco net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
davicom dm9000: avoid sleeping in dm9000_timeout callback 2014-06-05 15:12:11 -07:00
dec net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
dlink net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
emulex Merge branch 'ethtool-rssh-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/net-next 2014-06-02 23:07:02 -07:00
faraday net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-05 16:22:02 -07:00
fujitsu net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
hisilicon net: hisilicon: add hix5hd2 mac driver 2014-06-02 23:39:05 -07:00
hp
i825xx i825xx: Call dev_kfree_skb_any instead of dev_kfree_skb. 2014-03-24 21:19:02 -07:00
ibm net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
icplus net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
intel i40e/i40evf: bump version to 0.4.7 for i40e and 0.9.31 for i40evf 2014-06-09 01:16:25 -07:00
marvell net: mv643xx_eth: Avoid unmapping the TSO header buffers 2014-06-02 16:16:06 -07:00
mellanox net/mlx4_core: Fix SRIOV free-pool management when enforcing resource quotas 2014-06-11 00:32:46 -07:00
micrel net: ks8851: Don't use regulator_get_optional() 2014-06-02 00:13:51 -07:00
microchip net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
moxa drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
myricom net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
natsemi net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
neterion net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
nuvoton
nvidia net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
nxp lpc_eth: Use resource_size instead of computation 2014-06-03 16:08:52 -07:00
octeon
oki-semi net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate 2014-06-06 16:24:07 -07:00
packetengines net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
pasemi drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-05 16:22:02 -07:00
rdc r6040: remove empty MDIO bus reset function 2014-03-28 01:38:02 -04:00
realtek net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
samsung net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
seeq drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
sfc Merge branch 'ethtool-rssh-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/net-next 2014-06-02 23:07:02 -07:00
sgi drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
silan sc92031: Call dev_consume_skb_any instead of dev_kfree_skb. 2014-03-24 21:19:08 -07:00
sis net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
stmicro net: stmmac: Handle different error codes from platform_get_irq_byname 2014-06-02 14:04:06 -07:00
sun net: cassini: use nested lock annotation 2014-05-09 16:34:10 -04:00
tehuti net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
tile net: tile: Remove unnecessary memset of netdev private data 2014-05-30 17:06:23 -07:00
toshiba net: ethernet: toshiba: ps3_gelic_net.c: Cleaning up a check on a memory allocation 2014-06-11 00:13:16 -07:00
tundra drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
via net: via-rhine: Convert #ifdef USE_MMIO to a runtime flag 2014-05-05 15:36:41 -04:00
wiznet net: w5100: Use devm_ioremap_resource() 2014-02-28 16:57:24 -05:00
xilinx xilinx: Use time_before_eq() 2014-05-22 15:50:13 -04:00
xircom
xscale net: ptp: move PTP classifier in its own file 2014-04-01 16:43:18 -04:00
dnet.c dnet: remove empty MDIO bus reset function 2014-03-28 01:38:02 -04:00
dnet.h
ec_bhf.c driver/net/ethernet/ec_bhf.c: fix sparse warnings 2014-05-14 16:09:33 -04:00
ethoc.c net: ethoc: remove ethoc_config 2014-04-21 14:58:48 -04:00
fealnx.c
jme.c jme: Fix unmap loop counting error: 2014-05-14 15:11:22 -04:00
jme.h
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
korina.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
lantiq_etop.c netdevice: add queue selection fallback handler for ndo_select_queue 2014-02-17 00:36:34 -05:00
Makefile net: hisilicon: add hix5hd2 mac driver 2014-06-02 23:39:05 -07:00
netx-eth.c
s6gmac.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00