Storage Maintenance (StorM) Working Group Michael KoInternetDraft Consultant Intended status: Proposed Standard Alexander Nezhinsky Expires: January 2014 MellanoxEngineering Task Force (IETF) M. Ko Request for Comments: 7145 Obsoletes: 5046July 9, 2013 iSCSIA. Nezhinsky Category: Standards Track Mellanox ISSN: 2070-1721 April 2014 Internet Small Computer System Interface (iSCSI) Extensions forRDMA Specification draft-ietf-storm-iser-15.txt Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents oftheInternet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/1id-abstracts.html. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on January, 2014.Remote Direct Memory Access (RDMA) Specification AbstractiSCSIInternet Small Computer System Interface (iSCSI) Extensions for Remote Direct Memory Access (RDMA) provides the RDMA data transfer capability to iSCSI by layering iSCSI on top of an RDMA-Capable Protocol. An RDMA-Capable Protocol provides RDMA Read and Write services, which enable data to be transferred directly into SCSI I/O Buffers without intermediate data copies. This document describes the extensions to the iSCSI protocol to support RDMA services as provided by an RDMA-Capable Protocol. This document obsoletes RFC 5046.TableStatus of This Memo This is an Internet Standards Track document. This document is a product ofContents 1 Definitions and Acronyms ....................................6 1.1 Definitions .................................................6 1.2 Acronyms ...................................................12 1.3 Conventions ................................................14 2 Introduction ...............................................15 2.1 Motivation .................................................15 2.2 iSCSI/iSER Layering ........................................16 2.3 Architectural Goals ........................................17 2.4 Protocol Overview ..........................................17 2.5 RDMA services and iSER .....................................19 2.5.1 STag......................................................19 2.5.2 Send......................................................20 2.5.3 RDMA Write................................................21 2.5.4 RDMA Read.................................................21 2.6 SCSI Read Overview .........................................21 2.7 SCSI Write Overview ........................................22 3 Upper Layer Interface Requirements .........................23 3.1 Operational Primitives offered by iSER .....................23 3.1.1 Send_Control..............................................24 3.1.2 Put_Data..................................................24 3.1.3 Get_Data..................................................24 3.1.4 Allocate_Connection_Resources.............................25 3.1.5 Deallocate_Connection_Resources...........................25 3.1.6 Enable_Datamover..........................................25 3.1.7 Connection_Terminate......................................26 3.1.8 Notice_Key_Values.........................................26 3.1.9 Deallocate_Task_Resources.................................26 3.2 Operational Primitives used by iSER ........................27 3.2.1 Control_Notify............................................27 3.2.2 Data_Completion_Notify....................................27 3.2.3 Data_ACK_Notify...........................................28 3.2.4 Connection_Terminate_Notify...............................28 3.3 iSCSI Protocol Usage Requirements ..........................28 4 Lower Layer Interface Requirements .........................30 4.1 Interactions withtheRCaP Layer ...........................30 4.2 Interactions withInternet Engineering Task Force (IETF). It represents theTransport Layer ......................31 5 Connection Setupconsensus of the IETF community. It has received public review andTermination ...........................32 5.1 iSCSI/iSER Connection Setup ................................32 5.1.1 Initiator Behavior........................................33 5.1.2 Target Behavior...........................................35 5.1.3 iSER Hello Exchange.......................................36 5.2 iSCSI/iSER Connection Termination ..........................39 5.2.1 Normal Connection Termination athas been approved for publication by theInitiator............39 5.2.2 Normal Connection Termination atInternet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741. Information about theTarget...............40 5.2.3 Termination withoutcurrent status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7145. Copyright Notice Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction ....................................................5 1.1. Motivation .................................................5 1.2. iSCSI/iSER Layering ........................................6 1.3. Architectural Goals ........................................7 1.4. Protocol Overview ..........................................7 1.5. RDMA Services and iSER .....................................9 1.5.1. STag ................................................9 1.5.2. Send ...............................................10 1.5.3. RDMA Write .........................................11 1.5.4. RDMA Read ..........................................11 1.6. SCSI Read Overview ........................................11 1.7. SCSI Write Overview .......................................12 2. Definitions and Acronyms .......................................12 2.1. Definitions ...............................................12 2.2. Acronyms ..................................................18 2.3. Conventions ...............................................20 3. Upper-Layer Interface Requirements .............................20 3.1. Operational Primitives offered by iSER ....................21 3.1.1. Send_Control .......................................21 3.1.2. Put_Data ...........................................21 3.1.3. Get_Data ...........................................22 3.1.4. Allocate_Connection_Resources ......................22 3.1.5. Deallocate_Connection_Resources ....................23 3.1.6. Enable_Datamover ...................................23 3.1.7. Connection_Terminate ...............................23 3.1.8. Notice_Key_Values ..................................24 3.1.9. Deallocate_Task_Resources ..........................24 3.2. Operational Primitives Used by iSER .......................24 3.2.1. Control_Notify .....................................25 3.2.2. Data_Completion_Notify .............................25 3.2.3. Data_ACK_Notify ....................................25 3.2.4. Connection_Terminate_Notify ........................26 3.3. iSCSI Protocol Usage Requirements .........................26 4. Lower-Layer Interface Requirements .............................27 4.1. Interactions with the RCaP Layer ..........................27 4.2. Interactions with the Transport Layer .....................28 5. Connection Setup and Termination ...............................28 5.1. iSCSI/iSER Connection Setup ...............................28 5.1.1. Initiator Behavior .................................30 5.1.2. Target Behavior ....................................31 5.1.3. iSER Hello Exchange ................................33 5.2. iSCSI/iSER Connection Termination .........................36 5.2.1. Normal Connection Termination at the Initiator .....36 5.2.2. Normal Connection Termination at the Target ........36 5.2.3. Termination without Logout Request/ResponsePDUs..........40 6PDUs ...37 6. Login/Text Operational Keys................................42 6.1....................................38 6.1. HeaderDigest and DataDigest................................42 6.2...............................38 6.2. MaxRecvDataSegmentLength...................................42 6.3..................................38 6.3. RDMAExtensions.............................................43 6.4............................................39 6.4. TargetRecvDataSegmentLength................................44 6.5...............................40 6.5. InitiatorRecvDataSegmentLength.............................44 6.6............................41 6.6. OFMarker and IFMarker......................................45 6.7.....................................41 6.7. MaxOutstandingUnexpectedPDUs...............................45 6.8..............................41 6.8. MaxAHSLength...............................................46 6.9..............................................42 6.9. TaggedBufferForSolicitedDataOnly...........................46 6.10 iSERHelloRequired.........................................47 7..........................43 6.10. iSERHelloRequired ........................................43 7. iSCSI PDU Considerations...................................48 7.1.......................................44 7.1. iSCSI Data-Type PDU........................................48 7.2.......................................44 7.2. iSCSI Control-Type PDU.....................................49 7.3....................................45 7.3. iSCSI PDUs.................................................49 7.3.1................................................45 7.3.1. SCSICommand..............................................49 7.3.2Command .......................................45 7.3.2. SCSIResponse.............................................51 7.3.3Response ......................................47 7.3.3. Task Management FunctionRequest/Response.................53 7.3.4Request/Response ..........49 7.3.4. SCSIData-out.............................................54 7.3.5Data-out ......................................50 7.3.5. SCSIData-in..............................................55 7.3.6Data-in .......................................51 7.3.6. Ready To Transfer(R2T)...................................57 7.3.7(R2T) ............................53 7.3.7. AsynchronousMessage......................................59 7.3.8Message ...............................55 7.3.8. Text Request&and TextResponse..............................59 7.3.9Response .....................55 7.3.9. Login Request&and LoginResponse............................60 7.3.10Response ...................55 7.3.10. Logout Request&and Logout Response........................60 7.3.11................56 7.3.11. SNACK Request...........................................60 7.3.12.....................................56 7.3.12. Reject..................................................60 7.3.13............................................56 7.3.13. NOP-Out&and NOP-In........................................61 8................................57 8. Flow Control and STag Management...........................62 8.1...............................57 8.1. Flow Control for RDMA Send Messages........................62 8.1.1.......................57 8.1.1. Flow Control for Control-Type PDUs from theInitiator.....62 8.1.2Initiator ..........................................58 8.1.2. Flow Control for Control-Type PDUs from theTarget........65 8.2Target .............................................60 8.2. Flow Control for RDMA Read Resources.......................66 8.3......................61 8.3. STag Management............................................67 8.3.1...........................................62 8.3.1. Allocation ofSTags.......................................67 8.3.2STags ................................62 8.3.2. Invalidation ofSTags.....................................67 9STags ..............................62 9. iSER Control and Data Transfer.............................69 9.1.................................64 9.1. iSER Header Format.........................................69 9.2........................................64 9.2. iSER Header Format for iSCSI Control-Type PDU..............69 9.3.............65 9.3. iSER Header Format for iSER Hello Message..................72 9.4.................67 9.4. iSER Header Format for iSER HelloReply Message.............73 9.5............68 9.5. SCSI Data Transfer Operations..............................74 9.5.1.............................69 9.5.1. SCSI WriteOperation......................................74 9.5.2Operation ...............................69 9.5.2. SCSI ReadOperation.......................................75 9.5.3Operation ................................70 9.5.3. BidirectionalOperation...................................76 10Operation ............................70 10. iSER Error Handling and Recovery...........................77 10.1..............................71 10.1. ErrorHandling............................................77 10.1.1Handling ...........................................71 10.1.1. Errors in the Transport Layer...........................77 10.1.2.....................71 10.1.2. Errors in the RCaP Layer................................78 10.1.3..........................72 10.1.3. Errors in the iSER Layer................................78 10.1.4..........................73 10.1.4. Errors in the iSCSI Layer...............................80 10.2.........................75 10.2. ErrorRecovery............................................82 10.2.1Recovery ...........................................76 10.2.1. PDU Recovery............................................82 10.2.2......................................77 10.2.2. Connection Recovery.....................................83 11...............................77 11. Security Considerations....................................84 12.......................................78 12. IANA Considerations........................................85 13...........................................79 13. References.................................................86 13.1....................................................79 13.1. NormativeReferences......................................86 13.2References .....................................79 13.2. InformativeReferences....................................86 14References ...................................80 AppendixA:A. Summary of Changes from RFC 5046...............88 15......................81 AppendixB:B. Message Format for iSER........................90 15.1...............................83 B.1. iWARP Message Format for iSER HelloMessage...............90 15.2Message ..................83 B.2. iWARP Message Format for iSER HelloReplyMessage..........91 15.3Message .............84 B.3. iSER Header Format for SCSI Read CommandPDU..............92 15.4PDU .................85 B.4. iSER Header Format for SCSI Write CommandPDU.............93 15.5PDU ................86 B.5. iSER Header Format for SCSI ResponsePDU..................94 16PDU .....................87 AppendixC:C. Architectural discussion of iSER overInfiniBand95 16.1InfiniBand ......88 C.1. HostsideSide of iSCSI&and iSERconnectionsConnections inInfiniband.......95 16.2InfiniBand ........88 C.2. StoragesideSide of iSCSI&and iSERmixed network environment....96 16.3Mixed Network Environment .....89 C.3. DiscoveryprocessesProcesses for an InfiniBandHost................96 16.4Host ...................89 C.4. IBTA Connectionspecifications............................97 17Specifications ...............................90 Appendix D. Acknowledgments............................................98.......................................90 Table of Figures Figure11. Example of iSCSI/iSER Layering in Full Feature Phase...16.....6 Figure22. iSER Header Format.....................................69......................................64 Figure33. iSER Header Format for iSCSI Control-Type PDU..........70...........65 Figure44. iSER Header Format for iSER Hello Message..............72...............67 Figure55. iSER Header Format for iSER HelloReply Message.........73..........68 Figure66. SendSE MessagecontainingContaining an iSER Hello Message........90.........83 Figure77. SendSE MessagecontainingContaining an iSER HelloReply Message...91....84 Figure88. iSER Header Format for SCSI Read Command PDU...........92............85 Figure99. iSER Header Format for SCSI Write Command PDU..........93...........86 Figure1010. iSER Header Format for SCSI Response PDU..............94...............87 Figure1111. iSCSI and iSER on IB..................................95...................................88 Figure1212. Storage Controller with TCP, iWARP, and IB Connections96 1 Definitions and Acronyms 1.1 Definitions Advertisement (Advertised, Advertise, Advertisements, Advertises) -.89 1. Introduction 1.1. Motivation Theact of informing a remote iSER (iSCSI Extensions for RDMA) Layer that a local node's bufferiSCSI protocol ([iSCSI]) isavailable to it. A Node makesabuffer available for incoming RDMA Read Request Message or incoming RDMA Write Message access by informing the remote iSER Layermapping of theTagged Buffer identifiers (STag, Base Offset,SCSI Architecture Model (see [SAM5] andbuffer length). Note that this Advertisement of Tagged Buffer information is the responsibility of[iSCSI-SAM]) over theiSER Layer on either endTCP protocol. SCSI commands are carried by iSCSI requests, andis not definedSCSI responses and status are carried bythe RDMA-Capable Protocol. A typical method would be for the iSER Layer to embed the Tagged Buffer's STag, Base Offset,iSCSI responses. Other iSCSI protocol exchanges andbuffer lengthSCSI Data are also transported in iSCSI PDUs. Out-of-order TCP segments ina message destined fortheremote iSER Layer. Base Offset - A value when addedTraditional iSCSI model have to be stored and reassembled before theBuffer Offset forms the Tagged Offset. Completion (Completed, Complete, Completes) - Completion is defined as the process by which the RDMA-Capable ProtocoliSCSI protocol layerinformswithin an end node can place theiSER Layer, that a particular RDMA Operation has performed all functions specified fordata in theRDMA Operation. Connection - A connectioniSCSI buffers. This reassembly isa logical bidirectional communication channel between the initiatorrequired because not every TCP segment is likely to contain an iSCSI header to enable its placement andthe target, e.g.,TCP itself does not have a built- in mechanism for signaling ULP (Upper Level Protocol) message boundaries to aid placement of out-of-order segments. This TCPconnection. Communication betweenreassembly at high network speeds is quite counterproductive for theinitiatorfollowing reasons: wasted memory bandwidth in data copying, need for reassembly memory, wasted CPU cycles in data copying, and thetarget occurs over one or more connections.general store-and-forward latency from an application perspective. Theconnections carry control messages, SCSI commands, parameters, and data within iSCSIgeneric term RDMA-Capable ProtocolData Units (iSCSI PDUs). Connection Handle - An information element(RCaP) is used to refer to protocol stacks thatidentifiesprovide theparticular iSCSI connection and is unique for a given iSCSI LayerRemote Direct Memory Access (RDMA) functionality, such as iWARP and InfiniBand. With theunderlying iSER Layer. Every invocationavailability ofan Operational PrimitiveRDMA-Capable Controllers within a host system, it isqualified withappropriate for iSCSI to be able to exploit theConnection Handle. Data Sink - The peer receiving adirect datapayload. Note thatplacement function of theData Sink can be requiredRDMA-Capable Controller like other applications. iSCSI Extensions for RDMA (iSER) is designed precisely toboth send and receive RCaP (RDMA-Capable Protocol) Messagestake advantage of generic RDMA technologies -- iSER's goal is totransfer apermit iSCSI to employ direct datapayload. Data Source - The peer sendingplacement and RDMA capabilities using adata payload. Note thatgeneric RDMA-Capable Controller. In summary, theData Source can be requirediSCSI/iSER protocol stack is designed toboth send and receive RCaP Messagesenable scaling totransferhigh speeds by relying on a generic datapayload. Datamover Interface (DI) - The interface between the iSCSI Layerplacement process andthe Datamover Layer as described in [DA]. Datamover Layer - A layerRDMA technologies and products thatis directly below the iSCSI Layerenable direct data placement of both in-order andabove the underlying transport layers.out-of-order data. Thislayer exposes and usesdocument describes iSER as aset of transport independent Operational Primitivesprotocol extension to iSCSI, both forthe communication between the iSCSI Layerconvenience of description anditself. The Datamover layer, operatingalso because it is true inconjunction witha very strict protocol sense. However, it is to be noted that iSER is in reality extending thetransport layers, movesconnectivity of thecontroliSCSI protocol defined in [iSCSI], anddata information ontheiSCSI connection. Inname "iSER" reflects thisspecification, the iSER Layer isreality. When theDatamover layer. Datamover Protocol - A DatamoveriSCSI protocolisas defined in [iSCSI] (i.e., without thewire-protocol thatiSER enhancements) isdefined to realizeintended in theDatamover layer functionality. In this specification,rest of theiSER protocoldocument, the term "Traditional iSCSI" is used to make theDatamover protocol. Inbound RDMA Read Queue Depth (IRD) - The maximum numberintention clear. This document obsoletes RFC 5046. See Appendix A for the list ofincoming outstandingchanges from RFC 5046. 1.2. iSCSI/iSER Layering iSCSI Extensions for RDMARead Requests that(iSER) is layered between theRDMA-Capable Controller can handle on a particular RCaP Stream atiSCSI layer and theData Source. For some RDMA-CapableRCaP layer. +--------------------------------------------------------+ | SCSI | +--------------------------------------------------------+ | iSCSI | DI -> +--------------------------------------------------------+ | iSER | +-------+--------------------------+---------------------+ | RDMAP | | | +-------+ InfiniBand | | | DDP | Reliable | Other | +-------+ Connected | RDMA | | MPA | Transport | Capable | +-------+ Service | Protocollayers,| | TCP | | | +-------+--------------------------+---------------------+ | IP | InfiniBand Network Layer | Other Network Layer | +-------+--------------------------+---------------------+ Figure 1: Example of iSCSI/iSER Layering in Full Feature Phase Figure 1 shows an example of the relationship between SCSI, iSCSI, iSER, and theterm "IRD" may be known by adifferentname.RCaP layers. Forexample, for InfiniBand,TCP, theequivalent for IRDRCaP is iWARP. For InfiniBand, theResponder Resources. I/O Buffer - A buffer thatRCaP isused in a SCSI Read or Write operation so SCSI data may be sent from or received intothe Reliable Connected Transport Service. Note thatbuffer. iSCSI - Thethe iSCSIprotocollayer asdefineddescribed here supports the RDMA Extensions as used in[iSCSI] is a mapping ofiSER. 1.3. Architectural Goals This section summarizes theSCSI Architecture Model of SAM-5 over TCP. iSCSI control-type PDU - Any iSCSI PDUarchitectural goals thatis notguided the design of iSER. 1. Provide aniSCSI data- type PDU and also not a SCSI Data-out PDU carrying solicitedRDMA datais defined as antransfer model for iSCSIcontrol-type PDU. Specifically, it is to be notedthat enables direct in-order or out-of-order data placement of SCSIData-out PDUs for unsoliciteddataare defined as iSCSI control-type PDUs. iSCSI data-type PDU - An iSCSI data-type PDU is defined as an iSCSI PDU that causesinto pre- allocated SCSI buffers while maintaining in-order datatransfer via RDMA operations at the iSER layer, transparentdelivery. 2. Do not require any major changes to theremote iSCSI Layer, to take place betweenSCSI Architecture Model [SAM5] and SCSI command set standards. 3. Utilize thepeerexisting iSCSInodes oninfrastructure (sometimes referred to as "iSCSI ecosystem") including but not limited to MIB, bootstrapping, negotiation, naming and discovery, and security. 4. Enable afull feature phase iSCSI connection. An iSCSI data-type PDU, when requested for transmission by the sender iSCSI Layer, resultssession to operate in theassociatedTraditional iSCSI data transferwithout the participation of the remote iSCSI Layer, i.e. the PDU itselfmode if iSER is notdelivered as-is tosupported by either theremote iSCSI Layer. The following iSCSI PDUs constituteinitiator or theset of iSCSI data-type PDUs - SCSI Data-In PDU and R2T PDU.target. (Do not require iSCSILayer - A layer in the protocol stack implementation withinFull Feature Phase interoperability between an end nodethat implements theoperating in Traditional iSCSIprotocolmode andinterfaces with the iSER Layer via the Datamover Interface. iSCSI PDU (iSCSI Protocol Data Unit) - The iSCSI Layer at thean end node operating in iSER-assisted mode.) 5. Allow initiator andthe iSCSI Layer at thetargetdivide their communications into messages. The term "iSCSI protocol data unit" (iSCSI PDU) is used for these messages. iSCSI/iSER Connection - An iSER-assisted iSCSI connection. Animplementations to utilize generic RDMA-Capable Controllers such as RNICs or to implement iSCSIconnection that isand iSER in software. (Do notiSER-assisted always maps onto a TCP connection atrequire iSCSI- or iSER-specific assists in thetransport level. But an iSER-assisted iSCSI connection may not have an underlying TCP connection. For someRCaP implementation(e.g., iWARP), an iSER-assistedor RDMA-Capable Controller.) 6. Implement a lightweight Datamover protocol for iSCSIconnection has an underlying TCP connection. For other RCaP implementation (e.g., InfiniBand), there is no underlying TCP connection. (Inwith minimal state maintenance. 1.4. Protocol Overview Consistent with thespecific example of InfiniBand [IB], an iSER-assisted iSCSI connection is directly mapped ontoarchitectural goals stated in Section 1.3, the iSER protocol does not require changes in theInfiniBand RC channel.) iSCSI/iSER Session - An iSER-assistediSCSIsession. All connectionsecosystem or any related SCSI specifications. The iSER protocol defines the mapping ofaniSCSI PDUs to RCaP Messages in such a way that it is entirely feasible to realize iSCSI/iSERsessionimplementations that areiSCSI/iSER connections.based on generic RDMA-Capable Controllers. The iSER- iSCSI Extensions for RDMA, theprotocoldefined in this document. iSER-assisted - A term generally usedlayer requires minimal state maintenance todescribeassist a connection during theoperation ofiSCSIwhenFull Feature Phase, besides being oblivious to the notion of an iSCSI session. The crucial protocol aspects of iSERfunctionalitymay be summarized as follows: 1. iSER-assisted mode isalso enabled belownegotiated during the iSCSILayer for the specific iSCSI/iSER connectionlogin inquestion. iSER-IRD - This variable representsthemaximum numberleading connection for each session, and an entire iSCSI session can only operate in one mode (i.e., a connection in a session cannot operate in iSER-assisted mode if a different connection ofincoming outstanding RDMA Read Requests thattheiSER Layer atsame session is already in Full Feature Phase in theinitiator grantsTraditional iSCSI mode). 2. Once in iSER-assisted mode, all iSCSI interactions ona particular RCaP Stream. iSER-ORD - This variable represents the maximum number of outstanding RDMA Read Requeststhatthe iSER Layer can initiate on a particularconnection use RCaPStream. This variableMessages. 3. A Send Message ismaintained onlyused for carrying an iSCSI control-type PDU preceded bythean iSERLayer atheader. See Section 7.2 for more details on iSCSI control-type PDUs. 4. RDMA Write, RDMA Read Request, and RDMA Read Response Messages are used for carrying control and all data information associated with thetarget.iSCSI data-type PDUs (i.e., SCSI Data-In PDUs and R2T PDUs). iSERLayer -does not use SCSI Data-Out PDUs for solicited data, and SCSI Data-Out PDUs for unsolicited data are not treated as iSCSI data-type PDUs by iSER because RDMA is not used. See Section 7.1 for more details on iSCSI data-type PDUs. 5. Thelayer that implementstarget drives all data transfer (with the exception of iSCSIExtensionsunsolicited data) for SCSI writes and SCSI reads, by issuing RDMA(iSER) protocol.Read Requests and RDMA Writes, respectively. 6. RCaP is responsible for ensuring data integrity. (For example, iWARP- A suite of wire protocols comprisingincludes a CRC-enhanced framing layer called MPA on top of[RDMAP], [DDP],TCP; and[MPA] when layered above [TCP]. [RDMAP]for InfiniBand, the CRCs are included in the Reliable Connection mode). For this reason, iSCSI header and[DDP] may be layered above SCTP or other transport protocols. Local Mapping - A task state record maintaineddata digests are negotiated to "None" for iSCSI/iSER sessions. 7. The iSCSI error recovery hierarchy defined in [iSCSI] is fully supported by iSER. (However, see Section 7.3.11 on the handling of SNACK Request PDUs.) 8. iSERLayerrequires no changes to iSCSI security and text mode negotiation mechanisms. Note that Traditional iSCSI implementations may have to be adapted to employ iSER. It is expected thatassociatestheInitiator Task Tagadaptation when required is likely to be centered around theLocal STag(s). The specificsupper-layer interface requirements of iSER (Section 3). 1.5. RDMA Services and iSER iSER is designed to work with software and/or hardware protocol stacks providing therecord structure are implementation dependent. Local Peer -protocol services defined in RCaP documents such as [RDMAP], [IB], etc. Theimplementation offollowing subsections describe theRDMA-Capable Protocolkey protocol elements of RCaP services on which iSER relies. 1.5.1. STag An STag is thelocal endidentifier ofthe connection. Used to referan I/O Buffer unique to an RDMA-Capable Controller that thelocal entity when describing protocol exchanges or other interactions between two Nodes. Node - A computing device attachediSER layer Advertises toone or more links of a network. A Nodethe remote iSCSI/iSER node inthis context does not referorder to complete aspecific application or protocol instantiation running onSCSI I/O. In iSER, Advertisement is thecomputer. A Node may consistact ofone or more RDMA-Capable Controllers installed in a host computer. Operational Primitive - An Operational Primitive is an abstract functional interface procedureinforming the target by the initiator thatrequests another layer to perform a specific action onan I/O Buffer is available at therequestor's behalfinitiator for RDMA Read ornotifiesRDMA Write access by theother layer of some event.target. TheDatamover Interface between an iSCSI Layerinitiator Advertises the I/O Buffer by including the STag anda Datamover layer within an iSCSI end node uses a set of Operational Primitives to definethefunctional interface betweenBase Offset in thetwo layers. Note that not every invocationheader of anOperational Primitive may elicit a response from the requested layer. A full discussion ofiSER Message containing theOperational Primitive types and request-response semantics availableSCSI Command PDU toiSCSI and iSER can be found in [DA]. Outbound RDMA Read Queue Depth (ORD) -the target. Themaximum number of outstanding RDMA Read Requests thatbuffer length is as specified in theRDMA-Capable Controller can initiate on a particular RCaP StreamSCSI Command PDU. The iSER layer at theData Sink. For some RDMA-Capable Protocol layer,initiator Advertises theterm "ORD" may be known by a different name. For example, for InfiniBand,STag and theequivalentBase Offset forORD istheInitiator Depth. Phase Collapse - RefersI/O Buffer of each SCSI I/O to theoptimization in iSCSI whereiSER layer at theSCSI status is transferred along withtarget in thefinal SCSI Data-in PDU fromiSER header of atarget. See section 4.2 in [iSCSI]. RCaPSend Message- One or more packets ofcontaining thenetwork layer comprising a single RDMA operation or a partSCSI Command PDU, unless the I/O can be completely satisfied by unsolicited data alone. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). The iSER layer at the target provides the STag for the I/O Buffer that is the Data Sink of an RDMA Read Operationof(Section 1.5.4) to theRDMA-Capable Protocol. For iWARP, anRCaPMessagelayer on the initiator node -- i.e., this isknown as an RDMAP Message. RCaP Stream - A single bidirectional association betweencompletely transparent to thepeer RDMA-Capable Protocol layers on two Nodes overiSER layer at the initiator. The iSER layer at the initiator SHOULD invalidate the Advertised STag upon asingle transport-level stream. For iWARP, annormal completion of the associated task. The Send with Invalidate Message, if supported by the RCaPStreamlayer (e.g., iWARP), can be used for automatic invalidation when it isknown as an RDMAP Stream, andused to carry theassociation is created followingSCSI Response PDU. There are two exceptions to this automatic invalidation -- bidirectional commands and abnormal completion of asuccessful Login Phase during which iSER support is negotiated. RDMA-Capable Protocol (RCaP) -command. Theprotocol or protocol suiteiSER layer at the initiator SHOULD explicitly invalidate the STag in these two cases. That iSER layer MUST check thatprovidesSTag invalidation has occurred whenever receipt of areliable RDMA transport functionality, e.g., iWARP, InfiniBand, etc. RDMA-Capable Controller - A network I/O adapter or embedded controllerSend withRDMA functionality. For example, for iWARP, this could beInvalidate message is the expected means of causing anRNIC,STag to be invalidated, andfor InfiniBand, this could beit MUST perform the STag invalidation if the STag has not already been invalidated (e.g., because aHCA (Host Channel Adapter) or TCA (Target Channel Adapter). RDMA-enabled Network Interface Controller (RNIC) - A network I/O adapter or embedded controller with iWARP functionality. RDMA Operation - A sequenceSend Message was used instead ofRCaP Messages, including control Messages, to transfer data from a Data Source to a Data Sink. The following RDMA Operations are defined - RDMA Write Operation, RDMA Read Operation, andSendOperation. RDMA Protocol (RDMAP) - A wire protocol that supports RDMA Operations to transfer ULP (Upper Level Protocol) data between a Local Peer andwith Invalidate). If theRemote PeerAdvertised STag is not invalidated asdescribedrecommended in[RDMAP]. RDMA Read Operation - An RDMA Operation used bytheData Sinkforegoing paragraph (e.g., in order totransfercache thecontents of a Data Source buffer fromSTag for future reuse), theRemote PeerI/O Buffer remains exposed toa Data Sink buffer attheLocal Peer. An RDMA Read operation consists of a single RDMA Read Request Message and a single RDMA Read Response Message. RDMA Read Request - An RCaP Message usednetwork for access by theData Sink to request the Data Source to transfer the contentsRCaP. Such an I/O Buffer is capable ofa buffer. The RDMA Read Request Message describes both the Data Source and the Data Sink buffers. RDMA Read Response - An RCaP Message usedbeing read or written by theData Source to transferRCaP outside thecontentsscope ofa buffer totheData Sink, in response to an RDMA Read Request.iSCSI operation for which it was originally established; this fact has both robustness and security considerations. TheRDMA Read Response Message only describesrobustness considerations are that theData Sink buffer. RDMA Write Operation - An RDMA Operation used bysystem containing theData SourceiSER initiator may react poorly totransfer the contentsan unexpected modification ofa Data Source buffer fromits memory. For theLocal Peersecurity considerations, see Section 11. 1.5.2. Send Send is the RDMA Operation that is not addressed toa Data Sinkan Advertised bufferatand uses Untagged buffers as theRemote Peer.message is received. TheRDMA Write Message only describes the Data Sink buffer. Remote Direct Memory Access (RDMA) - A method of accessing memory on a remote system in which the local system specifiesiSER layer at theremote location ofinitiator uses thedataSend Operation tobe transferred. Employing an RDMA- Capable Controller in the remote system allows the accesstransmit any iSCSI control-type PDU totake place without interrupting the processing oftheCPU(s) on the system. Remote Mapping - A task state record maintained bytarget. As an example, the initiator uses Send Operations to transfer iSERLayer that associates the Initiator Task TagMessages containing SCSI Command PDUs to theAdvertised STag(s) and the Base Offset(s). The specifics of the record structure are implementation dependent. Remote Peer - The implementation ofiSER layer at theRDMA-Capable Protocol ontarget. An iSER layer at theopposite end oftarget uses theconnection. UsedSend Operation torefertransmit any iSCSI control-type PDU to theremote entity when describing protocol exchanges or other interactions between two Nodes. SCSI Layer - This layer builds/receives SCSI CDBs (Command Descriptor Blocks) and sends/receives them with the remaining command execute [SAM5] parameters to/frominitiator. As an example, theiSCSI Layer.target uses Send- An RDMA Operation that transfers the content of a buffer from the Local PeerOperations toan untagged buffertransfer iSER Messages containing SCSI Response PDUs to the iSER layer at theRemote Peer. SendInvSE Message - A Send with Solicited Eventinitiator. For interoperability, iSER implementations SHOULD accept andInvalidate Message.correctly process SendSEMessage - A Send with Solicited Event Message. Sequence Number (SN) - DataSN for a SCSI Data-in PDUandR2TSN for an R2T PDU. The semantics for both types of sequence numbersSendInvSE messages. However, SendSE and SendInvSE messages areas defined in [iSCSI]. Session, iSCSI Session - The group of Connections that link an initiator SCSI port with a target SCSI port form an iSCSI session (equivalenttoa SCSI I-T nexus). Connections canbeaddedregarded as optimizations or enhancements to the basic Send Message, andremoved from a session even whiletheir support may vary by RCaP protocol and specific implementation. In general, these messages SHOULD NOT be used, unless theI-T nexus is intact. AcrossRCaP requires support for them in allconnections within a session, an initiator sees one andimplementations. If these messages are used, thesame target. Steering Tag (STag) - An identifierimplementation SHOULD be capable of reverting to use of Send in order to work with aTagged Buffer onreceiver that does not support these messages. Attempted use of these messages with aNode (Local or Remote) as definedpeer that does not support them may result in[RDMAP] and [DDP]. For other RDMA-Capable Protocols,a fatal error that closes theSteering Tag may be known by different names but will be herein referred to as STags.RCaP connection. For example, these messages SHOULD NOT be used with the InfiniBand RCaP because InfiniBand does not require support forInfiniband, a Remote STag is known as an R-Key,them in all cases. New iSER implementations SHOULD use Send (and not SendSE or SendInvSE) unless there are compelling reasons for doing otherwise. Similarly, iSER implementations SHOULD NOT rely on events triggered by SendSE anda Local STag is knownSendInvSE, asan L-Key, and both willthese messages may not beconsidered STags. Tagged Buffer - A bufferused. 1.5.3. RDMA Write RDMA Write is the RDMA Operation that isexplicitly Advertisedused tothe iSER Layerplace data into an Advertised buffer at theremote node throughData Sink. The Data Source addresses theexchange ofMessage using anSTag, Base Offset,STag andlength.a Tagged Offset-that are valid on the Data Sink. Theoffset within a Tagged Buffer. Traditional iSCSI - Refers toiSER layer at theiSCSI protocol as defined in [iSCSI] (i.e. withouttarget uses theiSER enhancements). UntaggedRDMA Write Operation to transfer the contents of a local I/O Buffer- A buffer that is not explicitlyto an Advertised I/O Buffer at the initiator. The iSER layer at the target uses the RDMA Write to transfer the whole data or part of the data required to complete a SCSI Read command. The iSERLayerlayer at theremode node. 1.2 Acronyms Acronym Definition -------------------------------------------------------------- AHS Additional Header Segment BHS Basic Header Segment CO Connection Only CRC Cyclic Redundancy Check DDP Direct Data Placement Protocol DI Datamover Interface HCA Host Channel Adapter IANA Internet Assigned Numbers Authority IB Infiniband IETF Internet Engineering Task Force I/O Input - Output IO Initialize Only IP Internet Protocol IPoIB IP over Infiniband IPsec Internet Protocol Security iSER iSCSI Extensions forinitiator does not employ RDMA Writes. 1.5.4. RDMA Read RDMA Read is the RDMAITT Initiator Task Tag LO Leading Only MPA Marker PDU Aligned Framing for TCP NOP NoOperationNSG Next Stage (duringthat is used to retrieve data from an Advertised buffer at theiSCSI Login Phase) PDU ProtocolDataUnit R2T Ready To Transfer R2TSN Ready To Transfer Sequence Number RCaP RDMA-Capable ProtocolSource. The sender of the RDMARemote Direct Memory Access RDMAP Remote Direct Memory Access Protocol RFCRead RequestFor Comments RNIC RDMA-enabled Network Interface Controller SAM5 SCSI Architecture Model - 5 SCSI Small Computer Systems Interface SNACK Selective Negative Acknowledgment - also Sequence Number Acknowledgement for dataaddresses the Message using an STagSteering Tag SW Session Wide TCA Target Channel Adapter TCP Transmission Control Protocol TMF Task Management Function TTT Target Transfer Tag ULP Upper Level Protocol 1.3 Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",and"OPTIONAL" in this documenta Tagged Offset that areto be interpreted as describedvalid on the Data Source in[RFC2119]. 2 Introduction 2.1 Motivation The iSCSI protocol ([iSCSI]) isaddition to providing amapping of the SCSI Architecture Model (see [SAM5]valid local STag and[iSCSI-SAM]) overTagged Offset that identify theTCP protocol. SCSI commands are carried by iSCSI requests and SCSI responses and status are carried by iSCSI responses. Other iSCSI protocol exchanges and SCSIDataare also transported in iSCSI PDUs. Out-of-order TCP segments inSink. The iSER layer at theTraditional iSCSI model havetarget uses the RDMA Read Operation tobe stored and reassembled beforetransfer theiSCSI protocol layer withincontents of anend node can placeAdvertised I/O Buffer at thedata ininitiator to a local I/O Buffer at theiSCSI buffers. This reassembly is required because not every TCP segment is likelytarget. The iSER layer at the target uses the RDMA Read tocontain an iSCSI headerfetch whole or part of the data required toenable its placement and TCP itselfcomplete a SCSI Write Command. The iSER layer at the initiator does nothave a built- in mechanism for signaling ULP message boundaries to aid placement of out-of-order segments. This TCP reassemblyemploy RDMA Reads. 1.6. SCSI Read Overview The iSER layer athigh network speeds is quite counter-productive forthefollowing reasons: wasted memory bandwidth in data copying, need for reassembly memory, wasted CPU cycles in data copying, andinitiator receives thegeneral store-and-forward latencySCSI Command PDU froman application perspective. The generic term RDMA-Capable Protocol (RCaP) is used to refer to protocol stacks that providetheRemote Direct Memory Access (RDMA) functionality, such as iWARP and InfiniBand. WithiSCSI layer. The iSER layer at theavailability of RDMA-Capable Controllers within a host system, it is appropriateinitiator generates an STag foriSCSI to be able to exploitthedirect data placement functionI/O Buffer of theRDMA-Capable Controller like other applications. iSCSI Extensions for RDMA (iSER) is designed precisely to take advantage of generic RDMA technologies - iSER's goal is to permit iSCSI to employ direct data placementSCSI Read andRDMA capabilities using a generic RDMA-Capable Controller. In summary, iSCSI/iSER protocol stack is designed to enable scaling to high speedsAdvertises the buffer byrelying on a generic data placement process and RDMA technologiesincluding the STag andproducts, which enable direct data placementthe Base Offset as part ofboth in-order and out-of-order data. This document describesthe iSERas a protocol extension to iSCSI, bothheader forconvenience of description and also because it is true in a very strict protocol sense. However, itthe PDU. The iSER Message is transferred to the target using a Send Message. The SendSE Message should benoted thatused if supported by the RCaP layer (e.g., iWARP). The iSERis in reality extendinglayer at theconnectivity oftarget uses one or more RDMA Writes to transfer theiSCSI protocol defined in [iSCSI], anddata required to complete thenameSCSI Read. The iSERreflects this reality. When the iSCSI protocol as defined in [iSCSI] (i.e. withoutlayer at theiSER enhancements) is intended intarget uses a Send Message to transfer therest ofSCSI Response PDU back to thedocument,iSER layer at theterm "Traditional iSCSI" is used to makeinitiator. The iSER layer at theintention clear. This document obsoletes RFC 5046. See Section 14 forinitiator invalidates thelist of changes from RFC 5046. 2.2 iSCSI/iSER Layering iSCSI Extensions for RDMA (iSER) is layered betweenSTag and notifies the iSCSI layerandof theRCaP layer. +--------------------------------------------------------+ | SCSI | +--------------------------------------------------------+ | iSCSI | DI -> +--------------------------------------------------------+ | iSER | +-------+--------------------------+---------------------+ | RDMAP | | | +-------+ Infiniband | | | DDP | Reliable | Other | +-------+ Connected | RDMA | | MPA | Transport | Capable | +-------+ Service | Protocol | | TCP | | | +-------+--------------------------+---------------------+ | IP | Infiniband Network Layer | Other Network Layer | +-------+--------------------------+---------------------+ Figure 1 Example of iSCSI/iSER Layering in Full Feature Phase Figure 1 shows an exampleavailability of therelationship between SCSI, iSCSI, iSER, andSCSI Response PDU. The Send with Invalidate Message, if supported by thedifferentRCaPlayers. For TCP,layer (e.g., iWARP), can be used for automatic invalidation of theRCaP is iWARP. For Infiniband,STag. 1.7. SCSI Write Overview The iSER layer at theRCaP isinitiator receives theReliable Connected Transport Service. Note thatSCSI Command PDU from the iSCSIlayer as described here supports the RDMA Extensions as used in iSER. 2.3 Architectural Goals This section summarizeslayer. If solicited data transfer is involved, thearchitectural goals that guidediSER layer at thedesign of iSER. 1. Provideinitiator generates anRDMA data transfer modelSTag foriSCSI that enables direct in order or out of order data placementthe I/O Buffer of the SCSIdata into pre- allocated SCSI buffers while maintaining in order data delivery. 2. Not require any major changes to SCSI Architecture Model [SAM5]Write andSCSI command set standards. 3. Utilize existing iSCSI infrastructure (sometimes referred to as "iSCSI ecosystem")Advertises the buffer by includingbut not limited to MIB, bootstrapping, negotiation, naming & discovery, and security. 4. Enable a session to operate intheTraditional iSCSI data transfer mode ifSTag and the Base Offset as part of the iSER header for the PDU. The iSER Message isnottransferred to the target using a Send Message. The SendSE Message should be used if supported byeitherthe RCaP layer (e.g., iWARP). The iSER layer at the initiator may optionally send one or more non- immediate unsolicited data PDUs to the target(not require iSCSI full feature phase interoperability between an end node operating in Traditional iSCSI mode, and an end node operating in iSER-assisted mode). 5. Allow initiator and target implementations to utilize generic RDMA-Capable Controllers such as RNICs, or implement iSCSI and iSER in software (not require iSCSI orusing Send Messages. If solicited data transfer is involved, the iSERspecific assists inlayer at theRCaP implementationtarget uses one orRDMA-Capable Controller). 6. Implement a light weight Datamover protocol for iSCSI with minimal state maintenance. 2.4 Protocol Overview Consistent with the architectural goals stated in section 2.3,more RDMA Reads to transfer theiSER protocol does not require changes indata required to complete theiSCSI ecosystem or any relatedSCSIspecifications.Write. The iSERprotocol defineslayer at themapping of iSCSI PDUs to RCaP Messages in suchtarget uses away that it is entirely feasibleSend Message torealize iSCSI/iSER implementations that are based on generic RDMA-Capable Controllers. Thetransfer the SCSI Response PDU back to the iSERprotocollayerrequires minimal state maintenance to assist an iSCSI full feature phase connection, besides being oblivious toat thenotion of an iSCSI session.initiator. Thecrucial protocol aspects ofiSERmay be summarized thus: 1. iSER-assisted mode is negotiated duringlayer at theiSCSI login ininitiator invalidates theleading connection for each session,STag andan entirenotifies the iSCSIsession can only operate in one mode (i.e. a connection in a session cannot operate in iSER-assisted mode if a different connectionlayer of thesame session is already in full feature phase inavailability of theTraditional iSCSI mode). 2. Once in iSER-assisted mode, all iSCSI interactions on that connection use RCaP Messages. 3. ASCSI Response PDU. The SendMessage iswith Invalidate Message, if supported by the RCaP layer (e.g., iWARP), can be used forcarrying an iSCSI control-type PDU preceded by anautomatic invalidation of the STag. 2. Definitions and Acronyms 2.1. Definitions Advertisement (Advertised, Advertise, Advertisements, Advertises) -- The act of informing a remote iSERheader. See section 7.2(iSCSI Extensions formore details on iSCSI control-type PDUs. 4. RDMA Write,RDMA) layer that a local node's buffer is available to it. A node makes a buffer available for incoming RDMA ReadRequest, andRequest Message or incoming RDMARead Response Messages are used for carrying controlWrite Message access by informing the remote iSER layer of the Tagged Buffer identifiers (STag, Base Offset, andall databuffer length). Note that this Advertisement of Tagged Buffer informationassociated withis the responsibility of theiSCSI data-type PDUs (i.e., SCSI Data-In PDUs and R2T PDUs).iSERdoeslayer on either end and is notuse SCSI Data-Out PDUsdefined by the RDMA-Capable Protocol. A typical method would be forsolicited data,the iSER layer to embed the Tagged Buffer's STag, Base Offset, andSCSI Data-Out PDUsbuffer length in a message destined forunsolicited data are not treated as iSCSI data-type PDUs bythe remote iSERbecause RDMAlayer. Base Offset - A value when added to the Buffer Offset forms the Tagged Offset. Completion (Completed, Complete, Completes) - Completion isnot used. See section 7.1 for more details on iSCSI data-type PDUs. 5. Target drives all data transfer (withdefined as theexception of iSCSI unsolicited data) for SCSI writes and SCSI reads,process byissuingwhich the RDMA-Capable Protocol layer informs the iSER layer that a particular RDMARead Requests andOperation has performed all functions specified for the RDMAWrites respectively. 6. RCaPOperation. Connection - A connection isresponsible for ensuring data integrity. (For example, iWARP includesaCRC-enhanced framing layer called MPA on top of TCP;logical bidirectional communication channel between the initiator andfor Infiniband,theCRCs are included intarget, e.g., a TCP connection. Communication between theReliableinitiator and the target occurs over one or more connections. The connections carry control messages, SCSI commands, parameters, and data within iSCSI Protocol Data Units (iSCSI PDUs). Connectionmode). For this reason,Handle - An information element that identifies the particular iSCSIheaderconnection anddata digests are negotiated to "None"is unique foriSCSI/iSER sessions. 7. Thea given iSCSIerror recovery hierarchy defined in [iSCSI] is fully supported by iSER. (However, see section 7.3.11 onlayer and thehandling of SNACK Request PDUs.) 8.underlying iSERrequires no changes to iSCSI security and text mode negotiation mechanisms.layer. Every invocation of an Operational Primitive is qualified with the Connection Handle. Data Sink - The peer receiving a data payload. Note thatTraditional iSCSI implementations may have tothe Data Sink can beadaptedrequired toemploy iSER. It is expectedboth send and receive RCaP (RDMA-Capable Protocol) Messages to transfer a data payload. Data Source - The peer sending a data payload. Note that theadaptation whenData Source can be requiredis likelytobe centered aroundboth send and receive RCaP Messages to transfer a data payload. Datamover Interface (DI) - The interface between theupperiSCSI layerinterface requirements of iSER (section 3). 2.5 RDMA servicesandiSER iSER is designed to work with software and/or hardware protocol stacks providingtheprotocol services defined in RCaP documents suchDatamover Layer as[RDMAP], [IB], etc. The following subsections describe the key protocol elements of RCaP servicesdescribed in [DA]. Datamover Layer - A layer thatiSER relies on. 2.5.1 STag An STagis directly below theidentifier of an I/O Buffer unique to an RDMA-Capable Controller that the iSER Layer Advertises toiSCSI layer and above theremote iSCSI/iSER node in order to completeunderlying transport layers. This layer exposes and uses aSCSI I/O. In iSER, Advertisement is the actset ofinforming the target by the initiator that an I/O Buffer is available at the initiatortransport-independent Operational Primitives forRDMA Read or RDMA Write access bythetarget.communication between the iSCSI layer and itself. Theinitiator AdvertisesDatamover layer, operating in conjunction with theI/O Buffer by includingtransport layers, moves theSTagcontrol and data information on theBase Offset iniSCSI connection. In this specification, theheader of aniSERMessage containinglayer is theSCSI Command PDUDatamover layer. Datamover Protocol - A Datamover protocol is the wire protocol that is defined to realize thetarget. The buffer lengthDatamover-layer functionality. In this specification, the iSER protocol isas specified intheSCSI Command PDU.Datamover protocol. Inbound RDMA Read Queue Depth (IRD) - TheiSER Layer atmaximum number of incoming outstanding RDMA Read Requests that theinitiator AdvertisesRDMA-Capable Controller can handle on a particular RCaP Stream at theSTag andData Source. For some RDMA-Capable Protocol layers, theBase Offsetterm "IRD" may be known by a different name. For example, for InfiniBand, theI/O Buffer of each SCSI I/Oequivalent to IRD is theiSER Layer at the targetResponder Resources. I/O Buffer - A buffer that is used inthe iSER header ofaSend Message containing theSCSICommand PDU, unless the I/O can be completely satisfied by unsolicitedRead or Write operation so SCSI dataalone. The SendSE Message shouldmay beused if supported by the RCaP layer (e.g., iWARP). The iSER Layer at the target provides the STag for the I/O Buffersent from or received into that buffer. iSCSI - The iSCSI protocol as defined in [iSCSI] is a mapping of theData SinkSCSI Architecture Model of SAM-5 over TCP. iSCSI control-type PDU - Any iSCSI PDU that is not anRDMA Read Operation (section 2.5.4)iSCSI data- type PDU and also not a SCSI Data-Out PDU carrying solicited data is defined as an iSCSI control-type PDU. Specifically, it is tothe RCaP layer on the initiator nodebe noted that SCSI Data-Out PDUs for unsolicited data are defined as iSCSI control-type PDUs. iSCSI data-type PDU -i.e. thisAn iSCSI data-type PDU iscompletely transparent to the iSER Layerdefined as an iSCSI PDU that causes data transfer via RDMA operations at theinitiator. TheiSERlayer atlayer, transparent to theinitiator SHOULD invalidateremote iSCSI layer, to take place between theAdvertised STag uponpeer iSCSI nodes on anormal completion ofFull Feature Phase iSCSI connection. An iSCSI data-type PDU, when requested for transmission by the sender iSCSI layer, results in the associatedtask. The Send with Invalidate Message, if supported bydata transfer without theRCaP layer (e.g., iWARP), can be used for automatic invalidation when itparticipation of the remote iSCSI layer, i.e., the PDU itself isusednot delivered as-is tocarrythe remote iSCSI layer. The following iSCSI PDUs constitute the set of iSCSI data- type PDUs -- SCSIResponseData-In PDU and R2T PDU.There are two exceptions to this automatic invalidationiSCSI Layer -bidirectional commands,A layer in the protocol stack implementation within an end node that implements the iSCSI protocol andabnormal completion of a command. Theinterfaces with the iSERLayerlayer via the Datamover Interface. iSCSI PDU (iSCSI Protocol Data Unit) - The iSCSI layer at the initiatorSHOULD explicitly invalidateand theSTag in these two cases. That iSERiSCSI layerMUST checkat the target divide their communications into messages. The term "iSCSI Protocol Data Unit" (iSCSI PDU) is used for these messages. iSCSI/iSER Connection - An iSER-assisted iSCSI connection. An iSCSI connection thatSTag invalidation has occurred whenever receipt of a Send with Invalidate messageis not iSER assisted always maps onto a TCP connection at theexpected means of causingtransport level. But anSTag to be invalidated, and MUST perform the STag invalidation if the STag hasiSER-assisted iSCSI connection may notalready been invalidatedhave an underlying TCP connection. For some RCaP implementations (e.g.,because a Send message was used instead of Send with Invalidate). If the Advertised STagiWARP), an iSER-assisted iSCSI connection has an underlying TCP connection. For other RCaP implementations (e.g., InfiniBand), there isnot invalidated as recommended inno underlying TCP connection. (In theforegoing paragraph (e.g., in order to cachespecific example of InfiniBand [IB], an iSER- assisted iSCSI connection is directly mapped onto theSTagInfiniBand Reliable Connection-based (RC) channel.) iSCSI/iSER Session - An iSER-assisted iSCSI session. All connections of an iSCSI/iSER session are iSCSI/iSER connections. iSER - iSCSI Extensions forfuture reuse),RDMA, theI/O Buffer remains exposedprotocol defined in this document. iSER-assisted - A term generally used to describe thenetwork for access by the RCaP. Such an I/O Buffer is capableoperation ofbeing read or written by the RCaP outsideiSCSI when thescope ofiSER functionality is also enabled below the iSCSIoperationlayer forwhich it was originally established, which has both robustness and security considerations. The robustness considerations are thatthesystem containingspecific iSCSI/iSER connection in question. iSER-IRD - This variable represents theiSER initiator may react poorly to an unexpected modificationmaximum number ofits memory. For the security considerations, see Section 11. 2.5.2 Send Send is theincoming outstanding RDMAOperationRead Requests thatis not addressed to an Advertised buffer, and uses Untagged buffers asthemessage is received. TheiSERLayerlayer at the initiatoruses the Send Operation to transmit any iSCSI control-type PDU togrants on a particular RCaP Stream. iSER-ORD - This variable represents thetarget. As an example,maximum number of outstanding RDMA Read Requests that theinitiator uses Send Operations to transferiSERMessages containing SCSI Command PDUs tolayer can initiate on a particular RCaP Stream. This variable is maintained only by the iSERLayerlayer at the target.AniSER Layer - The layerat the target usesthat implements theSend Operation to transmit anyiSCSIcontrol-type PDU to the initiator. As an example, the target uses Send Operations to transfer iSER Messages containing SCSI Response PDUs to the iSER Layer at the initiator. For interoperability, iSER implementations SHOULD accept and correctly process SendSEExtensions for RDMA (iSER) protocol. iWARP - A suite of wire protocols comprising of [RDMAP], [DDP], andSendInvSE messages. However, SendSE[MPA] when layered above [TCP]. [RDMAP] andSendInvSE messages are to[DDP] may beregarded as optimizationslayered above SCTP orenhancementsother transport protocols. Local Mapping - A task state record maintained by the iSER layer that associates the Initiator Task Tag to thebasic Send message, and their support may vary by RCaP protocol and specific implementation. In general, these messages SHOULD NOT be used, unlessLocal STag(s). The specifics of theRCaP requires support for them in all implementations. If these messagesrecord structure areused, theimplementationSHOULD be capabledependent. Local Peer - The implementation ofreverting to usethe RDMA-Capable Protocol on the local end ofSend in orderthe connection. Used towork with a receiver that does not support these message. Attempted userefer to the local entity when describing protocol exchanges or other interactions between two nodes. Node - A computing device attached to one or more links ofthese messages withapeer thatnetwork. A node in this context does notsupport them may result inrefer to afatal error that closes the RCaP connection. For example, these messages SHOULD NOT be used with the InfiniBand RCaP because InfiniBand does not require support for them in all cases. New iSER implementations SHOULD use Send (and not SendSEspecific application orSendInvSE) unless there are compelling reasons for doing otherwise. Similarly, iSER implementations SHOULD NOT relyprotocol instantiation running onevents triggered by SendSE and SendInvSE, as these messagesthe computer. A node maynot be used. 2.5.3 RDMA Write RDMA Writeconsist of one or more RDMA-Capable Controllers installed in a host computer. Operational Primitive - An Operational Primitive isthe RDMA Operationan abstract functional interface procedure thatis usedrequests another layer toplace data into an Advertised buffer atperform a specific action on theData Sink. The Data Source addressesrequestor's behalf or notifies theMessage usingother layer of some event. The Datamover Interface between anSTagiSCSI layer and aTagged Offset that are valid on the Data Sink. The iSER Layer at the targetDatamover layer within an iSCSI end node usesthe RDMA Write Operation to transfer the contents ofalocal I/O Bufferset of Operational Primitives toan Advertised I/O Buffer atdefine theinitiator. The iSER Layer atfunctional interface between thetarget usestwo layers. Note that not every invocation of an Operational Primitive may elicit a response from theRDMA Write to transfer whole or partrequested layer. A full discussion of thedata requiredOperational Primitive types and request-response semantics available tocomplete a SCSI Read command. TheiSCSI and iSERLayer at the initiator does not employ RDMA Writes. 2.5.4can be found in [DA]. Outbound RDMA ReadRDMA Read is the RDMA Operation that is used to retrieve data from an Advertised buffer at the Data Source.Queue Depth (ORD) - Thesendermaximum number oftheoutstanding RDMA ReadRequest addresses the Message using an STag and a Tagged OffsetRequests thatare valid ontheData Source in addition to providingRDMA-Capable Controller can initiate on avalid local STag and Tagged Offset that identifyparticular RCaP Stream at the Data Sink.The iSER Layer at the target uses the RDMA Read Operation to transfer the contents of an Advertised I/O Buffer atFor some RDMA-Capable Protocol layer, theinitiator toterm "ORD" may be known by alocal I/O Buffer at the target. The iSER Layer at the target usesdifferent name. For example, for InfiniBand, theRDMA Readequivalent tofetch whole or part ofORD is thedata requiredInitiator Depth. Phase Collapse - Refers tocomplete a SCSI Write Command. The iSER Layer attheinitiator does not employ RDMA Reads. 2.6 SCSI Read Overview The iSER Layer atoptimization in iSCSI where theinitiator receivesSCSI status is transferred along with the final SCSICommandData-In PDU fromthe iSCSI Layer. The iSER Layer at the initiator generates an STag for the I/O Buffera target. See Section 4.2 in [iSCSI]. RCaP Message - One or more packets of theSCSI Read and Advertises the buffer by including the STag and the Base Offset asnetwork layer that constitute a single RDMA operation or a part of an RDMA Read Operation of theiSER header for the PDU. The iSERRDMA-Capable Protocol. For iWARP, an RCaP Message istransferred to the target using a Send Message. The SendSE Message should be used if supported byknown as an RDMAP Message. RCaP Stream - A single bidirectional association between the peer RDMA-Capable Protocol layers on two nodes over a single transport- level stream. For iWARP, an RCaPlayer (e.g., iWARP). The iSER Layer atStream is known as an RDMAP Stream, and thetarget uses oneassociation is created following a successful Login Phase during which iSER support is negotiated. RDMA-Capable Protocol (RCaP) - The protocol ormoreprotocol suite that provides a reliable RDMAWritestransport functionality, e.g., iWARP, InfiniBand, etc. RDMA-Capable Controller - A network I/O adapter or embedded controller with RDMA functionality. For example, for iWARP, this could be an RNIC, and for InfiniBand, this could be a HCA (Host Channel Adapter) or TCA (Target Channel Adapter). RDMA-enabled Network Interface Controller (RNIC) - A network I/O adapter or embedded controller with iWARP functionality. RDMA Operation - A sequence of RCaP Messages, including control messages, to transferthedatarequiredfrom a Data Source tocomplete the SCSI Read. The iSER Layer at the target usesa Data Sink. The following RDMA Operations are defined -- RDMA Write Operation, RDMA Read Operation, and SendMessageOperation. RDMA Protocol (RDMAP) - A wire protocol that supports RDMA Operations to transfer ULP data between a Local Peer and theSCSI Response PDU backRemote Peer as described in [RDMAP]. RDMA Read Operation - An RDMA Operation used by the Data Sink to transfer theiSER Layer atcontents of a Data Source buffer from theinitiator. The iSER LayerRemote Peer to a Data Sink buffer at theinitiator invalidates the STag and notifies the iSCSI Layer of the availabilityLocal Peer. An RDMA Read operation consists ofthe SCSIa single RDMA Read Request Message and a single RDMA Read ResponsePDU. The Send with Invalidate Message, if supported by theMessage. RDMA Read Request - An RCaPlayer (e.g., iWARP), can beMessage usedfor automatic invalidation of the STag. 2.7 SCSI Write Overview The iSER Layer at the initiator receivesby theSCSI Command PDU fromData Sink to request theiSCSI Layer. If solicited dataData Source to transferis involved, the iSER Layer at the initiator generates an STag fortheI/O Buffercontents of a buffer. The RDMA Read Request Message describes both theSCSI WriteData Source andAdvertisesthebufferData Sink buffers. RDMA Read Response - An RCaP Message used byincludingtheSTag andData Source to transfer theBase Offset as partcontents ofthe iSER header for the PDU. The iSER Message is transferreda buffer to thetarget using a Send Message.Data Sink, in response to an RDMA Read Request. TheSendSERDMA Read Response Messageshould beonly describes the Data Sink buffer. RDMA Write Operation - An RDMA Operation usedif supportedby theRCaP layer (e.g., iWARP). The iSER Layer at the initiator may optionally send one or more non- immediate unsolicited data PDUsData Source tothe target using Send Messages. If solicited datatransferis involved, the iSER Layer atthetarget uses one or more RDMA Reads to transfercontents of a Data Source buffer from thedata requiredLocal Peer tocompletea Data Sink buffer at theSCSI Write.Remote Peer. TheiSER Layer atRDMA Write Message only describes thetarget usesData Sink buffer. Remote Direct Memory Access (RDMA) - A method of accessing memory on aSend Messageremote system in which the local system specifies the remote location of the data totransferbe transferred. Employing an RDMA- Capable Controller in theSCSI Response PDU backremote system allows the access to take place without interrupting theiSER Layer atprocessing of the CPU(s) on the system. Remote Mapping - A task state record maintained by theinitiator. TheiSERLayer atlayer that associates theinitiator invalidatesInitiator Task Tag to theSTagAdvertised STag(s) andnotifiestheiSCSI LayerBase Offset(s). The specifics of theavailabilityrecord structure are implementation dependent. Remote Peer - The implementation of the RDMA-Capable Protocol on the opposite end of the connection. Used to refer to the remote entity when describing protocol exchanges or other interactions between two nodes. SCSIResponse PDU. TheLayer - This layer builds/receives SCSI CDBs (Command Descriptor Blocks) and sends/receives them with the remaining command execute [SAM5] parameters to/from the iSCSI layer. Send - An RDMA Operation that transfers the content of a buffer from the Local Peer to an untagged buffer at the Remote Peer. SendInvSE Message - A Send with Solicited Event and InvalidateMessage, if supported by the RCaP layer (e.g., iWARP), can be usedMessage. SendSE Message - A Send with Solicited Event Message. Sequence Number (SN) - DataSN forautomatic invalidationa SCSI Data-In PDU and R2TSN for an R2T PDU. The semantics for both types ofthe STag. 3 Upper Layersequence numbers are as defined in [iSCSI]. Session, iSCSI Session - The group of connections that link an initiator SCSI port with a target SCSI port form an iSCSI session (equivalent to a SCSI Initiator-Target (I-T) nexus). Connections can be added to and removed from a session even while the I-T nexus is intact. Across all connections within a session, an initiator sees one and the same target. Steering Tag (STag) - An identifier of a Tagged Buffer on a node (Local or Remote) as defined in [RDMAP] and [DDP]. For other RDMA-Capable Protocols, the Steering Tag may be known by different names but will be referred to herein as STags. For example, for InfiniBand, a Remote STag is known as an R-Key, and a Local STag is known as an L-Key, and both will be considered STags. Tagged Buffer - A buffer that is explicitly Advertised to the iSER layer at the remote node through the exchange of an STag, Base Offset, and length. Tagged Offset - The offset within a Tagged Buffer. Traditional iSCSI - Refers to the iSCSI protocol as defined in [iSCSI] (i.e., without the iSER enhancements). Untagged Buffer - A buffer that is not explicitly Advertised to the iSER layer at the remode node. 2.2. Acronyms Acronym Definition -------------------------------------------------------------- AHS Additional Header Segment BHS Basic Header Segment CO Connection Only CRC Cyclic Redundancy Check DDP Direct Data Placement Protocol DI Datamover Interface HCA Host Channel Adapter IANA Internet Assigned Numbers Authority IB InfiniBand IETF Internet Engineering Task Force I/O Input - Output IO Initialize Only IP Internet Protocol IPoIB IP over InfiniBand IPsec Internet Protocol Security iSER iSCSI Extensions for RDMA ITT Initiator Task Tag LO Leading Only MPA Marker PDU Aligned Framing for TCP NOP No Operation NSG Next Stage (during the iSCSI Login Phase) PDU Protocol Data Unit R2T Ready To Transfer R2TSN Ready To Transfer Sequence Number RCaP RDMA-Capable Protocol RDMA Remote Direct Memory Access RDMAP Remote Direct Memory Access Protocol RFC Request For Comments RNIC RDMA-enabled Network Interface Controller SAM5 SCSI Architecture Model - 5 SCSI Small Computer System Interface SNACK Selective Negative Acknowledgment - also Sequence Number Acknowledgement for data STag Steering Tag SW Session Wide TCA Target Channel Adapter TCP Transmission Control Protocol TMF Task Management Function TTT Target Transfer Tag ULP Upper Level Protocol 2.3. Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. 3. Upper-Layer Interface Requirements This section discusses theupper layerupper-layer interface requirements in the form of an abstract model of the required interactions between the iSCSILayerlayer and the iSERLayer.layer. The abstract model used here is derived from the architectural model described in [DA]. [DA] also provides a functional overview of the interactions between the iSCSILayerlayer and thedatamoverDatamover layer as intended by the Datamover Architecture. The interface requirements are specified by Operational Primitives. An Operational Primitive is an abstract functional interface procedure between the iSCSILayerlayer and the iSERLayerlayer that requests one layer to perform a specific action on behalf of the other layer or notifies the other layer of some event. Whenever an Operational Primitive in invoked, the Connection_Handle qualifier is used to identify a particular iSCSI connection. For some Operational Primitives, a Data_Descriptor is used to identify the iSCSI/SCSI data buffer associated with the requested or completed operation. The abstract model and the Operational Primitives defined in this section facilitate the description of the iSER protocol. In the rest of the iSER specification, the compliance statements related to the use of these Operational Primitives are only for the purpose of the required interactions between the iSCSILayerlayer and the iSERLayer.layer. Note that the compliance statements related to the Operational Primitives in the rest of this specification only mandate functional equivalence on implementations, but do not put any requirements on the implementation specifics of the interface between the iSCSILayerlayer and the iSERLayer.layer. Each Operational Primitive is invoked with a set of qualifiers which specify the information context for performing the specific action being requested of the Operational Primitive. While the qualifiers are required, the method of realizing the qualifiers (e.g., by passing synchronously with invocation, or by retrieving from task context, or by retrieving from shared memory, etc.) is implementation dependent.3.13.1. Operational Primitives offered by iSER The iSER protocol layer MUST support the following Operational Primitives to be used by the iSCSI protocol layer.3.1.13.1.1. Send_Control Input qualifiers: Connection_Handle, BHS and AHS (if any) of the iSCSI PDU, PDU-specific qualifiers Return results: Not specified This is used by the iSCSILayerslayers at the initiator and the target to request the outbound transfer of an iSCSI control-type PDU (seesectionSection 7.2). Qualifiers that only apply for a particular control- type PDU are known as PDU-specific qualifiers, e.g., ImmediateDataSize for a SCSI Write command. For details on PDU- specific qualifiers, seesectionSection 7.3. The iSCSILayerlayer can only invoke the Send_Control Operational Primitive when the connection is in iSER-assisted mode.3.1.23.1.2. Put_Data Input qualifiers: Connection_Handle, content of a SCSIData-inData-In PDU header, Data_Descriptor, Notify_Enable Return results: Not specified This is used by the iSCSILayerlayer at the target to request the outbound transfer of data for a SCSIData-inData-In PDU from the buffer identified by the Data_Descriptor qualifier. The iSCSILayerlayer can only invoke the Put_Data Operational Primitive when the connection is iniSER-assistediSER- assisted mode. The Notify_Enable qualifier is used to indicate to the iSERLayerlayer whether or not it should generate an eventual local completion notification to the iSCSILayer.layer. SeesectionSection 3.2.2 on Data_Completion_Notify for details.3.1.33.1.3. Get_Data Input qualifiers: Connection_Handle, content of an R2T PDU, Data_Descriptor, Notify_Enable Return results: Not specified This is used by the iSCSILayerlayer at the target to request the inbound transfer of solicited data requested by an R2T PDU into the buffer identified by the Data_Descriptor qualifier. The iSCSILayerlayer can only invoke the Get_Data Operational Primitive when the connection is in iSER-assisted mode. The Notify_Enable qualifier is used to indicate to the iSERLayerlayer whether or not it should generate the eventual local completion notification to the iSCSILayer.layer. SeesectionSection 3.2.2 on Data_Completion_Notify for details.3.1.43.1.4. Allocate_Connection_Resources Input qualifiers: Connection_Handle, Resource_Descriptor (optional) Return results: Status This is used by the iSCSILayerslayers at the initiator and the target to request the allocation of all connection resources necessary to support RCaP for an operational iSCSI/iSER connection. The iSCSILayerlayer may optionally specify the implementation-specific resource requirements for the iSCSI connection using the Resource_Descriptor qualifier. A return result of Status=success means the invocation succeeded, and a return result of Status=failure means that the invocation failed. If the invocation is for a Connection_Handle for which an earlier invocation succeeded, the request will be ignored by the iSERLayerlayer and the result of Status=success will be returned. Only one Allocate_Connection_Resources Operational Primitive invocation can be outstanding for a given Connection_Handle at any time.3.1.53.1.5. Deallocate_Connection_Resources Input qualifiers: Connection_Handle Return results: Not specified This is used by the iSCSILayerslayers at the initiator and the target to request the deallocation of all connection resources that were allocated earlier as a result of a successful invocation of the Allocate_Connection_Resources Operational Primitive.3.1.63.1.6. Enable_Datamover Input qualifiers: Connection_Handle, Transport_Connection_Descriptor, Final Login_Response_PDU (optional) Return results: Not specified This is used by the iSCSILayerslayers at the initiator and the target to request that iSER-assisted mode be used for the connection. The Transport_Connection_Descriptor qualifier is used to identify the specific connection associated with the Connection_Handle. The iSCSI layer can only invoke the Enable_Datamover Operational Primitive when there was a corresponding prior resource allocation. The Final_Login_Response_PDU input qualifier is applicable only for atarget,target and contains the final Login Response PDU that concludes the iSCSI Login Phase.3.1.73.1.7. Connection_Terminate Input qualifiers: Connection_Handle Return results: Not specified This is used by the iSCSILayerslayers at the initiator and the target to request that a specified iSCSI/iSER connection be terminated and all associated connection and task resources be freed. When this Operational Primitive invocation returns to the iSCSI layer, the iSCSI layer may assume full ownership of all iSCSI-level resources,e.g.e.g., I/O Buffers, associated with the connection.3.1.83.1.8. Notice_Key_Values Input qualifiers: Connection_Handle, number of keys, list ofKey-ValueKey- Value pairs Return results: Not specified This is used by the iSCSILayerslayers at the initiator and the target to request the iSERLayerlayer to take note of the specified Key-Value pairswhichthat were negotiated by the iSCSI peers for the connection.3.1.93.1.9. Deallocate_Task_Resources Input qualifiers: Connection_Handle, ITT Return results: Not specified This is used by the iSCSILayerslayers at the initiator and the target to request the deallocation of all RCaP-specific resources allocated by the iSERLayerlayer for the task identified by the ITT qualifier. The iSERLayerlayer may require a certain number of RCaP-specific resources associated with the ITT for each new iSCSI task. In the normal course of execution, these task-level resources in the iSERLayerlayer are assumed to be transparently allocated on each task initiation and deallocated on the conclusion of each task as appropriate. In exception scenarios where the task does not conclude with a SCSI Response PDU, the iSERLayerlayer needs to be notified of the individual task terminations to aid its task-level resource management. This Operational Primitive is used for thispurpose,purpose and is not needed when a SCSI Response PDU normally concludes a task. Note that RCaP- specific task resources are deallocated by the iSERLayerlayer when a SCSI Response PDU normally concludes a task, even if the SCSIStatusstatus was not success.3.23.2. Operational PrimitivesusedUsed by iSER The iSER layer MUST use the following Operational Primitives offered by the iSCSI protocol layer when the connection is in iSER-assisted mode.3.2.13.2.1. Control_Notify Input qualifiers: Connection_Handle, an iSCSI control-type PDU Return results: Not specified This is used by the iSERLayerslayers at the initiator and the target to notify the iSCSILayerlayer of the availability of an inbound iSCSI control-type PDU. A PDU is described as "available" to the iSCSILayerlayer when the iSERLayerlayer notifies the iSCSILayerlayer of the reception of that inbound PDU, along with an implementation-specific indication as to where the received PDU is.3.2.23.2.2. Data_Completion_Notify Input qualifiers: Connection_Handle, ITT, SN Return results: Not specified This is used by the iSERLayerlayer to notify the iSCSILayerlayer of the completion of the outbound data transfer that was requested by the iSCSILayerlayer only if the invocation of the Put_Data Operational Primitive (seesectionSection 3.1.2) was qualified with Notify_Enable set. SN refers to the DataSN associated with the SCSI Data-In PDU. This is used by the iSERLayerlayer to notify the iSCSILayerlayer of the completion of the inbound data transfer that was requested by the iSCSILayerlayer only if the invocation of the Get_Data Operational Primitive (seesectionSection 3.1.3) was qualified with Notify_Enable set. SN refers to the R2TSN associated with the R2T PDU.3.2.33.2.3. Data_ACK_Notify Input qualifier: Connection_Handle, ITT, DataSN Return results: Not specified This is used by the iSERLayerlayer at the target to notify the iSCSILayerlayer of the arrival of the data acknowledgement (as defined in [iSCSI]) requested earlier by the iSCSILayerlayer for the outbound data transfer via an invocation of the Put_Data Operational Primitive where the A-bit in the SCSIData-inData-In PDU is set to1.one. SeesectionSection 7.3.5. DataSN refers to the expected DataSN of the next SCSIData- inData-In PDUwhichthat immediately follows the SCSIData-inData-In PDU with the A-bit set to which this notification corresponds, with semantics as defined in [iSCSI].3.2.43.2.4. Connection_Terminate_Notify Input qualifiers: Connection_Handle Return results: Not specified This is used by the iSERLayerslayers at the initiator and the target to notify the iSCSILayerlayer of the unsolicited termination or failure of an iSCSI/iSER connection. The iSERLayerlayer MUST deallocate the connection and task resources associated with the terminated connection before the invocation of this Operational Primitive. Note that the Connection_Terminate_Notify Operational Primitive is not invoked when the termination of the connection was earlier requested by the local iSCSILayer. 3.3layer. 3.3. iSCSI Protocol Usage Requirements To operate inaniSER-assisted mode, the iSCSILayerslayers at both the initiator and the target MUST negotiate the RDMAExtensions key (seesectionSection 6.3) to "Yes" on the leading connection. If the RDMAExtensions key is not negotiated to "Yes", then iSER-assisted mode MUST NOT be used. If the RDMAExtensons key is negotiated to"Yes""Yes", but the invocation of the Allocate_Connection_Resources Operational Primitive to the iSER layer fails, the iSCSI layer MUST fail the iSCSI Login process or terminate the connection as appropriate. SeesectionSection 10.1.3.1 for details. If the RDMAExtensions key is negotiated to "Yes", the iSCSILayerlayer MUST satisfy the following protocol usage requirements from the iSER protocol: 1. The iSCSILayerlayer at the initiator MUST set ExpDataSN to0zero in Task Management Function Requests for Task Allegiance Reassignment for read/bidirectional commands, so as to cause the target to send all unacknowledged read data. 2. The iSCSILayerlayer at the target MUST always return the SCSI status in a separate SCSI Response PDU for read commands, i.e., there MUST NOT be a "phase collapse" in concluding a SCSI Read Command. 3. The iSCSILayerslayers at both the initiator and the target MUST support the keys as defined insectionSection 6 on Login/Text Operational Keys. If used as specified, these keys MUST NOT be answered withNotUnderstoodNotUnderstood, and the semantics as defined MUST be followed for each iSER-assisted connection. 4. The iSCSILayerlayer at the initiator MUST NOT issue SNACKs for PDUs.4 Lower Layer4. Lower-Layer Interface Requirements4.14.1. Interactions with the RCaP Layer The iSER protocol layer is layered on top of an RCaP layer (see Figure 1) and the following are the key features that are assumed to be supported by any RCaP layer: * The RCaP layer supports all basic RDMA operations, including the RDMA Write Operation, RDMA Read Operation, and Send Operation. * The RCaP layer provides reliable, in-order message delivery and direct data placement. * When the iSERLayerlayer initiates an RDMA Read Operation following an RDMA Write Operation on one RCaP Stream, the RDMA Read Response Message processing on the remote node will be started only after the preceding RDMA Write Message payload is placed in the memory of the remote node. * The RCaP layer encapsulates a single iSER Message into a single RCaP Message on the Data Source side. The RCaP layer decapsulates the iSER Message before delivering it to the iSERLayerlayer on the Data Sink side. * Foraan RCaP layer that supports the Send with Invalidate Message (e.g., iWARP), when the iSERLayerlayer provides the STag to be remotely invalidated to the RCaP layer for a Send with Invalidate Message, the RCaP layer uses this STag as the STag to be invalidated in the Send with Invalidate Message. * The RCaP layer uses the STag and Tagged Offset provided by the iSERLayerlayer for the RDMA Write and RDMA Read Request Messages. * When the RCaP layer delivers the content of an RDMA Send Message to the iSERLayer,layer, the RCaP layer provides the length of the RDMA Sendmessage.Message. This ensures that the iSERLayerlayer does not have to carry a length field in the iSER header. * When the RCaP layer delivers the Send Message to the iSERLayer,layer, it notifies the iSERLayerlayer with the mechanism provided on that interface. * Foraan RCaP layer that supports the Send with Invalidate Message (e.g., iWARP), when the RCaP layer delivers a Send with Invalidate Message to the iSERLayer,layer, it passes the value of the STag that was invalidated. * The RCaP layer propagates all status and error indications to the iSERLayer.layer. * For a transport layer that operates in byte stream mode such as TCP, the RCaP implementation supports the enabling of the RDMA mode afterConnectionconnection establishment and the exchange of Login parameters in byte stream mode. For a transport layer that provides message delivery capability such as [IB], the RCaP implementation supports the direct use of the messaging capability by the iSCSILayer directlylayer for the LoginphasePhase after connection establishment and before enabling iSER-assisted mode. (In the specific example of InfiniBand [IB], the iSCSILayerlayer uses IB messages to transfer iSCSI PDUs for the LoginphasePhase after connection establishment and before enabling iSER-assisted mode.) * Whenever the iSERLayerlayer terminates the RCaP Stream, the RCaP layer terminates the associatedConnection. 4.2connection. 4.2. Interactions with the Transport Layer After the iSER connection is established, the RCaP layer and the underlying transport layer are responsible for maintaining theConnectionconnection and reporting to the iSERLayerlayer anyConnectionconnection failures.55. Connection Setup and Termination5.15.1. iSCSI/iSER Connection Setup During connection setup, the iSCSILayerlayer at the initiator is responsible for establishing a connection with the target. After the connection is established, the iSCSILayerslayers at the initiator and the target enter the Login Phase using the same rules as outlined in [iSCSI]. The connection transitions into the iSCSIfull feature phaseFull Feature Phase in iSER-assisted mode following a successful login negotiation between the initiator and the target in which iSER-assisted mode is negotiated and the connection resources necessary to support RCaP have been allocated at both the initiator and the target. The same connection MUST be used for both the iSCSI LoginphasePhase and the subsequent iSER-assistedfull feature phase.Full Feature Phase. For a transport layer that operates in byte stream mode such as TCP, the RCaP implementation supports the enabling of the RDMA mode afterConnectionconnection establishment and the exchange of Login parameters in byte stream mode. For a transport layer that provides message delivery capability such as [IB], the RCaP implementation supports the use of the messaging capability by the iSCSILayerlayer directly for the LoginphasePhase after connection establishment before enablingiSER- assistediSER-assisted mode. iSER-assisted mode MUST NOT be enabled unless it is negotiated on the leading connection during the LoginOperationalNegotiationStagestage of the iSCSI Login Phase. iSER-assisted mode is negotiated using the RDMAExtensions=<boolean-value> key. Both the initiator and the target MUST exchange the RDMAExtensions key with the value set to "Yes" to enable iSER-assisted mode. If both the initiator and the target fail to negotiate the RDMAExtensions key set to "Yes", then the connection MUST continue with the login semantics as defined in [iSCSI]. If the RDMAExtensions key is not negotiated to Yes, then for some RCaP implementation (such as [IB]), the existing connection may need to be torn down and a new connection may need to be established inTCP capableTCP-capable mode. (ForInfiniBandInfiniBand, this will requirean [IPoIB] type connection.)a connection like [IPoIB].) iSER-assisted mode is defined for a Normal sessiononlyonly, and the RDMAExtensions key MUST NOT be negotiated for a Discovery session. Discovery sessions are always conducted using the transport layer as described in [iSCSI]. AniSER enablediSER-enabled node is not required to initiate the RDMAExtensions key exchange if its preference is for the Traditional iSCSI mode. The RDMAExtensions key, if offered, MUST be sent in the first available Login Response or Login Request PDU in the LoginOperationalNegotiation stage. This is due to the fact that the value of someloginLogin parameters might depend on whetheriSER-assistedor not iSER- assisted mode isenabled or not.enabled. iSER-assisted mode is a session-wide attribute. If both the initiator and the target negotiated RDMAExtensions="Yes" on the leading connection of a session, then all subsequent connections of the same session MUST enable iSER-assisted mode without having to exchange RDMAExtensionskeykeys during the iSCSI Login Phase. Conversely, if both the initiator and the target failed to negotiate RDMAExtensions to "Yes" on the leading connection of a session, then the RDMAExtensions key MUST NOT be negotiated further on any additional subsequent connection of the session. When the RDMAExtensions key is negotiated to "Yes", the HeaderDigest and the DataDigest keys MUST be negotiated to "None" on all iSCSI/iSER connections participating in that iSCSI session. This is because, for an iSCSI/iSER connection, RCaP is responsible for providing error detection that is at least as good as a 32-bit CRC for all iSER Messages. Furthermore, all SCSI Read data are sent using RDMA Write Messages instead of the SCSIData-inData-In PDUs, and all solicited SCSIwriteWrite data are sent using RDMA Read Response Messages instead of the SCSIData-outData-Out PDUs. HeaderDigest and DataDigestwhichthat apply to iSCSI PDUs would not be appropriate for RDMA Read and RDMA Write operations used with iSER.5.1.15.1.1. Initiator Behavior If the outcome of the iSCSI negotiation is to enable iSER-assisted mode, then on the initiator side, prior to sending the Login Request with the T (Transit) bit set to1one and the NSG (Next Stage) field set to FullFeaturePhase, the iSCSILayerlayer SHOULD request the iSERLayerlayer to allocate the connection resources necessary to support RCaP by invoking the Allocate_Connection_Resources Operational Primitive. The connection resources required are defined by the implementation and are outside the scope of this specification. The iSCSILayerlayer may invoke the Notice_Key_Values Operational Primitive before invoking the Allocate_Connection_Resources Operational Primitive to request the iSERLayerlayer to take note of the negotiated values of the iSCSI keys for theConnection.connection. The specific keys to be passed in as input qualifiers are implementation dependent. These may include, but are not limited to,MaxOutstandingR2T, ErrorRecoveryLevel, etc.MaxOutstandingR2T and ErrorRecoveryLevel. Among the connection resources allocated at the initiator is the Inbound RDMA Read Queue Depth (IRD). As described insectionSection 9.5.1, R2Ts are transformed by the target into RDMA Read operations. IRD limits the maximum number of simultaneously incoming outstanding RDMA Read Requests per an RCaP Stream from the target to the initiator. The required value of IRD is outside the scope of the iSER specification. The iSERLayerlayer at the initiator MUST set IRD to 1 or higher if R2Ts are to be used in the connection. However, the iSERLayerlayer at the initiator MAY set IRD to0zero based on implementationconfiguration whichconfiguration; setting IRD to zero indicates that no R2Ts will be used on that connection. Initially, the iSER-IRD value at the initiator SHOULD be set to the IRD value at the initiator and MUST NOT be more than the IRD value. On the other hand, the Outbound RDMA Read Queue Depth (ORD) MAY be set to0zero since the iSERLayerlayer at the initiator does not issue RDMA Read Requests to the target. Failure to allocate the requested connection resources locally results in a loginfailurefailure, and its handling is described insectionSection 10.1.3.1. The iSERLayerlayer MUST return a success status to the iSCSILayerlayer in response to the Allocate_Connection_Resources Operational Primitive. After the target returns the Login Response with the T bit set to1one and the NSG field set to FullFeaturePhase, and astatus classStatus-Class of00x00 (Success), the iSCSILayerlayer MUST invoke the Enable_Datamover Operational Primitive with the following qualifiers. (SeesectionSection 10.1.4.6 for the case when thestatus classStatus-Class is notSuccess.):Success.) a. Connection_Handle that identifies the iSCSI connection. b. Transport_Connection_Descriptorwhichthat identifies the specific transport connection associated with the Connection_Handle. The iSERLayerlayer MUST send the iSER Hello Message as the first iSER Message only if iSERHelloRequired is negotiated to "Yes". See Section 5.1.3 on iSER Hello Exchange. If the iSCSILayerlayer on the initiator side allocates the connection resources to support RCaP only after it receives the final Login Response PDU from the target, then it may not be able to handle the number of unexpected iSCSI control-type PDUs (as declared by the MaxOutstandingUnexpectedPDUs key from the initiator) that can be sent by the target before the buffer resources are allocated at the initiator side. In thiscasecase, the iSERHelloRequired key SHOULD be negotiated to "Yes" so that the initiator can allocate the connection resources before sending the iSER Hello Message. SeesectionSection 5.1.3 for more details.5.1.25.1.2. Target Behavior If the outcome of the iSCSI negotiation is to enable iSER-assisted mode, then on the target side, prior to sending the Login Response with the T (Transit) bit set to1one and the NSG (Next Stage) field set to FullFeaturePhase, the iSCSILayerlayer MUST request the iSERLayerlayer to allocate the resources necessary to support RCaP by invoking the Allocate_Connection_Resources Operational Primitive. The connection resources required are defined by implementation and are outside the scope of this specification. Optionally, the iSCSILayerlayer may invoke the Notice_Key_Values Operational Primitive before invoking the Allocate_Connection_Resources Operational Primitive to request the iSERLayerlayer to take note of the negotiated values of the iSCSI keys for theConnection.connection. The specific keys to be passed in as input qualifiers are implementation dependent. These may include, but not limited to,MaxOutstandingR2T, ErrorRecoveryLevel, etc.MaxOutstandingR2T and ErrorRecoveryLevel. Premature allocation of RCaP connection resources can expose an iSER target to a resource exhaustion attack on those resources via multiple iSER connections that progress only to the point at which the implementation allocates the RCaP connection resources. The countermeasure for this attack is initiator authentication; the iSCSILayerlayer MUST NOT request the iSERLayerlayer to allocate the connection resources necessary to support RCaP until the iSCSI layer is sufficiently far along in the iSCSI Login Phase that it is reasonably certain that the peer side is not an attacker. In particular, if the Login Phase includes a SecurityNegotiation stage, the iSCSILayerlayer MUST defer the connection resource allocation(i.e.(i.e., invoking the Allocate_Connection_Resources Operational Primitive) to the LoginOperationalNegotiation stage ([iSCSI]) so that the resource allocation occurs after the authentication phase is completed. Among the connection resources allocated at the target is the Outbound RDMA Read Queue Depth (ORD). As described insectionSection 9.5.1, R2Ts are transformed by the target into RDMA Read operations. The ORD limits the maximum number of simultaneously outstanding RDMA Read Requests per RCaP Stream from the target to the initiator. Initially, the iSER-ORD value at the target SHOULD be set to the ORD value at the target. On the other hand, the IRD at the target MAY be set to0zero since the iSERLayerlayer at the target does not expect RDMA Read Requests to be issued by the initiator. Failure to allocate the requested connection resources locally results in a loginfailurefailure, and its handling is described insectionSection 10.1.3.1. If the iSERLayerlayer at the target is successful in allocating the connection resources necessary to support RCaP, the following events MUST occur in the specified sequence: 1. The iSERLayerlayer MUST return a success status to the iSCSILayerlayer in response to the Allocate_Connection_Resources Operational Primitive. 2. The iSCSILayerlayer MUST invoke the Enable_Datamover Operational Primitive with the following qualifiers: a. Connection_Handle that identifies the iSCSI connection. b. Transport_Connection_Descriptorwhichthat identifies the specific transport connection associated with the Connection_Handle. c. The finaltransport layer (e.g.transport-layer (e.g., TCP) message containing the Login Response with the T bit set to1one and the NSG field set toFullFeaturePhaseFullFeaturePhase. 3. The iSERLayerlayer MUST send the final Login Response PDU in the native transport mode to conclude the iSCSI Login Phase. If the underlying transport is TCP, then the iSERLayerlayer MUST send the final Login Response PDU in byte stream mode. 4. After receiving the iSER Hello Message from the initiator, the iSERLayerlayer MUST respond with the iSER HelloReply Message to be sent as the first iSER Message if iSERHelloRequired is negotiated to "Yes". If the iSER layer receives an iSER Hello Message when iSERHelloRequired is negotiated to "No", then this MUST be treated as an iSER protocol error. SeesectionSection 5.1.3 on iSER Hello Exchange for more details. Note: In the above sequence, the operations as described inbulletsitems 3 and 4 MUST be performed atomically for iWARP connections. Failure to do this may result in race conditions.5.1.35.1.3. iSER Hello Exchange If iSERHelloRequired is negotiated to "Yes", the first iSER Message sent by the iSERLayerlayer at the initiator to the target MUST be the iSER Hello Message. The iSER Hello Message is used by the iSERLayerlayer at the initiator to declare iSER parameters to the target. SeesectionSection 9.3 on iSER Header Format for iSER Hello Message. Conversely, if iSERHelloRequired is negotiated to "No", then the iSERLayerlayer at the initiator MUST NOT send an iSER Hello Message. In response to the iSER Hello Message, the iSERLayerlayer at the target MUST return the iSER HelloReply Message as the first iSER Message sent by the target if iSERHelloRequired is negotiated to "Yes". The iSER HelloReply Message is used by the iSERLayerlayer at the target to declare iSER parameters to the initiator. SeesectionSection 9.4 on iSER Header Format for iSER HelloReply Message. If the iSER layer receives an iSER Hello Message when iSERHelloRequired is negotiated to "No", then this MUST be treated as an iSER protocol error. SeesectionSection 10.1.3.4 on iSER Protocol Errors on for moredetailsdetails. In the iSER Hello Message, the iSERLayerlayer at the initiator declares the iSER-IRD value to the target. Upon receiving the iSER Hello Message, the iSERLayerlayer at the target MUST set the iSER-ORD value to the minimum of the iSER-ORD value at the target and the iSER-IRD value declared by the initiator.TheIn order to free up the unused resources, the iSERLayerlayer at the target MAY adjust (lower) its ORD value to match the iSER-ORD value if the iSER-ORD value is smaller than the ORD value at thetarget in order to free up the unused resources.target. In the iSER HelloReply Message, the iSERLayerlayer at the target declares the iSER-ORD value to the initiator. Upon receiving the iSER HelloReply Message, the iSERLayerlayer at the initiator MAY adjust (lower) its IRD value to match the iSER-ORD value in order to free up the unused resources, if the iSER-ORD value declared by the target is smaller than the iSER-IRD value declared by the initiator. It is aniSER leveliSER-level negotiation failure if the iSER parameters declared in the iSER Hello Message by the initiator are unacceptable to the target. This includes the following: * The initiator-declared iSER-IRD value is greater than00, and the target-declared iSER-ORD value is 0. * The initiator-supported and the target-supported iSER protocol versions do not overlap. SeesectionSection 10.1.3.2 on the handling of the error situation. An initiator that conforms to [RFC5046] allocates connection resources beforesedingsending the Login Request with the T (Transit) bit set to1one and the NSG (Next Stage) field set to FullFeaturePhase. (For brevity, this is referred to as "early" connection allocation.) The current iSER specification relaxes this requirement to allow an initiator to allocate connection resources after it receives the final Login Response PDU from the target. (For brevity, this is referred to as "late" connection allocation.) An initiator that employs "late" connection allocation may encounter problems (e.g., RCaP connection closure) with a target that sends unexpected iSCSI PDUs immediately upon transitioning to Full Feature Phase, as allowed by the negotiated value of theMaxOustandingUnexpectedPDUsMaxOutstandingUnexpectedPDUs key. The only way to prevent this situation in full generality is to use iSER Hello Messages, as they enable the initiator to allocate its connection resources before sending its iSER Hello Message. The iSERHelloRequired key is used by the initiator to determine if it is dealing with a target that supports the iSER Hello exchanges. Fortunately, known iSER target implementations do not take full advantage of the number of allowed unexpected PDUs immediately upon transitioning intofull feature phase,Full Feature Phase, thus enabling an initiator workaround that involves a smaller quantity of connection resources prior tofull-feature phase,Full Feature Phase, as explained further below. In the followingsummarysummary, where "late" connection allocation ispractised,practiced, an initiator that follows [RFC5046] is referred to as an "old" initiator;otherwiseotherwise, it is referred to as a "new" initiator. Similarly, a target that does not support the iSERHelloRequired key (and responds with "NotUnderstood" when negotiating the iSERHelloRequired key) is referred to as an "old" target;otherwiseotherwise, it is referred to as a "new" target. Note that an "old" target can still support the iSER Helloexchangesexchanges, but this fact is not known by the initiator. A "new" target can also respond with "No" when negotiating the iSERHelloRequired key. In thiscasecase, its behavior with respect to "late" connection allocation is similar to an "old" target. A "new" initiator will work fine with a "new" target. For an "old" initiator and an "old" target, the failure by the initiator to handle the number of unexpected iSCSI control-type PDUs that are sent by the target before the buffer resources are allocated at the initiator can result in the failure of the iSER session caused by closure of the underlying RCaP connection. For the "old" target, there is a known implementation that sends one unexpected iSCSI control-type PDU after sending the final Login Response and then waits awhile before sending the next one. This tends to alleviate somewhat the buffer allocation problem at the initiator. For a "new" initiator and an "old" target, the failure by the initiator to handle the number of unexpected iSCSI control-type PDUs that are sent by the target before the buffer resources are allocated at the initiator can result in the failure of the iSER session caused by closure of the underlying RCaP connection. A "new" initiator MAY choose to terminate the connection;otherwiseotherwise, it SHOULD do one of the following: 1. Allocate the connection resources before sending the final Login Request PDU. 2. Allocate one or more buffers for receiving unexpectedcontrol- typecontrol-type PDUs from the target before sending the final Login Request PDU. This reduces the possibility of the unexpected control-type PDUs causing the RCaP connection to close before the connection resources have been allocated. For an "old" initiator and a "new" target, if the iSERHelloRequired key is not negotiated, a "new" target MUST still respond with the iSER HelloReply Message when it receives the iSER Hello Message. If the iSERHelloRequired key is negotiated to "No" or "NotUnderstood", a "new" target MAY choose to terminate the connection;otherwiseotherwise, it SHOULD delay sending any unexpected control-type PDUs until one of the following events has occurred: 1. A PDU is received from the initiator after it sends the final Login Response PDU. 2. Asystem configurablesystem-configurable timeoutperiod, sayperiod (say, onesecond,second) has expired.5.25.2. iSCSI/iSER Connection Termination5.2.15.2.1. Normal Connection Termination at the Initiator The iSCSILayerlayer at the initiator terminates an iSCSI/iSER connection normally by invoking the Send_Control Operational Primitive qualified with the Logout Request PDU. The iSERLayerlayer at the initiator MUST use a Send Message to send the Logout Request PDU to the target. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). After the iSERLayerlayer at the initiator receives the Send Message containing the Logout Response PDU from the target, it MUST notify the iSCSILayerlayer by invoking the Control_Notify Operational Primitive qualified with the Logout Response PDU. After the iSCSI logout process is complete, the iSCSI layer at the target is responsible for closing the iSCSI/iSER connection as described in Section 5.2.2. After the RCaP layer at the initiator reports that theConnectionconnection has been closed, the iSERLayerlayer at the initiator MUST deallocate all connection and task resources (if any) associated with the connection, and invalidate the Local Mappings (if any) before notifying the iSCSILayerlayer by invoking the Connection_Terminate_Notify Operational Primitive.5.2.25.2.2. Normal Connection Termination at the Target Upon receiving the Send Message containing the Logout Request PDU, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target by invoking the Control_Notify Operational Primitive qualified with the Logout Request PDU. The iSCSILayerlayer completes the logout process by invoking the Send_Control Operational Primitive qualified with the Logout Response PDU. The iSERLayerlayer at the target MUST use a Send Message to send the Logout Response PDU to the initiator. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). After the iSCSI logout process is complete, the iSCSILayerlayer at the target MUST request the iSERLayerlayer at the target to terminate the RCaP Stream by invoking the Connection_Terminate Operational Primitive. As part of the termination process, the RCaP layer MUST close theConnection.connection. When the RCaP layer notifies the iSERLayerlayer after the RCaP Stream and the associatedConnectionconnection are terminated, the iSERLayerlayer MUST deallocate all connection and task resources (if any) associated with the connection, and invalidate the Local and Remote Mappings (if any).5.2.35.2.3. Termination without Logout Request/Response PDUs5.2.3.15.2.3.1. Connection Termination Initiated by the iSCSILayerlayer The Connection_Terminate Operational Primitive MAY be invoked by the iSCSILayerlayer to request the iSERLayerlayer to terminate the RCaP Stream without having previously exchanged the Logout Request and Logout Response PDUs between the two iSCSI/iSER nodes. As part of the termination process, the RCaP layer will close theConnection.connection. When the RCaP layer notifies the iSERLayerlayer after the RCaP Stream and the associatedConnectionconnection are terminated, the iSERLayerlayer MUST perform the following actions. If the Connection_Terminate Operational Primitive is invoked by the iSCSILayerlayer at the target, then the iSERLayerlayer at the target MUST deallocate all connection and task resources (if any) associated with the connection, and invalidate the Local and Remote Mappings (if any). If the Connection_Terminate Operational Primitive is invoked by the iSCSILayerlayer at the initiator, then the iSERLayerlayer at the initiator MUST deallocate all connection and task resources (if any) associated with the connection, and invalidate the Local Mappings (if any).5.2.3.25.2.3.2. Connection Termination Notification to the iSCSILayerlayer If the iSCSI/iSER connection is terminated without the invocation of Connection_Terminate from the iSCSILayer,layer, the iSERLayerlayer MUST notify the iSCSILayerlayer that the iSCSI/iSER connection has been terminated by invoking the Connection_Terminate_Notify Operational Primitive. Prior to invoking Connection_Terminate_Notify, the iSERLayerlayer at the target MUST deallocate all connection and task resources (if any) associated with the connection, and invalidate the Local and Remote Mappings (if any). Prior to invoking Connection_Terminate_Notify, the iSERLayerlayer at the initiator MUST deallocate all connection and task resources (if any) associated with the connection, and invalidate the Local Mappings (if any). If the remote iSCSI/iSER node initiated the closing of theConnectionconnection (e.g., by sending a TCP FIN or TCP RST), the iSERLayerlayer MUST notify the iSCSILayerlayer after the RCaP layer reports that theConnectionconnection is closed by invoking the Connection_Terminate_Notify Operational Primitive. Another example of aConnectionconnection termination without a preceding logout is when the iSCSILayerlayer at the initiator does an implicit logout (connection reinstatement).66. Login/Text Operational Keys Certain iSCSI login/text operational keys have restricted usage in iSER, and additional keys are used to support the iSER protocol functionality. All other keys defined in [iSCSI] and not discussed in this section may be used on iSCSI/iSER connections with the same semantics.6.16.1. HeaderDigest and DataDigest Irrelevant when: RDMAExtensions=Yes Negotiations resulting in RDMAExtensions=Yes for a sessionimpliesimply HeaderDigest=None and DataDigest=None for all connections in that session andoverrides bothoverride the settings, whether defaultand an explicit setting. 6.2or configured. 6.2. MaxRecvDataSegmentLength For an iSCSI connection belonging to a session in which RDMAExtensions=Yes was negotiated on the leading connection of the session, MaxRecvDataSegmentLength need not be declared in the Login Phase, and MUST be ignored if it is declared.InsteadInstead, InitiatorRecvDataSegmentLength (as described insectionSection 6.5) and TargetRecvDataSegmentLength (as described insectionSection 6.4) keys are negotiated. The values of the local and remote MaxRecvDataSegmentLength are derived from the InitiatorRecvDataSegmentLength and TargetRecvDataSegmentLength keys. In thefull feature phase,Full Feature Phase, the initiator MUST consider the value of its local MaxRecvDataSegmentLength (that it would have declared to the target) as having the value of InitiatorRecvDataSegmentLength, and the value of the remote MaxRecvDataSegmentLength (that would have been declared by the target) as having the value of TargetRecvDataSegmentLength. Similarly, the target MUST consider the value of its local MaxRecvDataSegmentLength (that it would have declared to the initiator) as having the value of TargetRecvDataSegmentLength, and the value of the remote MaxRecvDataSegmentLength (that would have been declared by the initiator) as having the value of InitiatorRecvDataSegmentLength. Note that RFC 3720 requires that when a target receives a NOP-Out request with a valid Initiator Task Tag, it responds with a NOP-In with the same Initiator Task Tag that was provided in the NOP-Out request. Furthermore, it returns the first MaxRecvDataSegmentLength bytes of theinitiator providedinitiator-provided Ping Data. Since there is no MaxRecvDataSegmentLength common to the initiator and the target in iSER, the length of the data sent with the NOP-Out request MUST NOT exceed InitiatorMaxRecvDataSegmentLength. The MaxRecvDataSegmentLength key is applicable only for iSCSI control-type PDUs.6.36.3. RDMAExtensions Use: LO (leading only) Senders: Initiator and Target Scope: SW (session-wide) RDMAExtensions=<boolean-value> Irrelevant when: SessionType=Discovery Default is No Result function is AND This key is used by the initiator and the target to negotiate the support for iSER-assisted mode. To enable the use of iSER-assisted mode, both the initiator and the target MUST exchange RDMAExtensions=Yes. iSER-assisted mode MUST NOT be used if either the initiator or the target offers RDMAExtensions=No. An iSER-enabled node is not required to initiate the RDMAExtensions key exchange if it prefers to operate in the Traditional iSCSI mode. However, if the RDMAExtensions key is to be negotiated, an initiator MUST offer the key in the first Login Request PDU in the LoginOperationalNegotiation stage of the leading connection, and a target MUST offer the key in the first Login Response PDU with which it is allowed to do so (i.e., the first Login Response PDU issued after the first Login Request PDU with the C bit set to0)zero) in the LoginOperationalNegotiation stage of the leading connection. In response to the offered key=value pair of RDMAExtensions=yes, an initiator MUST respond in the next Login Request PDU with which it is allowed to do so, and a target MUST respond in the next Login Response PDU with which it is allowed to do so. Negotiating the RDMAExtensions key first enables a node to negotiate the optimal value for other keys. Certain iSCSI keys such as MaxBurstLength, MaxOutstandingR2T, ErrorRecoveryLevel, InitialR2T, ImmediateData, etc., may be negotiated differently depending on whether the connection is in Traditional iSCSI mode or iSER-assisted mode.6.46.4. TargetRecvDataSegmentLength Use: IO (Initialize only) Senders: Initiator and Target Scope: CO (connection-only) Irrelevant when: RDMAExtensions=No TargetRecvDataSegmentLength=<numerical-value-512-to-(2**24-1)> Default is 8192 bytes Result function is minimum This key is relevant only for the iSCSI connection of an iSCSI session if RDMAExtensions=Yes was negotiated on the leading connection of the session. It is used by the initiator and the target to negotiate the maximum size of the data segment that an initiator may send to the target in an iSCSI control-type PDU in thefull feature phase.Full Feature Phase. For SCSI Command PDUs and SCSIData-outData-Out PDUs containing non-immediate unsolicited data to be sent by the initiator, the initiator MUST send all non-Final PDUs with a data segment size of exactly TargetRecvDataSegmentLength whenever the PDUs constitute a data sequence whose size is larger than TargetRecvDataSegmentLength.6.56.5. InitiatorRecvDataSegmentLength Use: IO (Initialize only) Senders: Initiator and Target Scope: CO (connection-only) Irrelevant when: RDMAExtensions=No InitiatorRecvDataSegmentLength=<numerical-value-512-to-(2**24-1)> Default is 8192 bytes Result function is minimum This key is relevant only for the iSCSI connection of an iSCSI session if RDMAExtensions=Yes was negotiated on the leading connection of the session. It is used by the initiator and the target to negotiate the maximum size of the data segment that a target may send to the initiator in an iSCSI control-type PDU in thefull feature phase. 6.6Full Feature Phase. 6.6. OFMarker and IFMarker Irrelevant when: RDMAExtensions=Yes Negotiations resulting in RDMAExtensions=Yes for a sessionimpliesimply OFMarker=No and IFMarker=No for all connections in that session andoverrides bothoverride the settings, whether defaultand an explicit setting. 6.7or configured. 6.7. MaxOutstandingUnexpectedPDUs Use: LO (leading only), Declarative Senders: Initiator and Target Scope: SW (session-wide) Irrelevant when: RDMAExtensions=NoMaxOutstandingUnexpectedPDUs=<numerical-value-from-2-to-(2**32-1)MaxOutstandingUnexpectedPDUs= <numerical-value-from-2-to-(2**32-1) | 0> Default is 0 This key is used by the initiator and the target to declare the maximum number of outstanding "unexpected" iSCSI control-type PDUs that it can receive in thefull feature phase.Full Feature Phase. It is intended to allow the receiving side to determine the amount of buffer resources needed beyond the normal flow control mechanism available in iSCSI. An initiator or target should select a value such that it would not impose an unnecessary constraint on the iSCSILayerlayer under normal circumstances. The value of 0 is defined to indicate that the declarer has no limit on the maximum number of outstanding "unexpected" iSCSI control-type PDUs that it can receive. SeesectionsSections 8.1.1 and 8.1.2 for the usage of this key. Note that iSER Hello and HelloReply Messages are not iSCSI control-type PDUs and are not affected by this key. For interoperability with implementations based on [RFC5046], this key SHOULD be negotiated because the default value of 0 in [RFC5046] is problematic for most implementations as it does not impose a bound on resources consumable by unexpected PDUs.6.86.8. MaxAHSLength Use: LO (leading only), Declarative Senders: Initiator and Target Scope: SW (session-wide) Irrelevant when: RDMAExtensions=No MaxAHSLength=<numerical-value-from-2-to-(2**32-1) | 0> Default is 256 This key is used by theintiatorinitiator and target to declare the maximum size of AHS in an iSCSI control-type PDU that it can receive in thefull feature phase.Full Feature Phase. It is intended to allow the receiving side to determine the amount of resources needed for receive buffering. An initiator or target should select a value such that it would not impose an unnecessary constraint on the iSCSILayerlayer under normal circumstances. The value of 0 is defined to indicate that the declarer has no limit on the maximum size of AHS in iSCSI control- type PDUs that it can receive. For interoperability with implementations based on [RFC5046], an initiator or target MAY terminate the connection if it anticipates MaxAHSLength to be greater than 256 and the key is not understood by its peer.6.96.9. TaggedBufferForSolicitedDataOnly Use: LO (leading only), Declarative Senders: Initiator Scope: SW (session-wide) RDMAExtensions=<boolean-value> Irrelevant when: RDMAExtensions=No Default is No This key is used by theintiatorinitiator to declare to the target the usage of the Write Base Offset in the iSER header of an iSCSI control-type PDU. When set to No, the Base Offset is associated with an I/O buffer that contains all the write data, including both unsolicited and solicited data. When set to Yes, the Base Offset is associated with an I/O buffer that only contains solicited data.6.106.10. iSERHelloRequired Use: LO (leading only), Declarative Senders: Initiator Scope: SW (session-wide) RDMAExtensions=<boolean-value> Irrelevant when: RDMAExtensions=No Default is No This key is relevant only for the iSCSI connection of an iSCSI session if RDMAExtensions=Yes was negotiated on the leading connection of the session. It is used by theintiatorinitiator to declare to the targetifwhether the iSER Hello Exchange is required. When set to Yes, the iSER layers MUST perform the iSER Hello Exchange as described in Section 5.1.3. When set to No, the iSER layers MUST NOT perform the iSER Hello Exchange.77. iSCSI PDU Considerations When a connection is in the iSER-assisted mode, two types of message transfers are allowed between the iSCSILayer atlayer (at theinitiatorinitiator) and the iSCSILayer atlayer (at thetarget.target). These are known as the iSCSI data- type PDUs and the iSCSI control-typePDUsPDUs, and these terms are described in the following sections.7.17.1. iSCSI Data-Type PDU An iSCSI data-type PDU is defined as an iSCSI PDU that causes data transfer, transparent to the remote iSCSI layer, to take place between the peer iSCSI nodes in thefull feature phaseFull Feature Phase of an iSCSI/iSER connection. An iSCSI data-type PDU, when requested for transmission by the iSCSILayerlayer in the sending node, results in thedata being transferreddata's transfer without the participation of the iSCSILayerslayers at the sending and the receiving nodes. This is due to the fact that the PDU itself is not delivered as-is to the iSCSILayerlayer in the receiving node. Instead, the data transfer operations are transformed into the appropriate RDMAoperationsoperations, which are handled by the RDMA-Capable Controller. The set of iSCSI data-type PDUs consists of SCSIData-inData-In PDUs and R2T PDUs. If the invocation of the Operational Primitive by the iSCSILayerlayer to request the iSERLayerlayer to process an iSCSI data-type PDU is qualified with Notify_Enable set, then upon completing the RDMA operation, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target by invoking the Data_Completion_Notify Operational Primitive qualified with the ITT and SN. There is no data completion notification at the initiator since the RDMA operations are completely handled by the RDMA-Capable Controller at the initiator and the iSERLayerlayer at the initiator is not involved with the data transfer associated with iSCSI data-type PDUs. If the invocation of the Operational Primitive by the iSCSILayerlayer to request the iSERLayerlayer to process an iSCSI data-type PDU is qualified with Notify_Enable cleared, then upon completing the RDMA operation, the iSERLayerlayer at the target MUST NOT notify the iSCSILayerlayer at the target and MUST NOT invoke the Data_Completion_Notify Operational Primitive. If an operation associated with an iSCSI data-type PDU fails for any reason, the contents of the Data Sink buffers associated with the operation are considered indeterminate.7.27.2. iSCSI Control-Type PDU Any iSCSI PDU that is not an iSCSI data-type PDU and also not a SCSIData-outData-Out PDU carrying solicited data is defined as an iSCSI control- type PDU. The iSCSILayerlayer invokes the Send_Control Operational Primitive to request the iSERLayerlayer to process an iSCSI control-type PDU. iSCSI control-type PDUs are transferred using Send Messages of RCaP. Specifically, it is to be noted that SCSI Data-Out PDUs carrying unsolicited data are defined as iSCSI control-type PDUs. SeesectionSection 7.3.4 on the treatment of SCSIData-outData-Out PDUs. When the iSERLayerlayer receives an iSCSI control-type PDU, it MUST notify the iSCSILayerlayer by invoking the Control_Notify Operational Primitive qualified with the iSCSI control-type PDU.7.37.3. iSCSI PDUs This section describes the handling of each of the iSCSI PDU types by the iSERLayer.layer. The iSCSILayerlayer requests the iSERLayerlayer to process the iSCSI PDU by invoking the appropriate Operational Primitive. A Connection_Handle MUST qualify each of these invocations. In addition, the BHS and the optional AHS of the iSCSI PDU as defined in [iSCSI] MUST qualify each of the invocations. The qualifying Connection_Handle, theBHSBHS, and the AHS are not explicitly listed in the subsequent sections.7.3.17.3.1. SCSI Command Type: control-type PDU PDU-specific qualifiers (for SCSI Write or bidirectional command): ImmediateDataSize, UnsolicitedDataSize, DataDescriptorOut PDU-specific qualifiers (for SCSI Read or bidirectional command): DataDescriptorIn The iSERLayerlayer at the initiator MUST send the SCSI command in a Send Message to the target. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). For a SCSI Write or bidirectional command, the iSCSILayerlayer at the initiator MUST invoke the Send_Control Operational Primitive as follows: * If there is immediate data to be transferred for the SCSI write or bidirectional command, the qualifier ImmediateDataSize MUST be used to define the number of bytes of immediate unsolicited data to be sent with the write or bidirectional command, and the qualifier DataDescriptorOut MUST be used to define the initiator's I/O Buffer containing the SCSI Write data. * If there is unsolicited data to be transferred for the SCSI Write or bidirectional command, the qualifier UnsolicitedDataSize MUST be used to define the number of bytes of immediate and non- immediate unsolicited data for the command. The iSCSILayerlayer will issue one or more SCSIData-outData-Out PDUs for the non-immediate unsolicited data. See Section 7.3.4 on SCSIData-out.Data-Out. * If there is solicited data to be transferred for the SCSI Write or bidirectional command, as indicatedbywhen the Expected Data Transfer Length in the SCSI Command PDUexceedingexceeds the value of UnsolicitedDataSize, the iSERLayerlayer at the initiator MUST do the following: a. It MUST allocate a Write STag for the I/O Buffer defined by the qualifier DataDescriptorOut. DataDescriptorOut describes the I/O buffer starting with the immediate unsolicited data (if any), followed by the non-immediate unsolicited data (if any) and solicited data. When TaggedBufferForSolicitedDataOnly is negotiated to No, the Base Offset is associated with this I/O Buffer. When TaggedBufferForSolicitedDataOnly is negotiated to Yes, the Base Offset is associated with an I/O Buffer that contains only solicited data. b. It MUST establish a Local Mapping that associates the Initiator Task Tag (ITT) to the Write STag. c. It MUST Advertise the Write STag and the Base Offset to the target by sending them in the iSER header of the iSER Message (the payload of the Send Message of RCaP) containing the SCSI Write or bidirectional command PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). SeesectionSection 9.2 on iSER Header Format for iSCSI Control-Type PDU. For a SCSI Read or bidirectional command, the iSCSILayerlayer at the initiator MUST invoke the Send_Control Operational Primitive qualified withDataDescriptorInDataDescriptorIn, which defines the initiator's I/O Buffer for receiving the SCSI Read data. The iSERLayerlayer at the initiator MUST do the following: a. It MUST allocate a Read STag for the I/O Buffer and note the Base Offset for this I/O Buffer. b. It MUST establish a Local Mapping that associates the Initiator Task Tag (ITT) to the Read STag. c. It MUST Advertise the Read STag and the Base Offset to the target by sending them in the iSER header of the iSER Message (the payload of the Send Message of RCaP) containing the SCSI Read or bidirectional command PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). SeesectionSection 9.2 on iSER Header Format for iSCSI Control-Type PDU. If the amount of unsolicited data to be transferred in a SCSI Command exceeds TargetRecvDataSegmentLength, then the iSCSILayerlayer at the initiator MUST segment the data into multiple iSCSI control-type PDUs, with the data segment length in allPDUsgeneratedexceptPDUs (except the lastoneone) having exactly the size TargetRecvDataSegmentLength. The data segment length of the last iSCSI control-type PDU carrying the unsolicited data can be up to TargetRecvDataSegmentLength. When the iSERLayerlayer at the target receives the SCSI Command, it MUST establish a Remote Mapping that associates the ITT to the Base Offset(s) and the Advertised STag(s) in the iSER header. The Write STag is used by the iSERLayerlayer at the target in handling the data transfer associated with the R2T PDU(s) as described insectionSection 7.3.6. The Read STag is used in handling the SCSIData-inData-In PDU(s) from the iSCSILayerlayer at the target as described insectionSection 7.3.5.7.3.27.3.2. SCSI Response Type: control-type PDU PDU-specific qualifiers: DataDescriptorStatus The iSCSILayerlayer at the target MUST invoke the Send_Control Operational Primitive qualified withDataDescriptorStatusDataDescriptorStatus, which defines the buffer containing the sense and response information. The iSCSILayerlayer at the target MUST always return the SCSI status for a SCSI command in a separate SCSI Response PDU. "Phase collapse" for transferring SCSI status in a SCSIData-inData-In PDU MUST NOT be used. The iSERLayerlayer at the target sends the SCSI Response PDU according to the following rules: * If no STags were Advertised by the initiator in the iSER Message containing the SCSI command PDU, then the iSERLayerlayer at the target MUST send a Send Message containing the SCSI Response PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). * If the initiator Advertised a Read STag in the iSER Message containing the SCSI Command PDU, then the iSERLayerlayer at the target MUST send a Send Message containing the SCSI Response PDU. The header of the Send Message MUST carry the Read STag to be invalidated at the initiator. The Send with Invalidate Message, if supported by the RCaP layer (e.g., iWARP), can be used for the automatic invalidation of the STag. * If the initiator Advertised only the Write STag in the iSER Message containing the SCSI command PDU, then the iSERLayerlayer at the target MUST send a Send Message containing the SCSI Response PDU. The header of the Send Message MUST carry the Write STag to be invalidated at the initiator. The Send with Invalidate Message, if supported by the RCaP layer (e.g., iWARP), can be used for the automatic invalidation of the STag. When the iSCSILayerlayer at the target invokes the Send_Control Operational Primitive to send the SCSI Response PDU, the iSERLayerlayer at the target MUST invalidate the Remote Mapping before transferring the SCSI Response PDU to the initiator. Upon receiving a Send Message containing the SCSI Response PDU from the target, the iSER layer at the initiator MUST invalidate the STag(s) specified in the header. (If a Send with Invalidate Message is supported by the RCaP layer (e.g., iWARP) and is used to carry the SCSI Response PDU, the RCaP layer at the initiator will invalidate the STag. The iSERLayerlayer at the initiator MUST ensure that the correct STag is invalidated. If both the Read and the Write STags were Advertised earlier by the initiator, then the iSERLayerlayer at the initiator MUST explicitly invalidate the Write STag upon receiving the Send with Invalidate Message because the header of the Send with Invalidate Message can only carry one STag (in thiscasecase, the Read STag) to be invalidated.) The iSERLayerlayer at the initiator MUST ensure the invalidation of the STag(s) used in a command before notifying the iSCSILayerlayer at the initiator by invoking the Control_Notify Operational Primitive qualified with the SCSI Response. This precludes the possibility of using the STag(s) after the completion of thecommand thereby causingcommand; such use would cause data corruption. When the iSERLayerlayer at the initiator receives a Send Message containing the SCSI Response PDU, it SHOULD invalidate the Local Mapping. The iSERLayerlayer MUST ensure that all local STag(s) associated with the ITT are invalidated before notifying the iSCSILayerlayer of the SCSI Response PDU by invoking the Control_Notify Operational Primitive qualified with the SCSI Response PDU.7.3.37.3.3. Task Management Function Request/Response Type: control-type PDU PDU-specific qualifiers (for TMF Request): DataDescriptorOut, DataDescriptorIn The iSERLayerlayer MUST use a Send Message to send the Task Management Function Request/Response PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). For the Task Management Function Request with the TASK REASSIGN function, the iSERLayerlayer at the initiator MUST do the following: * It MUST use the ITT as specified in the Referenced Task Tag from the Task Management Function Request PDU to locate the existing STags (if any) in the Local Mappings. * It MUST invalidate the existing STags (if any) and the Local Mappings. * It MUST allocate a Read STag for the I/O Buffer and note the Base Offset associated with the I/O Buffer as defined by the qualifier DataDescriptorIn if the Send_Control Operational Primitive invocation is qualified with DataDescriptorIn. * It MUST allocate a Write STag for the I/O Buffer and note the BaseOIffsetOffset associated with the I/O Buffer as defined by the qualifier DataDescriptorOut if the Send_Control Operational Primitive invocation is qualified with DataDescriptorOut. * If STags are allocated, it MUST establish new Local Mapping(s) that associate the ITT to the allocated STag(s). * It MUST Advertise the STags and the Base Offsets, if allocated, to the target in the iSER header of the Send Message carrying the iSCSI PDU, as described insectionSection 9.2. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). For the Task Management Function Request with the TASK REASSIGN function for a SCSI Read or bidirectional command, the iSCSILayerlayer at the initiator MUST set ExpDataSN to0zero since the data transfer and acknowledgements happen transparently to the iSCSILayerlayer at the initiator. This provides the flexibility to the iSCSILayerlayer at the target to request transmission of only the unacknowledged data as specified in [iSCSI]. When the iSERLayerlayer at the target receives the Task Management Function Request with the TASK REASSIGN function, it MUST do the following: * It MUST use the ITT as specified in the Referenced Task Tag from the Task Management Function Request PDU to locate the Local and Remote Mappings (if any). * It MUST invalidate the localSTaqsSTags (if any) associated with the ITT. * It MUST replace the Base Offset(s) and the Advertised STag(s) in the Remote Mapping with the Base Offset(s) and the Advertised STag(s) in the iSER header. The Write STag is used in the handling of the R2T PDU(s) from the iSCSILayerlayer at the target as described insectionSection 7.3.6. The Read STag is used in the handling of the SCSIData-inData-In PDU(s) from the iSCSILayerlayer at the target as described insectionSection 7.3.5.7.3.47.3.4. SCSIData-outData-Out Type: control-type PDU PDU-specific qualifiers: DataDescriptorOut The iSCSILayerlayer at the initiator MUST invoke the Send_Control Operational Primitive qualified withDataDescriptorOutDataDescriptorOut, which defines the initiator's I/O Buffer containing unsolicited SCSI Write data. If the amount of unsolicited data to be transferred as SCSIData-outData-Out exceeds TargetRecvDataSegmentLength, then the iSCSILayerlayer at the initiator MUST segment the data into multiple iSCSI control-type PDUs,withwhere the DataSegmentLengthhavinghas the value of TargetRecvDataSegmentLength in allPDUsgenerated PDUs except the last one. The DataSegmentLength of the last iSCSI control-type PDU carrying the unsolicited data can be up to TargetRecvDataSegmentLength. The iSCSILayerlayer at the target MUST perform the reassembly function for the unsolicited data. For unsolicited data, the iSERLayerlayer at the initiator MUST use a Send Message to send the SCSIData-outData-Out PDU. If the F bit is set to 1, the SendSE Messageshoudshould be used if supported by the RCaP layer (e.g., iWARP). Note that for solicited data, the SCSIData-outData-Out PDUs are not used since R2T PDUs are not delivered to the iSCSI layer at the initiator;insteadinstead, R2T PDUs are transformed by the iSER layer at the target into RDMA Read operations. (SeesectionSection 7.3.6.)7.3.57.3.5. SCSIData-inData-In Type: data-type PDU PDU-specific qualifiers: DataDescriptorIn When the iSCSILayerlayer at the target is ready to return the SCSI Read data to the initiator, it MUST invoke the Put_Data Operational Primitive qualified withDataDescriptorInDataDescriptorIn, which defines the SCSIData-inData-In buffer. SeesectionSection 7.1 on the general requirement on the handling of iSCSI data-type PDUs. SCSIData-inData-In PDU(s) are used in SCSI Read data transfer as described insectionSection 9.5.2. The iSERLayerlayer at the target MUST do the following for each invocation of the Put_Data Operational Primitive: 1. It MUST use the ITT in the SCSIData-inData-In PDU to locate the remote Read STag and the Base Offset in the Remote Mapping. The Remote Mapping was established earlier by the iSERLayerlayer at the target when the SCSI Read Command was received from the initiator. 2. It MUST generate and send an RDMA Write Message containing the read data to the initiator. a. It MUST use the remote Read STag as the Data Sink STag of the RDMA Write Message. b. It MUST add the Buffer Offset from the SCSIData-inData-In PDU to the Base Offset from the Remote Mapping as the Data Sink Tagged Offset of the RDMA Write Message. c. It MUST use DataSegmentLength from the SCSIData-inData-In PDU to determine the amount of data to be sent in the RDMA Write Message. 3. It MUST associate the DataSN and ITT from the SCSIData-inData-In PDU with the RDMA Write operation. If the Put_Data Operational Primitive invocation was qualified with Notify_Enable set, then when the iSERLayerlayer at the target receives a completion from the RCaP layer for the RDMA Write Message, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer by invoking the Data_Completion_Notify Operational Primitive qualified with the DataSN and ITT. Conversely, if the Put_Data Operational Primitive invocation was qualified with Notify_Enable cleared, then the iSERLayerlayer at the target MUST NOT notify the iSCSILayerlayer on completion and MUST NOT invoke the Data_Completion_Notify Operational Primitive. When the A-bit is set to1one in the SCSIData-inData-In PDU, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target when the data transfer is complete at the initiator. To perform this additional function, the iSERLayerlayer at the target can take advantage of the operational ErrorRecoveryLevel if previously disclosed by the iSCSILayerlayer via an earlier invocation of the Notice_Key_Values Operational Primitive. There are two approaches that can be taken: 1. If the iSERLayerlayer at the target knows that the operational ErrorRecoveryLevel is 2, or if the iSERLayerlayer at the target does not know the operational ErrorRecoveryLevel, then the iSERLayerlayer at the target MUST issue a zero-length RDMA Read Request Message following the RDMA Write Message. When the iSERLayerlayer at the target receives a completion for the RDMA Read Request Message from the RCaP layer, implying that the RDMA-Capable Controller at the initiator has completed processing the RDMA Write Message due to the completion ordering semantics of RCaP, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target by invoking theData_Ack_NotifyData_ACK_Notify Operational Primitive qualified with ITT and DataSN (seesectionSection 3.2.3). 2. If the iSERLayerlayer at the target knows that the operational ErrorRecoveryLevel is 1, then the iSERLayerlayer at the target MUST do one of the following: a. It MUST notify the iSCSILayerlayer at the target by invoking theData_Ack_NotifyData_ACK_Notify Operational Primitive qualified with ITT and DataSN (seesectionSection 3.2.3) when it receives the local completion from the RCaP layer for the RDMA Write Message. This is allowed since digest errors do not occur in iSER (seesectionSection 10.1.4.2) and a CRC error will cause the connection to be terminated and the task to be terminated anyway. The local RDMA Write completion from the RCaP layer guarantees that the RCaP layer will not access the I/O Buffer again to transfer the data associated with that RDMA Write operation. b. Alternatively, it MUST use the same procedure for handling the data transfer completion at the initiator as for ErrorRecoveryLevel 2. It should be noted that the iSCSILayerlayer at the target cannot set the A-bit to 1 if the ErrorRecoveryLevel=0. SCSI status MUST always be returned in a separate SCSI Response PDU. The S bit in the SCSIData-inData-In PDU MUST always be set to0.zero. There MUST NOT be a "phase collapse" in the SCSIData-inData-In PDU. Since the RDMA Write Message only transfers the data portion of the SCSIData-inData-In PDU but not the control information in the header, such as ExpCmdSN, if timely updates of such informationisare crucial, the iSCSILayerlayer at the initiator MAY issue NOP-Out PDUs to request the iSCSILayerlayer at the target to respond with the information usingNOP- InNOP-In PDUs.7.3.67.3.6. Ready To Transfer (R2T) Type: data-type PDU PDU-specific qualifiers: DataDescriptorOut In order to send an R2T PDU, the iSCSILayerlayer at the target MUST invoke the Get_Data Operational Primitive qualified withDataDescriptorOutDataDescriptorOut, which defines the I/O Buffer for receiving the SCSI Write data from the initiator. SeesectionSection 7.1 on the general requirements on the handling of iSCSI data-type PDUs. The iSERLayerlayer at the target MUST do the following for each invocation of the Get_Data Operational Primitive: 1. It MUST ensure a valid local STag for the I/O Buffer and a valid Local Mapping. This may involve allocating a valid local STag and establishing a Local Mapping. 2. It MUST use the ITT in the R2T to locate the remote Write STag and the Base Offset in the Remote Mapping. The Remote Mapping was established earlier by the iSERLayerlayer at the target when the iSER Message containing the Advertised Write STag, the BaseOffsetOffset, and the SCSI Command PDU for a SCSI Write or bidirectional command was received from the initiator. 3. If the iSER-ORD value at the target is set to0,zero, the iSERLayerlayer at the target MUST terminate the connection and free up the resources associated with the connection (as described in Section 5.2.3) if it received the R2T PDU from the iSCSILayerlayer at the target. Upon termination of the connection, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target by invoking theConnection Terminate NotifyConnection_Terminate_Notify Operational Primitive. 4. If the iSER-ORD value at the target is set to greater than 0, the iSERLayerlayer at the target MUST transform the R2T PDU into an RDMA Read Request Message. While transforming the R2T PDU, the iSERLayerlayer at the target MUST ensure that the number of outstanding RDMA Read Request Messages does not exceed the iSER-ORD value. To transform the R2T PDU, the iSERLayerlayer at the target: a. MUST derive the local STag and local Tagged Offset from the DataDescriptorOut that qualified the Get_Data invocation. b. MUST use the local STag as the Data Sink STag of the RDMA Read Request Message. c. MUST use the local Tagged Offset as the Data Sink Tagged Offset of the RDMA Read Request Message. d. MUST use the Desired Data Transfer Length from the R2T PDU as the RDMA Read Message Size of the RDMA Read Request Message. e. MUST use the remote Write STag as the Data Source STag of the RDMA Read Request Message. f. MUST add the Buffer Offset from the R2T PDU to the Base Offset from the Remote Mapping as the Data Source Tagged Offset of the RDMA Read Request Message. 5. It MUST associate the R2TSN and ITT from the R2T PDU with the RDMA Read operation. If the Get_Data Operational Primitive invocation was qualified with Notify_Enable set, then when the iSERLayerlayer at the target receives a completion from the RCaP layer for the RDMA Read operation, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer by invoking the Data_Completion_Notify Operational Primitive qualified with the R2TSN and ITT. Conversely, if the Get_Data Operational Primitive invocation was qualified with Notify_Enable cleared, then the iSERLayerlayer at the target MUST NOT notify the iSCSILayerlayer on completion and MUST NOT invoke the Data_Completion_Notify Operational Primitive. When the RCaP layer at the initiator receives a valid RDMA Read Request Message, it will return an RDMA Read Response Message containing the solicited write data to the target. When the RCaP layer at the target receives the RDMA Read Response Message from the initiator, it will place the solicited data in the I/O Buffer referenced by the Data Sink STag in the RDMA Read Response Message. Since the RDMA Read Request Message from the target does not transfer the control information in the R2T PDU such as ExpCmdSN, if timely updates of such informationisare crucial, the iSCSILayerlayer at the initiator MAY issue NOP-Out PDUs to request the iSCSILayerlayer at the target to respond with the information using NOP-In PDUs. Similarly, since the RDMA Read Response Message from the initiator only transfers the data but not the control information normally found in the SCSIData-outData-Out PDU, such as ExpStatSN, if timely updates of such informationisare crucial, the iSCSILayerlayer at the target MAY issue NOP-In PDUs to request the iSCSILayerlayer at the initiator to respond with the information using NOP-Out PDUs.7.3.77.3.7. Asynchronous Message Type: control-type PDU PDU-specific qualifiers: DataDescriptorSense The iSCSILayerlayer MUST invoke the Send_Control Operational Primitive qualified withDataDescriptorSenseDataDescriptorSense, which defines the buffer containing the sense and iSCSI event information. The iSERLayerlayer MUST use a Send Message to send the Asynchronous Message PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP).7.3.87.3.8. Text Request&and Text Response Type: control-type PDU PDU-specific qualifiers: DataDescriptorTextOut (for Text Request), DataDescriptorIn (for Text Response) The iSCSILayerlayer MUST invoke the Send_Control Operational Primitive qualified with DataDescriptorTextOut (orDataDescriptorIn)DataDescriptorIn), which defines the Text Request (or Text Response) buffer. The iSERLayerlayer MUST use Send Messages to send the Text Request (or Text Response PDUs). The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP).7.3.97.3.9. Login Request&and Login Response During the login negotiation, the iSCSILayerlayer interacts with the transport layerdirectlydirectly, and the iSERLayerlayer is not involved. SeesectionSection 5.1 on iSCSI/iSER Connection Setup. If the underlying transport is TCP, the Login Request PDUs and the Login Response PDUs are exchanged when the connection between the initiator and the target is still in the byte stream mode. The iSCSILayerlayer MUST NOT send a Login Request (or a Login Response) PDU during thefull feature phase.Full Feature Phase. A Login Request (or a Login Response) PDU, if used, MUST be treated as an iSCSI protocol error. The iSERLayerlayer MAY reject such a PDU from the iSCSILayerlayer with an appropriate error code. If a Login Request PDU is received by the iSCSILayerlayer at the target, it MUST respond with a Reject PDU with a reason code of "protocol error".7.3.107.3.10. Logout Request&and Logout Response Type: control-type PDU PDU-specific qualifiers: None The iSERLayerlayer MUST use a Send Message to send the Logout Request or Logout Response PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP).SectionSections 5.2.1 and 5.2.2 describe the handling of the Logout Request and the Logout Response at the initiator and the target and the interactions between the initiator and the target to terminate a connection.7.3.117.3.11. SNACK Request Since HeaderDigest and DataDigest must be negotiated to "None", there are no digest errors when the connection is in iSER-assisted mode.AlsoAlso, since RCaP delivers all messages in the order they were sent, there are no sequence errors when the connection is iniSER- assistediSER-assisted mode.ThereforeTherefore, the iSCSILayerlayer MUST NOT send SNACK Request PDUs. A SNACK Request PDU, if used, MUST be treated as an iSCSI protocol error. The iSERLayerlayer MAY reject such a PDU from the iSCSILayerlayer with an appropriate error code. If a SNACK Request PDU is received by the iSCSILayerlayer at the target, it MUST respond with a Reject PDU with a reason code of "protocol error".7.3.127.3.12. Reject Type: control-type PDU PDU-specific qualifiers: DataDescriptorReject The iSCSILayerlayer MUST invoke the Send_Control Operational Primitive qualified withDataDescriptorRejectDataDescriptorReject, which defines the Reject buffer. The iSERLayerlayer MUST use a Send Message to send the Reject PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP).7.3.137.3.13. NOP-Out&and NOP-In Type: control-type PDU PDU-specific qualifiers: DataDescriptorNOPOut (for NOP-Out), DataDescriptorNOPIn (for NOP-In) The iSCSILayerlayer MUST invoke the Send_Control Operational Primitive qualified with DataDescriptorNOPOut (orDataDescriptorNOPIn)DataDescriptorNOPIn), which defines the Ping (or Return Ping) data buffer. The iSERLayerlayer MUST use Send Messages to send the NOP-Out (or NOP-In) PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP).88. Flow Control and STag Management8.18.1. Flow Control for RDMA Send Messages Send Messages in RCaP are used by the iSERLayerlayer to transfer iSCSI control-type PDUs. Each Send Message in RCaP consumes an Untagged Buffer at the Data Sink. However, neither the RCaP layer nor the iSERLayerlayer provides an explicit flow control mechanism for the Send Messages. Therefore, the iSERLayerlayer SHOULD provision enough Untagged buffers for handling incoming Send Messages to prevent buffer exhaustion at the RCaP layer. If buffer exhaustion occurs, it may result in the termination of the connection. An implementation may choose to satisfy the buffer requirement by using a common buffer pool shared across multiple connections, with usage limits on aper connectionper-connection basis and usage limits on the buffer pool itself. In such an implementation, exceeding the buffer usage limit for a connection or the buffer pool itself may trigger interventions from the iSERLayerlayer to replenish the buffer pool and/or to isolate the connection causing the problem. iSER also provides the MaxOutstandingUnexpectedPDUs key to be used by the initiator and the target to declare the maximum number of outstanding "unexpected" control-type PDUs that it can receive. It is intended to allow the receiving side to determine the amount of buffer resources needed beyond the normal flow control mechanism available in iSCSI. The buffer resources required at both the initiator and the target as a result of control-type PDUs sent by the initiatorisare described insectionSection 8.1.1. The buffer resources required at both the initiator and target as a result of control-type PDUs sent by the targetisare described insectionSection 8.1.2.8.1.18.1.1. Flow Control for Control-Type PDUs from the Initiator The control-type PDUs that can be sent by an initiator to a target can be grouped into the following categories: 1. Regulated: Control-type PDUs in this category are regulated by the iSCSI CmdSN windowmechanismmechanism, and the immediate flag is not set. 2. Unregulated but Expected: Control-type PDUs in this category are not regulated by the iSCSI CmdSN window mechanism but are expected by the target. 3. Unregulated and Unexpected: Control-type PDUs in this category are not regulated by the iSCSI CmdSN window mechanism and are "unexpected" by the target.8.1.1.18.1.1.1. Control-Type PDUs from the Initiator in the Regulated Category Control-type PDUs that can be sent by the initiator in this category are regulated by the iSCSI CmdSN windowmechanismmechanism, and the immediate flag is not set. The queuing capacity required of the iSCSI layer at the target is described insectionSection 4.2.2.1 of [iSCSI]. For each of the control- type PDUs that can be sent by the initiator in this category, the initiator MUST provision for the buffer resources required for the corresponding control-type PDU sent as a response from the target. The following is a list of the PDUs that can be sent by the initiator and the PDUs that are sent by the target in response: a. When an initiator sends a SCSI Command PDU, it expects a SCSI Response PDU from the target. b. When the initiator sends a Task Management Function Request PDU, it expects a Task Management Function Response PDU from the target. c. When the initiator sends a Text Request PDU, it expects a Text Response PDU from the target. d. When the initiator sends a Logout Request PDU, it expects a Logout Response PDU from the target. e. When the initiator sends a NOP-Out PDU as a ping request with ITT != 0xffffffff and TTT = 0xffffffff, it expects a NOP-In PDU from the target with the same ITT and TTT as in the ping request. The response from the target for any of the PDUs enumerated here may alternatively be in the form of a Reject PDU sentinsteadbefore the task is active, as described insectionSection 7.3 of [iSCSI].8.1.1.28.1.1.2. Control-Type PDUs from the Initiator in the Unregulated but Expected Category For the control-type PDUs in the Unregulated but Expected category, the amount of buffering resources required at the target can be predetermined. The following is a list of the PDUs in this category: a. SCSIData-outData-Out PDUs are used by the initiator to send unsolicited data. The amount of buffer resources required by the target can be determined using FirstBurstLength. Note that SCSIData-outData-Out PDUs are not used for solicited data since the R2TPDUPDU, which is used forsolicitationsolicitation, is transformed into RDMA Read operations by the iSER layer at the target. SeesectionSection 7.3.4. b. A NOP-Out PDU with TTT != 0xffffffff is sent as a ping response by the initiator to the NOP-In PDU sent as a ping request by the target.8.1.1.38.1.1.3. Control-Type PDUs from the Initiator in the Unregulated and Unexpected Category PDUs in the Unregulated and Unexpected category are PDUs with the immediate flag set. The number of PDUs that are in this categorywhichand can be sent by an initiator is controlled by the value of MaxOutstandingUnexpectedPDUs declared by the target. (SeesectionSection 6.7.) After a PDU in this category is sent by the initiator, it is outstanding until it is retired. At any time, the number of outstanding unexpected PDUs MUST NOT exceed the value of MaxOutstandingUnexpectedPDUs declared by the target. The target uses the value of MaxOutstandingUnexpectedPDUs that it declared to determine the amount of buffer resources required for control-type PDUs in this category that can be sent by an initiator. For the initiator, for each of the control-type PDUs that can be sent in this category, the initiator MUST provision for the buffer resources if required for the corresponding control-type PDU that can be sent as a response from the target. An outstanding PDU in this category is retired as follows. If the CmdSN of the PDU sent by the initiator in this category is x, the PDU is outstanding until the initiator sends a non-immediate control-type PDU on the same connection with CmdSN = y (where y is at least x) and the target responds with a control-type PDU on any connection where ExpCmdSN is at least y+1. When the number of outstanding unexpected control-type PDUs equals MaxOutstandingUnexpectedPDUs, the iSCSILayerlayer at the initiator MUST NOT generate any unexpectedPDUsPDUs, which otherwise it would have generated, even ifitthe unexpected PDU is intended for immediate delivery.8.1.28.1.2. Flow Control for Control-Type PDUs from the Target Control-type PDUs that can be sent by a target and are expected by the initiator are listed in the Regulated category. (SeesectionSection 8.1.1.1.) For the control-type PDUs that can be sent by a target and are unexpected by the initiator, the number is controlled by MaxOutstandingUnexpectedPDUs declared by the initiator. (SeesectionSection 6.7.) After a PDU in this category is sent by a target, it is outstanding until it is retired. At any time, the number of outstanding unexpected PDUs MUST NOT exceed the value of MaxOutstandingUnexpectedPDUs declared by the initiator. The initiator uses the value of MaxOutstandingUnexpectedPDUs that it declared to determine the amount of buffer resources required for control-type PDUs in this category that can be sent by a target. The following is a list of the PDUs in this category and the conditions for retiring the outstanding PDU: a. For an Asynchronous Message PDU with StatSN = x, the PDU is outstanding until the initiator sends a control-type PDU with ExpStatSN set to at least x+1. b. For a Reject PDU with StatSN =xx, which is sent after a task is active, the PDU is outstanding until the initiator sends a control-type PDU with ExpStatSN set to at least x+1. c. For a NOP-In PDU with ITT = 0xffffffff and StatSN = x, the PDU is outstanding until the initiator responds with a control-type PDU on the same connection where ExpStatSN is at least x+1. But if the NOP-In PDU is sent as a ping request with TTT != 0xffffffff, the PDU can also be retired when the initiator sends a NOP-Out PDU with the same ITT and TTT as in the ping request. Note that when a target sends a NOP-In PDU as a ping request, it must provision a buffer for the NOP-Out PDU sent as a ping response from the initiator. When the number of outstanding unexpected control-type PDUs equals MaxOutstandingUnexpectedPDUs, the iSCSILayerlayer at the target MUST NOT generate any unexpectedPDUsPDUs, which otherwise it would have generated, even if its intent is to indicate an iSCSI error condition (e.g., Asynchronous Message, Reject). Tasktimeoutstimeouts, as in theinitiatorinitiator's waiting for a command completion or other connection andsession level exceptionssession-level exceptions, will ensure that correct operational behavior will result in these cases despite not generating the PDU. This rule overrides any other requirements elsewherewhichthat require that a Reject PDU MUST be sent. (Implementation note: SCSI task timeout and recovery can be a lengthy process and hence SHOULD be avoided by proper provisioning of resources.) (Implementation note: To ensure that the initiator has a means to inform the target that outstanding PDUs have been retired, the target should reserve the last unexpected control-type PDU allowable by the value of MaxOutstandingUnexpectedPDUs declared by the initiator for sending a NOP-In ping request with TTT != 0xffffffff to allow the initiator to return the NOP-Out ping response with the current ExpStatSN.)8.28.2. Flow Control for RDMA Read Resources If iSERHelloRequired is negotiated to "Yes", then the total number of RDMA Read operations that can be active simultaneously on an iSCSI/iSER connection depends on the amount of resources allocated as declared in the iSER Hello exchange described insectionSection 5.1.3. Exceeding the number of RDMA Read operations allowed on a connection will result in the connection being terminated by the RCaP layer. The iSERLayerlayer at the target maintains the iSER-ORD to keep track of the maximum number of RDMA Read Requests that can be issued by the iSERLayerlayer on a particular RCaP Stream. During connection setup (seesectionSection 5.1), iSER-IRD is known at the initiator and iSER-ORD is known at the target after the iSERLayerslayers at the initiator and the target have respectively allocated the connection resources necessary to support RCaP, as directed by the Allocate_Connection_Resources Operational Primitive from the iSCSILayerlayer before the end of the iSCSI Login Phase. In thefull feature phase,Full Feature Phase, if iSERHelloRequired isngtiatednegotiated to "Yes", then the first message sent by the initiator is the iSER Hello Message (seesection 9.3)Section 9.3), which contains the value of iSER-IRD. In response to the iSER Hello Message, the target sends the iSER HelloReply Message (seesection 9.4)Section 9.4), which contains the value of iSER-ORD. The iSERLayerlayer at both the initiator and the target MAY adjust (lower) the resources associated with iSER-IRD andiSER-ORD respectivelyiSER-ORD, respectively, to match the iSER-ORD value declared in the HelloReply Message. The iSERLayerlayer at the target MUSTflowcontrol the flow of the RDMA Read Request Messagestoso that it does not exceed the iSER-ORD value at the target. If iSERHelloRequired is negotiated to "No", then the maximum number of RDMA Read operations that can be active is negotiated via other means outside the scope of this document. For example, in InfiniBand, iSER connection setup uses InfiniBandCM MADs,Connection Manager (CM) Management Datagrams (MADs), with additional iSER information exchanged in the private data.8.38.3. STag Management An STag is an identifier of a Tagged Buffer used in an RDMA operation.The allocation and the subsequent invalidation of the STags are specified in this document ifIf the STags are exposed on the wire by being Advertised in the iSER header or declared in the header of an RCaPMessage. 8.3.1Message, then the allocation and the subsequent invalidation of the STags are as specified in this document. 8.3.1. Allocation of STags When the iSCSILayerlayer at the initiator invokes the Send_Control Operational Primitive to request the iSERLayerlayer at the initiator to process a SCSI Command, zero, one, or two STags may be allocated by the iSERLayer.layer. SeesectionSection 7.3.1 for details. The number of STags allocated depends on whether the command is unidirectional or bidirectional and whether or not solicited write data transfer isinvolved or not.involved. When the iSCSILayerlayer at the initiator invokes the Send_Control Operational Primitive to request the iSERLayerlayer at the initiator to process a Task Management Function Request with the TASK REASSIGN function, besides allocating zero, one, or two STags, the iSERLayerlayer MUST invalidate the existing STags (if any) associated with the ITT. SeesectionSection 7.3.3 for details. The iSERLayerlayer at the target allocates a local Data Sink STag when the iSCSILayerlayer at the target invokes the Get_Data Operational Primitive to request the iSERLayerlayer to process an R2T PDU. SeesectionSection 7.3.6 for details.8.3.28.3.2. Invalidation of STags The invalidation of the STags at the initiator at the completion of a unidirectional or bidirectional command when the associated SCSI Response PDU is sent by the target is described insectionSection 7.3.2. When a unidirectional or bidirectional command concludes without the associated SCSI Response PDU being sent by the target, the iSCSILayerlayer at the initiator MUST request the iSERLayerlayer at the initiator to invalidate the STags by invoking the Deallocate_Task_Resources Operational Primitive qualified with ITT. In response, the iSERLayerlayer at the initiator MUST locate the STags (if any) in the Local Mapping. The iSERLayerlayer at the initiator MUST invalidate the STags (if any) and the Local Mapping. For an RDMA Read operation used to realize a SCSI Write data transfer, the iSERLayerlayer at the target SHOULD invalidate the Data Sink STag at the conclusion of the RDMA Read operation referencing the Data Sink STag (to permit the immediate reuse of buffer resources). For an RDMA Write operation used to realize a SCSI Read data transfer, the Data Source STag at the target is not declared to the initiator and is not exposed on the wire. Invalidation of the STag is thus not specified. When a unidirectional or bidirectional command concludes without the associated SCSI Response PDU being sent by the target, the iSCSILayerlayer at the target MUST request the iSERLayerlayer at the target to invalidate the STags by invoking the Deallocate_Task_Resources Operational Primitive qualified with ITT. In response, the iSERLayerlayer at the target MUST locate the local STags (if any) in the Local Mapping. The iSERLayerlayer at the target MUST invalidate the local STags (if any) and the Local Mapping.99. iSER Control and Data Transfer For iSCSI data-type PDUs (seesectionSection 7.1), the iSERLayerlayer uses RDMA Read and RDMA Write operations to transfer the solicited data. For iSCSI control-type PDUs (seesectionSection 7.2), the iSERLayerlayer uses Send Messages of RCaP.9.19.1. iSER Header Format An iSER header MUST be present in every Send Message of RCaP. The iSER header is located in the first 28 bytes of the message payload of the Send Message of RCaP, as shown in Figure 2. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opcode| Opcode Specific Fields | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opcode Specific Fields (32 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Opcode Specific Fields (64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opcode Specific Fields (32 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Opcode Specific Fields (64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure22: iSER Header Format Opcode - Operation Code: 4 bits The Opcode field identifies the type of iSER Messages: 0001b = iSCSI control-type PDU 0010b = iSER Hello Message 0011b = iSER HelloReply Message All otheropcodesOpcodes arereserved. 9.2unassigned. 9.2. iSER Header Format for iSCSI Control-Type PDU The iSERLayerlayer uses Send Messages of RCaP to transfer iSCSI control- type PDUs (seesectionSection 7.2). The message payload of each of the Send Messages of RCaP used for transferring an iSER Message contains an iSER Header followed by an iSCSI control-type PDU. The iSER header in a Send Message of RCaP carrying an iSCSI control- type PDU MUST have the format as described in Figure 3. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |W|R| | | 0001b |S|S| Reserved | | |V|V| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Write STag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Write Base Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Read STag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Read Base Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure33: iSER Header Format for iSCSI Control-Type PDU WSV - Write STag Valid flag: 1 bit This flag indicates the validity of the Write STag field and the Write Base Offset field of the iSER Header. If set to one, the Write STag field and the Write Base Offset field in this iSER Header are valid. If set to zero, the Write STag field and the Write Base Offset field in this iSER Header MUST be ignored at the receiver. The Write STag Valid flag is set to one when there is solicited data to be transferred for a SCSI Write or bidirectional command, or when there are non-immediate unsolicited and solicited data to be transferred for the referenced task specified in a Task Management Function Request with the TASK REASSIGN function. RSV - Read STag Valid flag: 1 bit This flag indicates the validity of the Read STag field and the Read Base Offset field of the iSER Header. If set to one, the Read STag field and the Read Base Offset field in this iSER Headerisare valid. If set to zero, the Read STag field and the Read Base Offset field in this iSER Header MUST be ignored at the receiver. The Read STag Valid flag is set to one for a SCSI Read or bidirectional command, or a Task Management Function Request with the TASK REASSIGN function. Write STag - Write Steering Tag: 32 bits This field contains the Write STag when the Write STag Valid flag is set to one. For a SCSI Write or bidirectional command, the Write STag is used to Advertise the initiator's I/O Buffer containing the solicited data. For a Task Management Function Request with the TASK REASSIGN function, the Write STag is used to Advertise the initiator's I/O Buffer containing thenon- immediatenon-immediate unsolicited data and solicited data. This Write STag is used as the Data Source STag in the resultant RDMA Read operation(s). When the Write STag Valid flag is set to zero, this field MUST be set to zero and ignored on receive. Write Base Offset: 64 bits This field contains the Base Offset associated with the I/O Buffer for the SCSI Write command when the Write STag Valid flag is set to one. When the Write STag Valid flag is set to zero, this field MUST be set to zero and ignored on receive. Read STag - Read Steering Tag: 32 bits This field contains the Read STag when the Read STag Valid flag is set to one. The Read STag is used to Advertise the initiator's Read I/O Buffer of a SCSI Read or bidirectional command, or a Task Management Function Request with the TASK REASSIGN function. This Read STag is used as the Data Sink STag in the resultant RDMA Write operation(s). When the Read STag Valid flag is zero, this field MUST be set to zero and ignored on receive. Read Base Offset: 64 bits This field contains the Base Offset associated with the I/O Buffer for the SCSI Read command when the Read STag Valid flag is set to one. When the Read STag Valid flag is set to zero, this field MUST be set to zero and ignored on receive. Reserved: Reserved fields MUST be set to zero on transmit and MUST be ignored on receive.9.39.3. iSER Header Format for iSER Hello Message An iSER Hello Message MUST only contain the iSERheaderheader, which MUST have the format as described in Figure 4. If iSERHelloRequired is negotiated to "Yes", then iSER Hello Message is the first iSER Message sent on the RCaP Stream from the iSERLayerlayer at the initiator to the iSERLayerlayer at the target. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | 0010b | Rsvd | MaxVer| MinVer| iSER-IRD | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure44: iSER Header Format for iSER Hello Message MaxVer - Maximum Version: 4 bits This field specifies the maximum version of the iSER protocol supported. It MUST be set to 10 to indicate the version of the specification described in this document. MinVer - Minimum Version: 4 bits This field specifies the minimum version of the iSER protocol supported. It MUST be set to 10 to indicate the version of the specification described in this document. iSER-IRD: 16 bits This field contains the value of the iSER-IRD at the initiator. Reserved (Rsvd): Reserved fields MUST be set to zero ontransmit,transmit and MUST be ignored on receive.9.49.4. iSER Header Format for iSER HelloReply Message An iSER HelloReply Message MUST only contain the iSERheaderheader, which MUST have the format as described in Figure 5. If iSERHelloRequired is negotiated to "Yes", then the iSER HelloReply Message is the first iSER Message sent on the RCaP Stream from the iSERLayerlayer at the target to the iSERLayerlayer at the initiator. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | |R| | | | | 0011b |Rsvd |E| MaxVer| CurVer| iSER-ORD | | | |J| | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure55: iSER Header Format for iSER HelloReply Message REJ - Reject flag: 1 bit This flag indicates whether the target is rejecting this connection. If set to one, the target is rejecting the connection. MaxVer - Maximum Version: 4 bits This field specifies the maximum version of the iSER protocol supported. It MUST be set to 10 to indicate the version of the specification described in this document. CurVer - Current Version: 4 bits This field specifies the current version of the iSER protocol supported. It MUST be set to 10 to indicate the version of the specification described in this document. iSER-ORD: 16 bits This field contains the value of the iSER-ORD at the target. Reserved (Rsvd): Reserved fields MUST be set to zero ontransmit,transmit and MUST be ignored on receive.9.59.5. SCSI Data Transfer Operations The iSERLayerlayer at the initiator and the iSERLayerlayer at the target handle each SCSI Write, SCSI Read, and bidirectional operation as described below.9.5.19.5.1. SCSI Write Operation The iSCSILayerlayer at the initiator MUST invoke the Send_Control Operational Primitive to request the iSERLayerlayer at the initiator to send the SCSI Write Command. The iSERLayerlayer at the initiator MUST request the RCaP layer to transmit a Send Message with the message payload consisting of the iSER header followed by the SCSI Command PDU and immediate data (if any). The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). If there is solicited data, the iSERLayerlayer MUST Advertise the Write STag and the Base Offset in the iSER header of the Send Message, as described insectionSection 9.2. Upon receiving the Send Message, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target by invoking the Control_Notify Operational Primitive qualified with the SCSI Command PDU. SeesectionSection 7.3.1 for details on the handling of the SCSI Write Command. For the non-immediate unsolicited data, the iSCSILayerlayer at the initiator MUST invoke a Send_Control Operational Primitive qualified with the SCSIData-outData-Out PDU. Upon receiving each Send Message containing the non-immediate unsolicited data, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target by invoking the Control_Notify Operational Primitive qualified with the SCSIData- outData-Out PDU. SeesectionSection 7.3.4 for details on the handling of the SCSIData-outData- Out PDU. For the solicited data, when the iSCSILayerlayer at the target has an I/O Buffer available, it MUST invoke the Get_Data Operational Primitive qualified with the R2T PDU. SeesectionSection 7.3.6 for details on the handling of the R2T PDU. When the data transfer associated with this SCSI Write operation is complete, the iSCSILayerlayer at the target MUST invoke the Send_Control Operational Primitive when it is ready to send the SCSI Response PDU. Upon receiving a Send Message containing the SCSI Response PDU, the iSERLayerlayer at the initiator MUST notify the iSCSILayerlayer at the initiator by invoking the Control_Notify Operational Primitive qualified with the SCSI Response PDU. SeesectionSection 7.3.2 for details on the handling of the SCSI Response PDU.9.5.29.5.2. SCSI Read Operation The iSCSILayerlayer at the initiator MUST invoke the Send_Control Operational Primitive to request the iSERLayerlayer at the initiator to send the SCSI Read Command. The iSERLayerlayer at the initiator MUST request the RCaP layer to transmit a Send Message with the message payload consisting of the iSER header followed by the SCSI Command PDU. The SendSE Message should be used if supported by the RCaP layer (e.g., iWARP). The iSERLayerlayer at the initiator MUST Advertise the Read STag and the Base Offset in the iSER header of the Send Message, as described insectionSection 9.2. Upon receiving the Send Message, the iSERLayerlayer at the target MUST notify the iSCSILayerlayer at the target by invoking the Control_Notify Operational Primitive qualified with the SCSI Command PDU. SeesectionSection 7.3.1 for details on the handling of the SCSI Read Command. When the requested SCSI data is available in the I/O Buffer, the iSCSILayerlayer at the target MUST invoke the Put_Data Operational Primitive qualified with the SCSIData-inData-In PDU. SeesectionSection 7.3.5 for details on the handling of the SCSIData-inData-In PDU. When the data transfer associated with this SCSI Read operation is complete, the iSCSILayerlayer at the target MUST invoke the Send_Control Operational Primitive when it is ready to send the SCSI Response PDU. The SendInvSE Message should be used if supported by the RCaP layer (e.g., iWARP). Upon receiving the Send Message containing the SCSI Response PDU, the iSERLayerlayer at the initiator MUST notify the iSCSILayerlayer at the initiator by invoking the Control_Notify Operational Primitive qualified with the SCSI Response PDU. SeesectionSection 7.3.2 for details on the handling of the SCSI Response PDU.9.5.39.5.3. Bidirectional Operation The initiator and the target handle the SCSI Write and the SCSI Read portions of this bidirectional operation the same as described inSectionSections 9.5.1 andSection 9.5.29.5.2, respectively.1010. iSER Error Handling and Recovery RCaP provides the iSERLayerlayer with reliable in-order delivery. Therefore, the error management needs of an iSER-assisted connection are somewhat different than those of a Traditional iSCSI connection.10.110.1. Error Handling iSER error handling is described in the following sections, classified loosely based on the sources of errors: 1. Those originating at the transport layer (e.g., TCP). 2. Those originating at the RCaP layer. 3. Those originating at the iSERLayer.layer. 4. Those originating at the iSCSILayer. 10.1.1layer. 10.1.1. Errors in the Transport Layer If the transport layer is TCP, then TCP packets with detected errors are silently dropped by the TCP layer and result in retransmission at the TCP layer. This has no impact on the iSERLayer.layer. However, connection loss (e.g., link failure) and unexpected termination (e.g., TCP graceful or abnormal close without the iSCSI Logout exchanges) at the transport layer will cause the iSCSI/iSER connection to be terminated as well.10.1.1.110.1.1.1. Failure in the Transport Layer Before RCaP Mode is Enabled If theConnectionconnection is lost or terminated before the iSCSILayerlayer invokes the Allocate_Connection_Resources Operational Primitive, the login process is terminated and no further action is required. If theConnectionconnection is lost or terminated after the iSCSILayerlayer has invoked the Allocate_Connection_Resources Operational Primitive, then the iSCSILayerlayer MUST request the iSERLayerlayer to deallocate all connection resources by invoking the Deallocate_Connection_Resources Operational Primitive.10.1.1.210.1.1.2. Failure in the Transport Layer After RCaP Mode is Enabled If theConnectionconnection is lost or terminated after the iSCSILayerlayer has invoked the Enable_Datamover Operational Primitive, the iSERLayerlayer MUST notify the iSCSILayerlayer of the connection loss by invoking the Connection_Terminate_Notify Operational Primitive. Prior to invoking the Connection_Terminate_Notify Operational Primitive, the iSER layer MUST perform the actions described in Section 5.2.3.2.10.1.210.1.2. Errors in the RCaP Layer The RCaP layer does not have error recovery operations built in. If errors are detected at the RCaP layer, the RCaP layer will terminate the RCaP Stream and the associatedConnection. 10.1.2.1connection. 10.1.2.1. Errors Detected in the Local RCaP Layer If an error is encountered at the local RCaP layer, the RCaP layer MAY send a Send Message to the Remote Peer to report the error if possible. (For iWARP, see [RDMAP] for the list of errors where a Terminate Message is sent.) The RCaP layer is responsible for terminating theConnection.connection. After the RCaP layer notifies the iSERLayerlayer that theConnectionconnection is terminated, the iSERLayerlayer MUST notify the iSCSILayerlayer by invoking the Connection_Terminate_Notify Operational Primitive. Prior to invoking theConnection Terminate NotifyConnection_Terminate_Notify Operational Primitive, the iSER layer MUST perform the actions described in Section 5.2.3.2.10.1.2.210.1.2.2. Errors Detected in the RCaP Layer at the Remote Peer If an error is encountered at the RCaP layer at the Remote Peer, the RCaP layer at the Remote Peer may send a Send Message to report the error if possible. If it is unable to send a Send Message, theConnectionconnection is terminated. This is treated the same as a failure in the transport layer after RDMA isenabledenabled, as described insectionSection 10.1.1.2. If an error is encountered at the RCaP layer at the Remote Peer and it is able to send a Send Message, the RCaP layer at the Remote Peer is responsible for terminating the connection. After the local RCaP layer notifies the iSERLayerlayer that theConnectionconnection is terminated, the iSERLayerlayer MUST notify the iSCSILayerlayer by invoking theConnection Terminate NotifyConnection_Terminate_Notify Operational Primitive. Prior to invoking the Connection_Terminate_Notify Operational Primitive, the iSER layer MUST perform the actions described in Section 5.2.3.2.10.1.310.1.3. Errors in the iSER Layer The error handling due to errors at the iSERLayerlayer is described in the following sections.10.1.3.110.1.3.1. Insufficient Connection Resources to Support RCaP at Connection Setup After the iSCSILayerlayer at the initiator invokes the Allocate_Connection_Resources Operational Primitive during the iSCSI login negotiation phase, if the iSERLayerlayer at the initiator fails to allocate the connection resources necessary to support RCaP, it MUST return a status of failure to the iSCSILayerlayer at the initiator. The iSCSILayerlayer at the initiator MUST terminate theConnectionconnection as described in Section 5.2.3.1. After the iSCSILayerlayer at the target invokes the Allocate_Connection_Resources Operational Primitive during the iSCSI login negotiation phase, if the iSERLayerlayer at the target fails to allocate the connection resources necessary to support RCaP, it MUST return a status of failure to the iSCSILayerlayer at the target. The iSCSILayerlayer at the target MUST send a Login Response with astatus classStatus- Class of30x03 (Target Error), and astatus codeStatus-Code of"0302"0x02 (Out of Resources). The iSCSILayerslayers at the initiator and the target MUST terminate theConnectionconnection as described in Section 5.2.3.1.10.1.3.210.1.3.2. iSER Negotiation Failures If iSERHelloRequired is negotiated to "Yes" and the RCaP or iSER related parameters declared by the initiator in the iSER Hello Messageisare unacceptable to the iSERLayerlayer at the target, the iSERLayerlayer at the target MUST set the Reject (REJ) flag, as described insectionSection 9.4, in the iSER HelloReply Message. The following are the cases when the iSERLayerlayer MUST set the REJ flag to 1 in the HelloReply Message: * The initiator-declared iSER-IRD value is greater than00, and the target-declared iSER-ORD value is 0. * The initiator-supported and the target-supported iSER protocol versions do not overlap. After requesting the RCaP layer to send the iSER HelloReply Message, the handling of the error situation is the same as that for iSER format errors as described insectionSection 10.1.3.3. 10.1.3.3.10.1.3.3iSER Format Errors The following types of errors in an iSER header are considered format errors: * Illegal contents of any iSER header field * Inconsistent field contents in an iSER header * Length error for an iSER Hello or HelloReply Message (seesectionSections 9.3 and 9.4) When a format error is detected, the following events MUST occur in the specified sequence: 1. The iSERLayerlayer MUST request the RCaP layer to terminate the RCaP Stream. The RCaP layer MUST terminate the associatedConnection.connection. 2. The iSERLayerlayer MUST notify the iSCSILayerlayer of the connection termination by invoking the Connection_Terminate_Notify Operational Primitive. Prior to invoking the Connection_Terminate_Notify Operational Primitive, the iSER layer MUST perform the actions described in Section 5.2.3.2.10.1.3.410.1.3.4. iSER Protocol Errors If iSERHelloRequired is negotiated to "Yes", then the first iSER Message sent by the iSERLayerlayer at the initiator MUST be the iSER Hello Message (seesectionSection 9.3). In this case the first iSER Message sent by the iSERLayerlayer at the target MUST be the iSER HelloReply Message (seesectionSection 9.4). Failure to send the iSER Hello or HelloReply Message, as indicated by the wrong Opcode in the iSER header, is a protocol error. Conversely, if the iSER Hello Message is sent by the iSERLayerlayer at the initiator when iSERHelloRequired is negotiated to "No", the iSERLayerlayer at the target MAY treat this as a protocol error or respond with an iSER HelloReply Message. The handling of iSER protocol errors is the same as that for iSER format errors as described insectionSection 10.1.3.3. If the sending side of an iSER-enabled connection acts in a manner not permitted by the negotiated or declared login/text operational key values as described insectionSection 6, this is a protocol error and the receiving side MAY handle this the same as for iSER format errors as described insectionSection 10.1.3.3.10.1.410.1.4. Errors in the iSCSI Layer The error handling due to errors at the iSCSILayerlayer is described in the following sections. For error recovery, seesectionSection 10.2.10.1.4.110.1.4.1. iSCSI Format Errors When an iSCSI format error is detected, the iSCSILayerlayer MUST request the iSERLayerlayer to terminate the RCaP Stream by invoking the Connection_Terminate Operational Primitive. For more details ontheconnection termination, see Section 5.2.3.1.10.1.4.210.1.4.2. iSCSI Digest Errors In the iSER-assisted mode, the iSCSILayerlayer will not see any digest error because both the HeaderDigest and the DataDigest keys are negotiated to "None".10.1.4.310.1.4.3. iSCSI Sequence Errors For Traditional iSCSI, sequence errors are caused by dropped PDUs due to header or data digest errors. Since digests are not used iniSER-assistediSER- assisted mode and the RCaP layer will deliver all messages in the order they were sent, sequence errors will not occur iniSER- assistediSER-assisted mode.10.1.4.410.1.4.4. iSCSI Protocol Error When the iSCSILayerlayer handles certain protocol errors by dropping the connection, the error handling is the same as that for iSCSI format errors as described insectionSection 10.1.4.1. When the iSCSILayerlayer uses the iSCSI Reject PDU and response codes to handle certain other protocol errors, no special handling at the iSERLayerlayer is required.10.1.4.510.1.4.5. SCSI Timeouts and Session Errors This is handled at the iSCSILayerlayer, and no special handling at the iSERLayerlayer is required.10.1.4.610.1.4.6. iSCSI Negotiation Failures For negotiation failures that happen during the Login Phase at the initiator after the iSCSILayerlayer has invoked the Allocate_Connection_Resources Operational Primitive and before the Enable_Datamover Operational Primitive has been invoked, the iSCSILayerlayer MUST request the iSERLayerlayer to deallocate all connection resources by invoking the Deallocate_Connection_Resources Operational Primitive. The iSCSILayerlayer at the initiator MUST terminate theConnection.connection. For negotiation failures during the Login Phase at the target, the iSCSILayerlayer can use a Login Response with astatus classStatus-Class other than 0 (success) to terminate the Login Phase. If the iSCSILayerlayer has invoked the Allocate_Connection_Resources Operational Primitive andbeforehas not yet invoked the Enable_Datamover OperationalPrimitive has been invoked,Primitive, the iSCSILayerlayer at the target MUST request the iSERLayerlayer at the target to deallocate all connection resources by invoking the Deallocate_Connection_Resources Operational Primitive. The iSCSILayerlayer at both the initiator and the target MUST terminate theConnection.connection. During the iSCSI Login Phase, if the iSCSILayerlayer at the initiator receives a Login Response from the target with astatus classStatus-Class other than 0 (Success) after the iSCSILayerlayer at the initiator has invoked the Allocate_Connection_Resources Operational Primitive, the iSCSILayerlayer MUST request the iSERLayerlayer to deallocate all connection resources by invoking the Deallocate_Connection_Resources Operational Primitive. The iSCSILayerlayer MUST terminate theConnectionconnection in this case. For negotiation failures during thefull feature phase,Full Feature Phase, the error handling is left to the iSCSILayerlayer and no special handling at the iSERLayerlayer is required.10.210.2. Error Recovery Error recovery requirements of iSCSI/iSER are the same as that of Traditional iSCSI. All three ErrorRecoveryLevels as defined in [iSCSI] are supported in iSCSI/iSER. * For ErrorRecoveryLevel 0, session recovery is handled by iSCSI and no special handling by the iSERLayerlayer is required. * For ErrorRecoveryLevel 1, seesectionSection 10.2.1 on PDU Recovery. * For ErrorRecoveryLevel 2, seesectionSection 10.2.2 on Connection Recovery. The iSCSILayerlayer may invoke the Notice_Key_Values Operational Primitive during connection setup to request the iSERLayerlayer to take note of the value of the operational ErrorRecoveryLevel, as described insectionsSections 5.1.1 and 5.1.2.10.2.110.2.1. PDU Recovery As described insectionsSections 10.1.4.2 and 10.1.4.3, digest and sequence errors will not occur in the iSER-assisted mode. If the RCaP layer detects an error, it will close the iSCSI/iSER connection, as described insectionSection 10.1.2. Therefore, PDU recovery is not useful in the iSER-assisted mode. The iSCSILayerlayer at the initiator SHOULD disable iSCSI timeout-driven PDU retransmissions.10.2.210.2.2. Connection Recovery The iSCSILayerlayer at the initiator MAY reassign connection allegiance for non-immediate commandswhichthat are still in progress and are associated with the failed connection by using a Task Management Function Request with the TASK REASSIGN function. SeesectionSection 7.3.3 for more details. When the iSCSILayerlayer at the initiator does a task reassignment for a SCSI Write command, it MUST qualify the Send_Control Operational Primitive invocation withDataDescriptorOutDataDescriptorOut, which defines the I/O Buffer for both the non-immediate unsolicited data and the solicited data. This allows the iSCSILayerlayer at the target to use recovery R2Ts to requestfordata originally sent as unsolicited and solicited from the initiator. When the iSCSILayerlayer at the target accepts a reassignment request for a SCSI Read command, it MUST request the iSERLayerlayer to process SCSIData-inData-In for all unacknowledged data by invoking the Put_Data Operational Primitive. SeesectionSection 7.3.5 on the handling of SCSIData-in.Data-In. When the iSCSILayerlayer at the target accepts a reassignment request for a SCSI Write command, it MUST request the iSERLayerlayer to process a recovery R2T for any non-immediate unsolicited data and any solicited data sequences that have not been received by invoking the Get_Data Operational Primitive. SeesectionSection 7.3.6 on the handling of Ready To Transfer (R2T). The iSCSILayerlayer at the target MUST NOT issue recovery R2Ts on an iSCSI/iSER connection for a task for which the connection allegiance was never reassigned. The iSERLayerlayer at the target MAY reject such a recovery R2T received via the Get_Data Operational Primitive invocation from the iSCSILayerlayer at the target, with an appropriate error code. The iSERLayerlayer at the target will process the requests invoked by the Put_Data and Get_Data Operational Primitives for a reassigned task in the same way as for the original commands.1111. Security Considerations When iSER is layered on top of an RCaP layer and provides the RDMA extensions to the iSCSI protocol, the security considerations of iSER are the same as that of the underlying RCaP layer. For iWARP, this is described in [RDMAP] and [RDDPSEC], plus the updates to both of those RFCs that are contained in [IPSEC-IPS]. Since iSER-assisted iSCSI protocol is still functionally iSCSI from a security considerations perspective, all of the iSCSI security requirements as described in [iSCSI]applies.apply. If iSER is layered on top of anon-IP basednon-IP-based RCaP layer, all the security protocol mechanisms applicable to that RCaP layerisare also applicable to an iSCSI/iSER connection. If iSER is layered on top of a non-IP protocol, the IPsec mechanism as specified in [iSCSI] MUST be implemented at any point where the iSER protocol enters the IP network (e.g., via gateways), and the non-IP protocol SHOULD implement (optional to use) apacket by packetpacket-by-packet security protocol equal in strength to the IPsec mechanism specified by [iSCSI]. In order to protect target RCaP connection resources from possible resource exhaustion attacks, allocation of such resources for a new connection MUST be delayed until it is reasonably certain that the new connection is not part of a resource exhaustion attack (e.g., until after the SecurityNegotiation stage ofLogin),Login); seesectionSection 5.1.2. A valid STag exposes I/O Buffer resources to the network for access via the RCaP. The security measures for the RCAP and iSER described in the above paragraphs can be used to protect data in an I/O buffer from undesired disclosure or modification, and these measures are of heightened importance for implementations that retain (e.g., cache) STags for use in multiple tasks (e.g., iSCSI I/O operations) because the resources are exposed to the network for a longer period of time. A complementary means of controlling I/O Buffer resource exposure is invalidation of the STag after completion of the associated task,which is RECOMMENDEDas specified in Section2.5.1.1.5.1. The use of Send with Invalidate messages (which cause remote STag invalidation) is OPTIONAL, therefore the iSER layer MUST NOT rely on use of a Send with Invalidate by its Remote Peer to cause local STag invalidation. If an STag is expected to be invalid after completion of a task, the iSER layer MUST check the STag and invalidate it if it is still valid.1212. IANA Considerations IANAis requested to addhas added the following entries to the "iSCSI Login/Text Keys"registry of "iSCSI Parameters":registry: MaxAHSLength,[RFCXXXX]RFC 7145 TaggedBufferForSolicitedDataOnly,[RFCXXXX] iSERHelloRequired, [RFCXXXX]RFCEditor: Please replace XXXX in all instances of [RFCXXXX] above with the7145 iSERHelloRequired, RFCnumber of this document and remove this note.7145 IANAis requested to updatehas updated the following entries in the "iSCSI Login/Text Keys" registryof "iSCSI Parameters"to referencethe RFC number ofthisdraft when it is published as anRFC. InitiatorRecvDataSegmentLength MaxOutstandingUnexpectedPDUs RDMAExtensions TargetRecvDataSegmentLength IANAishas alsorequested to changechanged theRFC5046reference to RFC 5046 for theiSCSI"iSCSI Login/TextKeysKeys" registry tothe RFC number ofrefer to thisdocument.RFC. IANAis requested to updatehas updated the registrations of the iSER Opcodes1- 31-3 in theiSER Opcodes"iSER Opcodes" registry to reference this RFC. IANA has also changed the reference to RFCnumber of5046 for the "iSER Opcodes" registry to refer to thisdraft when it is published as anRFC.1313. References13.113.1. Normative References [RFC5046]M. Ko et al., "iSCSI ExternsionsKo, M., Chadalapaka, M., Hufferd, J., Elzur, U., Shah, H., and P. Thaler, "Internet Small Computer System Interface (iSCSI) Extensions for Remote Direct MemoryAccess",Access (RDMA)", RFC 5046, October20072007. [iSCSI]Chadalapaka et al., "iSCSIChadalapaka, M., Satran, J., Meth, K., and D. Black, "Internet Small Computer System Interface (iSCSI) Protocol (Consolidated)",draft- ietf-storm-iscsi-cons-08.txt (work in progress), January 2013RFC 7143, April 2014. [RDMAP]R. Recio et al., "An RDMARecio, R., Metzler, B., Culley, P., Hilland, J., and D. Garcia, "A Remote Direct Memory Access Protocol Specification", RFC 5040, October20072007. [DDP]H. Shah et al.,Shah, H., Pinkerton, J., Recio, R., and P. Culley, "Direct Data Placement over Reliable Transports", RFC 5041, October20072007. [MPA]P. Culley et al.,Culley, P., Elzur, U., Recio, R., Bailey, S., and J. Carrier, "Marker PDU Aligned Framing for TCP Specification", RFC 5044, October20072007. [RDDPSEC] Pinkerton, J.Pinkerton et al., "DDP/RDMAPand E. Deleganes, "Direct Data Placement Protocol (DDP) / Remote Direct Memory Access Protocol (RDMAP) Security", RFC 5042, October20072007. [TCP] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September19811981. [RFC2119] Bradner, S., "KeyWordswords for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March1997 [IPS-IPSEC]1997. [IPSEC-IPS] Black, D.Black et al.,and P. Koning, "Securing Block Storage Protocols over IP: RFC 3723 Requirements Update for IPsec v3",draft-ietf- storm-ipsec-ips-update-03 (work in progress), July 2013 13.2RFC 7146, April 2014. 13.2. Informative References [SAM5]T10/2104D rev r04, SCSIINCITS Technical Committee T10, "SCSI Architecture Model - 5(SAM-5),(SAM-5)", T10/BSR INCITS 515 rev 04, Committee Draft. [iSCSI-SAM] Knight, F.Knight et al.,and M. Chadalapaka, "Internet Small ComputerSystemsSystem Interface (iSCSI) SCSIArchitectureFeatures Update",draft- ietf-storm-iscsi-sam-04.txt (work in progress), August 2011RFC 7144, April 2014. [DA]M. Chadalapaka et al., "DatamoverChadalapaka, M., Hufferd, J., Satran, J., and H. Shah, "DA: Datamover Architecture foriSCSI",the Internet Small Computer System Interface (iSCSI)", RFC 5047, October20072007. [IB] InfiniBand Architecture Specification Volume 1 Release 1.2, October 2004 [IPoIB]H.K. Chu et al,Chu, J. and V. Kashyap, "Transmission of IP overInfiniBand",InfiniBand (IPoIB)", RFC 4391,March 2006 14April 2006. AppendixA:A. Summary of Changes from RFC 5046 All changes are backward compatible with RFC 5046 except for item#8#8, which reflects all known implementations of iSER, each of which has implemented this change, despite its absence in RFC 5046. As a result, a hypothetical implementation based on RFC 5046 will not interoperate with an implementation based on this version of the specification. 1. Removed the requirement that a connection be opened in "normal" TCP mode and transitioned to zero-copy mode. This allows thespecspecification to conform to existingimplementationimplementations for bothInfinibandInfiniBand and iWARP. Changes were made insections 2,Sections 1, 3.1.6, 4.2, 5.1, 5.1.1, 5.1.2, 5.1.3, 10.1.3.4, and 11. 2. Added a clause insectionSection 6.2 to clarify that MaxRecvDataSegmentLength must be ignored if it is declared in the Login Phase. 3. Added a clause insectionSection 6.2 to clarify that the initiator must not send more than InitiatorMaxRecvDataSegmentLength worth of data when a NOP-Out request is sent with a valid Initiator Task Tag. Since InitiatorMaxRecvDataSegmentLength can be smaller than TargetMaxRecvDataSegmentLength, returning the original data in the NOP-Out request in this situation can overflow the receive buffer unless the length of the data sent with the NOP-Out request is less than InitiatorMaxRecvDataSegmentLength. 4. Added a SHOULD negotiate recommendation for MaxOutstandingUnexpectedPDUs insectionSection 6.7. 5. Added MaxAHSLength key insectionSection 6.8 to set a limit on the AHS Length. This is useful when posting receive buffers in knowing what the maximum possible message length is in a PDUwhichthat contains AHS. 6. Added TaggedBufferForSolicitedDataOnly key insectionSection 6.9 to indicate how the memory region will be used. An initiator can treat the memory regions intended for unsolicited and solicited datadifferently,differently and can use different registration modes. In contrast, RFC 5046 treats the memory occupied by the data as a contiguous (or virtually contiguous, by means of scatter-gather mechanisms) and homogenous region. Adding a new key will allow different memory models to be accommodated. Changes were also made insectionSection 7.3.1. 7. Added iSERHelloRequired key insectionSection 6.10 to allow an initiator to allocate connection resources after the login process by requiring the use of the iSER Hello messages before sending iSCSI PDUs. The default is "No" since iSER Hello messages have not been implemented and are not in use. Changes were made insectionsSections 5.1.1, 5.1.2, 5.1.3, 8.2, 9.3, 9.4,10.1.3.210.1.3.2, and 10.1.3.4. 8. Added two 64-bit fields in iSER header insectionSection 9.2 for the Read Base Offset and the Write Base Offset to accommodate anon-zeronon- zero Base Offset. This allows one implementation such as theOFEDOpen Fabrics Enterprise Distribution (OFED) stack to be used in both theInfinibandInfiniBand and the iWARP environment. Changes were made in thedefinitiondefinitions of Base Offset, Advertisement, and Tagged Buffer. Changes were also made insections 2.4.1, 2.5, 2.6,Sections 1.5.1, 1.6, 1.7, 7.3.1, 7.3.3, 7.3.5, 7.3.6, 9.1, 9.3, 9.4, 9.5.1, and 9.5.2. This change is not backward compatible with RFC 5046, butisit was part of all known implementations of iSER at the time this document was developed. 9. RemoveiWARP specificiWARP-specific behavior. Changes were made in thedefinition section ondefinitions of RDMA Operation and Send Message Type. Clarifications were added insection 2.4.2Section 1.5.2 on the use of SendSE and SendInvSE. These clarifications reflect a removal of the requirements in RFC 5046 for the use of these messages, as implementations have not followed RFC 5046 in this area. Changes affecting Send with Invalidate were made insections 2.4.1, 2.5, 2.6,Sections 1.5.1, 1.6, 1.7, 4.1, and 7.3.2. Changes affecting Terminate were made insectionsSections 10.1.2.1 and 10.1.2.2. Changes were made insection 15Appendix B to remove iWARP headers. 10. Removeddenial of servicedenial-of-service descriptions for the initiator insectionSection 5.1.1 sinceit isthey are applicable for the target only. 11. Clarified insection 2.4.1Section 1.5.1 that STag invalidation is the initiator's responsibility for security reasons, and the initiator cannot rely on the target using an Invalidate version of Send. Added text insectionSection 11 on Stag invalidation.15AppendixB:B. Message Format for iSER This section is for information only and is NOT part of the standard.15.1B.1. iWARP Message Format for iSER Hello Message The following figure depicts an iSER Hello Message encapsulated in an iWARP SendSE Message. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MPA Header | DDP Control | RDMA Control | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Send) Queue Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Send) Message Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Send) Message Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0010b | Zeros | 0001b | 0001b | iSER-IRD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | | MPA CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure66: SendSE MessagecontainingContaining an iSER Hello Message15.2B.2. iWARP Message Format for iSER HelloReply Message The following figure depicts an iSER HelloReply Message encapsulated in an iWARP SendSE Message. The Reject (REJ) flag is set to0.zero. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MPA Header | DDP Control | RDMA Control | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Send) Queue Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Send) Message Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Send) Message Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0011b |Zeros|0| 0001b | 0001b | iSER-ORD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MPA CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure77: SendSE MessagecontainingContaining an iSER HelloReply Message15.3B.3. iSER Header Format for SCSI Read Command PDU The following figure depicts a SCSI Read Command PDU embedded in an iSER Message. For this particular example, in the iSER header, the Write STag Valid flag is set to zero, the Read STag Valid flag is set to one, the Write STag field is set to all zeros, the Write Base Offset field is set to all zeros, the Read STag field contains a valid Read STag, and the Read Base Offset field contains a valid Base Offset for the Read Tagged Buffer. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0001b |0|1| All zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Read STag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Read Base Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SCSI Read Command PDU | // // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure88: iSER Header Format for SCSI Read Command PDU15.4B.4. iSER Header Format for SCSI Write Command PDU The following figure depicts a SCSI Write Command PDU embedded in an iSER Message. For this particular example, in the iSER header, the Write STag Valid flag is set to one, the Read STag Valid flag is set to zero, the Write STag field contains a valid Write STag, the Write Base Offset field contains a valid Base Offset for the Write Tagged Buffer, the Read STag field is set to all zeros since it is not used, and the Read Base Offset field is set to all zeros. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0001b |1|0| All zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Write STag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Write Base Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SCSI Write Command PDU | // // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure99: iSER Header Format for SCSI Write Command PDU15.5B.5. iSER Header Format for SCSI Response PDU The following figure depicts a SCSI Response PDU embedded in an iSER Message: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0001b |0|0| All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | All Zeros | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SCSI Response PDU | // // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure1010: iSER Header Format for SCSI Response PDU16AppendixC:C. ArchitecturaldiscussionDiscussion of iSER over InfiniBand This section explains how an InfiniBand network (with Gateways) would be structured. It is informational only and is intended to provide insight on how iSER is used in an InfiniBand environment.16.1C.1. HostsideSide of iSCSI&and iSERconnectionsConnections inInfinibandInfiniBand Figure 11 defines the topologies in which iSCSI and iSER will be able to operate on an InfiniBand Network. +---------+ +---------+ +---------+ +---------+ +--- -----+ | Host | | Host | | Host | | Host | | Host | | | | | | | | | | | +---+-+---+ +---+-+---+ +---+-+---+ +---+-+---+ +---+-+---+ |HCA| |HCA| |HCA| |HCA| |HCA| |HCA| |HCA| |HCA| |HCA| |HCA| +-v-+ +-v-+ +-v-+ +-v-+ +-v-+ +-v-+ +-v-+ +-v-+ +-v-+ +-v-+ |----+------|-----+-----|-----+-----|-----+-----|-----+---> To IB IB| IB | IB | IB | IB | SubNet2 SWTCH +-v-----------v-----------v-----------v-----------v---------+ | InfiniBand Switch for Subnet1 | +---+-----+--------+-----+--------+-----+------------v------+ | TCA | | TCA | | TCA | | +-----+ +-----+ +-----+ | IB / IB \ / IB \ / \ +--+--v--+--+ | iSER | | iSER | | IPoIB | | | TCA | | | Gateway | | Gateway | | Gateway | | +-----+ | | to | | to | | to | | Storage | | iSCSI | | iSER | | IP | | Controller| | TCP | | iWARP | |Ethernet | +-----+-----+ +---v-----| +---v-----| +----v----+ | EN | EN | EN +--------------+---------------+----> to IP based storage Ethernet links that carry iSCSI or iWARP Figure1111: iSCSI and iSER on IB In Figure 11, the Host systems are connected via the InfiniBand Host Channel Adapters (HCAs) to the InfiniBand links. With the use of IB switch(es), the InfiniBand links connect the HCA to InfiniBand Target Channel Adapters (TCAs) located in gateways or Storage Controllers. An iSER-capable IB-IP Gateway converts the iSER Messages encapsulated in IB protocols to either standard iSCSI, or iSER Messages for iWARP. An [IPoIB] Gateway converts the InfiniBand [IPoIB] protocol to IP protocol, and in the iSCSI case, permits iSCSI to be operated on an IB Network between the Hosts and the [IPoIB] Gateway.16.2C.2. StoragesideSide of iSCSI&and iSERmixed network environmentMixed Network Environment Figure 12 shows a storage controller that has three different portal groups: one supporting only iSCSI (TPG-4), one supporting iSER/iWARP or iSCSI (TPG-2), and one supporting iSER/IB (TPG-1). Here, "TPG" stands for "Target Portal Group". | | | | | | +--+--v--+----------+--v--+----------+--v--+--+ | | IB | |iWARP| | EN | | | | | | TCP | | NIC | | | |(TCA)| | RNIC| | | | | +-----| +-----+ +-----+ | | TPG-1 TPG-2 TPG-4 | | 9.1.3.3 9.1.2.4 9.1.2.6 | | | | Storage Controller | | | +---------------------------------------------+ Figure1212: Storage Controller with TCP, iWARP, and IB Connections The normal iSCSI portal group advertising processes (viaSLP, iSNS,the Service Location Protocol (SLP), Internet Storage Name Service (iSNS), or SendTargets) are available to a Storage Controller.16.3C.3. DiscoveryprocessesProcesses for an InfiniBand Host An InfiniBand Host system can gather portal group IPaddressaddresses from SLP, iSNS, or the SendTargets discovery processes by using TCP/IP via [IPoIB]. After obtaining one or more remote portal IP addresses, the Initiator uses the standard IP mechanisms to resolve the IP address to a local outgoing interface and the destination hardware address (Ethernet MAC orIB GIDInfiniBand Global Identifier (GID) of the target or a gateway leading to the target). If the resolved interface is an [IPoIB] network interface, then the target portal can be reached through an InfiniBand fabric. In thiscasecase, the Initiator can establish an iSCSI/TCP or iSCSI/iSER session with the Target over that InfiniBand interface, using theHardware Addresshardware address (InfiniBand GID) obtained through the standard Address Resolution Protocol (ARP) processes. If more than one IP addressareis obtained through the discovery process, the Initiator should select a Target IP address that is on the same IP subnet as theInitiatorInitiator, if one exists. This will avoid a potential overhead of going through a gateway when a direct path exists. Inadditionaddition, a user can configure manual static IP route entries if a particular path to the target is preferred.16.4C.4. IBTA ConnectionspecificationsSpecifications It is outside the scope of this document, but it is expected that the InfiniBand Trade Association (IBTA) has or will define: * The iSER ServiceID * AMeansmeans for permitting a Host to establish a connection with a peer InfiniBand end-node, and that peer indicating when thatend-nodeend- node supports iSER, so the Host would be able to fall back to iSCSI/TCP over [IPoIB]. * AMeansmeans for permitting the Host to establish connections with IB iSER connections on storage controllers or IBiSER connectediSER-connected Gateways in preference to[IPoIB] connectedIPoIB-connected Gateways/Bridges or connections to Target Storage Controllers that also accept iSCSI via [IPoIB]. * AMeansmeans for combining the IB ServiceID for iSER and the IP port number such that the IB Host can use normal IB connection processes, yet ensure that the iSER target peer can actually connect to the required IP port number.17Appendix D. Acknowledgments The authors acknowledge the following individuals for identifying implementation issues and/or suggesting resolutions to the issues clarified in this document: Robert Russell, Arne Redlich, David Black, Mallikarjun Chadalapaka, Tom Talpey, Felix Marti, Robert Sharp, Caitlin Bestler, Hemal Shah, Spencer Dawkins, Pete Resnick, Ted Lemon, Pete McCann, and Steve Kent. Credit also goes to the authors of the original iSER Specification [RFC5046], including Michael Ko, Mallikarjun Chadalapaka, John Hufferd, Uri Elzur, Hemal Shah, and Patricia Thaler. This document benefited from all of their contributions.Author's AddressAuthors' Addresses Michael KoEmail:EMail: mkosjc@gmail.com Alexander Nezhinsky Mellanox Technologies 13 Zarchin St. Raanana43662,43662 Israel Phone: +972-74-712-9000Email:EMail: alexandern@mellanox.com, nezhinsky@gmail.comCopyright Notice Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.