linux-stable/include
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
..
acpi ACPI / CPPC: remove redundant mbox_send_message() declaration 2016-02-03 01:09:52 +01:00
asm-generic Merge branch 'akpm' (patches from Andrew) 2016-01-21 12:32:08 -08:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-01-22 11:58:43 -08:00
drm Merge branch 'drm-fixes-mst' of git://people.freedesktop.org/~airlied/linux into drm-fixes 2016-02-05 15:24:17 +10:00
dt-bindings ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
keys
kvm
linux net/mlx4_core: Set UAR page size to 4KB regardless of system page size 2016-02-17 10:29:27 -05:00
math-emu
media [media] vb2: fix nasty vb2_thread regression 2016-02-04 09:13:46 -02:00
memory
misc
net vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices 2016-02-10 05:50:03 -05:00
pcmcia
ras
rdma IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers 2016-01-19 15:35:01 -05:00
rxrpc
scsi Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
soc ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
sound ALSA: rawmidi: Make snd_rawmidi_transmit() race-free 2016-02-03 14:51:28 +01:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2016-01-20 17:20:53 -08:00
trace This includes three minor fixes, mostly due to cut-and-paste issues. 2016-01-28 17:00:50 -08:00
uapi Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm 2016-02-01 15:21:20 -08:00
video
xen Merge branch 'for-4.5/drivers' of git://git.kernel.dk/linux-block 2016-01-21 18:19:38 -08:00
Kbuild