From b2536f47cf49b8c59b9e8c91be2d98d6a0fb0d26 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 19 May 2020 22:05:51 +0000 Subject: [PATCH] ib_srpt: Reduce QP max_recv_sge to 1 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8939 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 5 +---- srpt/src/ib_srpt.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 51286248c..62970cb34 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2331,10 +2331,8 @@ retry: qp_init->cap.max_send_wr = sq_size; #if HAVE_DEV_ATTR_MAX_SEND_SGE ch->max_send_sge = sdev->dev_attr.max_send_sge; - ch->max_recv_sge = sdev->dev_attr.max_recv_sge; #else ch->max_send_sge = sdev->dev_attr.max_sge; - ch->max_recv_sge = ch->max_send_sge; #endif /* * For max_sge values > 2 * max_sge_delta, subtract max_sge_delta. For @@ -2346,12 +2344,11 @@ retry: max_t(int, 0, ch->max_send_sge - max_sge_delta)); qp_init->cap.max_send_sge = ch->max_send_sge; - qp_init->cap.max_recv_sge = ch->max_recv_sge; + qp_init->cap.max_recv_sge = 1; if (sdev->use_srq) { qp_init->srq = sdev->srq; } else { qp_init->cap.max_recv_wr = ch->rq_size; - qp_init->cap.max_recv_sge = ch->max_recv_sge; } if (ch->using_rdma_cm) { diff --git a/srpt/src/ib_srpt.h b/srpt/src/ib_srpt.h index ce680261a..30b07adfb 100644 --- a/srpt/src/ib_srpt.h +++ b/srpt/src/ib_srpt.h @@ -382,7 +382,6 @@ enum rdma_ch_state { * @kref: kref for this channel. * @rq_size: IB receive queue size. * @max_send_sge: Maximum length of RDMA send scatter list. - * @max_recv_sge: Maximum length of RDMA receive scatter list. * @max_rsp_size: Maximum size of an SRP response message in bytes. * @sq_wr_avail: number of work requests available in the send queue. * @sport: pointer to the information of the HCA port used by this @@ -428,7 +427,6 @@ struct srpt_rdma_ch { struct kref kref; int rq_size; u32 max_send_sge; - u32 max_recv_sge; u32 max_rsp_size; atomic_t sq_wr_avail; struct srpt_port *sport;