On 02/29/2016 02:20 PM, Christoph Hellwig wrote: > Replace the homegrown RDMA READ/WRITE code in srpt with the generic API. > The only real twist here is that we need to allocate on Linux scatterlist ^^ This probably should have been "one" instead of "on"?
+ ret = target_alloc_sgl(&ctx->sg, &ctx->nents, size, false, + i == nbufs - 1 ? false : true);
Please change "i == nbufs - 1 ? false : true" into "i < nbufs - 1".
@@ -1832,8 +1626,11 @@ retry: qp_init->srq = sdev->srq; qp_init->sq_sig_type = IB_SIGNAL_REQ_WR; qp_init->qp_type = IB_QPT_RC; - qp_init->cap.max_send_wr = srp_sq_size; - qp_init->cap.max_send_sge = SRPT_DEF_SG_PER_WQE; + qp_init->cap.max_send_wr = srp_sq_size / 2; + qp_init->cap.max_rdma_ctxs = srp_sq_size / 2; + qp_init->cap.max_send_sge = max(sdev->device->attrs.max_sge_rd, + sdev->device->attrs.max_sge); + qp_init->port_num = ch->sport->port; ch->qp = ib_create_qp(sdev->pd, qp_init); if (IS_ERR(ch->qp)) {
These changes have not been described in the patch description. 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