Return-Path: <owner-ips@ece.cmu.edu>
X-Sieve: cmu-sieve 2.0
Return-Path: <owner-ips@ece.cmu.edu>
Received: (from majordom@localhost)
	by ece.cmu.edu (8.11.0/8.10.2) id h39EfUs25032
	for ips-outgoing; Wed, 9 Apr 2003 10:41:30 -0400 (EDT)
X-Authentication-Warning: ece.cmu.edu: majordom set sender to owner-ips@ece.cmu.edu using -f
Received: from firegate.attotech.com (firegate.attotech.com [12.32.232.50])
	by ece.cmu.edu (8.11.0/8.10.2) with ESMTP id h39EfQ325028
	for <ips@ece.cmu.edu>; Wed, 9 Apr 2003 10:41:26 -0400 (EDT)
Received: from [172.16.1.2] by firegate.attotech.com
	for wrstuden@wasabisystems.com
	id JAA09137; Wed Apr  9 09:58:40 2003
Subject: Re: iSCSI SCSI command F bit questions
Message-ID: <OF2CD68515.587CA4F5-ON85256D03.004CB265@attotech.com>
Date: Wed, 9 Apr 2003 09:58:31 -0400
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
To: wrstuden@wasabisystems.com
From: AClarke@attotech.com
Cc: ips@ece.cmu.edu
Sender: owner-ips@ece.cmu.edu
Precedence: bulk


>On Tue, 8 Apr 2003 AClarke@attotech.com wrote:
>
>> I have a few questions about iSCSI data transfer.
>>
>> In section 10.3.1 of the spec describing the F bit, why is the word
"may"
>> used?  I think that when Expected Data Transfer Length is larger than
>> DataSegmentLength the target "MUST" solicit the additional data.  Is
there
>> a situation when the target should not send an R2T for the rest of the
>> data?
>
>Note, that's "may", not "MAY". It's a polite phrasing. It means it's up to
>the target to get the rest of the data.
>
>> Is it at the initiator's discretion to set this bit, even if
InitialR2T=No,
>> ImmediateData=Yes, and DataSegmentLength is less than FirstBurstLength?
>
>Kinda. In the case you describe, it is at the initiator's discression what
>kind of unsolicited data transmission it wants to do. But given a decision
>(no unsolicited, unsolicited burst, immediate data, immediate data
>followed by unsolicited burst), the initiator must stick with that
>decision.

OK, and I see further clarification in sections 3.2.4.2, Data Transfer
Overview:

   An iSCSI initiator MAY choose not to send unsolicited data, only
   immediate data or FirstBurstLength bytes of unsolicited data with a
   command. If any non-immediate unsolicited data is sent, the total
   unsolicited data MUST be either FirstBurstLength, or all of the data
   if the total amount is less than the FirstBurstLength.

and in 10.3.4, SCSI Command/Expected Data Transfer Length:

   If the Expected Data Transfer Length is higher than the
   FirstBurstLength (the negotiated maximum amount of unsolicited data
   the target will accept), the initiator MUST send the maximum amount
   of unsolicited data OR ONLY the immediate data, if any.

So for each unidirectional write command (with InitialR2T=No,
ImmediateData=Yes), the initiator can choose between:
    1. no immediate data and no unsolicited data (data-outs)
    2. immediate data and no unsolicited, immediate < FirstBurstLength
    3. no immediate data and unsolicited, unsolicited = FirstBurstLength
    4. immediate data and unsolicited data, sum = FirstBurstLength
Is this correct?

Why can't the initiator send less than FirstBurstLength of unsolicited
using a data-out with F bit set?
If we are acting as if an R2T was sent, section 10.8 states "a target MAY
choose to Reject that PDU with "Protocol error" reason code."

>
>>      10.3.1  Flags and Task Attributes (byte 1)
>>
>>           The flags for a SCSI Command are:
>>
>>           bit 0   (F) is set to 1 when no unsolicited SCSI Data-Out PDUs
>>                 follow this PDU.  When F=1 for a write and if Expected
Data
>>                 Transfer Length is larger than the DataSegmentLength,
the
>>                 target may solicit additional data through R2T.
>
>Take care,
>
>Bill



