linux_dsm_epyc7002/drivers/net/ethernet
Huy Nguyen 85743f1eb3 net/mlx4_core: Set UAR page size to 4KB regardless of system page size
problem description:

The current code sets UAR page size equal to system page size.
The ConnectX-3 and ConnectX-3 Pro HWs require minimum 128 UAR pages.
The mlx4 kernel drivers are not loaded if there is less than 128 UAR pages.

solution:

Always set UAR page to 4KB. This allows more UAR pages if the OS
has PAGE_SIZE larger than 4KB. For example, PowerPC kernel use 64KB
system page size, with 4MB uar region, there are 4MB/2/64KB = 32
uars (half for uar, half for blueflame). This does not meet minimum 128
UAR pages requirement. With 4KB UAR page, there are 4MB/2/4KB = 512 uars
which meet the minimum requirement.

Note that only codes in mlx4_core that deal with firmware know that uar
page size is 4KB. Codes that deal with usr page in cq and qp context
(mlx4_ib, mlx4_en and part of mlx4_core) still have the same assumption
that uar page size equals to system page size.

Note that with this implementation, on 64KB system page size kernel, there
are 16 uars per system page but only one uars is used. The other 15
uars are ignored because of the above assumption.

Regarding SR-IOV, mlx4_core in hypervisor will set the uar page size
to 4KB and mlx4_core code in virtual OS will obtain the uar page size from
firmware.

