Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Transport APIs and State Machine Functions
iSCSI Transport

iSCSI Transport

Provides an abstracted SCSI interface to a back-end target and/or initiator. This allows access to the functionality of the HAL while using a transport agnostic API. The iSCSI transport module interfaces with the iHAL and takes all link/connection and unsolicited frame callbacks. It handles:
  • TCP connections for both initiator and target functionality.
  • Discovery and operational logins to remote target nodes.
  • Accepts logins from remote initiators.
The transport also performs the following:
  • Exports target and initiator functions through the SCSI API.
  • Performs iSCSI logins with remote nodes.
  • Performs registration of the SLI Port with the HAL.
  • Processes text PDU negotiation for SendTargets.
  • Handles domain event callback notifications from the HAL.
The iSCSI transport consists of the SCSI API, iSCSI API, link status handler components connection (node) state machine, and unsolicited PDU handler.

SCSI API

To enable the development of a SCSI initiator or target at a higher level than the SLI-4 and HAL, entry points have been defined and implemented in an API that uses SCSI semantics and concepts. For details on the SCSI API, see chapter 4, SCSI API, in the OneCore Storage Reference Driver Manual.

Link Status Handler

The link status handler provides the interface to the transport from the HAL's link events. The only functionality in this handler is to begin the TCP/IP configuration once the link is established. Nothing is done when the link is lost because the transport relies on the TCP time-outs before tearing down any connections.

Connection (Node) State Machine

The connection state machine implements the functions required to establish and maintain connections with remote nodes. Each node object has its own fully independent state machine instance. There are two node types that are created during the connection state machine operation:
  • Remote SCSI initiator nodes
  • Remote SCSI target nodes
The general flow of a node in the connection state machine:
  1. The node is created and may transition to an initial state, depending on the type of node.
  2. Events are posted to the node state machine instance. For example, connection events received.
  3. The back-end components are notified of creation and deletion of nodes through the domain portion of the SCSI API.

Connection Event Handler

The connection handler provides the interface to the transport from the HAL's connection events. These include:
  • New target connection notifications
  • Connection Invalidation notifications
  • Target data digest notifications

On receipt of the connection event, it calls the appropriate handler function.

Unsolicited PDU Handler

Unsolicited iSCSI PDUs are received, and passed up to a target-server using the SCSI API. The unsolicited PDU handler provides the interface to the transport from the HAL's unsolicited iSCSI PDU events. These include:
  • iSCSI login PDUs
  • iSCSI text PDUs
  • iSCSI command PDUs
  • iSCSI task management PDUs
  • iSCSI NOP PDUs
  • iSCSI logout PDUs
  • iSCSI reject PDUs

On receipt of an Unsolicited PDU, the unsolicited PDU handler uses the TCP connection to find a corresponding node object instance. Based on the type of PDU received, the unsolicited PDU handler calls the appropriate handler function. In general, the unsolicited PDU handler rarely makes any function or protocol decisions, but merely dispatches PDUs to their respective handlers.