<?xml version='1.0' encoding='ascii'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="1"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" ipr="trust200902" docName="draft-ietf-nfsv4-rfc5667bis-03" obsoletes="5667" updates="" submissionType="IETF" xml:lang="en">
  <front>
    <title abbrev="NFS On RPC-Over-RDMA">Network File System (NFS) Upper Layer Binding To RPC-Over-RDMA </title>
    <author initials="C.L." surname="Lever" fullname="Charles Lever" role="editor">
      <organization abbrev="Oracle">Oracle Corporation </organization>
      <address>
        <postal>
          <street>1015 Granger Avenue</street>
          <city>Ann Arbor</city>
          <region>MI</region>
          <code>48104</code>
          <country>USA</country>
        </postal>
        <phone>+1 734 274 2396</phone>
        <email>chuck.lever@oracle.com</email>
      </address>
    </author>
    <date/>
    <area>Transport</area>
    <workgroup>Network File System Version 4</workgroup>
    <keyword>NFS-Over-RDMA</keyword>
    <abstract>
      <t>This document specifies Upper Layer Bindings of Network File System (NFS) protocol versions to RPC-over-RDMA transports.  These bindings are required to enable RPC-based protocols such as NFS to use direct data placement on RPC-over-RDMA transports.  This document obsoletes RFC 5667.  </t>
    </abstract>
    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119" pageno="false" format="default"/>.  </t>
    </note>
  </front>
  <middle>
    <section title="Introduction" toc="default">
      <t>An RPC-over-RDMA transport, such as defined in <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>, may employ direct data placement to convey data payloads associated with RPC transactions.  Each RPC-over-RDMA transport header conveys lists of memory locations corresponding to XDR data items defined in an Upper Layer Protocol (such as NFS).  </t>
      <t>To facilitate interoperation, RPC client and server implementations must agree in advance on what XDR data items in which RPC procedures are eligible for direct data placement (DDP).  This document contains material required of Upper Layer Bindings, as specified in <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>, for the following NFS protocol versions: <list style="symbols"><t>NFS Version 2 <xref target="RFC1094" pageno="false" format="default"/> </t><t>NFS Version 3 <xref target="RFC1813" pageno="false" format="default"/> </t><t>NFS Version 4.0 <xref target="RFC7530" pageno="false" format="default"/> </t><t>NFS Version 4.1 <xref target="RFC5661" pageno="false" format="default"/> </t><t>NFS Version 4.2 <xref target="I-D.ietf-nfsv4-minorversion2" pageno="false" format="default"/> </t></list> </t>
    </section>
    <section title="Conveying NFS Operations On RPC-Over-RDMA Transports" toc="default">
      <t>Definitions of terminology and a general discussion of how RPC-over-RDMA is used to convey RPC transactions can be found in <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>.  In this section, these general principals are applied to the specifics of the NFS protocol.  </t>
      <section title="Use Of The Read List" toc="default">
        <t>The Read list in each RPC-over-RDMA transport header represents a set of memory regions containing DDP-eligible NFS argument data.  Large data items, such as the data payload of an NFS version 3 WRITE procedure, are referenced by the Read list.  The NFS server pulls such payloads from the client and places them directly into its own memory.  </t>
        <t>XDR unmarshaling code on the NFS server identifies the correspondence between Read chunks and particular NFS arguments via the chunk Position value encoded in each Read segment.  </t>
      </section>
      <section title="Use Of The Write List" toc="default">
        <t>The Write list in each RPC-over-RDMA transport header represents a set of memory regions that can receive DDP-eligible NFS result data.  Large data items, such as the payload of an NFS version 3 READ procedure, are referenced by the Write list.  The NFS server pushes such payloads to the client, placing them directly into the client's memory.  </t>
        <t>Each Write chunk corresponds to a specific XDR data item in an NFS reply.  This document specifies how NFS client and server implementations identify the correspondence between Write chunks and XDR results.  </t>
        <section title="Empty Write Chunks" toc="default">
          <t>Section 4.4.6.2 of <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/> defines the concept of unused Write chunks.  An unused Write chunk is a Write chunk with either zero segments or where all segments in the Write chunk have zero length.  In this document these are referred to as "empty" Write chunks.  A "non-empty" Write chunk has at least one segment of non-zero length.  </t>
          <t>An NFS client might wish an NFS server to return a DDP-eligible result inline.  If there is only one DDP-eligible result item in the reply, the NFS client simply specifies an empty Write list to force the NFS server to return that result inline.  If there are multiple DDP-eligible results, the NFS client specifies empty Write chunks for each DDP-eligible data item that it wishes to be returned inline.  </t>
          <t>An NFS server might encounter an XDR union result where there are arms that have a DDP-eligible result, and arms that do not.  If the NFS client has provided a non-empty Write chunk that matches with a DDP-eligible result, but the response does not contain that result, the NFS server MUST return an empty Write chunk in that position in the Write list.  </t>
        </section>
      </section>
      <section title="Use Of Long Calls And Replies" toc="default">
        <t>Small RPC messages are conveyed using RDMA Send operations which are of limited size.  If an NFS request is too large to be conveyed within the NFS server's responder inline threshold, and there are no DDP-eligible data items that can be removed, an NFS client must send the request using a Long Call.  The entire NFS request is sent in a special Read chunk called a Position-Zero Read chunk.  </t>
        <t>If an NFS client predicts that the maximum size of an NFS reply could be too large to be conveyed within it's own responder inline threshold, it provides a Reply chunk in the RPC-over-RDMA transport header conveying the NFS request.  The server places the entire NFS reply in the Reply chunk.  </t>
        <t>These special chunks are described in more detail in <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>.  </t>
      </section>
      <section title="Scatter-Gather Considerations" toc="default">
        <t>A chunk comprises exactly one XDR data item.  Each Read chunk is represented as a list of segments at the same XDR Position.  Each Write chunk is represented as an array of segments.  An NFS client thus has the flexibility to advertise a set of discontiguous memory regions in which to send or receive a single DDP-eligible XDR data item.  </t>
      </section>
    </section>
    <section title="NFS Versions 2 And 3 Upper Layer Binding" toc="default">
      <t>An NFS version 2 or version 3 client MAY send a single Read chunk to supply the opaque file data for an NFS WRITE procedure, or the pathname for an NFS SYMLINK procedure.  For these procedures, NFS version 2 or 3 servers MUST ignore Read chunks beyond the first in the Read list.  For all other NFS procedures, NFS version 2 or 3 servers MUST ignore Read chunks that have a non-zero value in their Position fields.  </t>
      <t>Similarly, an NFS version 2 or version 3 client MAY provide a single Write chunk to receive either the opaque file data from an NFS READ procedure, or the pathname from an NFS READLINK procedure.  For these procedures, NFS version 2 or 3 servers MUST ignore Write chunks beyond the first in the Write list.  For all other NFS procedures, NFS version 2 or 3 servers MUST ignore the Write list.  </t>
      <t>There are no NFS version 2 or 3 procedures that have DDP-eligible data items in both their Call and Reply.  However, when an NFS version 2 or version 3 client sends a Long Call or Reply, it MAY provide a combination of a Read list, a Write list, and/or a Reply chunk in the same RPC-over-RDMA header.  </t>
      <t>If an NFS version 2 or version 3 client has not provided enough bytes in a Read list to match the size of a DDP-eligible NFS argument data item, or if an NFS version 2 or version 3 client has not provided enough Write list resources to handle an NFS READ or READLINK reply, or if the client has not provided a large enough Reply chunk to convey an NFS reply, the server MUST return one of: <list style="symbols"><t>An RPC-over-RDMA message of type RDMA_ERROR, with the rdma_xid field set to the XID of the matching NFS Call, and the rdma_error field set to ERR_CHUNK; or </t><t>An RPC message (via an RDMA_MSG message) with the xid field set to the XID of the matching NFS Call, the mtype field set to REPLY, the stat field set to MSG_ACCEPTED, and the accept_stat field set to GARBAGE_ARGS.  </t></list> </t>
      <t>These replies do not give any indication to NFS version 2 or version 3 clients of whether an NFS version 2 or 3 server has processed the arguments of the RPC Call, or whether the NFS version 2 or 3 server has accessed NFS client memory associated with that RPC.  </t>
      <t>NFS version 2 or version 3 clients already successfully estimate the maximum reply size of each operation in order to provide an adequate set of buffers to receive each NFS reply.  An NFS version 2 or version 3 client provides a Reply chunk when the maximum possible reply size is larger than the client's responder inline threshold.  </t>
      <section title="Auxiliary Protocols" toc="default">
        <t>NFS versions 2 and 3 are typically deployed with several other protocols, referred to as "auxiliary" protocols.  These are separate RPC protcols which handle operations that are not part of the main NFS protocol.  These include the MOUNT and NLM protocols, introduced in an appendix of <xref target="RFC1813" pageno="false" format="default"/>; the NSM protocol, described in Chapter 11 of <xref target="NSM" pageno="false" format="default"/>; and the NFSACL protocol, which does not have a public definition.  However NFSACL is treated as a de facto standard and there are several interoperating implementations.  </t>
        <t>RPC-over-RDMA considers these as individual Upper Layer Protocols <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>.  Therefore to operate on an RPC-over-RDMA transport, an Upper Layer Binding must be provided for each of these.  </t>
        <t>Typically MOUNT, NLM, and NSM are conveyed via TCP rather than RPC-over-RDMA.  Note that only metadata is conveyed in these protocols, thus direct data placement is never necessary, and the size of RPC messages is uniformly small.  The maximum size of replies is easily determined by examining the XDR definitions of these protocols.  </t>
        <t>Implementations that support the NFSACL protocol typically send NFSACL procedures on the same connection as the main NFS protocol.  Thus NFSACL does require an Upper Layer Binding.  </t>
        <t>No data item in this protocol is DDP-eligible.  There is no protocol size limit for NFS version 3 ACL objects.  The client can have some difficulty ascertaining the size of ACLs to be read from servers.  Practically speaking, ACLs are not large (less than 4KB in most cases), but a large Reply chunk may be provided when the client is in doubt.  The usual rules apply to the use of Long Messages when the size of an NFSACL RPC exceeds a connection's inline thresholds.  </t>
      </section>
    </section>
    <section title="NFS Version 4 Upper Layer Binding" toc="default">
      <t>This specification applies to NFS Version 4.0 <xref target="RFC7530" pageno="false" format="default"/>, NFS Version 4.1 <xref target="RFC5661" pageno="false" format="default"/>, and NFS Version 4.2 <xref target="I-D.ietf-nfsv4-minorversion2" pageno="false" format="default"/>.  It also applies to the callback protocols associated with each of these minor versions defined in the same documents.  </t>
      <section title="DDP-Eligibility" anchor="sec:nfs4-ddp-eligibility" toc="default">
        <t>For each WRITE operation in an NFS version 4 COMPOUND procedure, an NFS version 4 client MAY provide a single Read chunk to supply the opaque file data argument.  For each CREATE(NF4LNK) operation in an NFS version 4 COMPOUND procedure, An NFS version 4 client MAY provide a single Read chunk to supply the pathname argument.  </t>
        <t>Similarly, for each READ operation in an NFS version 4 COMPOUND procedure, an NFS version 4 client MAY provide a single Write chunk to receive the opaque file data argument.  For each READ_PLUS operation in an NFS version 4 COMPOUND procedure, an NFS version 4 client MAY provide a single Write chunk to receive NFS4_CONTENT_DATA.  For each READLINK operation in an NFS version 4 COMPOUND procedure, an NFS version 4 client MAY provide a single Write chunk to receive the pathname argument.  </t>
        <t>An NFS version 4 client MUST NOT provide a Read or Write chunk that corresponds with any other XDR data item in any other NFS version 4 operation in an NFS version 4 COMPOUND procedure, or in an NFS version 4 NULL procedure.  </t>
        <t>It is possible for NFS version 4 COMPOUND procedures to use both the Read list and Write list simultaneously.  An NFS version 4 client MAY provide a Read list and a Write list in the same transaction if it is sending a Long Call or Reply.  </t>
        <t>If an NFS version 4 client has not provided enough bytes in a Read list to match the size of a DDP-eligible NFS argument data item, or if an NFS version 4 client has not provided enough Write list resources to handle a WRITE or READLINK operation, or if the client has not provided a large enough Reply chunk to convey an NFS reply, the server MUST return one of: <list style="symbols"><t>An RPC-over-RDMA message of type RDMA_ERROR, with the rdma_xid field set to the XID of the matching NFS Call, and the rdma_error field set to ERR_CHUNK; or </t><t>An RPC message (via an RDMA_MSG message) with the xid field set to the XID of the matching NFS Call, the stat field set to MSG_ACCEPTED, and the accept_stat field set to GARBAGE_ARGS.  </t></list> </t>
        <t>Such error replies are permanent errors, and constitute both completion of the RPC transaction, and a valid server response.  It is not necessary for an NFS version 4 server to drop the transport connection in this case.  </t>
        <section title="Session-Related Considerations" anchor="sec:sessions" toc="default">
          <t>In most cases, the presence of an NFS session <xref target="RFC5661" pageno="false" format="default"/> has no effect on the operation of RPC-over-RDMA.  None of the operations introduced to support NFS sessions contain DDP-eligible data items.  There is no need to match the number of session slots with the number of available RPC-over-RDMA credits.  </t>
          <t>However, there are some rare error conditions which require special handling when an NFS session is operating on an RPC-over-RDMA transport.  For example, a requester might receive, in response to an RPC request, an RDMA_ERROR message with an rdma_err value of ERR_CHUNK, or an RDMA_MSG containing an RPC_GARBAGEARGS reply.  Within RPC-over-RDMA Version One, this class of error can be generated for two different reasons: <list style="symbols"><t>There was an XDR error detected parsing the RPC-over-RDMA headers.  </t><t>There was an error sending the response, because, for example, a necessary reply chunk was not provided or the one provided is of insufficient length.  </t></list> </t>
          <t>These two situations, which arise only due to incorrect implementations, have different implications with regard to Exactly-Once Semantics.  An XDR error in decoding the request precludes the execution of the request on the responder, but failure to send a reply indicates that some or all of the operations were executed.  </t>
          <t>In both instances, the client SHOULD NOT retry the operation.  A retry is liable to result in the same sort of error seen previously.  Instead, it is best to consider the operation as completed unsuccessfully and report an error to the consumer who requested the RPC.  </t>
          <t>In addition, within the error response, the requester does not have the result of the execution of the SEQUENCE operation, which identifies the session, slot, and sequence id for the request which has failed.  The xid associated with the request, obtained from the rdma_xid field of the RDMA_ERROR or RDMA_MSG message, must be used to determine the session and slot for the request which failed, and the slot must be properly retired.  If this is not done, the slot could be rendered permanently unavailable.  </t>
        </section>
      </section>
      <section title="Reply Size Estimation" toc="default">
        <t>An NFS version 4 client provides a Reply chunk when the maximum possible reply size is larger than the client's responder inline threshold.  NFS version 4 clients already successfully estimate the maximum reply size of most operations in order to provide an adequate set of buffers to receive each NFS reply.  </t>
        <t>There are certain NFS version 4 data items whose size cannot be estimated by clients reliably, however, because there is no protocol-specified size limit on these structures.  These include but are not limited to opaque types, such as: <list style="symbols"><t>The attrlist4 field </t><t>Fields containing ACLs such as fattr4_acl, fattr4_dacl, fattr4_sacl </t><t>Fields in the fs_locations4 and fs_locations_info4 data structures </t><t>Opaque fields which pertain to pNFS layout metadata, such as loc_body, loh_body, da_addr_body, lou_body, lrf_body, fattr_layout_types and fs_layout_types, </t></list> </t>
        <t>In NFS version 4.1 and later minor versions, the csa_fore_chan_attrs argument of the CREATE_SESSION operation contains a ca_maxresponsesize field.  The value in this field can be taken as the absolute maximum size of replies generated by a replying NFS version 4 server.  This value can be used in cases where it is not possible to estimate a reply size upper bound precisely.  In practice, objects such as ACLs, named attributes, layout bodies, and security labels are much smaller than this maximum.  </t>
        <t>With regard to NFS version 4.0, things are more troublesome.  Typically NFS version 4.0 client implementations rely on their own architectural limits to keep reply buffer sizes reasonable.  For instance, although the NFS version 4 protocol is capable of conveying a megabyte-sized ACL, nearly all known physical filesystems store ACLs in on-disk containers which are small in size.  </t>
        <section title="Managing READ_PLUS Replies" toc="default">
          <t>The NFS version 4.2 READ_PLUS operation returns a complex data type <xref target="I-D.ietf-nfsv4-minorversion2" pageno="false" format="default"/>.  The rpr_contents field in the result of this operation is an array of read_plus_content unions, one arm of which contains an opaque byte stream (d_data).  </t>
          <t>The size of d_data is limited to the value of the rpa_count field, but the protocol does not bound the number of elements which can be returned in the rpr_contents array.  In order to make the size of READ_PLUS replies predictable by NFS version 4.2 clients, the following restrictions are placed on the use of the READ_PLUS operation on RPC-over-RDMA transports: <list style="symbols"><t>An NFS version 4.2 client MUST NOT provide more than one Write chunk for any READ_PLUS operation.  When providing a Write chunk for a READ_PLUS operation, an NFS version 4.2 client MUST provide a Write chunk that is either empty (which forces all result data items for this operation to be returned inline) or large enough to receive rpa_count bytes in a single element of the rpr_contents array.  </t><t>If the Write chunk provided for a READ_PLUS operation by an NFS version 4.2 client is not empty, an NFS version 4.2 server MUST use that chunk for the first element of the rpr_contents array that has an rpc_data arm.  </t><t>An NFS version 4.2 server MUST NOT return more than two elements in the rpr_contents array of any READ_PLUS operation.  It returns as much of the requested byte range as it can fit within these two elements.  If the NFS version 4.2 server has not asserted rpr_eof in the reply, the NFS version 4.2 client SHOULD send additional READ_PLUS requests for any remaining bytes.  </t></list> </t>
        </section>
      </section>
      <section title="NFS Version 4 COMPOUND Requests" toc="default">
        <t>A single NFS version 4 COMPOUND procedure supplies arguments for a sequence of operations, and returns results from that sequence, all in a single round-trip <xref target="RFC7530" pageno="false" format="default"/>.  An NFS version 4 client MAY construct an NFS version 4 COMPOUND procedure that provides more than one chunk in the Read list or Write list as long as it observes the restrictions in <xref target="sec:nfs4-ddp-eligibility" pageno="false" format="default"/>.  </t>
        <t>An NFS version 4 client provides XDR Position values in each Read chunk to disambiguate which chunk is associated with which argument data item.  However NFS version 4 server and client implementations must agree in advance on how to pair Write chunks with returned result data items.  </t>
        <t>The mechanism specified in Section 5.3.2 of <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>) is applied here, with some additional restrictions.  In the following list, an "NFS Read" operation refers to any NFS Version 4 operation which has a DDP-eligible result data item (i.e., either a READ, READ_PLUS, or READLINK operation).  <list style="symbols"><t>If an NFS version 4 client wishes all DDP-eligible items in an NFS reply to be conveyed inline, it leaves the Write list empty.  </t><t>The first chunk in the Write list MUST be used by the first NFS Read operation in an NFS version 4 COMPOUND procedure.  The next Write chunk is used by the next NFS Read operation, and so on.  </t><t>If an NFS version 4 client has provided a matching non-empty Write chunk, then the corresponding NFS Read operation MUST return its DDP-eligible data item using that chunk.  </t><t>If an NFS version 4 client has provided an empty matching Write chunk, then the corresponding NFS Read operation MUST return all of its result data items inline.  </t><t>If an NFS Read operation returns a union arm which does not contain a DDP-eligible result, and the NFS version 4 client has provided a matching non-empty Write chunk, an NFS version 4 server MUST return an empty Write chunk in that Write list position.  </t><t>If there are more NFS Read operations than Write chunks, then remaining NFS Read operations in an NFS version 4 COMPOUND that have no matching Write chunk MUST return their results inline.  </t></list> </t>
        <section title="NFS Version 4 COMPOUND Example" toc="default">
          <t>The following example shows a Write list with three Write chunks, A, B, and C.  The NFS version 4 server consumes the provided Write chunks by writing the results of the designated operations in the compound request (READ and READLINK) back to each chunk.  </t>
          <figure title="" suppress-title="false" align="left" alt="" width="" height="">
            <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">

   Write list:

      A --&gt; B --&gt; C

   NFS version 4 COMPOUND request:

      PUTFH LOOKUP READ PUTFH LOOKUP READLINK PUTFH LOOKUP READ
                    |                   |                   |
                    v                   v                   v
                    A                   B                   C

