linux/drivers/infiniband/hw/mlx4
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
..
ah.c IB: Let ib_core resolve destination mac address 2017-10-18 12:10:36 -04:00
alias_GUID.c IB/mlx4: Fix some spelling mistakes 2017-08-24 16:27:10 -04:00
cm.c IB/mlx4: Fix CM REQ retries in paravirt mode 2017-07-20 11:20:50 -04:00
cq.c IB/mlx4: Add contig support for control objects 2017-11-13 14:42:04 -05:00
doorbell.c IB: Refactor umem to use linear SG table 2014-03-04 10:34:28 -08:00
Kconfig net: mellanox: add DEVLINK dependencies 2016-03-03 17:08:59 -05:00
mad.c Add OPA extended LID support 2017-08-18 14:47:37 -04:00
main.c IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports 2018-01-15 15:33:21 -07:00
Makefile
mcg.c IB/mlx4: Suppress gcc 7 fall-through complaints 2017-10-14 20:47:06 -04:00
mlx4_ib.h IB/mlx4: Exposing modify CQ callback to uverbs layer 2017-11-13 16:59:22 -05:00
mr.c IB/mlx4: Fix mlx4_ib_alloc_mr error flow 2018-01-02 11:09:05 -07:00
qp.c IB/mlx4: Add support to RSS hash for inner headers 2017-12-28 11:33:14 -07:00
srq.c IB/core: Separate CQ handle in SRQ context 2017-08-29 08:30:16 -04:00
sysfs.c IB/mlx4: fix sprintf format warning 2017-09-13 18:53:15 -07:00