draft-ietf-nfsv4-rfc5666bis-02.txt   draft-ietf-nfsv4-rfc5666bis-03.txt 
Network File System Version 4 C. Lever, Ed. Network File System Version 4 C. Lever, Ed.
Internet-Draft Oracle Internet-Draft Oracle
Obsoletes: 5666 (if approved) W. Simpson Obsoletes: 5666 (if approved) W. Simpson
Intended status: Standards Track DayDreamer Intended status: Standards Track DayDreamer
Expires: July 14, 2016 T. Talpey Expires: July 28, 2016 T. Talpey
Microsoft Microsoft
January 11, 2016 January 25, 2016
Remote Direct Memory Access Transport for Remote Procedure Call Remote Direct Memory Access Transport for Remote Procedure Call
draft-ietf-nfsv4-rfc5666bis-02 draft-ietf-nfsv4-rfc5666bis-03
Abstract Abstract
This document specifies a protocol for conveying Remote Procedure This document specifies a protocol for conveying Remote Procedure
Call (RPC) messages on physical transports capable of Remote Direct Call (RPC) messages on physical transports capable of Remote Direct
Memory Access (RDMA). It requires no revision to application RPC Memory Access (RDMA). It requires no revision to application RPC
protocols or the RPC protocol itself. This document obsoletes RFC protocols or the RPC protocol itself. This document obsoletes RFC
5666. 5666.
Status of This Memo Status of This Memo
skipping to change at page 1, line 37 skipping to change at page 1, line 37
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 14, 2016. This Internet-Draft will expire on July 28, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
1.2. RPC On RDMA Transports . . . . . . . . . . . . . . . . . 3 1.2. Remote Procedure Calls On RDMA Transports . . . . . . . . 3
2. Changes Since RFC 5666 . . . . . . . . . . . . . . . . . . . 4 2. Changes Since RFC 5666 . . . . . . . . . . . . . . . . . . . 4
2.1. Changes To The Specification . . . . . . . . . . . . . . 4 2.1. Changes To The Specification . . . . . . . . . . . . . . 4
2.2. Changes To The Protocol . . . . . . . . . . . . . . . . . 4 2.2. Changes To The Protocol . . . . . . . . . . . . . . . . . 5
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Remote Procedure Calls . . . . . . . . . . . . . . . . . 5 3.1. Remote Procedure Calls . . . . . . . . . . . . . . . . . 5
3.2. Remote Direct Memory Access . . . . . . . . . . . . . . . 8 3.2. Remote Direct Memory Access . . . . . . . . . . . . . . . 8
4. RPC-Over-RDMA Protocol Framework . . . . . . . . . . . . . . 10 4. RPC-Over-RDMA Protocol Framework . . . . . . . . . . . . . . 10
4.1. Transfer Models . . . . . . . . . . . . . . . . . . . . . 10 4.1. Transfer Models . . . . . . . . . . . . . . . . . . . . . 10
4.2. RPC Message Framing . . . . . . . . . . . . . . . . . . . 11 4.2. Message Framing . . . . . . . . . . . . . . . . . . . . . 11
4.3. Flow Control . . . . . . . . . . . . . . . . . . . . . . 11 4.3. Managing Receiver Resources . . . . . . . . . . . . . . . 12
4.4. XDR Encoding With Chunks . . . . . . . . . . . . . . . . 13 4.4. XDR Encoding With Chunks . . . . . . . . . . . . . . . . 14
4.5. Message Size . . . . . . . . . . . . . . . . . . . . . . 19 4.5. Message Size . . . . . . . . . . . . . . . . . . . . . . 20
5. RPC-Over-RDMA In Operation . . . . . . . . . . . . . . . . . 20 5. RPC-Over-RDMA In Operation . . . . . . . . . . . . . . . . . 21
5.1. XDR Protocol Definition . . . . . . . . . . . . . . . . . 21 5.1. XDR Protocol Definition . . . . . . . . . . . . . . . . . 22
5.2. Fixed Header Fields . . . . . . . . . . . . . . . . . . . 23 5.2. Fixed Header Fields . . . . . . . . . . . . . . . . . . . 24
5.3. Chunk Lists . . . . . . . . . . . . . . . . . . . . . . . 25 5.3. Chunk Lists . . . . . . . . . . . . . . . . . . . . . . . 26
5.4. Memory Registration . . . . . . . . . . . . . . . . . . . 26 5.4. Memory Registration . . . . . . . . . . . . . . . . . . . 28
5.5. Error Handling . . . . . . . . . . . . . . . . . . . . . 28 5.5. Error Handling . . . . . . . . . . . . . . . . . . . . . 30
5.6. Protocol Elements No Longer Supported . . . . . . . . . . 30 5.6. Protocol Elements No Longer Supported . . . . . . . . . . 32
5.7. XDR Examples . . . . . . . . . . . . . . . . . . . . . . 31 5.7. XDR Examples . . . . . . . . . . . . . . . . . . . . . . 33
6. RPC Bind Parameters . . . . . . . . . . . . . . . . . . . . . 32 6. RPC Bind Parameters . . . . . . . . . . . . . . . . . . . . . 34
7. Bi-Directional RPC-Over-RDMA . . . . . . . . . . . . . . . . 34 7. Bi-Directional RPC-Over-RDMA . . . . . . . . . . . . . . . . 35
7.1. RPC Direction . . . . . . . . . . . . . . . . . . . . . . 34 7.1. RPC Direction . . . . . . . . . . . . . . . . . . . . . . 36
7.2. Backward Direction Flow Control . . . . . . . . . . . . . 35 7.2. Backward Direction Flow Control . . . . . . . . . . . . . 37
7.3. Conventions For Backward Operation . . . . . . . . . . . 36 7.3. Conventions For Backward Operation . . . . . . . . . . . 38
7.4. Backward Direction Upper Layer Binding . . . . . . . . . 38 7.4. Backward Direction Upper Layer Binding . . . . . . . . . 40
8. Upper Layer Binding Specifications . . . . . . . . . . . . . 39 8. Upper Layer Binding Specifications . . . . . . . . . . . . . 41
8.1. DDP-Eligibility . . . . . . . . . . . . . . . . . . . . . 39 8.1. DDP-Eligibility . . . . . . . . . . . . . . . . . . . . . 41
8.2. Maximum Reply Size . . . . . . . . . . . . . . . . . . . 41 8.2. Maximum Reply Size . . . . . . . . . . . . . . . . . . . 42
8.3. Additional Considerations . . . . . . . . . . . . . . . . 42 8.3. Additional Considerations . . . . . . . . . . . . . . . . 43
8.4. Upper Layer Protocol Extensions . . . . . . . . . . . . . 42 8.4. Upper Layer Protocol Extensions . . . . . . . . . . . . . 43
9. Transport Protocol Extensibility . . . . . . . . . . . . . . 42 9. Extensibility Guidelines . . . . . . . . . . . . . . . . . . 43
9.1. RPC-over-RDMA Version Numbering . . . . . . . . . . . . . 43 9.1. Extending RPC-over-RDMA Header XDR . . . . . . . . . . . 44
10. Security Considerations . . . . . . . . . . . . . . . . . . . 43 9.2. RPC-over-RDMA Version Numbering . . . . . . . . . . . . . 45
10.1. Memory Protection . . . . . . . . . . . . . . . . . . . 43 10. Security Considerations . . . . . . . . . . . . . . . . . . . 46
10.2. Using GSS With RPC-Over-RDMA . . . . . . . . . . . . . . 44 10.1. Memory Protection . . . . . . . . . . . . . . . . . . . 46
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 45 10.2. Using GSS With RPC-Over-RDMA . . . . . . . . . . . . . . 46
12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 46 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 47
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 46 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 48
13.1. Normative References . . . . . . . . . . . . . . . . . . 46 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 48
13.2. Informative References . . . . . . . . . . . . . . . . . 47 13.1. Normative References . . . . . . . . . . . . . . . . . . 48
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 48 13.2. Informative References . . . . . . . . . . . . . . . . . 49
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51
1. Introduction 1. Introduction
This document obsoletes RFC 5666; however, the protocol specified by This document obsoletes RFC 5666. However, the protocol specified by
this document is based on existing interoperating implementations of this document is based on existing interoperating implementations of
the RPC-over-RDMA Version One protocol. The new specification the RPC-over-RDMA Version One protocol.
clarifies text that is subject to multiple interpretations and
removes support for unimplemented RPC-over-RDMA Version One protocol The new specification clarifies text that is subject to multiple
elements. This document makes the role of Upper Layer Bindings an interpretations, and removes support for unimplemented RPC-over-RDMA
explicit part of the specification. In addition, this document Version One protocol elements. It makes the role of Upper Layer
introduces conventions that enable bi-directional RPC-over-RDMA Bindings an explicit part of the protocol specification.
operation to allow operation of NFSv4.1 [RFC5661] on RDMA transports.
In addition, this document introduces conventions that enable bi-
directional RPC-over-RDMA operation, enabling operation of NFSv4.1
[RFC5661] on RDMA transports.
1.1. Requirements Language 1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
1.2. RPC On RDMA Transports 1.2. Remote Procedure Calls On RDMA Transports
Remote Direct Memory Access (RDMA) [RFC5040] [RFC5041] [IB] is a Remote Direct Memory Access (RDMA) [RFC5040] [RFC5041] [IB] is a
technique for moving data efficiently between end nodes. By technique for moving data efficiently between end nodes. By
directing data into destination buffers as it is sent on a network, directing data into destination buffers as it is sent on a network,
and placing it via direct memory access by hardware, the benefits of and placing it via direct memory access by hardware, the benefits of
faster transfers and reduced host overhead are obtained. faster transfers and reduced host overhead are obtained.
Open Network Computing Remote Procedure Call (ONC RPC, or simply, Open Network Computing Remote Procedure Call (ONC RPC, or simply,
RPC) [RFC5531] is a remote procedure call protocol that runs over a RPC) [RFC5531] is a remote procedure call protocol that runs over a
variety of transports. Most RPC implementations today use UDP or variety of transports. Most RPC implementations today use UDP
TCP. On UDP, RPC messages are encapsulated inside datagrams, while [RFC0768] or TCP [RFC0793]. On UDP, RPC messages are encapsulated
on a TCP byte stream, RPC messages are delineated by a record marking inside datagrams, while on a TCP byte stream, RPC messages are
protocol. An RDMA transport also conveys RPC messages in a specific delineated by a record marking protocol. An RDMA transport also
fashion that must be fully described if RPC implementations are to conveys RPC messages in a specific fashion that must be fully
interoperate. described if RPC implementations are to interoperate.
RDMA transports present semantics different from either UDP or TCP. RDMA transports present semantics different from either UDP or TCP.
They retain message delineations like UDP, but provide a reliable and They retain message delineations like UDP, but provide a reliable and
sequenced data transfer like TCP. They also provide an offloaded sequenced data transfer like TCP. They also provide an offloaded
bulk transfer service not provided by UDP or TCP. RDMA transports bulk transfer service not provided by UDP or TCP. RDMA transports
are therefore appropriately viewed as a new transport type by RPC. are therefore appropriately viewed as a new transport type by RPC.
In this context, the Network File System (NFS) protocols as described In this context, the Network File System (NFS) protocols as described
in [RFC1094], [RFC1813], [RFC7530], [RFC5661], and future NFSv4 minor in [RFC1094], [RFC1813], [RFC7530], [RFC5661], and future NFSv4 minor
verions are obvious beneficiaries of RDMA transports. A complete verions are obvious beneficiaries of RDMA transports. A complete
skipping to change at page 4, line 27 skipping to change at page 4, line 31
The following alterations have been made to the RPC-over-RDMA Version The following alterations have been made to the RPC-over-RDMA Version
One specification. The section numbers below refer to [RFC5666]. One specification. The section numbers below refer to [RFC5666].
o Section 2 has been expanded to introduce and explain key RPC, XDR, o Section 2 has been expanded to introduce and explain key RPC, XDR,
and RDMA terminology. These terms are now used consistently and RDMA terminology. These terms are now used consistently
throughout the specification. This change was necesssary because throughout the specification. This change was necesssary because
implementers familiar with RDMA are often not familiar with the implementers familiar with RDMA are often not familiar with the
mechanics of RPC, and vice versa. mechanics of RPC, and vice versa.
o Section 3 has been re-organized and split into sub-sections to o Section 3 has been re-organized and split into sub-sections to
help implementers locate specific requirements and definitions. help readers locate specific requirements and definitions.
o Sections 4 and 5 have been combined for clarity and to improve the o Sections 4 and 5 have been combined to improve the organization of
organization of this information. this information.
o The XDR definition of RPC-over-RDMA Version One has been updated o The XDR definition of RPC-over-RDMA Version One has been updated
(without on-the-wire changes) to align with the terms and concepts (without on-the-wire changes) to align with the terms and concepts
introduced in this specification. introduced in this document.
o The specification of the optional Connection Configuration o The specification of the optional Connection Configuration
Protocol has been removed from the specification, as there are no Protocol has been removed from the specification, as there are no
known implementations of the protocol. known implementations of this protocol.
o A section outlining requirements for Upper Layer Bindings has been o A section consolidating requirements for Upper Layer Bindings has
added. been added.
o A section discussing RPC-over-RDMA protocol extensibility has been o A section discussing RPC-over-RDMA protocol extensibility has been
added. added.
2.2. Changes To The Protocol 2.2. Changes To The Protocol
While the protocol described herein interoperates with existing Although the protocol described herein interoperates with existing
implementations of [RFC5666], the following changes have been made implementations of [RFC5666], the following changes have been made
relative to the protocol described in that document: relative to the protocol described in that document:
o Support for the Read-Read transfer model has been removed. Read- o Support for the Read-Read transfer model has been removed. Read-
Read is a slower transfer model than Read-Write, thus implementers Read is a slower transfer model than Read-Write, thus implementers
have chosen not to support it. This simplifies explanatory text, have chosen not to support it. Removal simplifies explanatory
and support for the RDMA_DONE message type is no longer necessary. text, and support for the RDMA_DONE procedure is no longer
necessary.
o The specification of RDMA_MSGP in [RFC5666] and current o The specification of RDMA_MSGP in [RFC5666] and current
implementations of it are incomplete. Therefore the RDMA_MSGP implementations of it are incomplete. Even if completed, benefit
message type is no longer supported. for protocols such as NFSv4.0 [RFC7530] is doubtful. Therefore
the RDMA_MSGP message type is no longer supported.
o Technical errors with regard to handling RPC-over-RDMA header o Technical errors with regard to handling RPC-over-RDMA header
errors have been corrected. errors have been corrected.
o Specific requirements related to handling XDR round-up and o Specific requirements related to handling XDR round-up and complex
abstract data types have been added. Responders are now forbidden XDR data types have been added. Responders are now forbidden from
from writing Write chunk round-up bytes. writing Write chunk round-up bytes.
o Explicit guidance is provided for sizing Write chunks, managing
multiple chunks in the Write list, and handling unused Write
chunks.
o Clear guidance about Send and Receive buffer size has been added. o Clear guidance about Send and Receive buffer size has been added.
This enables better decisions about when to provide and use the This enables better decisions about when to provide and use the
Reply chunk. Reply chunk.
o A section specifying bi-directional RPC operation on RPC-over-RDMA o A section specifying bi-directional RPC operation on RPC-over-RDMA
has been added. This enables the NFSv4.1 [RFC5661] backchannel on has been added. This enables the NFSv4.1 [RFC5661] backchannel on
RPC-over-RDMA Version One transports when both endpoints support RPC-over-RDMA Version One transports when both endpoints support
the new functionality. the new functionality.
skipping to change at page 5, line 45 skipping to change at page 6, line 8
3.1. Remote Procedure Calls 3.1. Remote Procedure Calls
This section introduces key elements of the Remote Procedure Call This section introduces key elements of the Remote Procedure Call
[RFC5531] and External Data Representation [RFC4506] protocols, upon [RFC5531] and External Data Representation [RFC4506] protocols, upon
which RPC-over-RDMA Version One is constructed. which RPC-over-RDMA Version One is constructed.
3.1.1. Upper Layer Protocols 3.1.1. Upper Layer Protocols
Remote Procedure Calls are an abstraction used to implement the Remote Procedure Calls are an abstraction used to implement the
operations of an "Upper Layer Protocol," sometimes referred to as a operations of an "Upper Layer Protocol," or ULP. The term Upper
ULP. The term Upper Layer Protocol refers to an RPC Program and Layer Protocol refers to an RPC Program and Version tuple, which is a
Version tuple, which is a versioned set of procedure calls that versioned set of procedure calls that comprise a single well-defined
comprise a single well-defined API. One example of an Upper Layer API. One example of an Upper Layer Protocol is the Network File
Protocol is the Network File System Version 4.0 [RFC7530]. System Version 4.0 [RFC7530].
3.1.2. Requesters And Responders 3.1.2. Requesters And Responders
Like a local procedure call, every Remote Procedure Call has a set of Like a local procedure call, every Remote Procedure Call (RPC) has a
"arguments" and a set of "results". A calling context is not allowed set of "arguments" and a set of "results". A calling context is not
to proceed until the procedure's results are available to it. Unlike allowed to proceed until the procedure's results are available to it.
a local procedure call, the called procedure is executed remotely Unlike a local procedure call, the called procedure is executed
rather than in the local application's context. remotely rather than in the local application's context.
The RPC protocol as described in [RFC5531] is fundamentally a The RPC protocol as described in [RFC5531] is fundamentally a
message-passing protocol between one server and one or more clients. message-passing protocol between one server and one or more clients.
ONC RPC transactions are made up of two types of messages: ONC RPC transactions are made up of two types of messages:
CALL Message CALL Message
A CALL message, or "Call", requests that work be done. A Call is A CALL message, or "Call", requests that work be done. A Call is
designated by the value CALL in the message's msg_type field. An designated by the value zero (0) in the message's msg_type field.
arbitrary unique value is placed in the message's xid field. An arbitrary unique value is placed in the message's xid field in
order to match this CALL message to a corresponding REPLY message.
REPLY Message REPLY Message
A REPLY message, or "Reply", reports the results of work requested A REPLY message, or "Reply", reports the results of work requested
by a Call. A Reply is designated by the value REPLY in the by a Call. A Reply is designated by the value one (1) in the
message's msg_type field. The value contained in the message's message's msg_type field. The value contained in the message's
xid field is copied from the Call whose results are being xid field is copied from the Call whose results are being
reported. reported.
An RPC client endpoint, or "requester", serializes an RPC call's The RPC client endpoint, or "requester", serializes an RPC Call's
arguments and conveys them to a server endpoint via an RPC call arguments and conveys them to a server endpoint via an RPC Call
message. This message contains an RPC protocol header, a header message. This message contains an RPC protocol header, a header
describing the requested upper layer operation, and all arguments. describing the requested upper layer operation, and all arguments.
The server endpoint, or "responder", deserializes the arguments and The RPC server endpoint, or "responder", deserializes the arguments
processes the requested operation. It then serializes the and processes the requested operation. It then serializes the
operation's results into another byte stream. This byte stream is operation's results into another byte stream. This byte stream is
conveyed back to the requester via an RPC reply message. This conveyed back to the requester via an RPC Reply message. This
message contains an RPC protocol header, a header describing the message contains an RPC protocol header, a header describing the
upper layer reply, and all results. upper layer reply, and all results.
The requester deserializes the results and allows the original caller The requester deserializes the results and allows the original caller
to proceed. At this point the RPC transaction designated by the xid to proceed. At this point the RPC transaction designated by the xid
in the call message is terminated and the xid is retired. in the Call message is complete, and the xid is retired.
3.1.3. RPC Transports 3.1.3. RPC Transports
The role of an "RPC transport" is to mediate the exchange of RPC The role of an "RPC transport" is to mediate the exchange of RPC
messages between requesters and responders. An RPC transport bridges messages between requesters and responders. An RPC transport bridges
the gap between the RPC message abstraction and the native operations the gap between the RPC message abstraction and the native operations
of a particular network transport. of a particular network transport.
RPC-over-RDMA is a connection-oriented RPC transport. When a RPC-over-RDMA is a connection-oriented RPC transport. When a
connection-oriented transport is used, ONC RPC client endpoints are connection-oriented transport is used, requesters initiate transport
responsible for initiating transport connections, while ONC RPC connections, while responders wait passively for incoming connection
service endpoints wait passively for incoming connection requests. requests.
3.1.4. External Data Representation 3.1.4. External Data Representation
In a heterogenous environment, one cannot assume that requesters and One cannot assume that all requesters and responders internally
responders represent data the same way. RPC uses eXternal Data represent data objects the same way. RPC uses eXternal Data
Representation, or XDR, to translate data types and serialize Representation, or XDR, to translate data types and serialize
arguments and results [RFC4506]. arguments and results [RFC4506].
The XDR protocol encodes data independent of the endianness or size The XDR protocol encodes data independent of the endianness or size
of host-native data types, allowing unambiguous decoding of data on of host-native data types, allowing unambiguous decoding of data on
the receiving end. RPC programs are specified by writing an XDR the receiving end. RPC Programs are specified by writing an XDR
definition of their procedures, argument data types, and result data definition of their procedures, argument data types, and result data
types. types.
XDR assumes that the number of bits in a byte (octet) and their order XDR assumes that the number of bits in a byte (octet) and their order
are the same on both endpoints and on the physical network. The are the same on both endpoints and on the physical network. The
smallest indivisible unit of XDR encoding is a group of four octets smallest indivisible unit of XDR encoding is a group of four octets
in little-endian order. XDR also flattens lists, arrays, and other in little-endian order. XDR also flattens lists, arrays, and other
complex data types so they can be conveyed as a stream of bytes. complex data types so they can be conveyed as a stream of bytes.
A serialized stream of bytes that is the result of XDR encoding is A serialized stream of bytes that is the result of XDR encoding is
referred to as an "XDR stream." A sending endpoint encodes native referred to as an "XDR stream." A sending endpoint encodes native
data into an XDR stream and then transmits that stream to a receiver. data into an XDR stream and then transmits that stream to a receiver.
A receiving endpoint decodes incoming XDR byte streams into its A receiving endpoint decodes incoming XDR byte streams into its
native data representation format. native data representation format.
3.1.4.1. XDR Opaque Data 3.1.4.1. XDR Opaque Data
Sometimes a data item must be transferred as-is, without encoding or Sometimes a data item must be transferred as-is, without encoding or
decoding. Such a data item is referred to as "opaque data." XDR decoding. Such a data item is referred to as "opaque data." XDR
encoding places opaque data items directly into an XDR stream without encoding places opaque data items directly into an XDR stream without
altering its content in any way. Upper Layer Protocols or altering their content in any way. Upper Layer Protocols or
applications perform any needed data translation in this case. applications perform any needed data translation in this case.
Examples of opaque data items include the contents of files, and
Examples of opaque data items include the content of files, or
generic byte strings. generic byte strings.
3.1.4.2. XDR Round-up 3.1.4.2. XDR Round-up
The number of octets in a variable-size data item precedes that item The number of octets in a variable-size opaque data item precedes
in the encoding stream. If the size of an encoded data item is not a that item in an XDR stream. If the size of an encoded data item is
multiple of four octets, octets containing zero are added to the end not a multiple of four octets, octets containing zero are added to
of the item as it is encoded so that the next encoded data item the end of the item as it is encoded so that the next encoded data
starts on a four-octet boundary. The encoded size of the item is not item starts on a four-octet boundary. The encoded size of the item
changed by the addition of the extra octets, and the zero bytes are is not changed by the addition of the extra octets, and the zero
not exposed to the Upper Layer. bytes are not exposed to the Upper Layer.
This technique is referred to as "XDR round-up," and the extra octets This technique is referred to as "XDR round-up," and the extra octets
are referred to as "XDR padding". are referred to as "XDR padding".
3.2. Remote Direct Memory Access 3.2. Remote Direct Memory Access
RPC requesters and responders can be made more efficient if large RPC RPC requesters and responders can be made more efficient if large RPC
messages are transferred by a third party such as intelligent network messages are transferred by a third party such as intelligent network
interface hardware (data movement offload), and placed in the interface hardware (data movement offload), and placed in the
receiver's memory so that no additional adjustment of data alignment receiver's memory so that no additional adjustment of data alignment
skipping to change at page 9, line 47 skipping to change at page 10, line 8
RDMA Read RDMA Read
The RDMA provider supports an RDMA Read operation to directly The RDMA provider supports an RDMA Read operation to directly
place peer source data in the read initiator's memory. The local place peer source data in the read initiator's memory. The local
host initiates an RDMA Read, and completion is signaled there; no host initiates an RDMA Read, and completion is signaled there; no
completion is signaled on the remote. The local host provides completion is signaled on the remote. The local host provides
steering tags, memory addresses, and a length for the remote steering tags, memory addresses, and a length for the remote
source and local destination memory segments. source and local destination memory segments.
The remote peer receives no notification of RDMA Read completion. The remote peer receives no notification of RDMA Read completion.
The local host signals completion as part of an RDMA Send message The local host signals completion as part of a subsequent RDMA
so that the remote peer can release steering tags and subsequently Send message so that the remote peer can release steering tags and
free associated source memory segments. subsequently free associated source memory segments.
The RPC-over-RDMA Version One protocol is designed to be carried over The RPC-over-RDMA Version One protocol is designed to be carried over
RDMA transports that support the above abstract operations. This RDMA transports that support the above abstract operations. This
protocol conveys to the RPC peer information sufficient for that RPC protocol conveys to the RPC peer information sufficient for that RPC
peer to direct an RDMA layer to perform transfers containing RPC data peer to direct an RDMA layer to perform transfers containing RPC data
and to communicate their result(s). For example, it is readily and to communicate their result(s). For example, it is readily
carried over RDMA transports such as Internet Wide Area RDMA Protocol carried over RDMA transports such as Internet Wide Area RDMA Protocol
(iWARP) [RFC5040] [RFC5041]. (iWARP) [RFC5040] [RFC5041].
4. RPC-Over-RDMA Protocol Framework 4. RPC-Over-RDMA Protocol Framework
skipping to change at page 10, line 52 skipping to change at page 11, line 12
Write-Read Write-Read
The responder exposes its memory to requesters, but requesters do The responder exposes its memory to requesters, but requesters do
not expose their memory. Requesters employ RDMA Write operations not expose their memory. Requesters employ RDMA Write operations
to push RPC arguments or whole RPC calls to the responder. to push RPC arguments or whole RPC calls to the responder.
Requesters employ RDMA Read operations to pull RPC results or Requesters employ RDMA Read operations to pull RPC results or
whole RPC relies from the responder. whole RPC relies from the responder.
[RFC5666] specifies the use of both the Read-Read and the Read-Write [RFC5666] specifies the use of both the Read-Read and the Read-Write
Transfer Model. All current RPC-over-RDMA Version One Transfer Model. All current RPC-over-RDMA Version One
implementations use the Read-Write Transfer Model. Use of the Read- implementations use only the Read-Write Transfer Model. Therefore
Read Transfer Model by RPC-over-RDMA Version One implementations is the use of the Read-Read Transfer Model by RPC-over-RDMA Version One
no longer supported. Other Transfer Models may be used by a future implementations is no longer supported. Other Transfer Models may be
version of RPC-over-RDMA. used by a future version of RPC-over-RDMA.
4.2. RPC Message Framing 4.2. Message Framing
On an RPC-over-RDMA transport, each RPC message is encapsulated by an On an RPC-over-RDMA transport, each RPC message is encapsulated by an
RPC-over-RDMA message. An RPC-over-RDMA message consists of two XDR RPC-over-RDMA message. An RPC-over-RDMA message consists of two XDR
streams. streams.
Transport-Specific Stream RPC Payload Stream
The "transport-specific XDR stream," or "Transport stream," The "Payload stream" contains the encapsulated RPC message being
contains an RPC-over-RDMA header that describes and controls the transferred by this RPC-over-RDMA message. This stream always
transfer of the Payload stream in this RPC-over-RDMA message. begins with the XID field of the encapsulated RPC message.
This header is analogous to the record marking used for RPC over
TCP but is more extensive, since RDMA transports support several
modes of data transfer.
RPC Payload XDR Stream Transport-Specific Stream
The "RPC payload stream," or "Payload stream", contains the The "Transport stream" contains a header that describes and
encapsulated RPC message being transferred by this RPC-over-RDMA controls the transfer of the Payload stream in this RPC-over-RDMA
message. message. This header is analogous to the record marking used for
RPC over TCP but is more extensive, since RDMA transports support
several modes of data transfer.
In its simplest form, an RPC-over-RDMA message consists of a In its simplest form, an RPC-over-RDMA message consists of a
Transport stream followed immediately by a Payload stream conveyed Transport stream followed immediately by a Payload stream conveyed
together in a single RDMA Send. To transmit large RPC messages, a together in a single RDMA Send. To transmit large RPC messages, a
combination of one RDMA Send operation and one or more RDMA Read or combination of one RDMA Send operation and one or more RDMA Read or
Write operations is employed. Write operations is employed.
RPC-over-RDMA framing replaces all other RPC framing (such as TCP RPC-over-RDMA framing replaces all other RPC framing (such as TCP
record marking) when used atop an RPC-over-RDMA association, even record marking) when used atop an RPC-over-RDMA association, even
when the underlying RDMA protocol may itself be layered atop a when the underlying RDMA protocol may itself be layered atop a
transport with a defined RPC framing (such as TCP). transport with a defined RPC framing (such as TCP).
It is however possible for RPC-over-RDMA to be dynamically enabled in It is however possible for RPC-over-RDMA to be dynamically enabled in
the course of negotiating the use of RDMA via an Upper Layer Protocol the course of negotiating the use of RDMA via an Upper Layer Protocol
exchange. Because RPC framing delimits an entire RPC request or exchange. Because RPC framing delimits an entire RPC request or
reply, the resulting shift in framing must occur between distinct RPC reply, the resulting shift in framing must occur between distinct RPC
messages, and in concert with the underlying transport. messages, and in concert with the underlying transport.
4.3. Flow Control 4.3. Managing Receiver Resources
It is critical to provide RDMA Send flow control for an RDMA It is critical to provide RDMA Send flow control for an RDMA
connection. RDMA receive operations can fail if a pre-posted receive connection. If no pre-posted receive buffer is large enough to
buffer is not available to accept an incoming RDMA Send, and repeated accept an incoming RDMA Send, the RDMA Send operation fails. If a
occurrences of such errors can be fatal to the connection. This is a pre-posted receive buffer is not available to accept an incoming RDMA
departure from conventional TCP/IP networking where buffers are Send, the RDMA Send operation can fail. Repeated occurrences of such
allocated dynamically as part of receiving messages. errors can be fatal to the connection. This is a departure from
conventional TCP/IP networking where buffers are allocated
dynamically as part of receiving messages.
Flow control for RDMA Send operations directed to the responder is The longevity of an RDMA connection requires that sending endpoints
implemented as a simple request/grant protocol in the RPC-over-RDMA respect the resource limits of peer receivers. To ensure messages
header associated with each RPC message (Section 5.2.3 has details). can be sent and received reliably, there are two operational
parameters for each connection.
o The RPC-over-RDMA header for RPC call messages contains a 4.3.1. Credit Limit
The number of pre-posted RDMA Receive operations is sometimes
referred to as a peer's "credit limit." Flow control for RDMA Send
operations directed to the responder is implemented as a simple
request/grant protocol in the RPC-over-RDMA header associated with
each RPC message. Section 5.2.3 has further detail.
o The RPC-over-RDMA header for RPC Call messages contains a
requested credit value for the responder. This is the maximum requested credit value for the responder. This is the maximum
number of RPC replies the requester can handle at once, number of RPC replies the requester can handle at once,
independent of how many RPCs are in flight at that moment. The independent of how many RPCs are in flight at that moment. The
requester MAY dynamically adjust the requested credit value to requester MAY dynamically adjust the requested credit value to
match its expected needs. match its expected needs.
o The RPC-over-RDMA header for RPC reply messages provides the o The RPC-over-RDMA header for RPC Reply messages provides the
granted result. This is the maximum number of RPC calls the granted result. This is the maximum number of RPC calls the
responder can handle at once, without regard to how many RPCs are responder can handle at once, without regard to how many RPCs are
in flight at that moment. The granted value MUST NOT be zero, in flight at that moment. The granted value MUST NOT be zero,
since such a value would result in deadlock. The responder MAY since such a value would result in deadlock. The responder MAY
dynamically adjust the granted credit value to match its needs or dynamically adjust the granted credit value to match its needs or
policies (e.g. to accommodate the available resources in a shared policies (e.g. to accommodate the available resources in a shared
receive queue). receive queue).
The requester MUST NOT send unacknowledged requests in excess of this The requester MUST NOT send unacknowledged requests in excess of this
granted responder credit limit. If the limit is exceeded, the RDMA granted responder credit limit. If the limit is exceeded, the RDMA
layer may signal an error, possibly terminating the connection. Even layer may signal an error, possibly terminating the connection. If
if an RDMA layer error does not occur, the responder MAY handle an RDMA layer error does not occur, the responder MAY handle excess
excess requests or return an RPC layer error to the requester. requests or return an RPC layer error to the requester.
While RPC calls complete in any order, the current flow control limit While RPC calls complete in any order, the current flow control limit
at the responder is known to the requester from the Send ordering at the responder is known to the requester from the Send ordering
properties. It is always the lower of the requested and granted properties. It is always the lower of the requested and granted
credit values, minus the number of requests in flight. Advertised credit values, minus the number of requests in flight. Advertised
credit values are not altered when individual RPCs are started or credit values are not altered when individual RPCs are started or
completed. completed.
On occasion a requester or responder may need to adjust the amount of On occasion a requester or responder may need to adjust the amount of
resources available to a connection. When this happens, the resources available to a connection. When this happens, the
responder needs to ensure that a credit increase is effected (i.e. responder needs to ensure that a credit increase is effected (i.e.
receives are posted) before the next reply is sent. RDMA Receives are posted) before the next reply is sent.
Certain RDMA implementations may impose additional flow control Certain RDMA implementations may impose additional flow control
restrictions, such as limits on RDMA Read operations in progress at restrictions, such as limits on RDMA Read operations in progress at
the responder. Accommodation of such restrictions is considered the the responder. Accommodation of such restrictions is considered the
responsibility of each RPC-over-RDMA Version One implementation. responsibility of each RPC-over-RDMA Version One implementation.
4.3.1. Initial Connection State 4.3.2. Inline Threshold
There are two operational parameters for each connection:
Credit Limit A receiver's "inline threshold" value is the largest message size (in
As described above, the total number of responder receive buffers octets) that the receiver can accept via an RDMA Receive operation.
is sometimes referred to as a connection's credit limit. The Each connection has two inline threshold values, one for each peer
credit limit is advertised in the RPC-over-RDMA header in each RPC receiver.
message, and can change during the lifetime of a connection.
Inline Threshold Unlike credit limits, inline threshold values are not advertised to
A receiver's "inline threshold" value is the largest message size peers via the RPC-over-RDMA Version One protocol, and there is no
(in bytes) that can be conveyed via an RDMA Send/Receive provision for the inline threshold value to change during the
combination. Each connection has two inline threshold values, one lifetime of an RPC-over-RDMA Version One connection.
for each peer receiver.
Unlike the connection's credit limit, inline threshold values are 4.3.3. Initial Connection State
not advertised to peers via the RPC-over-RDMA Version One
protocol, and there is no provision for the inline threshold value
to change during the lifetime of an RPC-over-RDMA Version One
connection.
The longevity of a transport connection requires that sending When a connection is first established, peers might not know how many
endpoints respect the resource limits of peer receivers. However, receive buffers the other has, nor how large these buffers are.
when a connection is first established, peers cannot know how many
receive buffers the other has, nor how large the buffers are.
As a basis for an initial exchange of RPC requests, each RPC-over- As a basis for an initial exchange of RPC requests, each RPC-over-
RDMA Version One connection provides the ability to exchange at least RDMA Version One connection provides the ability to exchange at least
one RPC message at a time that is 1024 bytes in size. A responder one RPC message at a time that is 1024 bytes in size. A responder
MAY exceed this basic level of configuration, but a requester MUST MAY exceed this basic level of configuration, but a requester MUST
NOT assume more than one credit is available, and MUST receive a NOT assume more than one credit is available, and MUST receive a
valid reply from the responder carrying the actual number of valid reply from the responder carrying the actual number of
available credits, prior to sending its next request. available credits, prior to sending its next request.
Receiver implementations MUST support an inline threshold of 1024 Receiver implementations MUST support an inline threshold of 1024
bytes, but MAY support larger inline thresholds values. A mechanism bytes, but MAY support larger inline thresholds values. A mechanism
for discovering a peer's inline threshold value before a connection for discovering a peer's inline threshold value before a connection
is established may be used to optimize Send operations. In the is established may be used to optimize the use of RDMA Send
absense of such a mechanism, senders MUST assume a receiver's inline operations. In the absense of such a mechanism, senders MUST assume
threshold is 1024 bytes. a receiver's inline threshold is 1024 bytes.
4.4. XDR Encoding With Chunks 4.4. XDR Encoding With Chunks
XDR data items in an RPC message are encoded as a contiguous sequence When RDMA is available, during XDR encoding it can be determined that
of bytes for network transmission. This sequence of bytes is known an XDR data item is large enough that it might be more efficient if
as an XDR stream. In the case of an RDMA transport, during XDR the transport placed the content of the data item directly in the
encoding it can be determined that an XDR data item is large enough receiver's memory.
that it might be more efficient if the transport placed the content
of the data item directly in the receiver's memory.
4.4.1. Reducing An XDR Stream 4.4.1. Reducing An XDR Stream
RPC-over-RDMA Version One provides a mechanism for moving part of an RPC-over-RDMA Version One provides a mechanism for moving part of an
RPC message via a data transfer separate from an RDMA Send/Receive. RPC message via a data transfer separate from an RDMA Send/Receive.
The sender removes one or more XDR data items from the Payload The sender removes one or more XDR data items from the Payload
stream. They are conveyed via one or more RDMA Read or Write stream. They are conveyed via one or more RDMA Read or Write
operations. The receiver inserts the data items into the Payload operations. The receiver inserts the data items into the Payload
stream before passing it to the Upper Layer. stream before passing it to the Upper Layer.
skipping to change at page 14, line 26 skipping to change at page 14, line 33
after chunks have been removed is referred to as a "reduced" Payload after chunks have been removed is referred to as a "reduced" Payload
stream. stream.
4.4.2. DDP-Eligibility 4.4.2. DDP-Eligibility
Only an XDR data item that might benefit from Direct Data Placement Only an XDR data item that might benefit from Direct Data Placement
may be reduced. The eligibility of particular XDR data items to be may be reduced. The eligibility of particular XDR data items to be
reduced is not specified by this document. reduced is not specified by this document.
To maintain interoperability on an RPC-over-RDMA transport, a To maintain interoperability on an RPC-over-RDMA transport, a
determination of which XDR data items in each Upper Layer Protocol determination must be made of which XDR data items in each Upper
are allowed to use Direct Data Placement. Therefore an additional Layer Protocol are allowed to use Direct Data Placement. Therefore
specification is needed that describes how an Upper Layer Protocol an additional specification is needed that describes how an Upper
enables Direct Data Placement. The set of requirements for an Upper Layer Protocol enables Direct Data Placement. The set of
Layer Protocol to use an RPC-over-RDMA transport is known as an requirements for an Upper Layer Protocol to use an RPC-over-RDMA
"Upper Layer Binding specification," or ULB. transport is known as an "Upper Layer Binding specification," or ULB.
An Upper Layer Binding specification states which specific individual An Upper Layer Binding specification states which specific individual
XDR data items in an Upper Layer Protocol MAY be transferred via XDR data items in an Upper Layer Protocol MAY be transferred via
Direct Data Placement. This document will refer to XDR data items Direct Data Placement. This document will refer to XDR data items
that are permitted to be reduced as "DDP-eligible". All other XDR that are permitted to be reduced as "DDP-eligible". All other XDR
data items MUST NOT be reduced. RPC-over-RDMA Version One uses RDMA data items MUST NOT be reduced. RPC-over-RDMA Version One uses RDMA
Read and Write operations to transfer DDP-eligible data that has been Read and Write operations to transfer DDP-eligible data that has been
reduced. reduced.
Detailed requirements for Upper Layer Bindings are discussed in full Detailed requirements for Upper Layer Bindings are discussed in full
skipping to change at page 15, line 6 skipping to change at page 15, line 14
4.4.3. RDMA Segments 4.4.3. RDMA Segments
When encoding a Payload stream that contains a DDP-eligible data When encoding a Payload stream that contains a DDP-eligible data
item, a sender may choose to reduce that data item. It does not item, a sender may choose to reduce that data item. It does not
place the item into the Payload stream. Instead, the sender records place the item into the Payload stream. Instead, the sender records
in the RPC-over-RDMA header the actual address and size of the memory in the RPC-over-RDMA header the actual address and size of the memory
region containing that data item. region containing that data item.
The requester provides location information for DDP-eligible data The requester provides location information for DDP-eligible data
items in both RPC calls and replies. The responder uses this items in both RPC Calls and Replies. The responder uses this
information to initiate RDMA Read and Write operations to retrieve or information to initiate RDMA Read and Write operations to retrieve or
update the content of the requester's memory. update the specified region of the requester's memory.
An "RDMA segment", or just "segment", is an RPC-over-RDMA header data An "RDMA segment", or a "plain segment", is an RPC-over-RDMA header
object that contains the precise co-ordinates of a contiguous memory data object that contains the precise co-ordinates of a contiguous
region that is to be conveyed via one or more RDMA Read or RDMA Write memory region that is to be conveyed via one or more RDMA Read or
operations. The following fields are contained in each segment: RDMA Write operations. The following fields are contained in each
segment.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Handle |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Offset +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Handle Handle
Steering tag or handle obtained when the segment's memory is Steering tag (STag) or handle obtained when the segment's memory
registered for RDMA. Sometimes known as an R_key. is registered for RDMA. Also known as an R_key, this value is
generated by registering this memory with the RDMA provider.
Length Length
The length of the segment in bytes. The length of the memory segment, in octets.
Offset Offset
The offset or beginning memory address of the segment. The offset or beginning memory address of the segment.
See [RFC5040] for further discussion of the meaning of these fields. See [RFC5040] for further discussion of the meaning of these fields.
4.4.4. Chunks 4.4.4. Chunks
In RPC-over-RDMA Version One, a "chunk" refers to a portion of the In RPC-over-RDMA Version One, a "chunk" refers to a portion of the
Payload stream that is moved via RDMA Read or Write operations. Payload stream that is moved via RDMA Read or Write operations.
Chunk data is removed from the sender's Payload stream, transferred Chunk data is removed from the sender's Payload stream, transferred
by separate RDMA operations, and then re-inserted into the receiver's by separate RDMA operations, and then re-inserted into the receiver's
Payload stream. Payload stream.
Each chunk consists of one or more RDMA segments. Each segment Each chunk consists of one or more RDMA segments. Each segment
represents a single contiguous piece of that chunk. represents a single contiguous piece of that chunk. Segments MAY
divide a chunk on any boundary that is convenient to the requester.
Except in special cases, a chunk contains exactly one XDR data item. Except in special cases, a chunk contains exactly one XDR data item.
This makes it straightforward to remove chunks from an XDR stream This makes it straightforward to remove chunks from an XDR stream
without affecting XDR alignment. Not every message has chunks without affecting XDR alignment. Not every RPC-over-RDMA message has
associated with it. chunks associated with it.
4.4.4.1. Counted Arrays 4.4.4.1. Counted Arrays
If a chunk contains a counted array data type, the count of array If a chunk contains a counted array data type, the count of array
elements MUST remain in the Payload stream, while the array elements elements MUST remain in the Payload stream, while the array elements
MUST be moved to the chunk. For example, when encoding an opaque MUST be moved to the chunk. For example, when encoding an opaque
byte array as a chunk, the count of bytes stays in the Payload byte array as a chunk, the count of bytes stays in the Payload
stream, while the bytes in the array are removed from the Payload stream, while the bytes in the array are removed from the Payload
stream and transferred within the chunk. stream and transferred within the chunk.
skipping to change at page 16, line 32 skipping to change at page 17, line 11
A union data type should never be made DDP-eligible, but one or more A union data type should never be made DDP-eligible, but one or more
of its arms may be DDP-eligible. of its arms may be DDP-eligible.
4.4.5. Read Chunks 4.4.5. Read Chunks
A "Read chunk" represents an XDR data item that is to be pulled from A "Read chunk" represents an XDR data item that is to be pulled from
the requester to the responder using RDMA Read operations. the requester to the responder using RDMA Read operations.
A Read chunk is a list of one or more RDMA segments. Each RDMA A Read chunk is a list of one or more RDMA segments. Each RDMA
segment in a Read chunk has an additional Position field. segment in a Read chunk is a plain segment which has an additional
Position field.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Position |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Handle |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Offset +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Position Position
The byte offset in the Payload stream where the receiver re- The byte offset in the Payload stream where the receiver re-
inserts the data item conveyed in a chunk. The Position value inserts the data item conveyed in a chunk. The Position value
MUST be computed from the beginning of the Payload stream, which MUST be computed from the beginning of the Payload stream, which
begins at Position zero. All segments belonging to the same Read begins at Position zero. All RDMA segments belonging to the same
chunk have the same value in their Position field. Read chunk have the same value in their Position field.
While constructing an RPC-over-RDMA Call message, a requester While constructing an RPC-over-RDMA Call message, a requester
registers memory segments containing data in Read chunks. It registers memory segments containing data in Read chunks. It
advertises these chunks in the RPC-over-RDMA header of the RPC call. advertises these chunks in the RPC-over-RDMA header of the RPC Call.
After receiving an RPC call sent via an RDMA Send operation, a After receiving an RPC Call sent via an RDMA Send operation, a
responder transfers the chunk data from the requester using RDMA Read responder transfers the chunk data from the requester using RDMA Read
operations. The responder reconstructs the transferred chunk data by operations. The responder reconstructs the transferred chunk data by
concatenating the contents of each segment, in list order, into the concatenating the contents of each segment, in list order, into the
received Payload stream at the Position value recorded in the received Payload stream at the Position value recorded in the
segment. segment.
Put another way, a receiver inserts the first segment in a Read chunk Put another way, a receiver inserts the first segment in a Read chunk
into the Payload stream at the byte offset indicated by its Position into the Payload stream at the byte offset indicated by its Position
field. Segments whose Position field value match this offset are field. Segments whose Position field value match this offset are
concatenated afterwards, until there are no more segments at that concatenated afterwards, until there are no more segments at that
Position value. The next XDR data item in the Payload stream Position value. The next XDR data item in the Payload stream
follows. follows.
4.4.5.1. Read Chunk Round-up 4.4.5.1. Read Chunk Round-up
XDR requires each encoded data item to start on four-byte alignment. XDR requires each encoded data item to start on four-byte alignment.
When an odd-length data item is marshaled, its length is encoded When an odd-length data item is encoded, its length is encoded
literally, while the data is padded so the next data item in the XDR literally, while the data is padded so the next data item in the XDR
stream can start on a four-byte boundary. Receivers ignore the stream can start on a four-byte boundary. Receivers ignore the
content of the pad bytes. content of the pad bytes.
After an XDR data item has been reduced, all data items remaining in After an XDR data item has been reduced, all data items remaining in
the Payload stream must continue to adhere to these padding the Payload stream must continue to adhere to these padding
requirements. Thus when an XDR data item is moved from the Payload requirements. Thus when an XDR data item is moved from the Payload
stream into a Read chunk, the requester MUST remove XDR padding for stream into a Read chunk, the requester MUST remove XDR padding for
that data item from the Payload stream as well. that data item from the Payload stream as well.
The length of a Read chunk is the sum of the lengths of the segments The length of a Read chunk is the sum of the lengths of the read
that comprise it. If this sum is not a multiple of four, the segments that comprise it. If this sum is not a multiple of four,
requester MAY choose to send a Read chunk without any XDR padding. the requester MAY choose to send a Read chunk without any XDR
The responder MUST be prepared to provide appropriate round-up in the padding. If the requester provides no actual round-up in a Read
reconstructed call XDR stream if the requester provides no actual chunk, the responder MUST be prepared to provide appropriate round-up
round-up in a Read chunk. in the reconstructed call XDR stream
The Position field in read segments indicates where the containing The Position field in a read segment indicates where the containing
Read chunk starts in the RPC message XDR stream. The value in this Read chunk starts in the Payload stream. The value in this field
field MUST be a multiple of four. Moreover, all segments in the same MUST be a multiple of four. Moreover, all segments in the same Read
Read chunk share the same Position value, even if one or more of the chunk share the same Position value, even if one or more of the
segments have a non-four-byte aligned length. segments have a non-four-byte aligned length.
4.4.5.2. Decoding Read Chunks 4.4.5.2. Decoding Read Chunks
When decoding an RPC-over-RDMA message, the responder first decodes While decoding a received Payload stream, whenever the XDR offset in
the chunk lists from the RPC-over-RDMA header, then proceeds to the Payload stream matches that of a Read chunk, the transport
decode the Payload stream. Whenever the XDR offset in the Payload initiates an RDMA Read to pull the chunk's data content into
stream matches that of a Read chunk, the transport initiates an RDMA registered memory on the responder.
Read to bring over the chunk data into locally registered memory for
the destination buffer.
The responder acknowledges its completion of use of Read chunk source The responder acknowledges its completion of use of Read chunk source
buffers when it replies to the requester. The requester may then buffers when it sends an RPC Reply to the requester. The requester
release Read chunks advertised in the request. may then release Read chunks advertised in the request.
4.4.6. Write Chunks 4.4.6. Write Chunks
A "Write chunk" represents an XDR data item that is to be pushed from A "Write chunk" represents an XDR data item that is to be pushed from
a responder to a requester using RDMA Write operations. a responder to a requester using RDMA Write operations.
A Write chunk is an array of one or more RDMA segments. Segments in A Write chunk is an array of one or more plain RDMA segments. Write
a Write chunk do not have a Position field because Write chunks are chunks are provided by a requester long before the responder has
provided by a requester long before the responder has prepared the prepared the reply Payload stream. Therefore RDMA segments in a
reply Payload stream. Write chunk do not have a Position field.
While constructing an RPC call message, a requester also prepares While constructing an RPC Call message, a requester also prepares
memory regions to catch DDP-eligible reply data items. A requester memory regions to catch DDP-eligible reply data items. A requester
does not know the actual length of the result data item to be does not know the actual length of the result data item to be
returned, thus it MUST register a Write chunk long enough to returned, thus it MUST register a Write chunk long enough to
accommodate the maximum possible size of the returned data item. accommodate the maximum possible size of the returned data item.
A responder copies the requester-provided Write chunk segments into A responder copies the requester-provided Write chunk segments into
the RPC-over-RDMA header that it returns with the reply. The the RPC-over-RDMA header that it returns with the reply. The
responder updates the segment length fields to reflect the actual responder MUST NOT change the number of segments in the Write chunk.
amount of data that is being returned in the Write chunk. The
updated length of a Write chunk segment MAY be zero if the segment
was not filled by the responder. However the responder MUST NOT
change the number of segments in the Write chunk.
The responder then sends the RPC reply via an RDMA Send operation.
After receiving the RPC reply, the requester reconstructs the
transferred data by concatenating the contents of each segment, in
array order, into RPC reply XDR stream.
4.4.6.1. Unused Write Chunks
There are occasions when a requester provides a Write chunk but the The responder fills the segments in array order until the data item
responder does not use it. For example, an Upper Layer Protocol may has been completely written. The responder updates the segment
define a union result where some arms of the union contain a DDP- length fields to reflect the actual amount of data that is being
eligible data item, and other arms do not. To return an unused Write returned in each segment. If a Write chunk segment is not filled by
chunk, the responder MUST set the length of all segments in the chunk the responder, the updated length of the segment SHOULD be zero.
to zero.
Unused write chunks, or unused bytes in write chunk segments, are not The responder then sends the RPC Reply via an RDMA Send operation.
returned as results and their memory is returned to the Upper Layer After receiving the RPC Reply, the requester reconstructs the
as part of RPC completion. However, the RPC layer MUST NOT assume transferred data by concatenating the contents of each segment, in
that the buffers have not been modified. array order, into RPC Reply XDR stream.
4.4.6.2. Write Chunk Round-up 4.4.6.1. Write Chunk Round-up
XDR requires each encoded data item to start on four-byte alignment. XDR requires each encoded data item to start on four-byte alignment.
When an odd-length data item is marshaled, its length is encoded When an odd-length data item is encoded, its length is encoded
literally, while the data is padded so the next data item in the XDR literally, while the data is padded so the next data item in the XDR
stream can start on a four-byte boundary. Receivers ignore the stream can start on a four-byte boundary. Receivers ignore the
content of the pad bytes. content of the pad bytes.
After a data item is reduced, data items remaining in the Payload After a data item is reduced, data items remaining in the Payload
stream must continue to adhere to these padding requirements. Thus stream must continue to adhere to these padding requirements. Thus
when an XDR data item is moved from a reply Payload stream into a when an XDR data item is moved from a reply Payload stream into a
Write chunk, the responder MUST remove XDR padding for that data item Write chunk, the responder MUST remove XDR padding for that data item
from the reply Payload stream as well. from the reply Payload stream as well.
A requester SHOULD NOT provide extra length in a Write chunk to A requester SHOULD NOT provide extra length in a Write chunk to
accommodate XDR pad bytes. A responder MUST NOT write XDR pad bytes accommodate XDR pad bytes. A responder MUST NOT write XDR pad bytes
for a Write chunk. for a Write chunk.
4.4.6.2. Unused Write Chunks
There are occasions when a requester provides a Write chunk but the
responder does not use it.
For example, an Upper Layer Protocol may define a union result where
some arms of the union contain a DDP-eligible data item while other
arms do not. The requester is required to provide a Write chunk in
this case, but if the responder returns a result that uses an arm of
the union that has no DDP-eligible data item, the Write chunk remains
unused.
When forming an RPC-over-RDMA Reply message with an unused Write
chunk, the responder MUST set the length of all segments in the chunk
to zero.
Unused write chunks, or unused bytes in write chunk segments, are not
returned as results. Their memory is returned to the Upper Layer as
part of RPC completion. However, the RPC layer MUST NOT assume that
the buffers have not been modified.
4.5. Message Size 4.5. Message Size
A receiver of RDMA Send operations is required by RDMA to have A receiver of RDMA Send operations is required by RDMA to have
previously posted one or more adequately sized buffers. Memory previously posted one or more adequately sized buffers. Memory
savings can be achieved on both requesters and responders by leaving savings can be achieved on both requesters and responders by leaving
the inline threshold small. the inline threshold small. However, not all RPC messages are small.
4.5.1. Short Messages 4.5.1. Short Messages
RPC messages are frequently smaller than typical inline thresholds. RPC messages are frequently smaller than typical inline thresholds.
For example, the NFS version 3 GETATTR request is only 56 bytes: 20 For example, the NFS version 3 GETATTR request is only 56 bytes: 20
bytes of RPC header, plus a 32-byte file handle argument and 4 bytes bytes of RPC header, plus a 32-byte file handle argument and 4 bytes
for its length. The reply to this common request is about 100 bytes. for its length. The reply to this common request is about 100 bytes.
Since all RPC messages conveyed via RPC-over-RDMA require an RDMA Since all RPC messages conveyed via RPC-over-RDMA require an RDMA
Send operation, the most efficient way to send an RPC message that is Send operation, the most efficient way to send an RPC message that is
smaller than the receiver's inline threshold is to append the Payload smaller than the receiver's inline threshold is to append the Payload
stream directly to the Transport stream. An RPC-over-RDMA header stream directly to the Transport stream. An RPC-over-RDMA header
with a small RPC call or reply message immediately following is with a small RPC Call or Reply message immediately following is
transferred using a single RDMA Send operation. No RDMA Read or transferred using a single RDMA Send operation. No RDMA Read or
Write operations are needed. Write operations are needed.
4.5.2. Chunked Messages 4.5.2. Chunked Messages
If DDP-eligible data items are present in a Payload stream, a sender If DDP-eligible data items are present in a Payload stream, a sender
MAY reduce the Payload stream and use RDMA Read or Write operations MAY reduce the Payload stream and use RDMA Read or Write operations
to move the reduced data items. The Transport stream with the to move the reduced data items. The Transport stream with the
reduced Payload stream immediately following is transferred using a reduced Payload stream immediately following is transferred using a
single RDMA Send operation. single RDMA Send operation.
skipping to change at page 20, line 22 skipping to change at page 21, line 20
eligible data items in the Payload stream, or the Payload stream is eligible data items in the Payload stream, or the Payload stream is
still too large after it has been reduced, the RDMA transport MUST still too large after it has been reduced, the RDMA transport MUST
use RDMA Read or Write operations to convey the Payload stream use RDMA Read or Write operations to convey the Payload stream
itself. This mechanism is referred to as a "Long Message." itself. This mechanism is referred to as a "Long Message."
To transmit a Long Message, the sender conveys only the Transport To transmit a Long Message, the sender conveys only the Transport
stream with an RDMA Send operation. The Payload stream is not stream with an RDMA Send operation. The Payload stream is not
included in the Send buffer in this instance. Instead, the requester included in the Send buffer in this instance. Instead, the requester
provides chunks that the responder uses to move the Payload stream. provides chunks that the responder uses to move the Payload stream.
Long RPC call Long RPC Call
To send a Long RPC-over-RDMA Call message, the requester provides To send a Long RPC-over-RDMA Call message, the requester provides
a special Read chunk that contains the RPC call's Payload stream. a special Read chunk that contains the RPC Call's Payload stream.
Every segment in this Read chunk MUST contain zero in its Position Every segment in this Read chunk MUST contain zero in its Position
field. Thus this chunk is known as a "Position Zero Read chunk." field. Thus this chunk is known as a "Position Zero Read chunk."
Long RPC reply Long RPC Reply
To send a Long RPC-over-RDMA Reply message, the requester provides To send a Long RPC-over-RDMA Reply message, the requester provides
a single special Write chunk in advance, known as the "Reply a single special Write chunk in advance, known as the "Reply
chunk", that will contain the RPC reply's Payload stream. The chunk", that will contain the RPC Reply's Payload stream. The
requester sizes the Reply chunk to accommodate the maximum requester sizes the Reply chunk to accommodate the maximum
expected reply size for that Upper Layer operation. expected reply size for that Upper Layer operation.
Though the purpose of a Long Message is to handle large RPC messages, Though the purpose of a Long Message is to handle large RPC messages,
requesters MAY use a Long Message at any time to convey an RPC call. requesters MAY use a Long Message at any time to convey an RPC Call.
Responders MUST send a Long reply whenever a Reply chunk has been Responders MUST send a Long reply whenever a Reply chunk has been
provided by a requester. provided by a requester.
Because these special chunks contain a whole RPC message, any XDR Because these special chunks contain a whole RPC message, any XDR
data item MAY appear in one of these special chunks without regard to data item MAY appear in one of these special chunks without regard to
its DDP-eligibility. DDP-eligible data items MAY be removed from its DDP-eligibility. DDP-eligible data items MAY be removed from
these special chunks and conveyed via normal chunks, but non-eligible these special chunks and conveyed via normal chunks, but non-eligible
data items MUST NOT appear in normal chunks. data items MUST NOT appear in normal chunks.
5. RPC-Over-RDMA In Operation 5. RPC-Over-RDMA In Operation
skipping to change at page 23, line 23 skipping to change at page 24, line 21
}; };
union rpcrdma1_error switch (rpcrdma1_errcode rdma_err) { union rpcrdma1_error switch (rpcrdma1_errcode rdma_err) {
case RDMA_ERR_VERS: case RDMA_ERR_VERS:
uint32 rdma_vers_low; uint32 rdma_vers_low;
uint32 rdma_vers_high; uint32 rdma_vers_high;
case RDMA_ERR_CHUNK: case RDMA_ERR_CHUNK:
void; void;
}; };
union rdma_body switch (rpcrdma1_proc rdma_proc) { union rpcrdma1_body switch (rpcrdma1_proc rdma_proc) {
case RDMA_MSG: case RDMA_MSG:
case RDMA_NOMSG: case RDMA_NOMSG:
rpcrdma1_chunks rdma_chunks; rpcrdma1_chunks rdma_chunks;
case RDMA_MSGP: case RDMA_MSGP:
uint32 rdma_align; uint32 rdma_align;
uint32 rdma_thresh; uint32 rdma_thresh;
rpcrdma1_chunks rdma_achunks; rpcrdma1_chunks rdma_achunks;
case RDMA_DONE: case RDMA_DONE:
void; void;
case RDMA_ERROR: case RDMA_ERROR:
rpcrdma1_error rdma_error; rpcrdma1_error rdma_error;
}; };
<CODE ENDS> <CODE ENDS>
5.2. Fixed Header Fields 5.2. Fixed Header Fields
The RPC-over-RDMA header begins with four fixed 32-bit fields that The RPC-over-RDMA header begins with four fixed 32-bit fields that
MUST be present and that control the RDMA interaction including RDMA- control the RDMA interaction. These four fields, which must remain
specific flow control. These four fields are: with the same meanings and in the same positions in all subsequent
versions of the RPC-over-RDMA protocol, are described below.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| XID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Credit Value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Procedure Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5.2.1. Transaction ID (XID) 5.2.1. Transaction ID (XID)
The XID generated for the RPC Call and Reply. Having the XID at a The XID generated for the RPC Call and Reply. Having the XID at a
fixed location in the header makes it easy for the receiver to fixed location in the header makes it easy for the receiver to
establish context as soon as the message arrives. This XID MUST be establish context as soon as each RPC-over-RDMA message arrives.
the same as the XID in the RPC message. The receiver MAY perform its This XID MUST be the same as the XID in the RPC message. The
processing based solely on the XID in the RPC-over-RDMA header, and receiver MAY perform its processing based solely on the XID in the
thereby ignore the XID in the RPC message, if it so chooses. RPC-over-RDMA header, and thereby ignore the XID in the RPC message,
if it so chooses.
5.2.2. Version number 5.2.2. Version Number
For RPC-over-RDMA Version One, this field MUST contain the value 1 For RPC-over-RDMA Version One, this field MUST contain the value one
(one). Further discussion of protocol extensibility can be found in (1). Rules regarding changes to this transport protocol version
Section 9. number can be found in Section 9.2.
5.2.3. Flow control credit value 5.2.3. Credit Value
When sent in an RPC Call message, the requested credit value is When sent in an RPC Call message, the requested credit value is
provided. When sent in an RPC Reply message, the granted credit provided. When sent in an RPC Reply message, the granted credit
value is returned. RPC Calls SHOULD NOT be sent in excess of the value is returned. RPC Calls SHOULD NOT be sent in excess of the
currently granted limit. Further discussion of flow control can be currently granted limit. Further discussion of how the credit value
found in Section 4.3. is determined can be found in Section 4.3.
5.2.4. Message type 5.2.4. Procedure number
o RDMA_MSG = 0 indicates that chunk lists and an RPC message follow. o RDMA_MSG = 0 indicates that chunk lists and a Payload stream
The format of the chunk lists is discussed below. follow. The format of the chunk lists is discussed below.
o RDMA_NOMSG = 1 indicates that after the chunk lists there is no o RDMA_NOMSG = 1 indicates that after the chunk lists there is no
RPC message. In this case, the chunk lists provide information to Payload stream. In this case, the chunk lists provide information
allow the responder to transfer the RPC message using RDMA Read or to allow the responder to transfer the Payload stream using RDMA
Write operations. Read or Write operations.
o RDMA_MSGP = 2 is reserved. o RDMA_MSGP = 2 is reserved.
o RDMA_DONE = 3 is reserved. o RDMA_DONE = 3 is reserved.
o RDMA_ERROR = 4 is used to signal an error in RDMA chunk encoding. o RDMA_ERROR = 4 is used to signal an encoding error in the RPC-
over-RDMA header.
An RDMA_MSG type message conveys the Transport stream and the Payload An RDMA_MSG procedure conveys the Transport stream and the Payload
stream via an RDMA Send operation. The Transport stream contains the stream via an RDMA Send operation. The Transport stream contains the
four fixed fields, followed by the Read and Write lists and the Reply four fixed fields, followed by the Read and Write lists and the Reply
chunk, though any or all three MAY be marked as not present. The chunk, though any or all three MAY be marked as not present. The
Payload stream then follows, beginning with its XID field. If a Read Payload stream then follows, beginning with its XID field. If a Read
or Write chunk list is present, a portion of the Payload stream has or Write chunk list is present, a portion of the Payload stream has
been excised and is conveyed separately via RDMA Read or Write been excised and is conveyed separately via RDMA Read or Write
operations. operations.
An RDMA_NOMSG type message conveys the Transport stream via an RDMA An RDMA_NOMSG procedure conveys the Transport stream via an RDMA Send
Send operation. The Transport stream contains the four fixed fields, operation. The Transport stream contains the four fixed fields,
followed by the Read and Write chunk lists and the Reply chunk. followed by the Read and Write chunk lists and the Reply chunk.
Though any MAY be marked as not present, one MUST be present and MUST Though any of these MAY be marked as not present, one MUST be present
hold the Payload stream for this RPC-over-RDMA message, beginning and MUST hold the Payload stream for this RPC-over-RDMA message. If
with its XID field. If a Read or Write chunk list is present, a a Read or Write chunk list is present, a portion of the Payload
portion of the Payload stream has been excised and is conveyed stream has been excised and is conveyed separately via RDMA Read or
separately via RDMA Read or Write operations. Write operations.
An RDMA_ERROR type message conveys the Transport stream via an RDMA An RDMA_ERROR procedure conveys the Transport stream via an RDMA Send
Send operation. The Transport stream contains the four fixed fields, operation. The Transport stream contains the four fixed fields,
followed by formatted error information. No Payload stream is followed by formatted error information. No Payload stream is
conveyed in this type of RPC-over-RDMA message. conveyed in this type of RPC-over-RDMA message.
A gather operation on each RDMA Send operation can be used to marshal A gather operation on each RDMA Send operation can be used to combine
the Transport and Payload streams separately. However, the total the Transport and Payload streams, which might have been constructed
length of the gathered send buffers MUST NOT exceed the peer in separate buffers. However, the total length of the gathered send
receiver's inline threshold. buffers MUST NOT exceed the peer receiver's inline threshold.
5.3. Chunk Lists 5.3. Chunk Lists
The chunk lists in an RPC-over-RDMA Version One header are three XDR The chunk lists in an RPC-over-RDMA Version One header are three XDR
optional-data fields that MUST follow the fixed header fields in optional-data fields that follow the fixed header fields in RDMA_MSG
RDMA_MSG and RDMA_NOMSG type messages. Read Section 4.19 of and RDMA_NOMSG procedures. Read Section 4.19 of [RFC4506] carefully
[RFC4506] carefully to understand how optional-data fields work. to understand how optional-data fields work. Examples of XDR encoded
Examples of XDR encoded chunk lists are provided in Section 5.7 as an chunk lists are provided in Section 5.7 as an aid to understanding.
aid to understanding.
5.3.1. Read List 5.3.1. Read List
Each RDMA_MSG or RDMA_NOMSG type message has one "Read list." The Each RDMA_MSG or RDMA_NOMSG procedure has one "Read list." The Read
Read list is a list of zero or more Read segments, provided by the list is a list of zero or more Read segments, provided by the
requester, that are grouped by their Position fields into Read requester, that are grouped by their Position fields into Read
chunks. Each Read chunk advertises the location of data the chunks. Each Read chunk advertises the location of argument data the
responder is to retrieve via RDMA Read operations. responder is to retrieve via RDMA Read operations. The requester has
removed the data in these chunks from the call's Payload stream.
Via a Position Zero Read Chunk, a requester may provide an RPC Call Via a Position Zero Read Chunk, a requester may provide an RPC Call
message as a chunk in the Read list. message as a chunk in the Read list.
The Read list is empty if the RPC Call has no argument data that is If the RPC Call has no argument data that is DDP-eligible and the
DDP-eligible, and the Position Zero Read Chunk is not being used. Position Zero Read Chunk is not being used, the requester leaves the
Read list empty.
5.3.2. Write List 5.3.2. Write List
Each RDMA_MSG or RDMA_NOMSG type message has one "Write list." The Each RDMA_MSG or RDMA_NOMSG procedure has one "Write list." The
Write list is a list of zero or more Write chunks, provided by the Write list is a list of zero or more Write chunks, provided by the
requester. Each Write chunk is an array of RDMA segments, thus the requester. Each Write chunk is an array of RDMA segments, thus the
Write list is a list of counted arrays. Each Write chunk advertises Write list is a list of counted arrays. Each Write chunk advertises
receptacles for DDP-eligible data to be pushed by the responder via receptacles for DDP-eligible data to be pushed by the responder via
RDMA Write operations. RDMA Write operations. If the RPC Reply has no possible DDP-eligible
result data items, the requester leaves the Write list empty.
*** This section needs to specify when a requester must provide Write
chunks, and how many chunks must be provided. ***
When a Write list is provided for the results of an RPC Call, the When a Write list is provided for the results of an RPC Call, the
responder MUST provide any corresponding data via RDMA Write to the responder MUST provide data corresponding to DDP-eligible XDR data
memory referenced in the chunk's segments. The Write list is empty items via RDMA Write operations to the memory referenced in the Write
if the RPC operation has no DDP-eligible result data. list. The responder removes the data in these chunks from the
reply's Payload stream.
When multiple Write chunks are present, the responder fills in each When multiple Write chunks are present, the responder fills in each
Write chunk with a DDP-eligible result until either there are no more Write chunk with a DDP-eligible result until either there are no more
results or no more Write chunks. results or no more Write chunks. The requester may not be able to
predict which DDP-eligible data item goes in which chunk. Thus the
requester is responsible for allocating and registering Write chunks
large enough to accommodate the largest XDR data item that might be
associated with each chunk in the list.
The RPC reply conveys the size of result data by returning the Write The RPC Reply conveys the size of result data items by returning each
list to the requester with the lengths rewritten to match the actual Write chunk to the requester with the segment lengths rewritten to
transfer. Decoding the reply therefore performs no local data match the actual data transferred. Decoding the reply therefore
transfer but merely returns the length obtained from the reply. performs no local data copying but merely returns the length obtained
from the reply.
Each decoded result consumes one entry in the Write list, which in Each decoded result consumes one entry in the Write list, which in
turn consists of an array of RDMA segments. The length of a Write turn consists of an array of RDMA segments. The length of a Write
chunk is therefore the sum of all returned lengths in all segments chunk is therefore the sum of all returned lengths in all segments
comprising the corresponding list entry. As each Write chunk is comprising the corresponding list entry. As each Write chunk is
decoded, the entire entry is consumed. decoded, the entire Write list entry is consumed.
A requester constructs the Write list for an RPC transaction before
the responder has formulated its reply. When there is only one DDP-
eligible result data item, the requester inserts only a single Write
chunk in the Write list. If the responder populates that chunk with
data, the requester knows with certainty which result data item is
contained in it.
However, Upper Layer Protocol procedures may allow replies where more
than one result data item is DDP-eligible. For example, an NFSv4
COMPOUND procedure is composed of individual NFSv4 operations, more
than one of which may have a reply containing a DDP-eligible result.
As stated above, when multiple Write chunks are present, the
responder reduces DDP-eligible result until either there are no more
results or no more Write chunks. Then, as the requester decodes the
reply Payload stream, it is clear from the contents of the reply
which Write chunk contains which data item.
5.3.3. Reply Chunk 5.3.3. Reply Chunk
Each RDMA_MSG or RDMA_NOMSG type message has one "Reply chunk." The Each RDMA_MSG or RDMA_NOMSG procedure has one "Reply chunk." The
Reply chunk is a Write chunk, provided by the requester. The Reply Reply chunk is a Write chunk, provided by the requester. The Reply
chunk is a single counted array of RDMA segments. chunk is a single counted array of RDMA segments.
A requester MUST provide a Reply chunk whenever the maximum possible A requester MUST provide a Reply chunk whenever the maximum possible
size of the reply is larger than its own inline threshold. The Reply size of the reply is larger than its own inline threshold. The Reply
chunk MUST be large enough to contain a Payload stream (RPC message) chunk MUST be large enough to contain a Payload stream (RPC message)
of this maximum size. of this maximum size. If the actual reply Payload stream is smaller
than the requester's inline threshold, the responder MAY return it as
When a Reply chunk is provided, a responder MUST convey the RPC reply a Short message rather than using the Reply chunk.
message in this chunk.
5.4. Memory Registration 5.4. Memory Registration
RDMA requires that data is transferred between only registered memory RDMA requires that data is transferred between only registered memory
segments at the source and destination. All protocol headers as well segments at the source and destination. All protocol headers as well
as separately transferred data chunks must reside in registered as separately transferred data chunks must reside in registered
memory. memory.
Since the cost of registering and de-registering memory can be a Since the cost of registering and de-registering memory can be a
significant proportion of the RDMA transaction cost, it is important significant proportion of the RDMA transaction cost, it is important
to minimize registration activity. This can be achieved within RPC- to minimize registration activity. For memory that is targeted by
controlled memory by allocating chunk list data and RPC headers in a RDMA Send and Receive operations, a local-only registration is
reusable way from pre-registered pools. sufficient and can be left in place during the life of a connection
without any risk of data exposure.
5.4.1. Registration Longevity 5.4.1. Registration Longevity
Data chunks transferred via RDMA Read and Write MAY reside in a Data transferred via RDMA Read and Write can reside in a memory
memory allocation that persists outside the bounds of the RPC allocation not in the control of the RPC-over-RDMA transport. These
transaction. Hence, the default behavior of an RPC-over-RDMA memory allocations can persist outside the bounds of an RPC
transport is to register and invalidate these chunks on every RPC transaction. They are registered and invalidated as needed, as part
transaction. of each RPC transaction.
The requester endpoint must ensure that these memory segments are The requester endpoint must ensure that memory segments associated
properly fenced from the responder before allowing Upper Layer access with each RPC transaction are properly fenced from responders before
to the data contained in them. The data in such segments must be at allowing Upper Layer access to the data contained in them. Moreover,
rest while a responder has access to that memory. the requester must not access these memory segments while the
responder has access to them.
This includes segments that are associated with canceled RPCs. A This includes segments that are associated with canceled RPCs. A
responder cannot know that the requester is no longer waiting for a responder cannot know that the requester is no longer waiting for a
reply, and might proceed to read or even update memory that the reply, and might proceed to read or even update memory that the
requester has released for other use. requester might have released for other use.
5.4.2. Communicating DDP-Eligibility 5.4.2. Communicating DDP-Eligibility
The interface by which an Upper Layer Protocol implementation The interface by which an Upper Layer Protocol implementation
communicates the eligibility of a data item locally to its local RPC- communicates the eligibility of a data item locally to its local RPC-
over-RDMA endpoint is not described by this specification. over-RDMA endpoint is not described by this specification.
Depending on the implementation and constraints imposed by Upper Depending on the implementation and constraints imposed by Upper
Layer Bindings, it is possible to implement reduction transparently Layer Bindings, it is possible to implement reduction transparently
to upper layers. Such implementations may lead to inefficiencies, to upper layers. Such implementations may lead to inefficiencies,
skipping to change at page 28, line 14 skipping to change at page 30, line 10
overhead. By providing an offset in each chunk, many pre- overhead. By providing an offset in each chunk, many pre-
registration or region-based registrations can be readily supported. registration or region-based registrations can be readily supported.
By using a single, universal chunk representation, the RPC-over-RDMA By using a single, universal chunk representation, the RPC-over-RDMA
protocol implementation is simplified to its most general form. protocol implementation is simplified to its most general form.
5.5. Error Handling 5.5. Error Handling
A receiver performs basic validity checks on the RPC-over-RDMA header A receiver performs basic validity checks on the RPC-over-RDMA header
and chunk contents before it passes the RPC message to the RPC and chunk contents before it passes the RPC message to the RPC
consumer. If errors are detected in an RPC-over-RDMA header, an consumer. If errors are detected in an RPC-over-RDMA header, an
RDMA_ERROR type message MUST be generated. Because the transport RDMA_ERROR procedure MUST be generated. Because the transport layer
layer may not be aware of the direction of a problematic RPC message, may not be aware of the direction of a problematic RPC message, an
an RDMA_ERROR type message MAY be generated by either a requester or RDMA_ERROR procedure MAY be generated by either a requester or a
a responder. responder.
To form an RDMA_ERROR type message: The rdma_xid field MUST contain To form an RDMA_ERROR procedure: The rdma_xid field MUST contain the
the same XID that was in the rdma_xid field in the failing request; same XID that was in the rdma_xid field in the failing request; The
The rdma_vers field MUST contain the same version that was in the rdma_vers field MUST contain the same version that was in the
rdma_vers field in the failing request; The rdma_proc field MUST rdma_vers field in the failing request; The rdma_proc field MUST
contain the value RDMA_ERROR; The rdma_err field contains a value contain the value RDMA_ERROR; The rdma_err field contains a value
that reflects the type of error that occurred, as described below. that reflects the type of error that occurred, as described below.
An RDMA_ERROR type message indicates a permanent error. When An RDMA_ERROR procedure indicates a permanent error. When receiving
receiving an RDMA_ERROR type message, a requester should attempt to an RDMA_ERROR procedure, a requester should attempt to terminate the
terminate the RPC transaction if it recognizes the XID in the reply's RPC transaction if it recognizes the XID in the reply's rdma_xid
rdma_xid field, and return an error to the application to prevent field, and return an error to the application to prevent retrying the
retrying the failed RPC transaction. failed RPC transaction.
To avoid an infinite loop, a receiver should drop an RDMA_ERROR type To avoid an infinite loop, a receiver should drop an RDMA_ERROR
message that is malformed. procedure that is malformed.
5.5.1. Header Version Mismatch 5.5.1. Header Version Mismatch
When a receiver detects an RPC-over-RDMA header version that it does When a receiver detects an RPC-over-RDMA header version that it does
not support (currently this document defines only Version One), it not support (currently this document defines only Version One), it
MUST reply with an rdma_err value of ERR_VERS, providing the low and MUST reply with an RDMA_ERROR procedure and set the rdma_err value to
high inclusive version numbers it does, in fact, support. RDMA_ERR_VERS, also providing the low and high inclusive version
numbers it does, in fact, support.
5.5.2. XDR Errors 5.5.2. XDR Errors
A receiver might encounter an XDR parsing error that prevents it from A receiver might encounter an XDR parsing error that prevents it from
processing the incoming Transport stream. Examples of such errors processing the incoming Transport stream. Examples of such errors
include an invalid value in the rdma_proc field, an RDMA_NOMSG include an invalid value in the rdma_proc field, an RDMA_NOMSG
message that has no chunk lists, or the contents of the rdma_xid message that has no chunk lists, or the contents of the rdma_xid
field might not match the contents of the XID field in the field might not match the contents of the XID field in the
accompanying RPC message. In such cases, the responder MUST reply accompanying RPC message. If the rdma_vers field contains a
with an rdma_err value of ERR_CHUNK. recognized value, but an XDR parsing error occurs, the responder MUST
reply with an RDMA_ERROR procedure and set the rdma_err value to
RDMA_ERR_CHUNK.
When a responder receives a valid RPC-over-RDMA header but the When a responder receives a valid RPC-over-RDMA header but the
responder's Upper Layer Protocol implementation cannot parse the RPC responder's Upper Layer Protocol implementation cannot parse the RPC
arguments in the RPC Call message, the responder SHOULD return a arguments in the RPC Call message, the responder SHOULD return a
RPC_GARBAGEARGS reply, using an RDMA_MSG type message. This type of RPC_GARBAGEARGS reply, using an RDMA_MSG procedure. This type of
parsing failure might be due to mismatches between chunk sizes or parsing failure might be due to mismatches between chunk sizes or
offsets and the contents of the Payload stream, for example. A offsets and the contents of the Payload stream, for example. A
responder MAY also report the presence of a non-DDP-eligible data responder MAY also report the presence of a non-DDP-eligible data
item in a Read or Write chunk using RPC_GARBAGEARGS. item in a Read or Write chunk using RPC_GARBAGEARGS.
5.5.3. Responder Operational Errors 5.5.3. Responder Operational Errors
Problems can arise as a responder attempts to use requester-provided Problems can arise as a responder attempts to use requester-provided
resources for RDMA Read or Write operations. For example: resources for RDMA Read or Write operations. For example:
o Chunks can be validated only by using their contents to form RDMA o Chunks can be validated only by using their contents to form RDMA
Read or Write operations. If chunk contents are invalid (say, a Read or Write operations. If chunk contents are invalid (say, a
segment is no longer registered, or a chunk length is too long), a segment is no longer registered, or a chunk length is too long), a
Remote Access error occurs. Remote Access error occurs.
o If a requester's receive buffer is too small, the responder's Send o If a requester's receive buffer is too small, the responder's Send
operation completes with a Local Length Error. operation completes with a Local Length Error.
o If the requester-provided Reply chunk is too small to accommodate o If the requester-provided Reply chunk is too small to accommodate
a large RPC reply, a Remote Access error occurs. A responder can a large RPC Reply, a Remote Access error occurs. A responder can
detect this problem before attempting to write past the end of the detect this problem before attempting to write past the end of the
Reply chunk. Reply chunk.
Operational errors are typically fatal to the connection. To avoid a Operational errors are typically fatal to the connection. To avoid a
retransmission loop and repeated connection loss that deadlocks the retransmission loop and repeated connection loss that deadlocks the
connection, once the requester has re-established a connection, the connection, once the requester has re-established a connection, the
responder should send an RDMA_ERROR reply with an rdma_err value of responder should send an RDMA_ERROR reply with an rdma_err value of
ERR_CHUNK to indicate that no RPC-level reply is possible for that RDMA_ERR_CHUNK to indicate that no RPC-level reply is possible for
XID. that XID.
5.5.4. RDMA Transport Errors 5.5.4. RDMA Transport Errors
The RDMA connection and physical link provide some degree of error The RDMA connection and physical link provide some degree of error
detection and retransmission. iWARP's Marker PDU Aligned (MPA) layer detection and retransmission. iWARP's Marker PDU Aligned (MPA) layer
(when used over TCP), Stream Control Transmission Protocol (SCTP), as (when used over TCP), Stream Control Transmission Protocol (SCTP), as
well as the InfiniBand link layer all provide Cyclic Redundancy Check well as the InfiniBand link layer all provide Cyclic Redundancy Check
(CRC) protection of the RDMA payload, and CRC-class protection is a (CRC) protection of the RDMA payload, and CRC-class protection is a
general attribute of such transports. general attribute of such transports.
skipping to change at page 30, line 23 skipping to change at page 32, line 20
RDMA Version One. Related enum values and structure definitions RDMA Version One. Related enum values and structure definitions
remain in the RPC-over-RDMA Version One protocol for backwards remain in the RPC-over-RDMA Version One protocol for backwards
compatibility. compatibility.
5.6.1. RDMA_MSGP 5.6.1. RDMA_MSGP
The specification of RDMA_MSGP in Section 3.9 of [RFC5666] is The specification of RDMA_MSGP in Section 3.9 of [RFC5666] is
incomplete. To fully specify RDMA_MSGP would require: incomplete. To fully specify RDMA_MSGP would require:
o Updating the definition of DDP-eligibility to include data items o Updating the definition of DDP-eligibility to include data items
that may be transferred, with padding, via RDMA_MSGP type messages that may be transferred, with padding, via RDMA_MSGP procedures
o Adding full operational descriptions of the alignment and o Adding full operational descriptions of the alignment and
threshold fields threshold fields
o Discussing how alignment preferences are communicated between two o Discussing how alignment preferences are communicated between two
peers without using CCP peers without using CCP
o Describing the treatment of RDMA_MSGP type messages that convey o Describing the treatment of RDMA_MSGP procedures that convey Read
Read or Write chunks or Write chunks
The RDMA_MSGP message type is beneficial only when the padded data The RDMA_MSGP message type is beneficial only when the padded data
payload is at the end of an RPC message's argument or result list. payload is at the end of an RPC message's argument or result list.
This is not typical for NFSv4 COMPOUND RPCs, which often include a This is not typical for NFSv4 COMPOUND RPCs, which often include a
GETATTR operation as the final element of the compound operation GETATTR operation as the final element of the compound operation
array. array.
Without a full specification of RDMA_MSGP, there has been no fully Without a full specification of RDMA_MSGP, there has been no fully
implemented prototype of it. Without a complete prototype of implemented prototype of it. Without a complete prototype of
RDMA_MSGP support, it is difficult to assess whether this protocol RDMA_MSGP support, it is difficult to assess whether this protocol
element has benefit, or can even be made to work interoperably. element has benefit, or can even be made to work interoperably.
Therefore, senders MUST NOT send RDMA_MSGP type messages. When Therefore, senders MUST NOT send RDMA_MSGP procedures. When
receiving an RDMA_MSGP type message, receivers SHOULD reply with an receiving an RDMA_MSGP procedure, receivers SHOULD reply with an
RDMA_ERROR type message, setting the rdma_err field to ERR_CHUNK. RDMA_ERROR procedure, setting the rdma_err field to RDMA_ERR_CHUNK.
5.6.2. RDMA_DONE 5.6.2. RDMA_DONE
Because no implementation of RPC-over-RDMA Version One uses the Read- Because no implementation of RPC-over-RDMA Version One uses the Read-
Read transfer model, there is never a need to send an RDMA_DONE type Read transfer model, there is never a need to send an RDMA_DONE
message. procedure.
Therefore, senders MUST NOT send RDMA_DONE messages. When receiving Therefore, senders MUST NOT send RDMA_DONE messages. When receiving
an RDMA_DONE type message, receivers SHOULD reply with an RDMA_ERROR an RDMA_DONE procedure, receivers SHOULD reply with an RDMA_ERROR
type message, setting the rdma_err field to ERR_CHUNK. procedure, setting the rdma_err field to RDMA_ERR_CHUNK.
5.7. XDR Examples 5.7. XDR Examples
RPC-over-RDMA chunk lists are complex data types. In this appendix, RPC-over-RDMA chunk lists are complex data types. In this appendix,
illustrations are provided to help readers grasp how chunk lists are illustrations are provided to help readers grasp how chunk lists are
represented inside an RPC-over-RDMA header. represented inside an RPC-over-RDMA header.
An RDMA segment is the simplest component, being made up of a 32-bit An RDMA segment is the simplest component, being made up of a 32-bit
handle (H), a 32-bit length (L), and 64-bits of offset (OO). Once handle (H), a 32-bit length (L), and 64-bits of offset (OO). Once
flattened into an XDR stream, RDMA segments appear as flattened into an XDR stream, RDMA segments appear as
skipping to change at page 39, line 7 skipping to change at page 41, line 7
RPC programs that operate on RPC-over-RDMA Version One only in the RPC programs that operate on RPC-over-RDMA Version One only in the
backward direction do not require an Upper Layer Binding backward direction do not require an Upper Layer Binding
specification. Because RPC-over-RDMA Version One operation in the specification. Because RPC-over-RDMA Version One operation in the
backward direction does not allow reduction, there can be no DDP- backward direction does not allow reduction, there can be no DDP-
eligible data items in such a program. Backward direction operation eligible data items in such a program. Backward direction operation
occurs on an already-established connection, thus there is no need to occurs on an already-established connection, thus there is no need to
specify RPC bind parameters. specify RPC bind parameters.
8. Upper Layer Binding Specifications 8. Upper Layer Binding Specifications
Each RPC program and version tuple that operates on an RDMA transport An Upper Layer Protocol is typically defined independently of any
MUST have an Upper Layer Binding (ULB) specification. An Upper Layer particular RPC transport. An Upper Layer Binding specification (ULB)
Binding specification can be part of another protocol specification
document, or it might be a stand-alone document, similar to
[RFC5667].
An Upper Layer Protocol is typically defined independently of a
particular RPC transport. An Upper Layer Binding specification
provides guidance that helps the Upper Layer Protocol interoperate provides guidance that helps the Upper Layer Protocol interoperate
correctly and efficiently over a particular transport, such as RPC- correctly and efficiently over a particular transport. For RPC-over-
over-RDMA Version One. In particular, it provides: RDMA Version One, a ULB provides:
o A taxonomy of XDR data items that are eligible for Direct Data o A taxonomy of XDR data items that are eligible for Direct Data
Placement Placement
o Clarifications on how to compute the maximum reply size for o A method for determining the maximum size of the reply Payload
operations in the Upper Layer Protocol stream for all procedures in the Upper Layer Protocol
o An rpcbind port assignment for operation of the RPC Program and o An rpcbind port assignment for operation of the RPC Program and
Version on an RPC-over-RDMA transport Version on an RPC-over-RDMA transport
Each RPC Program and Version tuple that utilizes RPC-over-RDMA
Version One needs to have an Upper Layer Binding specification.
Requesters MUST NOT send RPC-over-RDMA messages for Upper Layer
Protocols that do not have a Upper Layer Binding. Responders MUST
NOT reply to RPC-over-RDMA messages for Upper Layer Protocols that do
not have a Upper Layer Binding.
8.1. DDP-Eligibility 8.1. DDP-Eligibility
To optimize the use of an RDMA transport, an Upper Layer Binding An Upper Layer Binding designates some XDR data items as eligible for
designates some XDR data items as eligible for Direct Data Placement. Direct Data Placement. As an RPC-over-RDMA message is formed, DDP-
A data item is a candidate for eligibility if there is a clear eligible data items can be removed from the Payload stream and placed
benefit for moving the contents of the item directly from the directly in the receiver's memory (reduced).
sender's memory into the receiver's memory. Criteria for DDP-
An XDR data item should be considered for DDP-eligibility if there is
a clear benefit to moving the contents of the item directly from the
sender's memory to the receiver's memory. Criteria for DDP-
eligibility include: eligibility include:
1. The size of the XDR data item is frequently much larger than the o The XDR data item is frequently sent or received, and its size is
inline threshold. often much larger than typical inline thresholds.
2. Transport-level processing of the XDR data item is not needed. o Transport-level processing of the XDR data item is not needed.
For example, the data item is an opaque byte array, which For example, the data item is an opaque byte array, which requires
requires no XDR encoding and decoding of its content. no XDR encoding and decoding of its content.
3. The content of the XDR data item is sensitive to address o The content of the XDR data item is sensitive to address
alignment. For example, pullup would be required on the receiver alignment. For example, pullup would be required on the receiver
before the content of the item can be used. before the content of the item can be used.
As RPC-over-RDMA messages are formed, DDP-eligible data items are o The XDR data item does not contain DDP-eligible data items.
treated specially. A DDP-eligible XDR data item is one that MAY be
conveyed by itself in a separate chunk. The Upper Layer Protocol
implementation or the RDMA transport implementation decides when to
move a DDP-eligible data item into a chunk instead of leaving the
item in the RPC message's XDR stream.
All other XDR data items are considered non-DDP-eligible, and MUST Senders MUST NOT reduce data items that are not DDP-eligible. Such
NOT be moved in a separate chunk. They MAY, however, be moved as data items MAY, however, be moved as part of a Position Zero Read
part of a Position Zero Read Chunk or a Reply chunk. Chunk or a Reply chunk.
The interface by which an Upper Layer implementation indicates the The interface by which an Upper Layer implementation indicates the
DDP-eligibility of a data item to the RPC transport is not described DDP-eligibility of a data item to the RPC transport is not described
by this specification. The only requirements are that the receiver by this specification. The only requirements are that the receiver
can re-assemble the transmitted RPC-over-RDMA message into a valid can re-assemble the transmitted RPC-over-RDMA message into a valid
XDR stream, and that DDP-eligibility rules specified by the Upper XDR stream, and that DDP-eligibility rules specified by the Upper
Layer Binding are respected. Layer Binding are respected.
There is no provision to express DDP-eligibility within the XDR There is no provision to express DDP-eligibility within the XDR
language. The only definitive specification of DDP-eligibility is language. The only definitive specification of DDP-eligibility is
the Upper Layer Binding itself. the Upper Layer Binding itself.
It is the responsibility of the protocol's Upper Layer Binding to 8.1.1. DDP-Eligibility Violation
specify DDP-eligibity rules so that if a DDP-eligible XDR data item
is embedded within another, only one of these two objects is to be
represented by a chunk. This ensures that the mapping from XDR
position to the XDR object represented is unambiguous. Note however
that such complex data types are unlikely to be good candidates for
Direct Data Placement.
8.1.1. Write List Ordering Ambiguity
A requester constructs the Write list for an RPC transaction before
the responder has formulated its reply. When there is only one
result data item that is DDP-eligible, the requester appends only a
single Write chunk to that Write list. If the responder populates
that chunk with data, the requester knows with certainty which result
is contained in it.
However, Upper Layer Protocol procedures may allow replies where more
than one result data item is DDP-eligible. For example, an NFSv4
COMPOUND is composed of individual NFSv4 operations, more than one of
which may have a reply containing a DDP-eligible result. As stated
in Section 5.3.2, when multiple Write chunks are present, the
responder fills in each Write chunk with a DDP-eligible result until
either there are no more results or no more Write chunks.
Ambiguities can arise when replies contain XDR unions or arrays of
complex data types which allow a responder options about whether a
DDP-eligible data item is included or not. It is the responsibility
of the Upper Layer Binding to avoid situations where there is
ambiguity about which result is in which chunk in the Write list. If
an ambiguity is unavoidable, the Upper Layer Binding MUST specify how
Write list entries are mapped to DDP-eligible results.
8.1.2. DDP-Eligibility Violation
A DDP-eligibility violation occurs when a requester forms a Call A DDP-eligibility violation occurs when a requester forms a Call
message with a non-DDP-eligible data item in a Read chunk, or message with a non-DDP-eligible data item in a Read chunk. A
provides a Write list when there are no DDP-eligible items allowed in violation occurs when a responder forms a Reply message without
the operation's reply. A violation occurs when a responder forms a reducing a DDP-eligible data item when there is a Write list provided
Reply message without reducing a DDP-eligible data item when there is by the requester.
a Write list provided by the requester.
In the first case, a responder might attempt to parse and process the In the first case, a responder MUST NOT process the Call message.
Call message anyway. If the responder cannot process the Call, it
MUST report this either via an RDMA_ERROR type message with the
rdma_err field set to ERR_CHUNK, or via an RPC-level RPC_GARBAGEARGS
message.
In the second case, the responder is in a bind: when a Write chunk is In the second case, as a requester parses a Reply message, it must
provided, it MUST use it, but the ULB specification does not say what assume that the responder has correctly reduced a DDP-eligible result
result is expected in that chunk. This is considered a transport- data item. If the responder has not done so, it is likely that the
level error, and MUST be reported to the requester via an RDMA_ERROR requester cannot finish parsing the Payload stream and that an XDR
type message with the rdma_err field set to ERR_CHUNK. error would result.
In the third case, a requester might attempt to parse and process the Both types of violations MUST be reported as described in
Reply message anyway. If the requester cannot process the Reply, it Section 5.5.2.
MUST report this via an RDMA_ERROR type message with the rdma_err
field set to ERR_CHUNK.
8.2. Maximum Reply Size 8.2. Maximum Reply Size
A requester provides resources for both a Call message and its A requester provides resources for both a Call message and its
matching Reply message. A requester forms the Call message itself, matching Reply message. A requester forms the Call message itself,
thus can compute the exact resources needed for it. thus can compute the exact resources needed for it.
A requester must allocate resources for the Reply message (an RPC- A requester must allocate resources for the Reply message (an RPC-
over-RDMA credit, a Receive buffer, and possibly a Write list and over-RDMA credit, a Receive buffer, and possibly a Write list and
Reply chunk) before the responder has formed the actual reply. To Reply chunk) before the responder has formed the actual reply. To
accommodate all possible replies for the operation in the Call accommodate all possible replies for the procedure in the Call
message, a requester must allocate reply resources based on the message, a requester must allocate reply resources based on the
maximum possible size of the expected reply. maximum possible size of the expected Reply message.
If there are operations in the Upper Layer Protocol for which there If there are procedures in the Upper Layer Protocol for which there
is no clear payload maximum, an Upper Layer Binding MUST provide a is no clear reply size maximum, the Upper Layer Binding needs to
mechanism a requester implementation can use to determine the specify a dependable means for determining the maximum.
resources needed for these operations.
8.3. Additional Considerations 8.3. Additional Considerations
There may be other details provided in an Upper Layer Binding. There may be other details provided in an Upper Layer Binding.
o An Upper Layer Binding may recommend an inline threshold value or o An Upper Layer Binding may recommend an inline threshold value or
other transport-related parameters for RPC-over-RDMA Version One other transport-related parameters for RPC-over-RDMA Version One
connections bearing that Upper Layer Protocol. connections bearing that Upper Layer Protocol.
o An Upper Layer Protocol may provide a means to communicate these o An Upper Layer Protocol may provide a means to communicate these
skipping to change at page 42, line 36 skipping to change at page 43, line 40
Given the above, Upper Layer Bindings and Upper Layer Protocols must Given the above, Upper Layer Bindings and Upper Layer Protocols must
be designed to interoperate correctly no matter what connection be designed to interoperate correctly no matter what connection
parameters are in effect on a connection. parameters are in effect on a connection.
8.4. Upper Layer Protocol Extensions 8.4. Upper Layer Protocol Extensions
An RPC Program and Version tuple may be extensible. For instance, An RPC Program and Version tuple may be extensible. For instance,
there may be a minor versioning scheme that is not reflected in the there may be a minor versioning scheme that is not reflected in the
RPC version number. Or, the Upper Layer Protocol may allow RPC version number. Or, the Upper Layer Protocol may allow
additional features to be specified after the original RPC program additional features to be specified after the original RPC program
specification was ratified. Upper Layer Bindings are provided for specification was ratified.
interoperable programs and versions by extending existing Upper Layer
Bindings to reflect the changes made necessary by each addition to
the existing XDR.
9. Transport Protocol Extensibility Upper Layer Bindings are provided for interoperable RPC Programs and
Versions by extending existing Upper Layer Bindings to reflect the
changes made necessary by each addition to the existing XDR.
Upper Layer RPC Protocols are defined solely by their XDR 9. Extensibility Guidelines
definitions. They are independent of the transport mechanism used to
convey base RPC messages. Protocols defined by XDR often have
signifcant extensibility restrictions placed on them.
Not all extensibility restrictions on RPC-based Upper Layer Protocols The RPC-over-RDMA header format is specified using XDR, unlike other
may be appropriate for an RPC transport protocol. TCP [RFC0793], for RPC transport protocols such as TCP or UDP. This creates
example, is an RPC transport protocol that has been extended many opportunities for addressing minor issues with the transport protocol
times independently of the RPC and XDR standards. and for introducing optional features, all without having to
increment the RPC-over-RDMA protocol version number. When more
invasive changes to the protocol are needed, a protocol version
number change is required. In either case, no changes to the RPC-
over-RDMA protocol can be made without Working Group discussion and
approval by the IESG.
RPC-over-RDMA might be considered as an extension of the RPC protocol Unlike the rest of this document, which defines the base of RPC-over-
rather than a separate transport, however. RDMA Version One, Section 9 applies to all versions of RPC-over-RDMA.
New versions of RPC-over-RDMA may be published as separate protocols
without updating this document, but any change to the extensibility
model defined here requires updating this document.
o The mechanisms that TCP uses to move data are opaque to the RPC 9.1. Extending RPC-over-RDMA Header XDR
implementation and RPC programs using it. Upper Layer Protocols
are often aware that RPC-over-RDMA is present, as they identify
data items that can be moved via direct data placement.
o RPC-over-RDMA is used only for moving RPC messages, and not ever The first four fields in the RPC-over-RDMA header must remain aligned
for generic data transfer. at the same fixed offsets for all versions of the RPC-over-RDMA
protocol. The version number must be in a fixed place in order for
version mismatches to be detected. For version mismatches to be
reported in a fashion that all future version implementations can
reliably decode, the rdma_proc field must be in a fixed place, the
value of RDMA_ERR_VERS must always remain the same, and the field
placement of the RDMA_ERR_VERS arm of the rpcrdma1_error union must
always remain the same.
o RPC-over-RDMA relies on a more sophisticated set of base transport Given these constraints, one way to extend RPC-over-RDMA is to add
operations than traditional socket-based transports. new values to the rdma_proc enumerated type and new components (arms)
Interoperability depends on RPC-over-RDMA implementations using to the rpcrdma1_body union. New argument and result types may be
these operations in a predictable way. introduced for each new procedure defined this way. These extensions
would be specified by new Internet Drafts with appropriate Working
Group and IESG review to ensure continued interoperation with
existing implementations.
o The RPC-over-RDMA header is specified using XDR, unlike other RPC XDR extensions may introduce only optional features to an existing
transport protocols. RPC-over-RDMA protocol version. To detect when an optional rdma_proc
value is supported by a receiver, it is desirable to have a specific
value of the rdma_err field, say, RDMA_ERR_PROC, that indicates when
the receiver does not recognize an rdma_proc value.
9.1. RPC-over-RDMA Version Numbering In RPC-over-RDMA Version One, a receiver can indicate that it does
not recognize an rdma_proc enum value only by returning an RDMA_ERROR
procedure with the rdma_err field set to RDMA_ERR_CHUNK (see
Section 5.5.2). This is indistinguishable from a situation where the
receiver does indeed support the procedure, but the XDR is malformed.
Because the version number is encoded as part of the RPC-over-RDMA To resolve this problem, an RPC-over-RDMA Version One sender uses the
header and the RDMA_ERROR message type is used to indicate errors, following convention. If the first time the sender uses an optional
these first four fields and the start of the chunk lists MUST always rdma_proc value the receiver returns an RDMA_ERROR procedure with
remain aligned at the same fixed offsets for all versions of the RPC- RDMA_ERR_CHUNK in the rdma_err field, the sender simply marks that
over-RDMA header. feature as unsupported and does not send it again on the current
connection instance. Subsequent to an initial successful result,
receiving RDMA_ERR_CHUNK retains its more relaxed meaning of "generic
XDR parsing error."
The value of the RPC-over-RDMA header's version field MUST be changed To ensure backwards compatibility when such an extension mechanism is
in place, the value of RDMA_ERR_CHUNK must remain the same for all
versions of the RPC-over-RDMA protocol.
o Whenever the on-the-wire format of the RPC-over-RDMA header is 9.2. RPC-over-RDMA Version Numbering
changed in a way that prevents interoperability with current
implementations
o Whenever the set of abstract RDMA operations that may be used is Before becoming REQUIRED, features created by XDR extension will
changed often need a significant period of optional general use to ensure
they are mature. This is especially true for infrastructural
features that others will build upon. When optional features become
REQUIRED, that would be an occasion to bump the RPC-over-RDMA
protocol version.
o Whenever the set of allowable transfer models is altered 9.2.1. Incrementing The Version Number
The value of the RPC-over-RDMA header's version field has to be
updated when the protocol is altered in a way that prevents
interoperability with current implementations. Two examples of such
changes include:
o Whenever the RPC-over-RDMA header XDR definition is changed to add
a REQUIRED protocol element, or whenever a REQUIRED protocol
element is removed
o Whenever the use of a new abstract RDMA operation is specified as
REQUIRED, or the use of an existing REQUIRED abstract RDMA
operation is removed
When a version number bump is forced (e.g. a REQUIRED feature is to
be introduced), the Working Group can:
o Document the whole protocol as amended
o Normatively reference all features added since the previous
version
o Include all REQUIRED functionality, and normatively reference
optional functionality
The Working Group retains all these options but the last is typically
preferred.
10. Security Considerations 10. Security Considerations
10.1. Memory Protection 10.1. Memory Protection
A primary consideration is the protection of the integrity and A primary consideration is the protection of the integrity and
privacy of local memory by an RPC-over-RDMA transport. The use of privacy of local memory by an RPC-over-RDMA transport. The use of
RPC-over-RDMA MUST NOT introduce any vulnerabilities to system memory RPC-over-RDMA MUST NOT introduce any vulnerabilities to system memory
contents, nor to memory owned by user processes. contents, nor to memory owned by user processes.
It is REQUIRED that any RDMA provider used for RPC transport be It is REQUIRED that any RDMA provider used for RPC transport be
conformant to the requirements of [RFC5042] in order to satisfy these conformant to the requirements of [RFC5042] in order to satisfy these
protections. These protections are provided by the RDMA layer protections. These protections are provided by the RDMA layer
specifications, and specifically their security models. specifications, and in particular, their security models.
10.1.1. Protection Domains 10.1.1. Protection Domains
The use of Protection Domains to limit the exposure of memory The use of Protection Domains to limit the exposure of memory
segments to a single connection is critical. Any attempt by a host segments to a single connection is critical. Any attempt by an
not participating in that connection to re-use handles will result in endpoint not participating in that connection to re-use memory
a connection failure. Because Upper Layer Protocol security handles should result in immediate failure of that connection.
mechanisms rely on this aspect of Reliable Connection behavior, Because Upper Layer Protocol security mechanisms rely on this aspect
strong authentication of the remote is recommended. of Reliable Connection behavior, strong authentication of remote
endpoints is recommended.
10.1.2. Handle Predictability 10.1.2. Handle Predictability
Unpredictable memory handles should be used for any operation Unpredictable memory handles should be used for any operation
requiring advertised memory segments. Advertising a continuously requiring advertised memory segments. Advertising a continuously
registered memory region allows a remote host to read or write to registered memory region allows a remote host to read or write to
that region even when an RPC involving that memory is not under way. that region even when an RPC involving that memory is not under way.
Therefore implementations should avoid advertising persistently Therefore implementations should avoid advertising persistently
registered memory. registered memory.
10.1.3. Memory Fencing 10.1.3. Memory Fencing
Advertised memory segments should be invalidated as soon as related Advertised memory segments should be invalidated as soon as related
RPC operations are complete. Invalidation and DMA unmapping of RPC operations are complete. Invalidation and DMA unmapping of
segments should be complete before an RPC application is allowed to segments should be complete before the Upper Layer is allowed to
continue execution and use or alter the contents of a memory region. continue execution and use or alter the contents of a memory region.
10.2. Using GSS With RPC-Over-RDMA 10.2. Using GSS With RPC-Over-RDMA
ONC RPC provides its own security via the RPCSEC_GSS framework ONC RPC provides its own security via the RPCSEC_GSS framework
[RFC2203]. RPCSEC_GSS can provide message authentication, integrity [RFC2203]. RPCSEC_GSS can provide message authentication, integrity
checking, and privacy. This security mechanism is unaffected by the checking, and privacy. This security mechanism is unaffected by the
RDMA transport. However, there is much host data movement associated RDMA transport. However, there is much host data movement associated
with the computation and verification of integrity and with with the computation and verification of integrity and with
encryption/decryption, so performance advantages can be lost. encryption/decryption, so performance advantages can be lost.
skipping to change at page 45, line 13 skipping to change at page 47, line 23
required. required.
Once delivered securely by the RDMA provider, any RDMA-exposed memory Once delivered securely by the RDMA provider, any RDMA-exposed memory
will contain only RPC payloads in the chunk lists, transferred under will contain only RPC payloads in the chunk lists, transferred under
the protection of RPCSEC_GSS integrity and privacy. By these means, the protection of RPCSEC_GSS integrity and privacy. By these means,
the data will be protected end-to-end, as required by the RPC layer the data will be protected end-to-end, as required by the RPC layer
security model. security model.
11. IANA Considerations 11. IANA Considerations
Three new assignments are specified by this document: Three assignments are specified by this document:
o A new set of RPC "netids" for resolving RPC-over-RDMA services o A set of RPC "netids" for resolving RPC-over-RDMA services
o Optional service port assignments for Upper Layer Bindings o Optional service port assignments for Upper Layer Bindings
o An RPC program number assignment for the configuration protocol o An RPC program number assignment for the configuration protocol
These assignments have been established, as below. These assignments have been established, as below.
The new RPC transport has been assigned an RPC "netid", which is an The new RPC transport has been assigned an RPC "netid", which is an
rpcbind [RFC1833] string used to describe the underlying protocol in rpcbind [RFC1833] string used to describe the underlying protocol in
order for RPC to select the appropriate transport framing, as well as order for RPC to select the appropriate transport framing, as well as
skipping to change at page 46, line 20 skipping to change at page 48, line 29
[RFC5531]. [RFC5531].
12. Acknowledgments 12. Acknowledgments
The editor gratefully acknowledges the work of Brent Callaghan and The editor gratefully acknowledges the work of Brent Callaghan and
Tom Talpey on the original RPC-over-RDMA Version One specification Tom Talpey on the original RPC-over-RDMA Version One specification
[RFC5666]. [RFC5666].
Dave Noveck provided excellent review, constructive suggestions, and Dave Noveck provided excellent review, constructive suggestions, and
consistent navigational guidance throughout the process of drafting consistent navigational guidance throughout the process of drafting
this document. this document. Dave also contributed much of the organization and
content of Section 9.
The comments and contributions of Karen Deitke, Dai Ngo, Chunli The comments and contributions of Karen Deitke, Dai Ngo, Chunli
Zhang, Dominique Martinet, and Mahesh Siddheshwar are accepted with Zhang, Dominique Martinet, and Mahesh Siddheshwar are accepted with
many and great thanks. The editor also wishes to thank Bill Baker great thanks. The editor also wishes to thank Bill Baker for his
for his unwavering support of this work. unwavering support of this work.
Special thanks go to nfsv4 Working Group Chair Spencer Shepler and Special thanks go to nfsv4 Working Group Chair Spencer Shepler and
nfsv4 Working Group Secretary Thomas Haynes for their support. nfsv4 Working Group Secretary Thomas Haynes for their support.
13. References 13. References
13.1. Normative References 13.1. Normative References
[RFC1833] Srinivasan, R., "Binding Protocols for ONC RPC Version 2", [RFC1833] Srinivasan, R., "Binding Protocols for ONC RPC Version 2",
RFC 1833, DOI 10.17487/RFC1833, August 1995, RFC 1833, DOI 10.17487/RFC1833, August 1995,
skipping to change at page 47, line 39 skipping to change at page 50, line 5
<http://www.rfc-editor.org/info/rfc5665>. <http://www.rfc-editor.org/info/rfc5665>.
13.2. Informative References 13.2. Informative References
[IB] InfiniBand Trade Association, "InfiniBand Architecture [IB] InfiniBand Trade Association, "InfiniBand Architecture
Specifications", <http://www.infinibandta.org>. Specifications", <http://www.infinibandta.org>.
[IBPORT] InfiniBand Trade Association, "IP Addressing Annex", [IBPORT] InfiniBand Trade Association, "IP Addressing Annex",
<http://www.infinibandta.org>. <http://www.infinibandta.org>.
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, DOI
10.17487/RFC0768, August 1980,
<http://www.rfc-editor.org/info/rfc768>.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC
793, DOI 10.17487/RFC0793, September 1981, 793, DOI 10.17487/RFC0793, September 1981,
<http://www.rfc-editor.org/info/rfc793>. <http://www.rfc-editor.org/info/rfc793>.
[RFC1094] Nowicki, B., "NFS: Network File System Protocol [RFC1094] Nowicki, B., "NFS: Network File System Protocol
specification", RFC 1094, DOI 10.17487/RFC1094, March specification", RFC 1094, DOI 10.17487/RFC1094, March
1989, <http://www.rfc-editor.org/info/rfc1094>. 1989, <http://www.rfc-editor.org/info/rfc1094>.
[RFC1813] Callaghan, B., Pawlowski, B., and P. Staubach, "NFS [RFC1813] Callaghan, B., Pawlowski, B., and P. Staubach, "NFS
Version 3 Protocol Specification", RFC 1813, DOI 10.17487/ Version 3 Protocol Specification", RFC 1813, DOI 10.17487/
 End of changes. 172 change blocks. 
499 lines changed or deleted 604 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/