linux/drivers/infiniband/hw
Jack Morgenstein ade57e9031 IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports
commit 852f692759 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>
History 2018-02-22 15:42:14 +01:00
..
bnxt_re bnxt_re: changing the ip address shouldn't affect new connections 2017-12-14 09:53:14 +01:00
cxgb3 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cxgb4 iw_cxgb4: when flushing, complete all wrs in a chain 2018-01-17 09:45:19 +01:00
hfi1 IB/hfi1: Prevent a NULL dereference 2018-01-23 19:58:12 +01:00
hns RDMA/hns: Avoid NULL pointer exception 2017-12-25 14:26:30 +01:00
i40iw License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mlx4 IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports 2018-02-22 15:42:14 +01:00
mlx5 {net,ib}/mlx5: Don't disable local loopback multicast traffic when needed 2018-01-31 14:03:46 +01:00
mthca License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nes IB: Correct MR length field to be 64-bit 2017-09-25 11:47:23 -04:00
ocrdma IB/ocrdma: fix incorrect fall-through on switch statement 2017-09-22 13:16:00 -04:00
qedr RDMA/qedr: Parse vlan priority as sl 2017-10-04 15:18:18 -04:00
qib IB/qib: Fix comparison error with qperf compare/swap test 2018-02-22 15:42:14 +01:00
usnic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmw_pvrdma RDMA/vmw_pvrdma: Fix reporting correct opcodes for completion 2017-09-22 13:32:22 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00