|
@@ -115,9 +115,12 @@ isert_conn_setup_qp(struct isert_conn *isert_conn, struct rdma_cm_id *cma_id,
|
|
attr.cap.max_recv_wr = ISERT_QP_MAX_RECV_DTOS;
|
|
attr.cap.max_recv_wr = ISERT_QP_MAX_RECV_DTOS;
|
|
/*
|
|
/*
|
|
* FIXME: Use devattr.max_sge - 2 for max_send_sge as
|
|
* FIXME: Use devattr.max_sge - 2 for max_send_sge as
|
|
- * work-around for RDMA_READ..
|
|
|
|
|
|
+ * work-around for RDMA_READs with ConnectX-2.
|
|
|
|
+ *
|
|
|
|
+ * Also, still make sure to have at least two SGEs for
|
|
|
|
+ * outgoing control PDU responses.
|
|
*/
|
|
*/
|
|
- attr.cap.max_send_sge = device->dev_attr.max_sge - 2;
|
|
|
|
|
|
+ attr.cap.max_send_sge = max(2, device->dev_attr.max_sge - 2);
|
|
isert_conn->max_sge = attr.cap.max_send_sge;
|
|
isert_conn->max_sge = attr.cap.max_send_sge;
|
|
|
|
|
|
attr.cap.max_recv_sge = 1;
|
|
attr.cap.max_recv_sge = 1;
|