linux-sg2042/drivers/infiniband/hw
Jack Morgenstein 852f692759 IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports
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).

Cc: <stable@vger.kernel.org>
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>
2018-01-15 15:33:21 -07:00
..
bnxt_re bnxt_re: report RoCE device support at info level 2018-01-05 14:35:31 -05:00
cxgb3 Updates for 4.15 kernel merge window 2017-11-15 14:54:53 -08:00
cxgb4 iw_cxgb4: Change error/warn prints to pr_debug 2017-12-29 11:09:23 -07:00
hfi1 IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
hns RDMA/hns: Fix endian problems around imm_data and rkey 2018-01-15 15:33:21 -07:00
i40iw i40iw: Replace mdelay with msleep in i40iw_wait_pe_ready 2018-01-05 13:47:29 -05:00
mlx4 IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports 2018-01-15 15:33:21 -07:00
mlx5 IB/mlx5: remove redundant assignment of mdev 2018-01-10 16:52:52 -05:00
mthca IB/mthca: Use zeroing memory allocator than allocator/memset 2018-01-02 11:20:13 -07:00
nes nes: Change accelerated flag to bool 2017-12-22 13:33:30 -07:00
ocrdma IB/ocrdma: Use zeroing memory allocator than allocator/memset 2018-01-02 11:20:13 -07:00
qedr RDMA/qedr: Fix endian problems around imm_data 2018-01-15 15:33:21 -07:00
qib IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
usnic drivers: infiniband: remove duplicate includes 2017-12-22 09:39:35 -07:00
vmw_pvrdma RDMA/vmw_pvrdma: Use zeroing memory allocator than allocator/memset 2018-01-02 11:20:13 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00