linux/drivers/infiniband/hw
Michael J. Ruhl d555533d42 IB/hfi1: Fix incorrect available receive user context count
commit d7d626179f upstream.

The addition of the VNIC contexts to num_rcv_contexts changes the
meaning of the sysfs value nctxts from available user contexts, to
user contexts + reserved VNIC contexts.

User applications that use nctxts are now broken.

Update the calculation so that VNIC contexts are used only if there are
hardware contexts available, and do not silently affect nctxts.

Update code to use the calculated VNIC context number.

Update the sysfs value nctxts to be available user contexts only.

Fixes: 2280740f01 ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Niranjana Vishwanathapura <Niranjana.Vishwanathapura@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-11-30 08:40:55 +00:00
..
bnxt_re License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +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: remove the stid on listen create failure 2017-09-22 12:59:42 -04:00
hfi1 IB/hfi1: Fix incorrect available receive user context count 2017-11-30 08:40:55 +00:00
hns Merge branch 'k.o/for-4.13-rc' into k.o/for-next 2017-08-18 14:12:04 -04: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 sprintf format warning 2017-09-13 18:53:15 -07:00
mlx5 IB/mlx5: Fix label order in error path handling 2017-10-04 14:59:15 -04: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +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