diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 50970ca6a..50566bc48 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2008,8 +2008,8 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) qp_init->sq_sig_type = IB_SIGNAL_REQ_WR; qp_init->qp_type = IB_QPT_RC; qp_init->cap.max_send_wr = srpt_sq_size; - ch->max_sge = sdev->dev_attr.max_sge - 2; - BUG_ON(ch->max_sge <= 2); + ch->max_sge = sdev->dev_attr.max_sge - 3; + BUG_ON(ch->max_sge < 1); qp_init->cap.max_send_sge = ch->max_sge; ch->qp = ib_create_qp(sdev->pd, qp_init);