On Wed, Aug 25, 2010 at 4:48 AM, David Dillow <[email protected]> wrote:
>
> On Sun, 2010-08-22 at 18:56 +0200, Bart Van Assche wrote:
> > [ ... ]
> > static struct srp_iu *__srp_get_tx_iu(struct srp_target_port *target,
> > - enum srp_request_type req_type)
> > + enum srp_tx_iu_type iu_type)
> > {
> > - s32 rsv = (req_type == SRP_REQ_TASK_MGMT) ? 0 : SRP_TSK_MGMT_SQ_SIZE;
> > + s32 rsv = (iu_type == SRP_IU_REQ_TSK_MGMT) ? 0 : SRP_TSK_MGMT_SQ_SIZE;
>
> You check for credits even if this is an SRP_IU_RSP, so we'll fail to
> allocate an IU if we're low on credits. Not a common condition, but
> possible within the spec.
The code below was present in version five of the patch series and has
been removed accidentally. I'll resend the patch series.
+ if (tx_iu_type != SRP_TX_IU_RSP && target->req_lim <= rsv) {
+ ++target->zero_req_lim;
+ return NULL;
+ }
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html