idnits 2.17.1 draft-ietf-rddp-ddp-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There are 4 instances of lines with non-ascii characters in the document. == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 2106 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RDMA' is mentioned on line 266, but not defined == Missing Reference: 'DDP' is mentioned on line 359, but not defined == Unused Reference: 'RFC2026' is defined on line 1311, but no explicit reference was found in the text == Unused Reference: 'RFC2119' is defined on line 1314, but no explicit reference was found in the text == Outdated reference: A later version (-08) exists of draft-ietf-rddp-mpa-01 == Outdated reference: A later version (-07) exists of draft-ietf-rddp-rdmap-01 ** Obsolete normative reference: RFC 2960 (ref. 'SCTP') (Obsoleted by RFC 4960) ** Obsolete normative reference: RFC 793 (ref. 'TCP') (Obsoleted by RFC 9293) -- Obsolete informational reference (is this intentional?): RFC 2246 (ref. 'TLS') (Obsoleted by RFC 4346) -- Obsolete informational reference (is this intentional?): RFC 2401 (ref. 'IPSEC') (Obsoleted by RFC 4301) == Outdated reference: A later version (-10) exists of draft-ietf-rddp-security-05 Summary: 3 errors (**), 0 flaws (~~), 10 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Remote Direct Data Placement Work Group Hemal Shah 3 INTERNET-DRAFT Intel Corporation 4 Category: Standards Track James Pinkerton 5 draft-ietf-rddp-ddp-03.txt Microsoft Corporation 6 Renato Recio 7 IBM Corporation 8 Paul Culley 9 Hewlett-Packard Company 11 Expires: February, 2005 August, 2004 13 Direct Data Placement over Reliable Transports 15 Status of this Memo 17 By submitting this Internet-Draft, I certify that any applicable 18 patent or other IPR claims of which I am aware of have been 19 disclosed, and any of which I become aware will be disclosed, in 20 accordance with RFC 3668. 22 By submitting this Internet-Draft, I accept the provisions of 23 Section 4 of RFC 3667. 25 This document is an Internet-Draft and is subject to all provisions 26 of Section 10 of RFC2026. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six 34 months and may be updated, replaced, or obsoleted by other documents 35 at any time. It is inappropriate to use Internet-Drafts as 36 reference material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/1id-abstracts.html The list of Internet-Draft 40 Shadow Directories can be accessed at 41 http://www.ietf.org/shadow.html. 43 Abstract 45 The Direct Data Placement protocol provides information to Place the 46 incoming data directly into an upper layer protocol's receive buffer 47 without intermediate buffers. This removes excess CPU and memory 48 utilization associated with transferring data through the 49 intermediate buffers. 51 Shah, et. al. Expires February 2005 1 52 Table of Contents 54 Status of this Memo...............................................1 55 Abstract..........................................................1 56 1 Introduction................................................4 57 1.1 Architectural Goals.........................................4 58 1.2 Protocol Overview...........................................5 59 1.3 DDP Layering................................................6 60 2 Glossary....................................................9 61 2.1 General.....................................................9 62 2.2 LLP........................................................10 63 2.3 Direct Data Placement (DDP)................................10 64 3 Reliable Delivery LLP Requirements.........................13 65 4 Header Format..............................................15 66 4.1 DDP Control Field..........................................15 67 4.2 DDP Tagged Buffer Model Header.............................16 68 4.3 DDP Untagged Buffer Model Header...........................17 69 4.4 DDP Segment Format.........................................18 70 5 Data Transfer..............................................19 71 5.1 DDP Tagged or Untagged Buffer Models.......................19 72 5.1.1 Tagged Buffer Model.......................................19 73 5.1.2 Untagged Buffer Model.....................................19 74 5.2 Segmentation and Reassembly of a DDP Message...............19 75 5.3 Ordering Among DDP Messages................................21 76 5.4 DDP Message Completion & Delivery..........................22 77 6 DDP Stream Setup & Teardown................................23 78 6.1 DDP Stream Setup...........................................23 79 6.2 DDP Stream Teardown........................................23 80 6.2.1 DDP Graceful Teardown.....................................23 81 6.2.2 DDP Abortive Teardown.....................................24 82 7 Error Semantics............................................25 83 7.1 Errors detected at the Data Sink...........................25 84 7.2 DDP Error Numbers..........................................26 85 8 Security Considerations....................................27 86 8.1 Protocol-specific Security Considerations..................27 87 8.2 Using IPSec with DDP.......................................27 88 8.3 Association of an STag and a DDP Stream....................27 89 8.4 Other Security Considerations..............................28 90 9 IANA Considerations........................................30 91 10 References.................................................31 92 10.1 Normative References......................................31 93 10.2 Informative References....................................31 94 11 Appendix...................................................32 95 11.1 Receive Window sizing.....................................32 96 12 Author's Addresses.........................................33 97 13 Acknowledgments............................................34 98 14 Full Copyright Statement...................................37 100 Table of Figures 102 Figure 1 DDP Layering.............................................7 103 Figure 2 MPA, DDP, and RDMAP Header Alignment.....................8 105 Shah, et. al. Expires February 2005 2 106 Figure 3 DDP Control Field.......................................15 107 Figure 4 Tagged Buffer DDP Header................................16 108 Figure 5 Untagged Buffer DDP Header..............................17 109 Figure 6 DDP Segment Format......................................18 111 Shah, et. al. Expires February 2005 3 112 1 Introduction 114 Direct Data Placement Protocol (DDP) enables an Upper Layer Protocol 115 (ULP) to send data to a Data Sink without requiring the Data Sink to 116 Place the data in an intermediate buffer - thus when the data 117 arrives at the Data Sink, the network interface can Place the data 118 directly into the ULP's buffer. This can enable the Data Sink to 119 consume substantially less memory bandwidth than a buffered model 120 because the Data Sink is not required to move the data from the 121 intermediate buffer to the final destination. Additionally, this can 122 also enable the network protocol to consume substantially fewer CPU 123 cycles than if the CPU was used to move the data, and removes the 124 bandwidth limitation of only being able to move data as fast as the 125 CPU can copy the data. 127 DDP preserves ULP record boundaries (messages) while providing a 128 variety of data transfer mechanisms and completion mechanisms to be 129 used to transfer ULP messages. 131 1.1 Architectural Goals 133 DDP has been designed with the following high-level architectural 134 goals: 136 * Provide a buffer model that enables the Local Peer to Advertise 137 a named buffer (i.e. a Tag for a buffer) to the Remote Peer, 138 such that across the network the Remote Peer can Place data 139 into the buffer at Remote Peer specified locations. This is 140 referred to as the Tagged Buffer Model. 142 * Provide a second receive buffer model which preserves ULP 143 message boundaries from the Remote Peer and keeps the Local 144 Peer's buffers anonymous (i.e. Untagged). This is referred to 145 as the Untagged Buffer Model. 147 * Provide reliable, in-order Delivery semantics for both Tagged 148 and Untagged Buffer Models. 150 * Provide segmentation and reassembly of ULP messages. 152 * Enable the ULP buffer to be used as a reassembly buffer, 153 without a need for a copy, even if incoming DDP Segments arrive 154 out of order. This requires the protocol to separate Data 155 Placement of ULP Payload contained in an incoming DDP Segment 156 from Data Delivery of completed ULP Messages. 158 * If the LLP supports multiple LLP streams within a LLP 159 Connection, provide the above capabilities independently on 160 each LLP stream and enable the capability to be exported on a 161 per LLP stream basis to the ULP. 163 Shah, et. al. Expires February 2005 4 164 1.2 Protocol Overview 166 DDP supports two basic data transfer models - a Tagged Buffer data 167 transfer model and an Untagged Buffer data transfer model. 169 The Tagged Buffer data transfer model requires the Data Sink to send 170 the Data Source an identifier for the ULP buffer, referred to as a 171 Steering Tag (STag). The STag is transferred to the Data Source 172 using a ULP defined method. Once the Data Source ULP has an STag for 173 a destination ULP buffer, it can request that DDP send the ULP data 174 to the destination ULP buffer by specifying the STag to DDP. Note 175 that the Tagged Buffer does not have to be filled starting at the 176 beginning of the ULP buffer. The ULP Data Source can provide an 177 arbitrary offset into the ULP buffer. 179 The Untagged Buffer data transfer model enables data transfer to 180 occur without requiring the Data Sink to Advertise a ULP Buffer to 181 the Data Source. The Data Sink can queue up a series of receive ULP 182 buffers. An Untagged DDP Message from the Data Source consumes an 183 Untagged Buffer at the Data Sink. Because DDP is message oriented, 184 even if the Data Source sends a DDP Message payload smaller than the 185 receive ULP buffer, the partially filled receive ULP buffer is 186 Delivered to the ULP anyway. If the Data Source sends a DDP Message 187 payload larger than the receive ULP buffer, it results in an error. 189 There are several key differences between the Tagged and Untagged 190 Buffer Model: 192 * For the Tagged Buffer Model, the Data Source specifies which 193 received Tagged Buffer will be used for a specific Tagged DDP 194 Message (sender-based ULP buffer management). For the Untagged 195 Buffer Model, the Data Sink specifies the order in which 196 Untagged Buffers will be consumed as Untagged DDP Messages are 197 received (receiver-based ULP buffer management). 199 * For the Tagged Buffer Model, the ULP at the Data Sink must 200 Advertise the ULP buffer to the Data Source through a ULP 201 specific mechanism before data transfer can occur. For the 202 Untagged Buffer Model, data transfer can occur without an end- 203 to-end explicit ULP buffer Advertisement. Note, however, that 204 the ULP needs to address flow control issues. 206 * For the Tagged Buffer Model, a DDP Message can start at an 207 arbitrary offset within the Tagged Buffer. For the Untagged 208 Buffer Model, a DDP Message can only start at offset 0. 210 * The Tagged Buffer Model allows multiple DDP Messages targeted 211 to a Tagged Buffer with a single ULP buffer Advertisement. The 212 Untagged Buffer Model requires associating a receive ULP buffer 213 for each DDP Message targeted to an Untagged Buffer. 215 Either data transfer model Places a ULP Message into a DDP Message. 216 Each DDP Message is then sliced into DDP Segments that are intended 218 Shah, et. al. Expires February 2005 5 219 to fit within a lower-layer-protocol's (LLP) Maximum Upper Layer 220 Protocol Data Unit (MULPDU). Thus the ULP can post arbitrary size 221 ULP Messages, containing up to 2^32 - 1 octets of ULP Payload, and 222 DDP slices the ULP message into DDP Segments which are reassembled 223 transparently at the Data Sink. 225 DDP provides in-order Delivery for the ULP. However, DDP 226 differentiates between Data Delivery and Data Placement. DDP 227 provides enough information in each DDP Segment to allow the ULP 228 Payload in each inbound DDP Segment payloads to be directly Placed 229 into the correct ULP Buffer, even when the DDP Segments arrive out- 230 of-order. Thus, DDP enables the reassembly of ULP Payload contained 231 in DDP Segments of a DDP Message into a ULP Message to occur within 232 the ULP Buffer, therefore eliminating the traditional copy out of 233 the reassembly buffer into the ULP Buffer. 235 A DDP Message's payload is Delivered to the ULP when: 237 * all DDP Segments of a DDP Message have been completely received 238 and the payload of the DDP Message has been Placed into the 239 associated ULP Buffer, 241 * all prior DDP Messages have been Placed, and 243 * all prior DDP Message Deliveries have been performed. 245 The LLP under DDP may support a single LLP stream of data per 246 connection (e.g. TCP) or multiple LLP streams of data per connection 247 (e.g. SCTP). But in either case, DDP is specified such that each DDP 248 Stream is independent and maps to a single LLP stream. Within a 249 specific DDP Stream, the LLP Stream is required to provide in-order, 250 reliable Delivery. Note that DDP has no ordering guarantees between 251 DDP Streams. 253 A DDP protocol could potentially run over reliable Delivery LLPs or 254 unreliable Delivery LLPs. This specification requires reliable, in 255 order Delivery LLPs. 257 1.3 DDP Layering 259 DDP is intended to be LLP independent, subject to the requirements 260 defined in section 3. However, DDP was specifically defined to be 261 part of a family of protocols that were created to work well 262 together, as shown in Figure 1 DDP Layering. For LLP protocol 263 definitions of each LLP, see [MPA], [TCP], and [SCTP]. 265 DDP enables direct data Placement capability for any ULP, but it has 266 been specifically designed to work well with RDMAP (see [RDMA]), and 267 is part of the iWARP protocol suite. 269 Shah, et. al. Expires February 2005 6 270 +-------------------+ 271 | | 272 | RDMA ULP | 273 | | 274 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 275 | | | 276 | ULP | RDMAP | 277 | | | 278 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 279 | | 280 | DDP protocol | 281 | | 282 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 283 | | | 284 | MPA | | 285 | | | 286 | | | 287 +-+-+-+-+-+-+-+-+-+ SCTP | 288 | | | 289 | TCP | | 290 | | | 291 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 293 Figure 1 DDP Layering 295 If DDP is layered below RDMAP and on top of MPA and TCP, then the 296 respective headers and payload are arranged as follows (Note: For 297 clarity, MPA header and CRC are included but framing markers are not 298 shown.): 300 Shah, et. al. Expires February 2005 7 301 0 1 2 3 302 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 303 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 304 | | 305 // TCP Header // 306 | | 307 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 308 | MPA Header | | 309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 310 | | 311 // DDP Header // 312 | | 313 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 314 | | 315 // RDMAP Header // 316 | | 317 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 318 | | 319 // RDMAP ULP Payload // 320 | | 321 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 322 | MPA CRC | 323 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 325 Figure 2 MPA, DDP, and RDMAP Header Alignment 327 Shah, et. al. Expires February 2005 8 328 2 Glossary 330 2.1 General 332 Advertisement (Advertised, Advertise, Advertisements, Advertises) - 333 The act of informing a Remote Peer that a local RDMA Buffer is 334 available to it. A Node makes available an RDMA Buffer for 335 incoming RDMA Read or RDMA Write access by informing its 336 RDMA/DDP peer of the Tagged Buffer identifiers (STag, base 337 address, length). This advertisement of Tagged Buffer 338 information is not defined by RDMA/DDP and is left to the ULP. A 339 typical method would be for the Local Peer to embed the Tagged 340 Buffer's Steering Tag, address, and length in a Send message 341 destined for the Remote Peer. 343 Data Delivery (Delivery, Delivered, Delivers) - Delivery is defined 344 as the process of informing the ULP or consumer that a 345 particular message is available for use. This is specifically 346 different from "Placement", which may generally occur in any 347 order, while the order of "Delivery" is strictly defined. See 348 "Data Placement". 350 Data Sink - The peer receiving a data payload. Note that the Data 351 Sink can be required to both send and receive RDMA/DDP Messages 352 to transfer a data payload. 354 Data Source - The peer sending a data payload. Note that the Data 355 Source can be required to both send and receive RDMA/DDP 356 Messages to transfer a data payload. 358 iWARP - A suite of wire protocols comprised of RDMAP [RDMAP], DDP 359 [DDP], and MPA [MPA]. The iWARP protocol suite may be layered 360 above TCP, SCTP, or other transport protocols. 362 Local Peer - The RDMA/DDP protocol implementation on the local end 363 of the connection. Used to refer to the local entity when 364 describing a protocol exchange or other interaction between two 365 Nodes. 367 Node - A computing device attached to one or more links of a 368 network. A Node in this context does not refer to a specific 369 application or protocol instantiation running on the computer. A 370 Node may consist of one or more RNICs installed in a host 371 computer. 373 Remote Peer - The RDMA/DDP protocol implementation on the opposite 374 end of the connection. Used to refer to the remote entity when 375 describing protocol exchanges or other interactions between two 376 Nodes. 378 ULP - Upper Layer Protocol. The protocol layer above the protocol 379 layer currently being referenced. The ULP for RDMA/DDP is 380 expected to be an OS, application, adaptation layer, or 382 Shah, et. al. Expires February 2005 9 383 proprietary device. The RDMA/DDP documents do not specify a ULP 384 - they provide a set of semantics that allow a ULP to be 385 designed to utilize RDMA/DDP. 387 ULP Message - The ULP data that is handed to a specific protocol 388 layer for transmission. Data boundaries are preserved as they 389 are transmitted through iWARP. 391 ULP Payload - The ULP data that is contained within a single 392 protocol segment or packet (e.g. a DDP Segment). 394 2.2 LLP 396 LLP - Lower Layer Protocol. The protocol layer beneath the protocol 397 layer currently being referenced. For example, for DDP the LLP 398 is SCTP, MPA, or other transport protocols. For RDMA, the LLP is 399 DDP. 401 LLP Connection - Corresponds to an LLP transport-level connection 402 between the peer LLP layers on two nodes. 404 LLP Stream - Corresponds to a single LLP transport-level stream 405 between the peer LLP layers on two Nodes. One or more LLP 406 Streams may map to a single transport-level LLP Connection. For 407 transport protocols that support multiple streams per connection 408 (e.g. SCTP), a LLP Stream corresponds to one transport-level 409 stream. 411 MULPDU - Maximum Upper Layer Protocol Data Unit. The current maximum 412 size of the record that is acceptable for DDP to pass to the LLP 413 for transmission. 415 2.3 Direct Data Placement (DDP) 417 DDP Graceful Teardown - The act of closing a DDP Stream such that 418 all in-progress and pending DDP Messages are allowed to complete 419 successfully. 421 DDP Abortive Teardown - The act of closing a DDP Stream without 422 attempting to complete in-progress and pending DDP Messages. 424 Data Placement (Placement, Placed, Places) - For DDP, this term is 425 specifically used to indicate the process of writing to a data 426 buffer by a DDP implementation. DDP Segments carry Placement 427 information, which may be used by the receiving DDP 428 implementation to perform Data Placement of the DDP Segment ULP 429 Payload. See "Data Delivery" and �Direct Data Placement�. 431 DDP Control Field - A fixed 8-bit field in the DDP Header. 433 DDP Header - The header present in all DDP Segments. The DDP Header 434 contains control and Placement fields that are used to define 436 Shah, et. al. Expires February 2005 10 437 the final Placement location for the ULP Payload carried in a 438 DDP Segment. 440 DDP Message - A ULP defined unit of data interchange, which is 441 subdivided into one or more DDP Segments. This segmentation may 442 occur for a variety of reasons, including segmentation to 443 respect the maximum segment size of the underlying transport 444 protocol. 446 DDP Segment - The smallest unit of data transfer for the DDP 447 protocol. It includes a DDP Header and ULP Payload (if present). 448 A DDP Segment should be sized to fit within the Lower Layer 449 Protocol MULPDU. 451 DDP Stream - a sequence of DDP messages whose ordering is defined by 452 the LLP. For SCTP, a DDP Stream maps directly to an SCTP stream. 453 For MPA, a DDP Stream maps directly to a TCP connection and a 454 single DDP Stream is supported. Note that DDP has no ordering 455 guarantees between DDP Streams. 457 DDP Stream Identifier (ID) � An identifier for a DDP Stream. 459 Direct Data Placement - A mechanism whereby ULP data contained 460 within DDP Segments may be Placed directly into its final 461 destination in memory without processing of the ULP. This may 462 occur even when the DDP Segments arrive out of order. Out of 463 order Placement support may require the Data Sink to implement 464 the LLP and DDP as one functional block. 466 Direct Data Placement Protocol (DDP) - Also, a wire protocol that 467 supports Direct Data Placement by associating explicit memory 468 buffer placement information with the LLP payload units. 470 Message Offset (MO) - For the DDP Untagged Buffer Model, specifies 471 the offset, in octets, from the start of a DDP Message. 473 Message Sequence Number (MSN) - For the DDP Untagged Buffer Model, 474 specifies a sequence number that is increasing with each DDP 475 Message. 477 Protection Domain (PD) � A Mechanism used to associate a DDP Stream 478 and an STag. Under this mechanism, the use of an STag is valid 479 on a DDP Stream if the STag has the same Protection Domain 480 Identifier (PD ID) as the DDP Stream. 482 Protection Domain Identifier (PD ID) � An identifier for the 483 Protection Domain. 485 Queue Number (QN) - For the DDP Untagged Buffer Model, identifies a 486 destination Data Sink queue for a DDP Segment. 488 Steering Tag - An identifier of a Tagged Buffer on a Node, valid as 489 defined within a protocol specification. 491 Shah, et. al. Expires February 2005 11 492 STag - Steering Tag 494 Tagged Buffer - A buffer that is explicitly Advertised to the Remote 495 Peer through exchange of an STag, Tagged Offset, and length. 497 Tagged Buffer Model - A DDP data transfer model used to transfer 498 Tagged Buffers from the Local Peer to the Remote Peer. 500 Tagged DDP Message - A DDP Message that targets a Tagged Buffer. 502 Tagged Offset (TO) - The offset within a Tagged Buffer on a Node. 504 ULP Buffer - A buffer owned above the DDP Layer and advertised to 505 the DDP Layer either as a Tagged Buffer or an Untagged ULP 506 Buffer. 508 ULP Message Length - The total length, in octets, of the ULP Payload 509 contained in a DDP Message. 511 Untagged Buffer - A buffer that is not explicitly Advertised to the 512 Remote Peer. 514 Untagged Buffer Model - A DDP data transfer model used to transfer 515 Untagged Buffers from the Local Peer to the Remote Peer. 517 Untagged DDP Message - A DDP Message that targets an Untagged 518 Buffer. 520 Shah, et. al. Expires February 2005 12 521 3 Reliable Delivery LLP Requirements 523 1. LLPs MUST expose MULPDU & MULPDU Changes. This is required so 524 that the DDP layer can perform segmentation aligned with the 525 MULPDU and can adapt as MULPDU changes come about. The corner 526 case of how to handle outstanding requests during a MULPDU 527 change is covered by the requirements below. 529 2. In the event of a MULPDU change, DDP MUST NOT be required by the 530 LLP to re-segment DDP Segments that have been previously posted 531 to the LLP. Note that under pathological conditions the LLP may 532 change the advertised MULPDU more frequently than the queue of 533 previously posted DDP Segment transmit requests is flushed. 534 Under this pathological condition, the LLP transmit queue can 535 contain DDP Messages which were posted multiple MULPDU updates 536 previously, thus there may be no correlation between the queued 537 DDP Segment(s) and the LLP's current value of MULPDU. 539 3. The LLP MUST ensure that if it accepts a DDP Segment, it will 540 transfer it reliably to the receiver or return with an error 541 stating that the transfer failed to complete. 543 4. The LLP MUST preserve DDP Segment and Message boundaries at the 544 Data Sink. 546 5. The LLP MAY provide the incoming segments out of order for 547 Placement, but if it does, it MUST also provide information that 548 specifies what the sender specified order was. 550 6. LLP MUST provide a strong digest (at least equivalent to CRC32- 551 C) to cover at least the DDP Segment. It is believed that some 552 of the existing data integrity digests are not sufficient and 553 that direct memory transfer semantics require a stronger digest 554 than, for example, a simple checksum. 556 7. On receive, the LLP MUST provide the length of the DDP Segment 557 received. This ensures that DDP does not have to carry a length 558 field in its header. 560 8. If an LLP does not support teardown of a LLP stream independent 561 of other LLP streams and a DDP error occurs on a specific DDP 562 Stream, then the LLP MUST label the associated LLP stream as an 563 erroneous LLP stream and MUST NOT allow any further data 564 transfer on that LLP stream after DDP requests the associated 565 DDP Stream to be torn down. 567 9. For a specific LLP Stream, the LLP MUST provide a mechanism to 568 indicate that the LLP Stream has been gracefully torn down. For 569 a specific LLP Connection, the LLP MUST provide a mechanism to 570 indicate that the LLP Connection has been gracefully torn down. 571 Note that if the LLP does not allow an LLP Stream to be torn 572 down independently of the LLP Connection, the above requirements 573 allow the LLP to notify DDP of both events at the same time. 575 Shah, et. al. Expires February 2005 13 576 10. For a specific LLP Connection, when all LLP Streams are either 577 gracefully torn down or are labeled as erroneous LLP streams, 578 the LLP Connection MUST be torn down. 580 11. The LLP MUST NOT pass a duplicate DDP Segment to the DDP Layer 581 after it has passed all the previous DDP Segments to the DDP 582 Layer and the associated ordering information for the previous 583 DDP Segments and the current DDP Segment. 585 Shah, et. al. Expires February 2005 14 586 4 Header Format 588 DDP has two different header formats: one for Data Placement into 589 Tagged Buffers, and the other for Data Placement into Untagged 590 Buffers. See Section 5.1 for a description of the two models. 592 4.1 DDP Control Field 594 The first 8 bits of the DDP Header carry a DDP Control Field that is 595 common between the two formats. It is shown below in Figure 3, 596 offset by 16 bits to accommodate the MPA header defined in [MPA]. 597 The MPA header is only present if DDP is layered on top of MPA. 599 0 1 2 3 600 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 601 +-+-+-+-+-+-+-+-+ 602 |T|L| Rsvd |DV | 603 +-+-+-+-+-+-+-+-+ 604 Figure 3 DDP Control Field 606 T - Tagged flag: 1 bit. 608 Specifies the Tagged or Untagged Buffer Model. If set to one, 609 the ULP Payload carried in this DDP Segment MUST be Placed into 610 a Tagged Buffer. 612 If set to zero, the ULP Payload carried in this DDP Segment 613 MUST be Placed into an Untagged Buffer. 615 L - Last flag: 1 bit. 617 Specifies whether the DDP Segment is the Last segment of a DDP 618 Message. It MUST be set to one on the last DDP Segment of every 619 DDP Message. It MUST NOT be set to one on any other DDP 620 Segment. 622 The DDP Segment with the L bit set to 1 MUST be posted to the 623 LLP after all other DDP Segments of the associated DDP Message 624 have been posted to the LLP. For an Untagged DDP Message, the 625 DDP Segment with the L bit set to 1 MUST carry the highest MO. 627 If the Last flag is set to one, the DDP Message payload MUST be 628 Delivered to the ULP after: 630 . Placement of all DDP Segments of this DDP Message and all 631 prior DDP Messages, and 633 . Delivery of each prior DDP Message. 635 If the Last flag is set to zero, the DDP Segment is an 636 intermediate DDP Segment. 638 Shah, et. al. Expires February 2005 15 639 Rsvd - Reserved: 4 bits. 641 Reserved for future use by the DDP protocol. This field MUST be 642 set to zero on transmit, and not checked on receive. 644 DV - Direct Data Placement Protocol Version: 2 bits. 646 The version of the DDP Protocol in use. This field MUST be set 647 to one to indicate the version of the specification described 648 in this document. The value of DV MUST be the same for all the 649 DDP Segments transmitted or received on a DDP Stream. 651 4.2 DDP Tagged Buffer Model Header 653 Figure 4 shows the DDP Header format that MUST be used in all DDP 654 Segments that target Tagged Buffers. It includes the DDP Control 655 Field previously defined in Section 4.1. (Note: In Figure 4, the DDP 656 Header is offset by 16 bits to accommodate the MPA header defined in 657 [MPA]. The MPA header is only present if DDP is layered on top of 658 MPA.) 660 0 1 2 3 661 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 662 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 663 |T|L| Rsvd | DV| RsvdULP | 664 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 665 | STag | 666 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 667 | | 668 + TO + 669 | | 670 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 671 Figure 4 Tagged Buffer DDP Header 673 T is set to one. 675 RsvdULP - Reserved for use by the ULP: 8 bits. 677 The RsvdULP field is opaque to the DDP protocol and can be 678 structured in any way by the ULP. At the Data Source, DDP MUST 679 set RsvdULP Field to the value specified by the ULP. It is 680 transferred unmodified from the Data Source to the Data Sink. 681 At the Data Sink, DDP MUST provide the RsvdULP field to the ULP 682 when the DDP Message is delivered. Each DDP Segment within a 683 specific DDP Message MUST contain the same value for this 684 field. The Data Source MUST ensure that each DDP Segment within 685 a specific DDP Message contains the same value for this field. 687 STag - Steering Tag: 32 bits. 689 The Steering Tag identifies the Data Sink's Tagged Buffer. The 690 STag MUST be valid for this DDP Stream. The STag is associated 691 with the DDP Stream through a mechanism that is outside the 693 Shah, et. al. Expires February 2005 16 694 scope of the DDP Protocol specification. At the Data Source, 695 DDP MUST set the STag field to the value specified by the ULP. 696 At the Data Sink, the DDP MUST provide the STag field when the 697 ULP Message is delivered. Each DDP Segment within a specific 698 DDP Message MUST contain the same value for this field and MUST 699 be the value supplied by the ULP. The Data Source MUST ensure 700 that each DDP Segment within a specific DDP Message contains 701 the same value for this field. 703 TO - Tagged Offset: 64 bits. 705 The Tagged Offset specifies the offset, in octets, within the 706 Data Sink's Tagged Buffer, where the Placement of ULP Payload 707 contained in the DDP Segment starts. A DDP Message MAY start at 708 an arbitrary TO within a Tagged Buffer. 710 4.3 DDP Untagged Buffer Model Header 712 Figure 5 shows the DDP Header format that MUST be used in all DDP 713 Segments that target Untagged Buffers. It includes the DDP Control 714 Field previously defined in Section 4.1. (Note: In Figure 5, the DDP 715 Header is offset by 16 bits to accommodate the MPA header defined in 716 [MPA]. The MPA header is only present if DDP is layered on top of 717 MPA.) 719 0 1 2 3 720 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 721 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 722 |T|L| Rsvd | DV| RsvdULP[0:7] | 723 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 724 | RsvdULP[8:39] | 725 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 726 | QN | 727 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 728 | MSN | 729 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 730 | MO | 731 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 732 Figure 5 Untagged Buffer DDP Header 734 T is set to zero. 736 RsvdULP - Reserved for use by the ULP: 40 bits. 738 The RsvdULP field is opaque to the DDP protocol and can be 739 structured in any way by the ULP. At the Data Source, DDP MUST 740 set RsvdULP Field to the value specified by the ULP. It is 741 transferred unmodified from the Data Source to the Data Sink. 742 At the Data Sink, DDP MUST provide RsvdULP field to the ULP 743 when the ULP Message is Delivered. Each DDP Segment within a 744 specific DDP Message MUST contain the same value for the 746 Shah, et. al. Expires February 2005 17 747 RsvdULP field. At the Data Sink, the DDP implementation is NOT 748 REQUIRED to verify that the same value is present in the 749 RsvdULP field of each DDP Segment within a specific DDP Message 750 and MAY provide the value from any one of the received DDP 751 Segment to the ULP when the ULP Message is Delivered. 753 QN - Queue Number: 32 bits. 755 The Queue Number identifies the Data Sink's Untagged Buffer 756 queue referenced by this header. Each DDP segment within a 757 specific DDP message MUST contain the same value for this field 758 and MUST be the value supplied by the ULP at the Data Source. 759 The Data Source MUST ensure that each DDP Segment within a 760 specific DDP Message contains the same value for this field. 762 MSN - Message Sequence Number: 32 bits. 764 The Message Sequence Number specifies a sequence number that 765 MUST be increased by one (modulo 2^32) with each DDP Message 766 targeting the specific Queue Number on the DDP Stream 767 associated with this DDP Segment. The initial value for MSN 768 MUST be one. The MSN value MUST wrap to 0 after a value of 769 0xFFFFFFFF. Each DDP segment within a specific DDP message MUST 770 contain the same value for this field. The Data Source MUST 771 ensure that each DDP Segment within a specific DDP Message 772 contains the same value for this field. 774 MO - Message Offset: 32 bits. 776 The Message Offset specifies the offset, in octets, from the 777 start of the DDP Message represented by the MSN and Queue 778 Number on the DDP Stream associated with this DDP Segment. The 779 MO referencing the first octet of the DDP Message MUST be set 780 to zero by the DDP layer. 782 4.4 DDP Segment Format 784 Each DDP Segment MUST contain a DDP Header. Each DDP Segment may 785 also contain ULP Payload. Following is the DDP Segment format: 787 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 788 | DDP | | 789 | Header| ULP Payload (if any) | 790 | | | 791 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 792 Figure 6 DDP Segment Format 794 Shah, et. al. Expires February 2005 18 795 5 Data Transfer 797 DDP supports multi-segment DDP Messages. Each DDP Message is 798 composed of one or more DDP Segments. Each DDP Segment contains a 799 DDP Header. The DDP Header contains the information required by the 800 receiver to Place any ULP Payload included in the DDP Segment. 802 5.1 DDP Tagged or Untagged Buffer Models 804 DDP uses two basic Buffer Models for the Placement of the ULP 805 Payload: Tagged Buffer Model and Untagged Buffer Model. 807 5.1.1 Tagged Buffer Model 809 The Tagged Buffer Model is used by the Data Source to transfer a DDP 810 Message into a Tagged Buffer at the Data Sink that has been 811 previously Advertised to the Data Source. An STag identifies a 812 Tagged Buffer. For the Placement of a DDP Message using the Tagged 813 Buffer model, the STag is used to identify the buffer, and the TO is 814 used to identify the offset within the Tagged Buffer into which the 815 ULP Payload is transferred. The protocol used to Advertise the 816 Tagged Buffer is outside the scope of this specification (i.e. ULP 817 specific). A DDP Message can start at an arbitrary TO within a 818 Tagged Buffer. 820 Additionally, a Tagged Buffer can potentially be written multiple 821 times. This might be done for error recovery or because a buffer is 822 being re-used after some ULP specific synchronization mechanism. 824 5.1.2 Untagged Buffer Model 826 The Untagged Buffer Model is used by the Data Source to transfer a 827 DDP Message to the Data Sink into a queued buffer. 829 The DDP Queue Number is used by the ULP to separate ULP messages 830 into different queues of receive buffers. For example, if two queues 831 were supported, the ULP could use one queue to post buffers handed 832 to it by the application above the ULP, and it could use the other 833 queue for buffers which are only consumed by ULP specific control 834 messages. This enables the separation of ULP control messages from 835 opaque ULP Payload when using Untagged Buffers. 837 The DDP Message Sequence Number can be used by the Data Sink to 838 identify the specific Untagged Buffer. The protocol used to 839 communicate how many buffers have been queued is outside the scope 840 of this specification. Similarly, the exact implementation of the 841 buffer queue is outside the scope of this specification. 843 5.2 Segmentation and Reassembly of a DDP Message 845 At the Data Source, the DDP layer MUST segment the data contained in 846 a ULP message into a series of DDP Segments, where each DDP Segment 847 contains a DDP Header and ULP Payload, and MUST be no larger than 849 Shah, et. al. Expires February 2005 19 850 the MULPDU value advertised by the LLP. The ULP Message Length MUST 851 be less than 2^32. At the Data Source, the DDP layer MUST send all 852 the data contained in the ULP message. At the Data Sink, the DDP 853 layer MUST Place the ULP Payload contained in all valid incoming DDP 854 Segments associated with a DDP Message into the ULP Buffer. 856 DDP Message segmentation at the Data Source is accomplished by 857 identifying a DDP Message (which corresponds one-to-one with a ULP 858 Message) uniquely and then, for each associated DDP Segment of a DDP 859 Message, by specifying an octet offset for the portion of the ULP 860 Message contained in the DDP Segment. 862 For an Untagged DDP Message, the combination of the QN and MSN 863 uniquely identifies a DDP Message. The octet offset for each DDP 864 Segment of a Untagged DDP Message is the MO field. For each DDP 865 Segment of a Untagged DDP Message, the MO MUST be set to the octet 866 offset from the first octet in the associated ULP Message (which is 867 defined to be zero) to the first octet in the ULP Payload contained 868 in the DDP Segment. 870 For example, if the ULP Untagged Message was 2048 octets, and the 871 MULPDU was 1500 octets, the Data Source would generate two DDP 872 Segments, one with MO = 0, containing 1482 octets of ULP Payload, 873 and a second with MO = 1482, containing 566 octets of ULP Payload. 874 In this example, the amount of ULP Payload for the first DDP Segment 875 was calculated as: 877 1482 = 1500 (MULPDU) - 18 (for the DDP Header) 879 For a Tagged DDP Message, the STag and TO, combined with the in- 880 order delivery characteristics of the LLP, are used to segment and 881 reassemble the ULP Message. Because the initial octet offset (the TO 882 field) can be non-zero, recovery of the original ULP Message 883 boundary cannot be done in the general case without an additional 884 ULP Message. 886 Implementers Note: One implementation, valid for some ULPs such 887 as RDMAP, is to not directly support recovery of the ULP 888 Message boundary for a Tagged DDP Message. For example, the ULP 889 may wish to have the Local Peer use small buffers at the Data 890 Source even when the ULP at the Data Sink has advertised a 891 single large Tagged Buffer for this data transfer. In this 892 case, the ULP may choose to use the same STag for multiple 893 consecutive ULP Messages. Thus a non-zero initial TO and re-use 894 of the STag effectively enables the ULP to implement 895 segmentation and reassembly due to ULP specific constraints. 896 See [RDMAP] for details of how this is done. 898 A different implementation of a ULP could use an Untagged DDP 899 Message sent after the Tagged DDP Message which details the 900 initial TO for the STag that was used in the Tagged DDP 901 Message. And finally, another implementation of a ULP could 902 choose to always use an initial TO of zero such that no 904 Shah, et. al. Expires February 2005 20 905 additional message is required to convey the initial TO used in 906 a Tagged DDP Message. 908 Regardless of whether the ULP chooses to recover the original ULP 909 Message boundary at the Data Sink for a Tagged DDP Message, DDP 910 supports segmentation and reassembly of the Tagged DDP Message. The 911 STag is used to identify the ULP Buffer at the Data Sink and the TO 912 is used to identify the octet-offset within the ULP Buffer 913 referenced by the STag. The ULP at the Data Source MUST specify the 914 STag and the initial TO when the ULP Message is handed to DDP. 916 For each DDP Segment of a Tagged DDP Message, the TO MUST be set to 917 the octet offset from the first octet in the associated ULP Message 918 to the first octet in the ULP Payload contained in the DDP Segment, 919 plus the TO assigned to the first octet in the associated ULP 920 Message. 922 For example, if the ULP Tagged Message was 2048 octets with an 923 initial TO of 16384, and the MULPDU was 1500 octets, the Data Source 924 would generate two DDP Segments, one with TO = 16384, containing the 925 first 1486 octets of ULP payload, and a second with TO = 17870, 926 containing 562 octets of ULP payload. In this example, the amount of 927 ULP payload for the first DDP Segment was calculated as: 929 1486 = 1500 (MULPDU) - 14 (for the DDP Header) 931 A zero-length DDP Message is allowed and MUST consume exactly one 932 DDP Segment. Only the DDP Control and RsvdULP Fields MUST be valid 933 for a zero length Tagged DDP Segment. The STag and TO fields MUST 934 NOT be checked for a zero-length Tagged DDP Message. 936 For either Untagged or Tagged DDP Messages, the Data Sink is not 937 required to verify that the entire ULP Message has been received. 939 5.3 Ordering Among DDP Messages 941 Messages passed through the DDP MUST conform to the ordering rules 942 defined in this section. 944 At the Data Source, DDP: 946 * MUST transmit DDP Messages in the order they were submitted to 947 the DDP layer, 949 * SHOULD transmit DDP Segments within a DDP Message in increasing 950 MO order for Untagged DDP Messages and in increasing TO order 951 for Tagged DDP Messages. 953 At the Data Sink, DDP (Note: The following rules are motivated by 954 LLP implementations that separate Placement and Delivery.): 956 * MAY perform Placement of DDP Segments out of order, 958 Shah, et. al. Expires February 2005 21 959 * MAY perform Placement of a DDP Segment more than once, 961 * MUST Deliver a DDP Message to the ULP at most once, 963 * MUST Deliver DDP Messages to the ULP in the order they were 964 sent by the Data Source. 966 5.4 DDP Message Completion & Delivery 968 At the Data Source, DDP Message transfer is considered completed 969 when the reliable, in-order transport LLP has indicated that the 970 transfer will occur reliably. Note that this in no way restricts the 971 LLP from buffering the data at either the Data Source or Data Sink. 972 Thus at the Data Source, completion of a DDP Message does not 973 necessarily mean that the Data Sink has received the message. 975 At the Data Sink, DDP MUST Deliver a DDP Message if and only if all 976 of the following are true: 978 * the last DDP Segment of the DDP Message had its Last flag set, 980 * all of the DDP Segments of the DDP Message have been Placed, 982 * all preceding DDP Messages have been Placed, and 984 * each preceding DDP Message has been Delivered to the ULP. 986 At the Data Sink, DDP MUST provide the ULP Message Length to the ULP 987 when an Untagged DDP Message is Delivered. The ULP Message Length 988 may be calculated by adding the MO and the ULP Payload length in the 989 last DDP Segment (with the Last flag set) of an Untagged DDP 990 Message. 992 At the Data Sink, DDP MUST provide the RsvdULP Field of the DDP 993 Message to the ULP when the DDP Message is delivered. 995 Shah, et. al. Expires February 2005 22 996 6 DDP Stream Setup & Teardown 998 This section describes LLP independent issues related to DDP Stream 999 setup and teardown. 1001 6.1 DDP Stream Setup 1003 It is expected that the ULP will use a mechanism outside the scope 1004 of this specification to establish an LLP Connection, and that the 1005 LLP Connection will support one or more LLP Streams (e.g. MPA/TCP or 1006 SCTP). After the LLP sets up the LLP Stream, it will enable a DDP 1007 Stream on a specific LLP Stream at an appropriate point. 1009 The ULP is required to enable both endpoints of an LLP Stream for 1010 DDP data transfer at the same time, in both directions; this is 1011 necessary so that the Data Sink can properly recognize the DDP 1012 Segments. 1014 6.2 DDP Stream Teardown 1016 DDP MUST NOT independently initiate Stream Teardown. DDP either 1017 responds to a stream being torn down by the LLP or processes a 1018 request from the ULP to teardown a stream. DDP Stream teardown 1019 disables DDP capabilities on both endpoints. For connection-oriented 1020 LLPs, DDP Stream teardown MAY result in underlying LLP Connection 1021 teardown. 1023 6.2.1 DDP Graceful Teardown 1025 It is up to the ULP to ensure that DDP teardown happens on both 1026 endpoints of the DDP Stream at the same time; this is necessary so 1027 that the Data Sink stops trying to interpret the DDP Segments. 1029 If the Local Peer ULP indicates graceful teardown, the DDP layer on 1030 the Local Peer SHOULD ensure that all ULP data would be transferred 1031 before the underlying LLP Stream & Connection are torn down, and any 1032 further data transfer requests by the Local Peer ULP MUST return an 1033 error. 1035 If the DDP layer on the Local Peer receives a graceful teardown 1036 request from the LLP, any further data received after the request is 1037 considered an error and MUST cause the DDP Stream to be abortively 1038 torn down. 1040 If the Local Peer LLP supports a half-closed LLP Stream, on the 1041 receipt of a LLP graceful teardown request of the DDP Stream, DDP 1042 SHOULD indicate the half-closed state to the ULP, and continue to 1043 process outbound data transfer requests normally. Following this 1044 event, when the Local Peer ULP requests graceful teardown, DDP MUST 1045 indicate to the LLP that it SHOULD perform a graceful close of the 1046 other half of the LLP Stream. 1048 Shah, et. al. Expires February 2005 23 1049 If the Local Peer LLP supports a half-closed LLP Stream, on the 1050 receipt of a ULP graceful half-close teardown request of the DDP 1051 Stream, DDP SHOULD keep data reception enabled on the other half of 1052 the LLP stream. 1054 6.2.2 DDP Abortive Teardown 1056 As previously mentioned, DDP does not independently terminate a DDP 1057 Stream. Thus any of the following fatal errors on a DDP Stream MUST 1058 cause DDP to indicate to the ULP that a fatal error has occurred: 1060 * Underlying LLP Connection or LLP Stream is lost. 1062 * Underlying LLP reports a catastrophic error. 1064 * DDP Header has one or more invalid fields. 1066 If the LLP indicates to the ULP that a fatal error has occurred, the 1067 DDP layer SHOULD report the error to the ULP (see Section 7.2, DDP 1068 Error Numbers) and complete all outstanding ULP requests with an 1069 error. If the underlying LLP Stream is still intact, DDP SHOULD 1070 continue to allow the ULP to transfer additional DDP Messages on the 1071 outgoing half connection after the fatal error was indicated to the 1072 ULP. This enables the ULP to transfer an error syndrome to the 1073 Remote Peer. After indicating to the ULP a fatal error has occurred, 1074 the DDP Stream MUST NOT be terminated until the Local Peer ULP 1075 indicates to the DDP layer that the DDP Stream should be abortively 1076 torndown. 1078 Shah, et. al. Expires February 2005 24 1079 7 Error Semantics 1081 All LLP errors reported to DDP SHOULD be passed up to the ULP. 1083 7.1 Errors detected at the Data Sink 1085 For non-zero length Untagged DDP Segments, the DDP Segment MUST be 1086 validated before Placement by verifying: 1088 1. The QN is valid for this stream. 1090 2. The QN and MSN have an associated buffer that allows Placement 1091 of the payload. 1093 Implementers note: DDP implementations SHOULD consider lack of 1094 an associated buffer as a system fault. DDP implementations MAY 1095 try to recover from the system fault using LLP means in a ULP- 1096 transparent way. DDP implementations SHOULD NOT permit system 1097 faults to occur repeatedly or frequently. If there is not an 1098 associated buffer, DDP implementations MAY choose to disable 1099 the stream for the reception and report an error to the ULP at 1100 the Data Sink. 1102 3. The MO falls in the range of legal offsets associated with the 1103 Untagged Buffer. 1105 4. The sum of the DDP Segment payload length and the MO falls in 1106 the range of legal offsets associated with the Untagged Buffer. 1108 5. The Message Sequence Number falls in the range of legal Message 1109 Sequence Numbers, for the queue defined by the QN. The legal 1110 range is defined as being between the MSN value assigned to the 1111 first available buffer for a specific QN and the MSN value 1112 assigned to the last available buffer for a specific QN. 1114 Implementers note: for a typical Queue Number, the lower limit 1115 of the Message Sequence Number is defined by whatever DDP 1116 Messages have already been Completed. The upper limit is 1117 defined by however many message buffers are currently available 1118 for that queue. Both numbers change dynamically as new DDP 1119 Messages are received and Completed, and new buffers are added. 1120 It is up to the ULP to ensure that sufficient buffers are 1121 available to handle the incoming DDP Segments. 1123 For non-zero length Tagged DDP Segments, the segment MUST be 1124 validated before Placement by verifying: 1126 1. The STag is valid for this stream. 1128 2. The STag has an associated buffer that allows Placement of the 1129 payload. 1131 Shah, et. al. Expires February 2005 25 1132 3. The TO falls in the range of legal offsets registered for the 1133 STag. 1135 4. The sum of the DDP Segment payload length and the TO falls in 1136 the range of legal offsets registered for the STag. 1138 5. A 64-bit unsigned sum of the DDP Segment payload length and the 1139 TO does not wrap. 1141 If the DDP layer detects any of the receive errors listed in this 1142 section, it MUST cease placing the remainder of the DDP Segment and 1143 report the error(s) to the ULP. The DDP layer SHOULD include in the 1144 error report the DDP Header, the type of error, and the length of 1145 the DDP segment, if available. DDP MUST silently drop any subsequent 1146 incoming DDP Segments. Since each of these errors represents a 1147 failure of the sending ULP or protocol, DDP SHOULD enable the ULP to 1148 send one additional DDP Message before terminating the DDP Stream. 1150 7.2 DDP Error Numbers 1152 The following error numbers MUST be used when reporting errors to 1153 the ULP. They correspond to the checks enumerated in section 7.1. 1154 Each error is subdivided into a 4-bit Error Type and an 8 bit Error 1155 Code. 1157 Error Error 1158 Type Code Description 1159 ---------------------------------------------------------- 1160 0x0 0x00 Local Catastrophic 1162 0x1 Tagged Buffer Error 1163 0x00 Invalid STag 1164 0x01 Base or bounds violation 1165 0x02 STag not associated with DDP Stream 1166 0x03 TO wrap 1167 0x04 Invalid DDP version 1169 0x2 Untagged Buffer Error 1170 0x01 Invalid QN 1171 0x02 Invalid MSN - no buffer available 1172 0x03 Invalid MSN - MSN range is not valid 1173 0x04 Invalid MO 1174 0x05 DDP Message too long for available buffer 1175 0x06 Invalid DDP version 1177 0x3 Rsvd Reserved for the use by the LLP 1179 Shah, et. al. Expires February 2005 26 1180 8 Security Considerations 1182 This section discusses both protocol-specific considerations and the 1183 implications of using DDP with existing security mechanisms. A more 1184 detailed analysis of the security issues around the implementation 1185 and the use of the DDP can be found in [RDMASEC]. 1187 8.1 Protocol-specific Security Considerations 1189 The vulnerabilities of DDP to active third-party interference are no 1190 greater than any other protocol running over TCP. A third party, by 1191 injecting spoofed packets into the network that are Delivered to a 1192 DDP Data Sink, could launch a variety of attacks that exploit DDP- 1193 specific behavior. Since DDP directly or indirectly exposes memory 1194 addresses on the wire, the Placement information carried in each DDP 1195 Segment must be validated, including invalid STag and octet level 1196 granularity base and bounds check, before any data is Placed. For 1197 example, a third-party adversary could inject random packets that 1198 appear to be valid DDP Segments and corrupt the memory on a DDP Data 1199 Sink. Since DDP is IP transport protocol independent, communication 1200 security mechanisms such as IPsec [IPSEC] or TLS [TLS] may be used 1201 to prevent such attacks. 1203 8.2 Using IPSec with DDP 1205 IPsec can be used to protect against the packet injection attacks 1206 outlined above. Because IPsec is designed to secure arbitrary IP 1207 packet streams, including streams where packets are lost, DDP can 1208 run on top of IPsec without any change. IPsec packets are processed 1209 (e.g., integrity checked and possibly decrypted) in the order they 1210 are received, and a DDP Data Sink will process the decrypted DDP 1211 Segments contained in these packets in the same manner as DDP 1212 Segments contained in unsecured IP packets. 1214 8.3 Association of an STag and a DDP Stream 1216 There are several mechanisms for associating an STag and a DDP 1217 Stream. Two required mechanisms for this association are a 1218 Protection Domain (PD) association and a DDP Stream association. 1220 Under the Protection Domain (PD) association, a unique Protection 1221 Domain Identifier (PD ID) is created and used locally to associate 1222 an STag with a set of DDP Streams. Under this mechanism, the use of 1223 the STag is only permitted on the DDP Streams that have the same PD 1224 ID as the STag. For an incoming DDP Segment of a Tagged DDP Message 1225 on a DDP Stream, if the PD ID of the DDP Stream is not the same as 1226 the PD ID of the STag targeted by the Tagged DDP Message, then the 1227 DDP Segment is not placed and the DDP layer MUST surface a local 1228 error to the ULP. Note that the PD ID is locally defined, and cannot 1229 be directly manipulated by the Remote Peer. 1231 Under the DDP Stream association, a DDP Stream is identified locally 1232 by a unique DDP Stream identifier (ID). An STag is associated with a 1234 Shah, et. al. Expires February 2005 27 1235 DDP Stream by using a DDP Stream ID. In this case, for an incoming 1236 DDP Segment of a Tagged DDP Message on a DDP Stream, if the DDP 1237 Stream ID of the DDP Stream is not the same as the DDP Stream ID of 1238 the STag targeted by the Tagged DDP Message, then the DDP Segment is 1239 not placed and the DDP layer MUST surface a local error to the ULP. 1240 Note that the DDP Stream ID is locally defined, and cannot be 1241 directly manipulated by the Remote Peer. 1243 A ULP SHOULD associate an STag and a DDP Stream. DDP MUST support 1244 Protection Domain association and DDP Stream association mechanisms 1245 for associating an STag and a DDP Stream. 1247 8.4 Other Security Considerations 1249 DDP has several mechanisms that deal with a number of attacks. 1250 These attacks include, but are not limited to: 1252 1. Connection to/from an unauthorized or unauthenticated endpoint. 1253 2. Hijacking of a DDP Stream. 1254 3. Attempts to read or write from unauthorized memory regions. 1255 4. Injection of RDMA Messages within a Stream on a multi-user 1256 operating system by another application. 1258 DDP relies on the LLP to establish the LLP Stream over which DDP 1259 Messages will be carried. DDP itself does nothing to authenticate 1260 the validity of the LLP Stream of either of the endpoints. It is the 1261 responsibility of the ULP to validate the LLP Stream. This is highly 1262 desirable due to the nature of DDP. 1264 Hijacking of an DDP Stream would require that the underlying LLP 1265 Stream is hijacked. This would require knowledge of Advertised 1266 buffers in order to directly Place data into a user buffer and is 1267 therefore constrained by the same techniques mentioned to guard 1268 against attempts to read or write from unauthorized memory regions. 1270 DDP does not require a node to open its buffers to arbitrary attacks 1271 over the DDP Stream. It may access ULP memory only to the extent 1272 that the ULP has enabled and authorized it to do so. The STag 1273 access control model is defined in [RDMASEC]. Specific security 1274 operations include: 1276 1. STags are only valid over the exact byte range established by the 1277 ULP. DDP MUST provide a mechanism for the ULP to establish and 1278 revoke the TO range associated with the ULP Buffer referenced by 1279 the STag. 1280 2. STags are only valid for the duration established by the ULP. The 1281 ULP may revoke them at any time, in accordance with its own upper 1282 layer protocol requirements. DDP MUST provide a mechanism for the 1283 ULP to establish and revoke STag validity. 1285 Shah, et. al. Expires February 2005 28 1286 3. DDP MUST provide a mechanism for the ULP to communicate the 1287 association between a STag and a specific DDP Stream. 1288 4. A ULP may only expose memory to remote access to the extent that 1289 it already had access to that memory itself. 1290 5. If an STag is not valid on a DDP Stream, DDP MUST pass the invalid 1291 access attempt to the ULP. The ULP may provide a mechanism for 1292 terminating the DDP Stream. 1294 Further, DDP provides a mechanism that directly Places incoming 1295 payloads in user-mode ULP Buffers. This avoids the risks of prior 1296 solutions that relied upon exposing system buffers for incoming 1297 payloads. 1299 Shah, et. al. Expires February 2005 29 1300 9 IANA Considerations 1302 If DDP was enabled a priori for a ULP by connecting to a well-known 1303 port, this well-known port would be registered for the DDP with 1304 IANA. 1306 Shah, et. al. Expires February 2005 30 1307 10 References 1309 10.1 Normative References 1311 [RFC2026] Bradner, S., "The Internet Standards Process -- Revision 1312 3", BCP 9, RFC 2026, October 1996. 1314 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1315 Requirement Levels", BCP 14, RFC 2119, March 1997. 1317 [MPA] Culley, P., Elzur, U., Recio, R., Bailey, S., Carrier, J., 1318 "Marker PDU Aligned Framing for TCP Specification", Internet 1319 Draft draft-ietf-rddp-mpa-01.txt (work in progress), July 2004 1321 [RDMAP] Recio, R., Culley, P., Garcia, D., Hilland, J., "An RDMA 1322 Protocol Specification", Internet Draft draft-ietf-rddp-rdmap- 1323 01.txt (work in progress), October 2003 1325 [SCTP] Stewart, R. et al., "Stream Control Transmission Protocol", 1326 RFC 2960, October 2000. 1328 [TCP] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, 1329 September 1981. 1331 10.2 Informative References 1333 [TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC 1334 2246, November 1998. 1336 [IPSEC] Atkinson, R., Kent, S., "Security Architecture for the 1337 Internet Protocol", RFC 2401, November 1998. 1339 [RDMASEC] Pinkerton J., Deleganes E., Romanow A., Bitan S., 1340 "DDP/RDMAP Security", draft-ietf-rddp-security-05.txt (work in 1341 progress), August 2004. 1343 Shah, et. al. Expires February 2005 31 1344 11 Appendix 1346 11.1 Receive Window sizing 1348 Reliable, sequenced, LLPs include a mechanism to advertise the 1349 amount of receive buffer space a sender may consume. This is 1350 generally called a "receive window". 1352 DDP allows data to be transferred directly to predefined buffers at 1353 the Data Sink. Accordingly, the LLP receive window size need not be 1354 affected by the reception of a DDP Segment, if that segment is 1355 placed before additional segments arrive. 1357 The LLP implementation SHOULD maintain an advertised receive window 1358 large enough to enable a reasonable number of segments to be 1359 outstanding at one time. The amount to advertise depends on the 1360 desired data rate, and the expected or actual round trip delay 1361 between endpoints. 1363 The amount of actual buffers maintained to "back up" the receive 1364 window is left up to the implementation. This amount will depend on 1365 the rate that DDP Segments can be retired; there may be some cases 1366 where segment processing cannot keep up with the incoming packet 1367 rate. If this occurs, one reasonable way to slow the incoming packet 1368 rate is to reduce the receive window. 1370 Note that the LLP should take care to comply with the applicable 1371 RFCs; for instance, for TCP, receivers are highly discouraged from 1372 "shrinking" the receive window (reducing the right edge of the 1373 window after it has been advertised). 1375 Shah, et. al. Expires February 2005 32 1376 12 Author's Addresses 1378 Hemal Shah 1379 Intel Corporation 1380 MS AN1-PTL1 1381 1501 South Mopac Expressway, #400 1382 Austin, TX 78746 USA 1383 Phone: +1 (512) 732-3963 1384 Email: hemal.shah@intel.com 1386 James Pinkerton 1387 Microsoft Corporation 1388 One Microsoft Way 1389 Redmond, WA 98052 USA 1390 Phone: +1 (425) 705-5442 1391 Email: jpink@microsoft.com 1393 Renato Recio 1394 IBM Corporation 1395 11501 Burnett Road 1396 Austin, TX 78758 USA 1397 Phone: +1 (512) 838-1365 1398 Email: recio@us.ibm.com 1400 Paul R. Culley 1401 Hewlett-Packard Company 1402 20555 SH 249 1403 Houston, TX 77070-2698 USA 1404 Phone: +1 (281) 514-5543 1405 Email: paul.culley@hp.com 1407 Shah, et. al. Expires February 2005 33 1408 13 Acknowledgments 1410 John Carrier 1411 Adaptec, Inc. 1412 691 S. Milpitas Blvd. 1413 Milpitas, CA 95035 USA 1414 Phone: +1 (360) 378-8526 1415 Email: john_carrier@adaptec.com 1417 Hari Ghadia 1418 Adaptec, Inc. 1419 691 S. Milpitas Blvd., 1420 Milpitas, CA 95035 USA 1421 Phone: +1 (408) 957-5608 1422 Email: hari_ghadia@adaptec.com 1424 Patricia Thaler 1425 Agilent Technologies, Inc. 1426 1101 Creekside Ridge Drive, #100 1427 M/S-RG10 1428 Roseville, CA 95678 1429 Phone: +1-916-788-5662 1430 email: pat_thaler@agilent.com 1432 Mike Penna 1433 Broadcom Corporation 1434 16215 Alton Parkway 1435 Irvine, California 92619-7013 USA 1436 Phone: +1 (949) 926-7149 1437 Email: MPenna@Broadcom.com 1439 Uri Elzur 1440 Broadcom Corporation 1441 16215 Alton Parkway 1442 Irvine, California 92619-7013 USA 1443 Phone: +1 (949) 585-6432 1444 Email: Uri@Broadcom.com 1446 Ted Compton 1447 EMC Corporation 1448 Research Triangle Park, NC 27709, USA 1449 Phone: 919-248-6075 1450 Email: compton_ted@emc.com 1452 Jim Wendt 1453 Hewlett-Packard Company 1454 8000 Foothills Boulevard 1455 Roseville, CA 95747-5668 USA 1456 Phone: +1 (916) 785-5198 1457 Email: jim_wendt@hp.com 1459 Mike Krause 1460 Hewlett-Packard Company, 43LN 1462 Shah, et. al. Expires February 2005 34 1463 19410 Homestead Road 1464 Cupertino, CA 95014 USA 1465 Phone: +1 (408) 447-3191 1466 Email: krause@cup.hp.com 1468 Dave Minturn 1469 Intel Corporation 1470 MS JF1-210 1471 5200 North East Elam Young Parkway 1472 Hillsboro, OR 97124 USA 1473 Phone: +1 (503) 712-4106 1474 Email: dave.b.minturn@intel.com 1476 Howard C. Herbert 1477 Intel Corporation 1478 MS CH7-404 1479 5000 West Chandler Blvd. 1480 Chandler, AZ 85226 USA 1481 Phone: +1 (480) 554-3116 1482 Email: howard.c.herbert@intel.com 1484 Tom Talpey 1485 Network Appliance 1486 375 Totten Pond Road 1487 Waltham, MA 02451 USA 1488 Phone: +1 (781) 768-5329 1489 EMail: thomas.talpey@netapp.com 1491 Dwight Barron 1492 Hewlett-Packard Company 1493 20555 SH 249 1494 Houston, TX 77070-2698 USA 1495 Phone: +1 (281) 514-2769 1496 Email: Dwight.Barron@Hp.com 1498 Dave Garcia 1499 Hewlett-Packard Company 1500 19333 Vallco Parkway 1501 Cupertino, Ca. 95014 USA 1502 Phone: +1 (408) 285-6116 1503 Email: dave.garcia@hp.com 1505 Jeff Hilland 1506 Hewlett-Packard Company 1507 20555 SH 249 1508 Houston, Tx. 77070-2698 USA 1509 Phone: +1 (281) 514-9489 1510 Email: jeff.hilland@hp.com 1512 Shah, et. al. Expires February 2005 35 1513 Barry Reinhold 1514 Lamprey Networks 1515 Durham, NH 03824 USA 1516 Phone: +1 (603) 868-8411 1517 Email: bbr@LampreyNetworks.com 1519 Shah, et. al. Expires February 2005 36 1520 14 Full Copyright Statement 1522 This document and the information contained herein is provided on an 1523 "AS IS" basis and ADAPTEC INC., AGILENT TECHNOLOGIES INC., BROADCOM 1524 CORPORATION, CISCO SYSTEMS INC., EMC CORPORATION, HEWLETT-PACKARD 1525 COMPANY, INTERNATIONAL BUSINESS MACHINES CORPORATION, INTEL 1526 CORPORATION, MICROSOFT CORPORATION, NETWORK APPLIANCE INC., THE 1527 INTERNET SOCIETY, AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM 1528 ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY 1529 WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE 1530 ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS 1531 FOR A PARTICULAR PURPOSE. 1533 Copyright (c) The Internet Society (2004). This document is subject 1534 to the rights, licenses and restrictions contained in BCP 78, and 1535 except as set forth therein, the authors retain all their rights. 1537 Copyright (c) 2002 ADAPTEC INC., BROADCOM CORPORATION, CISCO SYSTEMS 1538 INC., EMC CORPORATION, HEWLETT-PACKARD COMPANY, INTERNATIONAL 1539 BUSINESS MACHINES CORPORATION, INTEL CORPORATION, MICROSOFT 1540 CORPORATION, NETWORK APPLIANCE INC., All Rights Reserved. 1542 Shah, et. al. Expires February 2005 37