android_kernel_oneplus_msm8998/drivers/net/ethernet/mellanox/mlx4
Jack Morgenstein 5b6e767562 IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports
commit 852f6927594d0d3e8632c889b2ab38cbc46476ad upstream.

Allocating steerable UD QPs depends on having at least one IB port,
while releasing those QPs does not.

As a result, when there are only ETH ports, the IB (RoCE) driver
requests releasing a qp range whose base qp is zero, with
qp count zero.

When SR-IOV is enabled, and the VF driver is running on a VM over
a hypervisor which treats such qp release calls as errors
(rather than NOPs), we see lines in the VM message log like:

 mlx4_core 0002:00:02.0: Failed to release qp range base:0 cnt:0

Fix this by adding a check for a zero count in mlx4_release_qp_range()
(which thus treats releasing 0 qps as a nop), and eliminating the
check for device managed flow steering when releasing steerable UD QPs.
(Freeing ib_uc_qpns_bitmap unconditionally is also OK, since it
remains NULL when steerable UD QPs are not allocated).

Fixes: 4196670be7 ("IB/mlx4: Don't allocate range of steerable UD QPs for Ethernet-only device")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22 15:44:58 +01:00
..
alloc.c
catas.c net/mlx4_core: Avoid command timeouts during VF driver device shutdown 2017-06-17 06:39:37 +02:00
cmd.c net/mlx4_core: Avoid delays during VF driver device shutdown 2017-12-20 10:04:56 +01:00
cq.c net/mlx4_core: Fix racy CQ (Completion Queue) free 2017-04-18 07:14:38 +02:00
en_clock.c net/mlx4_en: fix overflow in mlx4_en_init_timestamp() 2017-10-21 17:09:04 +02:00
en_cq.c
en_dcb_nl.c
en_ethtool.c
en_main.c
en_netdev.c net/mlx4_core: Allow resetting VF admin mac to zero 2016-10-28 03:01:34 -04:00
en_port.c
en_port.h
en_resources.c
en_rx.c net/mlx4_en: Fix bad WQE issue 2017-04-18 07:14:37 +02:00
en_selftest.c
en_tx.c
eq.c net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV 2017-07-05 14:37:21 +02:00
fw.c
fw.h
fw_qos.c
fw_qos.h
icm.c net/mlx4: Remove BUG_ON from ICM allocation routine 2017-08-06 19:19:44 -07:00
icm.h
intf.c net/mlx4_core: Avoid command timeouts during VF driver device shutdown 2017-06-17 06:39:37 +02:00
Kconfig
main.c net/mlx4_core: Avoid delays during VF driver device shutdown 2017-12-20 10:04:56 +01:00
Makefile
mcg.c
mlx4.h net/mlx4_core: Avoid command timeouts during VF driver device shutdown 2017-06-17 06:39:37 +02:00
mlx4_en.h net/mlx4_en: fix overflow in mlx4_en_init_timestamp() 2017-10-21 17:09:04 +02:00
mlx4_stats.h
mr.c
pd.c
port.c
profile.c
qp.c IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports 2018-02-22 15:44:58 +01:00
reset.c
resource_tracker.c net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions 2017-04-18 07:14:38 +02:00
sense.c
srq.c