From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com ([209.85.212.176]:33174 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751593AbbKCS4d (ORCPT ); Tue, 3 Nov 2015 13:56:33 -0500 Received: by wijp11 with SMTP id p11so78043653wij.0 for ; Tue, 03 Nov 2015 10:56:32 -0800 (PST) Subject: Re: [PATCH] IB/srp: Fix possible send queue overflow References: <1444901206-27462-1-git-send-email-sagig@mellanox.com> Cc: linux-rdma@vger.kernel.org, Stable To: Doug Ledford From: Sagi Grimberg Message-ID: <5639035D.6050805@dev.mellanox.co.il> Date: Tue, 3 Nov 2015 20:56:29 +0200 MIME-Version: 1.0 In-Reply-To: <1444901206-27462-1-git-send-email-sagig@mellanox.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 15/10/2015 12:26, Sagi Grimberg wrote: > When using work request based memory registration (fast_reg) > we must reserve SQ entries for registration and invalidation > in addition to send operations. Each IO consumes 3 SQ entries > (registration, send, invalidation) so we need to allocate 3x > larger send-queue instead of 2x. > > Signed-off-by: Sagi Grimberg > CC: Stable > --- > drivers/infiniband/ulp/srp/ib_srp.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c > index d00f819..43b07f7 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -488,7 +488,7 @@ static int srp_create_ch_ib(struct srp_rdma_ch *ch) > struct ib_qp *qp; > struct ib_fmr_pool *fmr_pool = NULL; > struct srp_fr_pool *fr_pool = NULL; > - const int m = 1 + dev->use_fast_reg; > + const int m = dev->use_fast_reg ? 3 : 1; > struct ib_cq_init_attr cq_attr = {}; > int ret; > > Hi Doug, Kind reminder for picking this up for 4.4 Cheers, Sagi