From: David Dillow <dave-i1Mk8JYDVaaSihdK6806/g@public.gmane.org>
To: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 2/4] IB/srp: implement SRP_CRED_REQ
Date: Fri, 13 Aug 2010 14:12:44 -0400 [thread overview]
Message-ID: <1281723164.2437.40.camel@lap75545.ornl.gov> (raw)
In-Reply-To: <AANLkTikmh4+15_3wPGaBkb5o5wkyyiLnRbqKu2Tzmbgp-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, 2010-08-10 at 09:55 +0200, Bart Van Assche wrote:
> On Tue, Aug 3, 2010 at 5:44 PM, David Dillow <dave-i1Mk8JYDVaaSihdK6806/g@public.gmane.org> wrote:
> >
> > On Tue, 2010-08-03 at 17:26 +0200, Bart Van Assche wrote:
> > [ ... ]
> > > I'm not sure it is a good idea to allow that all transmit buffers get
> > > allocated for sending CMD_RSP information units and that none remain
> > > for replying to incoming SRP_CRED_REQ / SRP_AER_REQ / SRP_T_LOGOUT
> > > requests. Wouldn't that be a protocol violation ?
> >
> > You mean SRP_CMD? We don't do that, we clamp the outstanding requests we
> > generate so we'll always have a buffer to reply to SRP_CRED_REQ et al.
> >
> > If SRQ_SQ_SIZE is 64, we set .can_queue to 63 which will leave a buffer
> > available for the reply.
> >
> > Now, if the target sends us multiple SRP_CRED_REQ without waiting for a
> > reply, then we could use up buffers and not be able to send requests,
> > but that would be a protocol violation on the target's side.
>
> (resending as plain text)
>
> I have been looking further into this. There is a slight asymmetry in
> the current transmit buffer allocation code: one buffer element is
> reserved on the target for task management requests but not on the
> initiator. So - at least in theory - it is possible that all elements
> of the initiator transmit ring are allocated for SRP_CMD requests at
> the time an SRP_TSK_MGMT request should be sent. Wouldn't it be more
> symmetric to change __srp_get_tx_iu() as follows (diff against the
> current for-next branch) ?
This is not needed in the code as it currently stands. We cannot have
all elements of the tx ring allocated for SRP_CMD requests, because we
don't send one if we don't have a credit for it, and we save a credit
for the SRP_TSK_MGMT request. Hence, there will always be a buffer
available for the management request.
We don't need it for when we start replying to target requests in the
future, because we already reserve that buffer by limiting our view of
credits to one less than the actual ring size.
Dave
--
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
next prev parent reply other threads:[~2010-08-13 18:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 15:32 [PATCH 2/4] IB/srp: implement SRP_CRED_REQ Bart Van Assche
[not found] ` <201008021732.44769.bvanassche-HInyCGIudOg@public.gmane.org>
2010-08-02 21:44 ` David Dillow
[not found] ` <1280785473.2451.90.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2010-08-03 11:40 ` Bart Van Assche
[not found] ` <AANLkTikSFgcjZ0z-Py1+yeFZ8oAohBS=fpRAMqWRBnHy-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-03 15:05 ` David Dillow
[not found] ` <1280847933.20446.29.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2010-08-03 15:26 ` Bart Van Assche
[not found] ` <AANLkTinMU8QkX-5WrsW18UJ7qNfp7ZDchpqcPw0JGAJz-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-03 15:44 ` David Dillow
[not found] ` <1280850256.20446.56.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2010-08-04 16:40 ` Bart Van Assche
2010-08-10 7:55 ` Bart Van Assche
[not found] ` <AANLkTikmh4+15_3wPGaBkb5o5wkyyiLnRbqKu2Tzmbgp-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-13 18:12 ` David Dillow [this message]
[not found] ` <1281723164.2437.40.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2010-08-14 8:21 ` Bart Van Assche
2010-08-14 17:08 ` David Dillow
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=1281723164.2437.40.camel@lap75545.ornl.gov \
--to=dave-i1mk8jydvaasihdk6806/g@public.gmane.org \
--cc=bvanassche-HInyCGIudOg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.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