Subject: iSCSI: SendTargets in login or FFP?

From: "Eddy Quicksall" <[email-masked]>
Date: Mon, 23 Jul 2001 21:15:56 -0400

The spec says:

  An initiator can log into this default target [iSCSI]
  name, and use a command called "SendTargets" to retrieve a list of
  iSCSI targets that exist at that address

I assume this means the SendTargets would be used in Full Feature Phase ...
the initiator would login using TargetName=iSCSI. That would get into FFP
and then the initiator would use SendTargets= to get the list of targets.
Then, login again with the appropriate target.

The spec says:

  In full feature phase the initiator may send SCSI
  commands and data to the various LUs on the target by wrapping them
  in iSCSI PDUs that go over the established iSCSI session.

That means the target has to do something if a CDB is received to the iSCSI
canonical target. The spec doesn't give any suggestions here. I am assuming
the target would give a reject PDU with a reason of "Protocol Error" (code
5).

Do you agree that this is what should happen?

We shouldn't require that the target enter FFP when it would not be valid to
send a CDB. I think SendTargets should be done only at LO or IO time and
that iSCSI should not get you into FFP. That would simplify coding.

[email-masked]

---

From: Mark Bakke <[email-masked]>
Date: Tue, 24 Jul 2001 08:11:39 -0500

Eddy-

Thanks for bringing this one up.  One of the changes we have
made to the way SendTargets works is that rather than logging
into the default target "iSCSI", the initiator simply supplies
the key

  SessionType=Discovery

in the initial Login Command PDU and no longer specifies the
TargetName at all.  Unfortunately, we didn't catch all of the
places where default/canonical targets were discussed.  Please
consider the default target "iSCSI" as simply "reserved for a
future use".

Anyway, SendTargets is always done in full feature phase, and
never during the login phase.

> I assume this means the SendTargets would be used in Full Feature Phase ...

Correct.

> the initiator would login using TargetName=iSCSI. That would get into FFP

The login now uses SessionType=Discovery instead.

> and then the initiator would use SendTargets= to get the list of targets.

Yes.

> Then, login again with the appropriate target.

Yes, but on a new connection.

> the target would give a reject PDU with a reason of "Protocol Error" (code

That makes sense to me.  Since a discovery session does not terminate at
an actual target, anything addressed to a target must fail.  5 seems
like the best fit.

> that iSCSI should not get you into FFP. That would simplify coding.

No.  The point of doing SendTarget in full feature phase is that the
initiators must first go through their normal authentication;
SendTargets responses will often be based on the initiator's identity.

Having SendTargets as a one-shot at the end of login, without going into
full feature phase was another option, but this would effectively kill
the discovery session after the first SendTargets.  Some implementations
may keep this session around for further SendTargets requests.

-- 
Mark A. Bakke
Cisco Systems
[email-masked]
763.398.1054