From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-rdma <linux-rdma@vger.kernel.org>,
target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Roland Dreier <roland@purestorage.com>
Subject: Re: [PATCH 2/2] ib_srpt: Make srpt_srq_size module parameter use S_IRUGO|S_IWUSR
Date: Sun, 06 Nov 2011 04:02:39 -0800 [thread overview]
Message-ID: <1320580959.5859.441.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <CAO+b5-pvgAkCxU=+sSXRLGjBU-bsC=q8-O9qHTQJg9L8P=W_9g@mail.gmail.com>
On Sun, 2011-11-06 at 12:40 +0100, Bart Van Assche wrote:
> On Sun, Nov 6, 2011 at 12:15 PM, Nicholas A. Bellinger
> <nab@linux-iscsi.org> wrote:
> > This patch converts the srpt_srq_size module parameter to R/W access
> > so that it's accessable when built as CONFIG_INFINIBAND_SRPT=y. This
> > parameter is only referenced within srpt_add_one() directly to set
> > srpt_device->srq_size.
> >
> > Reported-by: Bart Van Assche <bvanassche@acm.org>
> > Cc: Bart Van Assche <bvanassche@acm.org>
> > Cc: Roland Dreier <roland@purestorage.com>
> > Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> > ---
> > drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> > index 94e6aff..43a17e3 100644
> > --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> > +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> > @@ -84,7 +84,7 @@ MODULE_PARM_DESC(srp_max_req_size,
> > "Maximum size of SRP request messages in bytes.");
> >
> > static int srpt_srq_size = DEFAULT_SRPT_SRQ_SIZE;
> > -module_param(srpt_srq_size, int, 0444);
> > +module_param(srpt_srq_size, int, S_IRUGO|S_IWUSR);
> > MODULE_PARM_DESC(srpt_srq_size,
> > "Shared receive queue (SRQ) size.");
>
> This patch makes it possible to set srpt_srq_size to values that are
> so low that communication becomes impossible. Attempts to set
> srpt_srq_size below MIN_SRPT_SRQ_SIZE should either be blocked or the
> modification shown should be added to the above patch:
>
> -sdev->srq_size = min(srpt_srq_size, sdev->dev_attr.max_srq_wr);
> +sdev->srq_size = min(max(srpt_srq_size, MIN_SRPT_SRQ_SIZE),
> sdev->dev_attr.max_srq_wr);
Fixed.
Thanks,
--nab
next prev parent reply other threads:[~2011-11-06 12:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 11:15 [PATCH 1/2] ib_srpt: Make srp_max_req_size module parameter use S_IRUGO|S_IWUSR Nicholas A. Bellinger
2011-11-06 11:15 ` [PATCH 2/2] ib_srpt: Make srpt_srq_size " Nicholas A. Bellinger
2011-11-06 11:40 ` Bart Van Assche
2011-11-06 12:02 ` Nicholas A. Bellinger [this message]
2011-11-06 11:46 ` [PATCH 1/2] ib_srpt: Make srp_max_req_size " Bart Van Assche
2011-11-06 12:10 ` Nicholas A. Bellinger
2011-11-06 12:54 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1320580959.5859.441.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=bvanassche@acm.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=roland@purestorage.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox