Message ID | 462EF229174FDB4D92ACE4656EA5610051E3C4E6@CMEXMB1.ad.emulex.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
On 10/31/2014 9:50 PM, Chris Moore wrote: > > This is the isert version of the patch that Minh Tran submitted for iser. > isert has the same issue of trying to create a CQ with more CQEs than are supported by > the hardware. > ib_isert is maintained in target-devel. Can you resend it there? Thanks! Sagi. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> -----Original Message----- > From: Sagi Grimberg [mailto:sagig@dev.mellanox.co.il] > Sent: Sunday, November 02, 2014 4:37 AM > To: Chris Moore; linux-rdma@vger.kernel.org > Cc: Nicholas A. Bellinger > Subject: Re: [PATCH] IB/isert: Adjust CQ size to HW limits > > On 10/31/2014 9:50 PM, Chris Moore wrote: > > > > This is the isert version of the patch that Minh Tran submitted for iser. > > isert has the same issue of trying to create a CQ with more CQEs than > > are supported by the hardware. > > > > ib_isert is maintained in target-devel. Can you resend it there? > > Thanks! > > Sagi. Yep, no problem, I'll do that. There was another issue in ib_isert.c that Nic proposed a fix for in an email back on 10/22. This was the issue with attr.cap.max_send_sge being set to (device->dev_attr.max_sge - 2) instead of just device->dev_attr.max_sge. Should I post that issue to target-devel as well? Thanks, Chris -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 3effa93..f837a23 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -225,12 +225,16 @@ isert_create_device_ib_res(struct isert_device *device) struct isert_cq_desc *cq_desc; struct ib_device_attr *dev_attr; int ret = 0, i, j; + int max_rx_cqe, max_tx_cqe; dev_attr = &device->dev_attr; ret = isert_query_device(ib_dev, dev_attr); if (ret) return ret; + max_rx_cqe = min(ISER_MAX_RX_CQ_LEN, dev_attr->max_cqe); + max_tx_cqe = min(ISER_MAX_TX_CQ_LEN, dev_attr->max_cqe); + /* asign function handlers */ if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS && dev_attr->device_cap_flags & IB_DEVICE_SIGNATURE_HANDOVER) { @@ -272,7 +276,7 @@ isert_create_device_ib_res(struct isert_device *device) isert_cq_rx_callback, isert_cq_event_callback, (void *)&cq_desc[i], - ISER_MAX_RX_CQ_LEN, i); + max_rx_cqe, i); if (IS_ERR(device->dev_rx_cq[i])) { ret = PTR_ERR(device->dev_rx_cq[i]); device->dev_rx_cq[i] = NULL; @@ -284,7 +288,7 @@ isert_create_device_ib_res(struct isert_device *device) isert_cq_tx_callback, isert_cq_event_callback, (void *)&cq_desc[i], - ISER_MAX_TX_CQ_LEN, i); + max_tx_cqe, i); if (IS_ERR(device->dev_tx_cq[i])) { ret = PTR_ERR(device->dev_tx_cq[i]); device->dev_tx_cq[i] = NULL;
This is the isert version of the patch that Minh Tran submitted for iser. isert has the same issue of trying to create a CQ with more CQEs than are supported by the hardware. Signed-off-by: Chris Moore <chris.moore@emulex.com> --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html