Re: [PATCH 1/2] mlx4: Expose correct max_sge_rd limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/27/2015 02:40 AM, Sagi Grimberg wrote:
mlx4 devices (ConnectX-2, ConnectX-3) can not issue
max_sge in a single RDMA_READ request (resulting in
a completion error). Thus, expose lower max_sge_rd
to avoid this issue.

Signed-off-by: Sagi Grimberg <sagig@xxxxxxxxxxxx>
---
  drivers/infiniband/hw/mlx4/main.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 3889723..46305dc 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -499,7 +499,8 @@ static int mlx4_ib_init_device_flags(struct ib_device *ibdev)
  	ibdev->max_qp_wr	   = dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE;
  	ibdev->max_sge		   = min(dev->dev->caps.max_sq_sg,
  					 dev->dev->caps.max_rq_sg);
-	ibdev->max_sge_rd	   = ibdev->max_sge;
+	/* reserve 2 sge slots for rdma reads */
+	ibdev->max_sge_rd	   = ibdev->max_sge - 2;
  	ibdev->max_cq		   = dev->dev->quotas.cq;
  	ibdev->max_cqe		   = dev->dev->caps.max_cqes;
  	ibdev->max_mr		   = dev->dev->quotas.mpt;

Hello Sagi,

Is this the same issue as what has been discussed in http://www.spinics.net/lists/linux-rdma/msg21799.html ?

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux