Subject: Re: [Ips] LUN or reserved in R2T?

From: Julian Satran <[email-masked]>
Date: Sun, 6 Mar 2005 06:12:21 -0500

LUN should always be correct. Whether an initiator or a target checks them 
is left to the implementer.
The reason the LUN is there in REQ and DataOUT is that the TTT is required 
to be unique only for a given LU.
An implementer using an incorrect LUN invites trouble - especially in case 
when the target is "composed target" (on which the LUN will be used for 
routing.

Julo

----- Forwarded by Julian Satran/Haifa/IBM on 06/03/2005 05:42 -----

Ming Zhang <[email-masked]> 
Sent by: [email-masked]
05/03/2005 22:35
Please respond to
[email-masked]

To
Eddy Quicksall <[email-masked]>
cc
[email-masked]
Subject
Re: [Ips] LUN or reserved in R2T?

On Sat, 2005-03-05 at 18:50, Eddy Quicksall wrote:
> It is up to the target:
> 
> The Target Transfer Tag and LUN are copied in
> 
>    the outgoing data PDUs and are only used by the target.
see my another email, if this is only used by the target, then initiator
should never check this?

ming

> 
> 
> 
> Eddy
> ----- Original Message ----- 
> From: "Ming Zhang" <[email-masked]>
> To: <[email-masked]>
> Sent: Saturday, March 05, 2005 11:51 AM
> Subject: [Ips] LUN or reserved in R2T?
> 
> 
> > In R2T, shall the LUN field have actual LUN value or can be reserved?
> > 
> > I knew this is asked before. but the archival i can find is 
> > http://www.pdl.cmu.edu/mailinglists/ips/mail/msg09192.html, which is 
in
> > 2002, pretty old. And there is no formal description on this field in
> > 10.8.
> > 
> > Thanks.
> > 
> > Ming
> > 
> > 
> > 
> > _______________________________________________
> > Ips mailing list
> > [email-masked]
> > https://www1.ietf.org/mailman/listinfo/ips

_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips

----- Forwarded by Julian Satran/Haifa/IBM on 06/03/2005 05:42 -----

Ming Zhang <[email-masked]> 
Sent by: [email-masked]
05/03/2005 22:33
Please respond to
[email-masked]

To
Eddy Quicksall <[email-masked]>
cc
[email-masked]
Subject
Re: [Ips] LUN or reserved in R2T?

On Sat, 2005-03-05 at 19:11, Eddy Quicksall wrote:
> I see the confusion because the LUN in the R2T is only used by the 
target so 
> that says the initiator must only copy it and not use it. But the data 
out 
> which was solicited by the R2T must have a valid LUN.
> 
> So, the best thing is to make sure the LUN is valid when you send the 
R2T.
yes, this is the best thing.

but can we safely say this?

1) initiator should not check the validity of LUN field and should
simply copy it to data out packet
2) if target wants to check the validity of lun field in data out
packet, then target should supply a valid lun field in r2t packet?

ming

> 
> Eddy
> ----- Original Message ----- 
> From: "Ming Zhang" <[email-masked]>
> To: <[email-masked]>
> Sent: Saturday, March 05, 2005 11:51 AM
> Subject: [Ips] LUN or reserved in R2T?
> 
> 
> > In R2T, shall the LUN field have actual LUN value or can be reserved?
> >
> > I knew this is asked before. but the archival i can find is
> > http://www.pdl.cmu.edu/mailinglists/ips/mail/msg09192.html, which is 
in
> > 2002, pretty old. And there is no formal description on this field in
> > 10.8.
> >
> > Thanks.
> >
> > Ming
> >
> >
> >
> > _______________________________________________
> > Ips mailing list
> > [email-masked]
> > https://www1.ietf.org/mailman/listinfo/ips

_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips

----- Forwarded by Julian Satran/Haifa/IBM on 06/03/2005 05:42 -----

"Nicholas A. Bellinger" <[email-masked]> 
Sent by: [email-masked]
06/03/2005 03:09

To
[email-masked]
cc
[email-masked], Eddy Quicksall <[email-masked]>
Subject
Re: [Ips] LUN or reserved in R2T?

Hi Ming!!

On Sat, 2005-03-05 at 22:35 -0500, Ming Zhang wrote:
> On Sat, 2005-03-05 at 18:50, Eddy Quicksall wrote:
> > It is up to the target:
> > 
> > The Target Transfer Tag and LUN are copied in
> > 
> >    the outgoing data PDUs and are only used by the target.
> see my another email, if this is only used by the target, then initiator
> should never check this?
> 

I have used to rule in the iscsi-initiator-core.org initiator stack
implementation that the Initiator uses the OS'es SCSI Task LUN inside of
the LUN field for DataOUT PDUs in the solicited DataOUT case.  This
ensures that the LUN from the original PDU containing the SCSI CDB and
all DataOUT PDUs contain the same value.  Please see
iscsi_initiator.c:iscsi_build_data_out() for further details.

On the target side,  I have observed in the past that certain initiators
may not include the correct LUN inside of solicited DataOUT PDUs, and
hence cause interopt problems.  In the PyX Technologies Target Stack we
leave the check against DataOUT PDU's LUN vs. the original
ISCSI_INIT_SCSI_CMND pdu's LUN stubbed out in order to ensure interopt
with these initiator implementations.

Take care,

-- 
Nicholas A. Bellinger <[email-masked]>
Chief Architect, PyX Technologies, Inc.

> ming
> 
> > 
> > 
> > 
> > Eddy
> > ----- Original Message ----- 
> > From: "Ming Zhang" <[email-masked]>
> > To: <[email-masked]>
> > Sent: Saturday, March 05, 2005 11:51 AM
> > Subject: [Ips] LUN or reserved in R2T?
> > 
> > 
> > > In R2T, shall the LUN field have actual LUN value or can be 
reserved?
> > > 
> > > I knew this is asked before. but the archival i can find is 
> > > http://www.pdl.cmu.edu/mailinglists/ips/mail/msg09192.html, which is 
in
> > > 2002, pretty old. And there is no formal description on this field 
in
> > > 10.8.
> > > 
> > > Thanks.
> > > 
> > > Ming
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Ips mailing list
> > > [email-masked]
> > > https://www1.ietf.org/mailman/listinfo/ips
> 
> 
> _______________________________________________
> Ips mailing list
> [email-masked]
> https://www1.ietf.org/mailman/listinfo/ips
-- 
Nicholas A. Bellinger <[email-masked]>

_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips
_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips

---

From: Ming Zhang <[email-masked]>
Date: Sun, 06 Mar 2005 12:31:44 -0500

Thanks.

On Sun, 2005-03-06 at 06:12, Julian Satran wrote:
> LUN should always be correct. Whether an initiator or a target checks
> them is left to the implementer.
> The reason the LUN is there in REQ and DataOUT is that the TTT is
> required to be unique only for a given LU.
> An implementer using an incorrect LUN invites trouble - especially in
> case when the target is "composed target" (on which the LUN will be
> used for routing.
> 
so my understanding is that this is left to target. As long as a target
can handle this, it should be able to do what it wants to do.

ming

> Eddy Quicksall
> <[email-masked]>
>                cc
> [email-masked]
>           Subject
> Re: [Ips] LUN or
> reserved in R2T?
> 
> 
> 
> 
> > > http://www.pdl.cmu.edu/mailinglists/ips/mail/msg09192.html, which
> is in
> Eddy Quicksall
> <[email-masked]>
>                cc
> [email-masked]
>           Subject
> Re: [Ips] LUN or
> reserved in R2T?
> 
> 
> 
> 
> > that says the initiator must only copy it and not use it. But the
> data out 
> > So, the best thing is to make sure the LUN is valid when you send
> the R2T.
> > > http://www.pdl.cmu.edu/mailinglists/ips/mail/msg09192.html, which
> is in
> [email-masked],
> Eddy Quicksall
> <[email-masked]>
>           Subject
> Re: [Ips] LUN or
> reserved in R2T?
> 
> 
> 
> 
> Hi Ming!!
> 
> > > > http://www.pdl.cmu.edu/mailinglists/ips/mail/msg09192.html,
> which is in
> ______________________________________________________________________

---

From: Julian Satran <[email-masked]>
Date: Sun, 6 Mar 2005 22:25:36 -0600

Ming Zhang,

That is left to both!. If a traget issues invalid LUN it risks 
encountering an overzelous initiator that will not like an LU that is not 
matching the one one it has marked as addressing when issuing the 
oringinal command (the ITT). That is why for interoperability you will 
want to always use a correct LUN. So a target should use correct LUN and 
an initiator should not replace them with other values. Any implementation 
using incorrect LUN may be marked by testing  labs as "not-compliant".

Julo

06/03/2005 12:31
Please respond to
[email-masked]

To
Julian Satran/Haifa/IBM@IBMIL
cc
[email-masked]
Subject
Re: [Ips] LUN or reserved in R2T?

Thanks.

ming