From: Bart Van Assche Subject: Re: [PATCH for v4.7] IB/srpt: Reduce QP buffer size Date: Fri, 24 Jun 2016 07:24:42 +0200 Message-ID: References: <20160623073548.9883-1-bart.vanassche@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Parav Pandit Cc: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Laurence Oberman , Christoph Hellwig , Sagi Grimberg List-Id: linux-rdma@vger.kernel.org On 06/24/2016 05:58 AM, Parav Pandit wrote: > On Thu, Jun 23, 2016 at 1:05 PM, Bart Van Assche > wrote: >> - qp_init->cap.max_send_sge = max(sdev->device->attrs.max_sge_rd, >> - sdev->device->attrs.max_sge); >> + qp_init->cap.max_send_sge = SRPT_DEF_SG_PER_WQE; >> qp_init->port_num = ch->sport->port; > > Instead of static value, you might want to do > > max_send_sge = min(max_sge_rd, max_sge, SRPT_DEF_SG_PER_WQE) > > So that it can still remain functional (if not as high performance) > for hw and software devices with SGE of 8 or 12 also? > Otherwise QP creation itself might fail for values lower than 16. Thanks, will do. Another change I will make is that I will make it possible for ULPs to pass max_sge as an argument to rdma_rw_ctx_init() and related functions. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html