]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Fix max_wqe capacity reported from query device
authorSagi Grimberg <sagig@mellanox.co.il>
Thu, 24 May 2012 13:08:08 +0000 (16:08 +0300)
committerRoland Dreier <roland@purestorage.com>
Wed, 6 Jun 2012 17:08:03 +0000 (10:08 -0700)
commit868979e84c47939484efa7ae6d514d94c4019d17
tree975ff9ce5051b607382b49917f033cfc7c5e9c7f
parent18f405fd0dd2017091abe7e3d615b210328f92e0
IB/mlx4: Fix max_wqe capacity reported from query device

1. Limit the max number of WQEs per QP reported when querying the
   device, so that ib_create_qp() will not fail for a QP size that the
   device claimed to support due to additional headroom WQEs being
   allocated.

2. Limit qp resources accepted for ib_create_qp() to the limits
   reported in ib_query_device().  In kernel space, make sure that the
   limits returned to the caller following qp creation also lie within
   the reported device limits. For userspace, report as before, and do
   adjustment in libmlx4 (so as not to break ABI).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Sagi Grimberg <sagig@mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/mlx4_ib.h
drivers/infiniband/hw/mlx4/qp.c