Regarding backward compatibility in SR-IOV, if hypervisor has this new code,
the virtual OS must be updated. If hypervisor has old code, and the virtual
OS has this new code, the new code will be backward compatible with the
old code. If the uar size is big enough, this new code in VF continues to
work with 64 KB uar page size (on PowerPc kernel). If the uar size does not
meet 128 uars requirement, this new code not loaded in VF and print the same
error message as the old code in Hypervisor.

Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 10:29:27 -05:00
..
3com 3c59x: fix another page map/single unmap imbalance 2016-01-13 14:55:18 -05:00
8390 pcnet_cs: add new id 2016-02-16 16:06:13 -05:00
adaptec
adi net: bfin_mac: Use phy_find_first() instead of open-coding it 2016-01-11 00:00:34 -05:00
aeroflex mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
agere phy: Add an mdio_device structure 2016-01-07 14:31:26 -05:00
allwinner
alteon
altera phy: Add an mdio_device structure 2016-01-07 14:31:26 -05:00
amd net: am79c961a: avoid %? in inline assembly 2016-02-16 15:06:54 -05:00
apm drivers: net: xgene: fix extra IRQ issue 2016-01-24 22:15:56 -08:00
apple
arc net: arc_emac: fix sk_buff leak 2016-02-16 15:26:30 -05:00
atheros ethernet/atheros/alx: sanitize buffer sizing and padding 2016-01-06 15:05:25 -05:00
aurora net: nb8800: avoid uninitialized variable warning 2016-01-29 20:33:39 -08:00
broadcom bnxt_en: Reduce default ring sizes. 2016-02-16 15:50:02 -05:00
brocade bna: fix Rx data corruption with VLAN stripping enabled and MTU > 4096 2016-01-15 21:49:25 -05:00
cadence net: macb: fix build warning 2016-01-25 10:51:52 -08:00
calxeda
cavium net: cavium: liquidio: fix check for in progress flag 2016-02-13 06:05:41 -05:00
chelsio cxgb4: Add pci device id for chelsio t540 lom adapter 2016-02-16 15:36:30 -05:00
cirrus
cisco enic: increment devcmd2 result ring in case of timeout 2016-02-09 04:48:01 -05:00
davicom
dec drivers/net: fix eisa_driver probe section mismatch 2015-12-14 00:24:22 -05:00
dlink dl2k: Implement suspend 2015-11-20 14:48:27 -05:00
emulex RDMA/be2net: Remove open and close entry points 2016-01-19 14:00:47 -05:00
ezchip net: Fix dependencies for !HAS_IOMEM archs 2016-01-28 16:03:19 -08:00
faraday net: ethernet: faraday: Use phy_find_first() instead of open coding it 2016-01-10 22:05:30 -05:00
freescale net: fec: use CONFIG_ARM instead of CONFIG_ARCH_MXC/SOC_IMX28 2016-01-25 10:51:53 -08:00
fujitsu
hisilicon net: hns: enet specifies a reference to dsaf 2016-01-21 12:02:31 -08:00
hp net: hp100: remove unnecessary #ifdefs 2016-01-29 20:33:38 -08:00
i825xx
ibm Driver for IBM System i/p VNIC protocol 2015-12-28 00:12:13 -05:00
intel net: i40e: shut up uninitialized variable warnings 2016-01-25 15:49:36 -08:00
marvell net: mvneta: Fix race condition during stopping 2016-02-13 06:02:19 -05:00
mellanox net/mlx4_core: Set UAR page size to 4KB regardless of system page size 2016-02-17 10:29:27 -05:00
micrel
microchip net: encx24j600: move rev announcement to probe function 2015-11-20 10:45:20 -05:00
moxa net: moxart: use correct accessors for DMA memory 2016-01-29 19:40:02 -08:00
myricom net: provide generic busy polling to all NAPI drivers 2015-11-18 16:17:42 -05:00
natsemi natsemi: add checks for dma mapping errors 2015-12-19 12:58:46 -05:00
neterion net: vxge: avoid unused function warnings 2016-01-29 20:33:39 -08:00
netronome nfp: call netif_carrier_off() during init 2015-12-18 15:31:36 -05:00
nuvoton
nvidia
nxp net: lpc_eth: Remove unused variables 2016-01-10 22:50:14 -05:00
octeon
oki-semi net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK 2015-12-15 16:50:08 -05:00
packetengines
pasemi
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-06 22:54:18 -05:00
qualcomm net: qca_spi: fix transmit queue timeout handling 2015-12-06 12:02:24 -05:00
rdc mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
realtek r8169:fix system hange problem. 2016-02-13 05:57:39 -05:00
renesas ravb: skip gPTP start/stop on R-Car gen3 2016-02-16 14:53:00 -05:00
rocker switchdev: Require RTNL mutex to be held when sending FDB notifications 2016-01-28 16:21:31 -08:00
samsung phy: Add API for {un}registering an mdio device to a bus. 2016-01-07 14:31:26 -05:00
seeq
sfc sfc: Downgrade or remove some error messages 2015-12-23 22:06:39 -05:00
sgi
silan
sis
smsc net: smc91x: propagate irq return code 2016-02-16 15:02:23 -05:00
stmicro stmmac: Don't exit mdio registration when mdio subnode is not found in the DTS 2016-01-10 18:02:33 -05:00
sun sunvnet: Initialize network_header and transport_header in vnet_rx_one() 2016-01-19 14:48:15 -05:00
synopsys dwc_eth_qos: Reset hardware before PHY start 2016-02-06 03:38:11 -05:00
tehuti
ti net: davinci_cpdma: use dma_addr_t for DMA address 2016-01-29 20:33:38 -08:00
tile tilepro: use to_delayed_work 2016-01-04 16:07:16 -05:00
toshiba net: tc35815: Drop unused variable 2016-01-10 23:31:25 -05:00
tundra
via via-velocity: unconditionally drop frames with bad l2 length 2015-11-17 14:37:16 -05:00
wiznet
xilinx phy: Add an mdio_device structure 2016-01-07 14:31:26 -05:00
xircom
xscale
dnet.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
dnet.h
ec_bhf.c
ethoc.c phy: Add API for {un}registering an mdio device to a bus. 2016-01-07 14:31:26 -05:00
fealnx.c
jme.c net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK 2015-12-15 16:50:08 -05:00
jme.h
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-03 21:09:12 -05:00
korina.c
lantiq_etop.c net: lantiq_etop.c: Use helper to find first phy 2016-01-10 18:03:47 -05:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-03 21:09:12 -05:00
netx-eth.c