Subject: iSCSI: SCSI command error

From: Mike Donohoe <[email-masked]>
Date: Wed, 24 Jul 2002 09:05:01 -0700

> Let's say a target has a 4MB buffer to hold scsi data.
> 
> If the initiator sends a scsi command with ExpectedDataLength of 4MB+1, 
> what is the expected response of the target??????????
> 
> 1.  Send a Reject PDU.
> 
> 2. Send a Scsi response with Status=2 and a revelant sense code error:4h
> 44h 0h (Internal Target failure).
> 
> 3.  Send a Scsi response with Response=1.
> 
> Must the Reject or Scsi response wait until the initiator has send all
> their data for each of these possibilities????????
> 
> Thanks.
> 
>

---

From: Bill Studenmund <[email-masked]>
Date: Wed, 24 Jul 2002 10:46:45 -0700 (PDT)

> > 3.  Send a Scsi response with Response=1.

I'll let the list say what's best for this. Another option is, if you're
working with disks, to cheat and just not need to have more than 4 MB
worth in your buffers at once. Remember the target controls how much/fast
the initiator sends data, since the target sends R2Ts. By controling
FirstBurstSize and MaxBurstSize, you control how much data you have to
immediately buffer.

> > their data for each of these possibilities????????

No, you will have negotiated how much data the initiator sends with the
command (FirstBurstSize, InitialR2T, and ImmediateData). If InitialR2T is
no, then at worst you have to wait FirstBurstSize worth of data.

I think you could also immediately send a reject/SCSI Response with error,
and just remember the ITT. For all future data writes on that ITT, you
just black-hole them. You of course clear this black hole when an SCSI
command comes in with that ITT.

Take care,

Bill