</artwork>
          </figure>
          <t>If the NFS version 4 client does not want to have the READLINK result returned via RDMA, it provides an empty Write chunk for buffer B to indicate that the READLINK result must be returned inline.  </t>
        </section>
      </section>
      <section title="NFS Version 4 Callback" toc="default">
        <t>The NFS version 4 protocols support server-initiated callbacks to notify clients of events such as recalled delegations.  </t>
        <section title="NFS Version 4.0 Callback" toc="default">
          <t>NFS version 4.0 implementations typically employ a separate TCP connection to handle callback operations, even when the forward channel uses a RPC-over-RDMA transport.  Therefore no Upper Layer Binding for the NFS version 4.0 callback program is provided in this document.  </t>
        </section>
        <section title="NFS Version 4.1 Callback" toc="default">
          <t>In NFS version 4.1 and later minor versions, callback operations may appear on the same connection as is used for NFS version 4 forward channel client requests.  NFS version 4 clients and servers MUST use the mechanism described in <xref target="I-D.ietf-nfsv4-rpcrdma-bidirection" pageno="false" format="default"/> when backchannel operations are conveyed on RPC-over-RDMA transports.  </t>
          <t>The csa_back_chan_attrs argument of the CREATE_SESSION operation contains a ca_maxresponsesize field.  The value in this field can be taken as the absolute maximum size of backchannel replies generated by a replying NFS version 4 client.  </t>
          <t>There are no DDP-eligible data items in callback protocols associated with NFS version 4.1 or NFS version 4.2.  However, some callback requests, such as messages that convey device ID information, may be large, in which case a Long Call or Reply may be appropriate.  When the NFS version 4 client reports a backchannel ca_maxresponsesize that is larger than the connection's inline thresholds, the NFS version 4 client can support Long messages (i.e., Read chunks and Reply chunks).  Otherwise an NFS version 4 server MUST use Short messages to convey backchannel operations.  </t>
          <t>See <xref target="sec:nfs4-ddp-eligibility" pageno="false" format="default"/> for a discussion of how an NFS version 4 server handles situations where an NFS version 4 client has provided inadequate RDMA resources to convey a backchannel reply.  </t>
        </section>
      </section>
      <section title="Connection Keep-Alive" toc="default">
        <t>NFS version 4 client implementations often rely on a transport-layer keep-alive mechanism to detect when an NFS version 4 server has become unresponsive.  When an NFS server is no longer responsive, client-side keep-alive terminates the connection, which in turn triggers reconnection and RPC retransmission.  </t>
        <t>RDMA transports have no keep-alive mechanism.  Without a disconnect or new RPC traffic, RDMA transport connections can remain alive long after an NFS server has become unresponsive.  Once an NFS client has consumed all available RPC-over-RDMA credits on that transport connection, it will forever await a reply before sending another RPC request.  </t>
        <t>NFS version 4 clients SHOULD reserve one RPC-over-RDMA credit to use for periodic server or connection health assessment.  This credit can be used to drive an RPC request on an otherwise idle connection, triggering either a quick affirmative server response or immediate connection termination.  </t>
        <t>To prevent lease expiry, NFS version 4 clients should use a lease-extending operation such as RENEW or SEQUENCE, rather than a NULL request, when performing a periodic health assessment.  </t>
      </section>
    </section>
    <section title="Extending NFS Upper Layer Bindings" toc="default">
      <t>RPC programs such as NFS are required to have an Upper Layer Binding specification to interoperate on RPC-over-RDMA transports <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>.  Via standards action, the Upper Layer Binding specified in this document can be extended to cover versions of the NFS version 4 protocol specified after NFS version 4 minor version 2.  This includes NFS version 4 extensions that are documented separately from a new minor version.  </t>
    </section>
    <section title="IANA Considerations" toc="default">
      <t>NFS use of direct data placement introduces a need for an additional NFS port number assignment for networks that share traditional UDP and TCP port spaces with RDMA services.  The iWARP <xref target="RFC5041" pageno="false" format="default"/> <xref target="RFC5040" pageno="false" format="default"/> protocol is such an example (InfiniBand is not).  </t>
      <t>NFS servers for versions 2 and 3 <xref target="RFC1094" pageno="false" format="default"/> <xref target="RFC1813" pageno="false" format="default"/> traditionally listen for clients on UDP and TCP port 2049, and additionally, they register these with the portmapper and/or rpcbind <xref target="RFC1833" pageno="false" format="default"/> service.  However, <xref target="RFC7530" pageno="false" format="default"/> requires NFS version 4 servers to listen on TCP port 2049, and they are not required to register.  </t>
      <t>An NFS version 2 or version 3 server supporting RPC-over-RDMA on such a network and registering itself with the RPC portmapper MAY choose an arbitrary port, or MAY use the alternative well-known port number for its RPC-over-RDMA service.  The chosen port MAY be registered with the RPC portmapper under the netid assigned by the requirement in <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>.  </t>
      <t>An NFS version 4 server supporting RPC-over-RDMA on such a network MUST use the alternative well-known port number for its RPC-over-RDMA service.  Clients SHOULD connect to this well-known port without consulting the RPC portmapper (as for NFS version 4 on TCP transports).  </t>
      <t>The port number assigned to an NFS service over an RPC-over-RDMA transport is available from the IANA port registry <xref target="RFC3232" pageno="false" format="default"/>.  </t>
    </section>
    <section title="Security Considerations" toc="default">
      <t>RPC-over-RDMA supports all RPC security models, including RPCSEC_GSS security and transport-level security <xref target="RFC2203" pageno="false" format="default"/>.  The choice of RDMA Read and RDMA Write to convey RPC argument and results does not affect this, since it changes only the method of data transfer.  Specifically, the requirements of <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/> ensure that this choice does not introduce new vulnerabilities.  </t>
      <t>Because this document defines only the binding of the NFS protocols atop <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/>, all relevant security considerations are therefore to be described at that layer.  </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <reference anchor="I-D.ietf-nfsv4-rpcrdma-bidirection">
        <front>
          <title>Bi-directional Remote Procedure Call On RPC-over-RDMA Transports</title>
          <author initials="C" surname="Lever" fullname="Chuck Lever">
            <organization/>
          </author>
          <date month="June" day="9" year="2016"/>
          <abstract>
            <t>Minor versions of NFSv4 newer than NFSv4.0 work best when ONC RPC transports can send Remote Procedure Call transactions in both directions on the same connection.  This document describes how RPC- over-RDMA transport endpoints convey RPCs in both directions on a single connection.</t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-nfsv4-rpcrdma-bidirection-05"/>
        <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-nfsv4-rpcrdma-bidirection-05.txt"/>
        <format type="PS" target="http://www.ietf.org/internet-drafts/draft-ietf-nfsv4-rpcrdma-bidirection-05.ps"/>
        <format type="PDF" target="http://www.ietf.org/internet-drafts/draft-ietf-nfsv4-rpcrdma-bidirection-05.pdf"/>
      </reference>
      <reference anchor="I-D.ietf-nfsv4-rfc5666bis">
        <front>
          <title>Remote Direct Memory Access Transport for Remote Procedure Call, Version One</title>
          <author initials="C" surname="Lever" fullname="Chuck Lever">
            <organization/>
          </author>
          <author initials="W" surname="Simpson" fullname="William Simpson">
            <organization/>
          </author>
          <author initials="T" surname="Talpey" fullname="Tom Talpey">
            <organization/>
          </author>
          <date month="May" day="27" year="2016"/>
          <abstract>
            <t>This document specifies a protocol for conveying Remote Procedure Call (RPC) messages on physical transports capable of Remote Direct Memory Access (RDMA).  It requires no revision to application RPC protocols or the RPC protocol itself.  This document obsoletes RFC 5666.</t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-nfsv4-rfc5666bis-07"/>
        <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-nfsv4-rfc5666bis-07.txt"/>
        <format type="PS" target="http://www.ietf.org/internet-drafts/draft-ietf-nfsv4-rfc5666bis-07.ps"/>
        <format type="PDF" target="http://www.ietf.org/internet-drafts/draft-ietf-nfsv4-rfc5666bis-07.pdf"/>
      </reference>
      <reference anchor="I-D.ietf-nfsv4-minorversion2">
        <front>
          <title>NFS Version 4 Minor Version 2</title>
          <author initials="T" surname="Haynes" fullname="Thomas Haynes">
            <organization/>
          </author>
          <date month="January" day="28" year="2016"/>
          <abstract>
            <t>This Internet-Draft describes NFS version 4 minor version two, describing the protocol extensions made from NFS version 4 minor version 1.  Major extensions introduced in NFS version 4 minor version two include: Server Side Copy, Application Input/Output (I/O) Advise, Space Reservations, Sparse Files, Application Data Blocks, and Labeled NFS.</t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-nfsv4-minorversion2-41"/>
        <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-nfsv4-minorversion2-41.txt"/>
      </reference>
      <reference anchor="RFC1833" target="http://www.rfc-editor.org/info/rfc1833">
        <front>
          <title>Binding Protocols for ONC RPC Version 2</title>
          <author initials="R." surname="Srinivasan" fullname="R. Srinivasan">
            <organization/>
          </author>
          <date year="1995" month="August"/>
          <abstract>
            <t>This document describes the binding protocols used in conjunction with the ONC Remote Procedure Call (ONC RPC Version 2) protocols. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="1833"/>
        <seriesInfo name="DOI" value="10.17487/RFC1833"/>
      </reference>
      <reference anchor="RFC2119" target="http://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization/>
          </author>
          <date year="1997" month="March"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC2203" target="http://www.rfc-editor.org/info/rfc2203">
        <front>
          <title>RPCSEC_GSS Protocol Specification</title>
          <author initials="M." surname="Eisler" fullname="M. Eisler">
            <organization/>
          </author>
          <author initials="A." surname="Chiu" fullname="A. Chiu">
            <organization/>
          </author>
          <author initials="L." surname="Ling" fullname="L. Ling">
            <organization/>
          </author>
          <date year="1997" month="September"/>
          <abstract>
            <t>This memo describes an ONC/RPC security flavor that allows RPC protocols to access the Generic Security Services Application Programming Interface (referred to henceforth as GSS-API).  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="2203"/>
        <seriesInfo name="DOI" value="10.17487/RFC2203"/>
      </reference>
      <reference anchor="RFC5661" target="http://www.rfc-editor.org/info/rfc5661">
        <front>
          <title>Network File System (NFS) Version 4 Minor Version 1 Protocol</title>
          <author initials="S." surname="Shepler" fullname="S. Shepler" role="editor">
            <organization/>
          </author>
          <author initials="M." surname="Eisler" fullname="M. Eisler" role="editor">
            <organization/>
          </author>
          <author initials="D." surname="Noveck" fullname="D. Noveck" role="editor">
            <organization/>
          </author>
          <date year="2010" month="January"/>
          <abstract>
            <t>This document describes the Network File System (NFS) version 4 minor version 1, including features retained from the base protocol (NFS version 4 minor version 0, which is specified in RFC 3530) and protocol extensions made subsequently.  Major extensions introduced in NFS version 4 minor version 1 include Sessions, Directory Delegations, and parallel NFS (pNFS).  NFS version 4 minor version 1 has no dependencies on NFS version 4 minor version 0, and it is considered a separate protocol.  Thus, this document neither updates nor obsoletes RFC 3530.  NFS minor version 1 is deemed superior to NFS minor version 0 with no loss of functionality, and its use is preferred over version 0.  Both NFS minor versions 0 and 1 can be used simultaneously on the same network, between the same client and server.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5661"/>
        <seriesInfo name="DOI" value="10.17487/RFC5661"/>
      </reference>
      <reference anchor="RFC7530" target="http://www.rfc-editor.org/info/rfc7530">
        <front>
          <title>Network File System (NFS) Version 4 Protocol</title>
          <author initials="T." surname="Haynes" fullname="T. Haynes" role="editor">
            <organization/>
          </author>
          <author initials="D." surname="Noveck" fullname="D. Noveck" role="editor">
            <organization/>
          </author>
          <date year="2015" month="March"/>
          <abstract>
            <t>The Network File System (NFS) version 4 protocol is a distributed file system protocol that builds on the heritage of NFS protocol version 2 (RFC 1094) and version 3 (RFC 1813).  Unlike earlier versions, the NFS version 4 protocol supports traditional file access while integrating support for file locking and the MOUNT protocol. In addition, support for strong security (and its negotiation), COMPOUND operations, client caching, and internationalization has been added.  Of course, attention has been applied to making NFS version 4 operate well in an Internet environment.</t>
            <t>This document, together with the companion External Data Representation (XDR) description document, RFC 7531, obsoletes RFC 3530 as the definition of the NFS version 4 protocol.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7530"/>
        <seriesInfo name="DOI" value="10.17487/RFC7530"/>
      </reference>
    </references>
    <references title="Informative References">
      <reference anchor="RFC1094" target="http://www.rfc-editor.org/info/rfc1094">
        <front>
          <title>NFS: Network File System Protocol specification</title>
          <author initials="B." surname="Nowicki" fullname="B. Nowicki">
            <organization/>
          </author>
          <date year="1989" month="March"/>
          <abstract>
            <t>This RFC describes a protocol that Sun Microsystems, Inc., and others are using.  A new version of the protocol is under development, but others may benefit from the descriptions of the current protocol, and discussion of some of the design issues.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="1094"/>
        <seriesInfo name="DOI" value="10.17487/RFC1094"/>
      </reference>
      <reference anchor="RFC1813" target="http://www.rfc-editor.org/info/rfc1813">
        <front>
          <title>NFS Version 3 Protocol Specification</title>
          <author initials="B." surname="Callaghan" fullname="B. Callaghan">
            <organization/>
          </author>
          <author initials="B." surname="Pawlowski" fullname="B. Pawlowski">
            <organization/>
          </author>
          <author initials="P." surname="Staubach" fullname="P. Staubach">
            <organization/>
          </author>
          <date year="1995" month="June"/>
          <abstract>
            <t>This paper describes the NFS version 3 protocol.  This paper is provided so that people can write compatible implementations.  This memo provides information for the Internet community.  This memo does not specify an Internet standard of any kind.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="1813"/>
        <seriesInfo name="DOI" value="10.17487/RFC1813"/>
      </reference>
      <reference anchor="RFC3232" target="http://www.rfc-editor.org/info/rfc3232">
        <front>
          <title>Assigned Numbers: RFC 1700 is Replaced by an On-line Database</title>
          <author initials="J." surname="Reynolds" fullname="J. Reynolds" role="editor">
            <organization/>
          </author>
          <date year="2002" month="January"/>
          <abstract>
            <t>This memo obsoletes RFC 1700 (STD 2) "Assigned Numbers", which contained an October 1994 snapshot of assigned Internet protocol parameters.  This memo provides information for the Internet community.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="3232"/>
        <seriesInfo name="DOI" value="10.17487/RFC3232"/>
      </reference>
      <reference anchor="RFC5040" target="http://www.rfc-editor.org/info/rfc5040">
        <front>
          <title>A Remote Direct Memory Access Protocol Specification</title>
          <author initials="R." surname="Recio" fullname="R. Recio">
            <organization/>
          </author>
          <author initials="B." surname="Metzler" fullname="B. Metzler">
            <organization/>
          </author>
          <author initials="P." surname="Culley" fullname="P. Culley">
            <organization/>
          </author>
          <author initials="J." surname="Hilland" fullname="J. Hilland">
            <organization/>
          </author>
          <author initials="D." surname="Garcia" fullname="D. Garcia">
            <organization/>
          </author>
          <date year="2007" month="October"/>
          <abstract>
            <t>This document defines a Remote Direct Memory Access Protocol (RDMAP) that operates over the Direct Data Placement Protocol (DDP protocol).  RDMAP provides read and write services directly to applications and enables data to be transferred directly into Upper Layer Protocol (ULP) Buffers without intermediate data copies.  It also enables a kernel bypass implementation.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5040"/>
        <seriesInfo name="DOI" value="10.17487/RFC5040"/>
      </reference>
      <reference anchor="RFC5041" target="http://www.rfc-editor.org/info/rfc5041">
        <front>
          <title>Direct Data Placement over Reliable Transports</title>
          <author initials="H." surname="Shah" fullname="H. Shah">
            <organization/>
          </author>
          <author initials="J." surname="Pinkerton" fullname="J. Pinkerton">
            <organization/>
          </author>
          <author initials="R." surname="Recio" fullname="R. Recio">
            <organization/>
          </author>
          <author initials="P." surname="Culley" fullname="P. Culley">
            <organization/>
          </author>
          <date year="2007" month="October"/>
          <abstract>
            <t>The Direct Data Placement protocol provides information to Place the  incoming data directly into an upper layer protocol's receive buffer  without intermediate buffers.  This removes excess CPU and memory  utilization associated with transferring data through the  intermediate buffers.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5041"/>
        <seriesInfo name="DOI" value="10.17487/RFC5041"/>
      </reference>
      <reference anchor="RFC5667" target="http://www.rfc-editor.org/info/rfc5667">
        <front>
          <title>Network File System (NFS) Direct Data Placement</title>
          <author initials="T." surname="Talpey" fullname="T. Talpey">
            <organization/>
          </author>
          <author initials="B." surname="Callaghan" fullname="B. Callaghan">
            <organization/>
          </author>
          <date year="2010" month="January"/>
          <abstract>
            <t>This document defines the bindings of the various Network File System (NFS) versions to the Remote Direct Memory Access (RDMA) operations supported by the RPC/RDMA transport protocol.  It describes the use of direct data placement by means of server-initiated RDMA operations into client-supplied buffers for implementations of NFS versions 2, 3, 4, and 4.1 over such an RDMA transport.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5667"/>
        <seriesInfo name="DOI" value="10.17487/RFC5667"/>
      </reference>
      <reference anchor="NSM">
        <front>
          <title>Protocols for Interworking: XNFS, Version 3W</title>
          <author>
            <organization>The Open Group</organization>
          </author>
          <date month="February" year="1998"/>
          <abstract>
            <t>This Technical Standard is aligned with Sun's NFS Version 3, and incorporates the Sun WebNFS&#8482; extensions.  The process of accessing remote files and directories as though they were part of the local file system hierarchy is commonly known as Transparent File Access (TFA).  The most widely used heterogeneous TFS architecture is the Network File System (NFS), originally developed by Sun Microsytems.  The Open Group XNFS offers a complete solution to transparent file access between open system-compliant systems, through the XNFS protocols for interoperability, and The Open Group XSI interfaces for application/user portability (as identified in several XNFS appendixes).  </t>
          </abstract>
        </front>
      </reference>
    </references>
    <section title="Changes Since RFC 5667" toc="default">
      <t>Corrections and updates made necessary by new language in <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/> have been introduced.  For example, references to deprecated features of RPC-over-RDMA Version One, such as RDMA_MSGP, and the use of the Read list for handling RPC replies, have been removed.  The term "mapping" has been replaced with the term "binding" or "Upper Layer Binding" throughout the document.  Some material that duplicates what is in <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/> has been deleted.  </t>
      <t>Material required by <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/> for Upper Layer Bindings that was not present in <xref target="RFC5667" pageno="false" format="default"/> has been added, including discussion of how each NFS version properly estimates the maximum size of RPC replies.  </t>
      <t>Technical corrections have been made.  For example, the mention of 12KB and 36KB inline thresholds have been removed.  The reference to a non-existant NFS version 4 SYMLINK operation has been replaced with NFS version 4 CREATE(NF4LNK).  </t>
      <t>The discussion of NFS version 4 COMPOUND handling has been completed.  Some changes were made to the algorithm for matching DDP-eligible results to Write chunks.  </t>
      <t>The following additional improvements have been made, relative to <xref target="RFC5667" pageno="false" format="default"/>: <list style="symbols"><t>An explicit discussion of NFS version 4.0 and NFS version 4.1 backchannel operation has replaced the previous treatment of callback operations.  </t><t>A binding for NFS version 4.2 has been added that includes discussion of new data-bearing operations like READ_PLUS.  </t><t>A section suggesting a mechanism for periodically assessing connection health has been introduced.  </t><t>Language inconsistent with or contradictory to <xref target="I-D.ietf-nfsv4-rfc5666bis" pageno="false" format="default"/> has been removed from Sections 2 and 3, and both Sections have been combined into Section 2 in the present document.  </t><t>Ambiguous or erroneous uses of RFC2119 terms have been corrected.  </t><t>References to obsolete RFCs have been updated.  </t><t>An IANA Considerations Section has replaced the "Port Usage Considerations" Section.  </t><t>Code excerpts have been removed, and figures have been modernized.  </t></list> </t>
    </section>
    <section title="Acknowledgments" toc="default">
      <t>The author gratefully acknowledges the work of Brent Callaghan and Tom Talpey on the original NFS Direct Data Placement specification <xref target="RFC5667" pageno="false" format="default"/>.  The author also wishes to thank Bill Baker and Greg Marsden for their support of this work.  </t>
      <t>Dave Noveck provided excellent review, constructive suggestions, and consistent navigational guidance throughout the process of drafting this document.  Dave also contributed the text of <xref target="sec:sessions" pageno="false" format="default"/>.  </t>
      <t>Thanks to Karen Deitke for her sharp observations about idempotency, and the clarity of the discussion of NFS COMPOUNDs.  </t>
      <t>Special thanks go to Transport Area Director Spencer Dawkins, nfsv4 Working Group Chair Spencer Shepler, and nfsv4 Working Group Secretary Thomas Haynes for their support.  </t>
    </section>
  </back>
</rfc>
