idnits 2.17.1 draft-ietf-nfsv4-nfs-ulb-v2-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (13 May 2022) is 712 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-07) exists of draft-ietf-nfsv4-rpcrdma-version-two-06 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network File System Version 4 C. Lever 3 Internet-Draft Oracle 4 Intended status: Standards Track 13 May 2022 5 Expires: 14 November 2022 7 Network File System (NFS) Upper-Layer Binding To RPC-Over-RDMA Version 2 8 draft-ietf-nfsv4-nfs-ulb-v2-07 10 Abstract 12 This document specifies Upper-Layer Bindings of Network File System 13 (NFS) protocol versions to RPC-over-RDMA version 2. 15 Note 17 Discussion of this draft takes place on the NFSv4 working group 18 mailing list (nfsv4@ietf.org), archived at 19 https://mailarchive.ietf.org/arch/browse/nfsv4/. Working Group 20 information is available at https://datatracker.ietf.org/wg/nfsv4/ 21 about/. 23 Submit suggestions and changes as pull requests at 24 https://github.com/chucklever/i-d-nfs-ulb-v2. Instructions are on 25 that page. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on 14 November 2022. 44 Copyright Notice 46 Copyright (c) 2022 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 51 license-info) in effect on the date of publication of this document. 52 Please review these documents carefully, as they describe your rights 53 and restrictions with respect to this document. Code Components 54 extracted from this document must include Revised BSD License text as 55 described in Section 4.e of the Trust Legal Provisions and are 56 provided without warranty as described in the Revised BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 61 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3 62 3. Upper-Layer Binding for NFS Versions 2 and 3 . . . . . . . . 4 63 3.1. DDP-Eligibility . . . . . . . . . . . . . . . . . . . . . 4 64 3.2. Reply Size Estimation . . . . . . . . . . . . . . . . . . 5 65 3.3. RPC Binding Considerations . . . . . . . . . . . . . . . 5 66 3.4. Transport Considerations . . . . . . . . . . . . . . . . 5 67 3.4.1. Keep-Alive . . . . . . . . . . . . . . . . . . . . . 6 68 3.4.2. Replay Detection . . . . . . . . . . . . . . . . . . 6 69 4. Upper-Layer Bindings for NFS Version 2 and 3 Auxiliary 70 Protocols . . . . . . . . . . . . . . . . . . . . . . . . 7 71 4.1. MOUNT, NLM, and NSM Protocols . . . . . . . . . . . . . . 7 72 4.2. NFSACL Protocol . . . . . . . . . . . . . . . . . . . . . 7 73 5. Upper-Layer Binding For NFS Version 4 . . . . . . . . . . . . 8 74 5.1. DDP-Eligibility . . . . . . . . . . . . . . . . . . . . . 8 75 5.1.1. The NFSv4.2 READ_PLUS operation . . . . . . . . . . . 8 76 5.1.2. NFS Version 4 COMPOUND Requests . . . . . . . . . . . 9 77 5.2. Reply Size Estimation . . . . . . . . . . . . . . . . . . 11 78 5.2.1. Reply Size Estimation for Minor Version 0 . . . . . . 11 79 5.2.2. Reply Size Estimation for Minor Version 1 and 80 Newer . . . . . . . . . . . . . . . . . . . . . . . . 12 81 5.3. RPC Binding Considerations . . . . . . . . . . . . . . . 12 82 5.4. Transport Considerations . . . . . . . . . . . . . . . . 12 83 5.4.1. Congestion Avoidance . . . . . . . . . . . . . . . . 12 84 5.4.2. Retransmission and Keep-alive . . . . . . . . . . . . 13 85 5.5. Session-Related Considerations . . . . . . . . . . . . . 13 86 6. Upper-Layer Binding For NFS Version 4 Callbacks . . . . . . . 14 87 6.1. NFS Version 4.0 Callback . . . . . . . . . . . . . . . . 14 88 6.2. NFS Version 4.1 Callback . . . . . . . . . . . . . . . . 15 89 7. Extending NFS Upper-Layer Bindings . . . . . . . . . . . . . 15 90 8. Security Considerations . . . . . . . . . . . . . . . . . . . 15 91 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 92 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 93 10.1. Normative References . . . . . . . . . . . . . . . . . . 16 94 10.2. Informative References . . . . . . . . . . . . . . . . . 17 95 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 18 96 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 18 98 1. Introduction 100 The RPC-over-RDMA version 2 transport can employ direct data 101 placement to convey data payloads associated with RPC transactions, 102 as described in [I-D.ietf-nfsv4-rpcrdma-version-two]. As mandated by 103 that document, RPC client and server implementations using RPC-over- 104 RDMA version 2 MUST agree in advance which XDR data items and RPC 105 procedures are eligible for direct data placement (DDP). 107 An Upper-Layer Binding specifies this agreement for one or more 108 versions of one RPC program. Other operational details, such as RPC 109 binding assignments, pairing Write chunks with result data items, and 110 reply size estimation, are also specified by such a Binding. 112 This document contains material required of Upper-Layer Bindings, as 113 specified in Appendix A of [I-D.ietf-nfsv4-rpcrdma-version-two], for 114 the following NFS protocol versions: 116 * NFS version 2 [RFC1094] 118 * NFS version 3 [RFC1813] 120 * NFS version 4.0 [RFC7530] 122 * NFS version 4.1 [RFC8881] 124 * NFS version 4.2 [RFC7862] 126 The current document also provides Upper-Layer Bindings for auxiliary 127 protocols used with NFS versions 2 and 3 (see Section 4). 129 This document assumes the reader is already familiar with concepts 130 and terminology defined throughout 131 [I-D.ietf-nfsv4-rpcrdma-version-two] and the documents it references. 133 2. Requirements Language 135 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 136 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 137 "OPTIONAL" in this document are to be interpreted as described in 138 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 139 capitals, as shown here. 141 3. Upper-Layer Binding for NFS Versions 2 and 3 143 The Upper-Layer Binding specification in this section applies to NFS 144 version 2 [RFC1094] and NFS version 3 [RFC1813]. For brevity, in 145 this document, a "Legacy NFS client" refers to an NFS client using 146 version 2 or version 3 of the NFS RPC program (100003) to communicate 147 with an NFS server. Likewise, a "Legacy NFS server" is an NFS server 148 communicating with clients using NFS version 2 or NFS version 3. 150 3.1. DDP-Eligibility 152 Generally, storage protocols based on RDMA divide both read and write 153 operations into two steps. This division enables the payload 154 receiver to allocate the sink buffer for each I/O operation in 155 advance of the network payload transfer. By allocating the sink 156 buffer tactically, a good quality receiver implementation reduces the 157 amount of data movement it must perform during and after the I/O 158 operation. 160 During an NFS WRITE that involves explicit RDMA, first the NFS client 161 sends a request that indicates where the NFS server can find the 162 payload buffer, then the NFS server pulls the WRITE payload from that 163 buffer. Likewise, during an NFS READ that involves explicit RDMA, 164 the NFS client provides the location of the destination buffer, then 165 the NFS server pushes the READ payload to that buffer. 167 Therefore, the following XDR data items in NFS versions 2 and 3 are 168 DDP-eligible: 170 * The opaque file data argument in the NFS WRITE procedure 172 * The pathname argument in the NFS SYMLINK procedure 174 * The opaque file data result in the NFS READ procedure 176 * The pathname result in the NFS READLINK procedure 178 All other argument or result data items in NFS versions 2 and 3 are 179 not DDP-eligible. 181 Regardless of whether an NFS operation is considered non-idempotent, 182 a transport error might not indicate whether the server has processed 183 the arguments of the RPC Call or whether the server has accessed or 184 modified client memory associated with that RPC. 186 3.2. Reply Size Estimation 188 During the construction of each RPC Call message, a Requester is 189 responsible for allocating appropriate RDMA resources to receive the 190 corresponding Reply message. These resources must be capable of 191 holding the entire Reply. Therefore the Requester needs to estimate 192 the maximum possible size of the expected Reply message. 194 * Often, the expected Reply can fit in a limited number of RDMA Send 195 messages. The Requester need not provision any RDMA resources for 196 the Reply, relying instead on message continuation to handle the 197 entire Reply message. 199 * In cases where the Upper Layer Binding permits direct data 200 placement of the results (DDP), a Requester can provision Write 201 chunks to receive those results. The Requester MUST reliably 202 estimate the maximum size of each result receive via a Write 203 chunk. 205 * A Requester that expects a large Reply message can provision a 206 Reply chunk. The Requester MUST reliably estimate the maximum 207 size of the payload received via the Reply chunk. 209 * If RDMA resources are not available to send a Reply, a Responder 210 falls back to message continuation. 212 A correctly implemented Legacy NFS client thus avoids retransmission 213 of non-idempotent NFS requests due to improperly estimated Reply 214 resources. 216 3.3. RPC Binding Considerations 218 Legacy NFS servers typically listen for clients on UDP and TCP port 219 2049. Additionally, they register these ports with a local 220 portmapper service [RFC1833]. 222 A Legacy NFS server supporting RPC-over-RDMA version 2 and 223 registering itself with the RPC portmapper MAY choose an arbitrary 224 port or MAY use the alternative well-known port number for its RPC- 225 over-RDMA service (see Section 9). The chosen port MAY be registered 226 with the RPC portmapper using the netids assigned in Section 12 of 227 [I-D.ietf-nfsv4-rpcrdma-version-two]. 229 3.4. Transport Considerations 230 3.4.1. Keep-Alive 232 Legacy NFS client implementations can rely on connection keep-alive 233 to detect when a Legacy NFS server has become unresponsive. When an 234 NFS server is no longer responsive, client-side keep-alive terminates 235 the connection, triggering reconnection and retransmission of 236 outstanding RPC transactions. 238 Some RDMA transports (such as the Reliable Connected QP type on 239 InfiniBand) have no keep-alive mechanism. Without a disconnect or 240 new RPC traffic, such connections can remain alive long after an NFS 241 server has become unresponsive or unreachable. Once an NFS client 242 has consumed all available RPC-over-RDMA version 2 credits on that 243 transport connection, it awaits a reply indefinitely before sending 244 another RPC request. 246 Legacy NFS clients SHOULD reserve one RPC-over-RDMA version 2 credit 247 to use for periodic server or connection health assessment. Either 248 peer can use this credit to drive an RPC request on an otherwise idle 249 connection, triggering either an affirmative server response or a 250 connection termination. 252 3.4.2. Replay Detection 254 Like NFSv4.0, Legacy NFS servers typically employ request replay 255 detection to reduce the risk of data and file namespace corruption 256 that could result when an NFS client retransmits a non-idempotent NFS 257 request. A Legacy NFS server can send a cached response when a 258 replay is detected, rather than executing the request again. Replay 259 detection is not perfect, but it is usually adequate. 261 For Legacy NFS servers, replay detection commonly utilizes heuristic 262 indicators such as the IP address of the NFS client, the source port 263 of the connection, the transaction ID of the request, and the 264 contents of the request's RPC and upper-layer protocol headers. A 265 Legacy NFS client is careful to re-use the same source port when 266 reconnecting so that Legacy NFS servers can better detect RPC 267 retransmission. 269 However, a Legacy NFS client operating over an RDMA transport has no 270 control over connection source ports. It is almost certain that an 271 RPC request retransmitted on a new connection can never be detected 272 as a replay if the receiving Legacy NFS server includes the 273 connection source port in its replay detection heuristics. 275 Therefore a Legacy NFS server using an RDMA transport should never 276 use a connection's source port as part of its NFS request replay 277 detection mechanism. 279 4. Upper-Layer Bindings for NFS Version 2 and 3 Auxiliary Protocols 281 Storage administrators typically deploy NFS versions 2 and 3 with 282 several other protocols, sometimes called the "NFS auxiliary 283 protocols." These are distinct RPC programs that define procedures 284 not part of the NFS RPC program (100003). The Upper-Layer Bindings 285 in this section apply to: 287 * Versions 2 and 3 of the MOUNT RPC program (100005) [RFC1813] 289 * Versions 1, 3, and 4 of the NLM RPC program (100021) [RFC1813] 291 * Version 1 of the NSM RPC program (100024), described in Chapter 11 292 of [XNFS] 294 * Versions 2 and 3 of the NFSACL RPC program (100227). The NFSACL 295 program does not have a public definition. This document treats 296 the NFSACL program as a de facto standard, as there are several 297 interoperating implementations. 299 4.1. MOUNT, NLM, and NSM Protocols 301 Historically, NFS/RDMA implementations have conveyed the MOUNT, NLM, 302 and NSM protocols via TCP. A Legacy NFS server implementation MUST 303 provide support for these auxiliary protocols via TCP. 305 Moreover, there is little benefit from transporting these protocols 306 via RDMA. Thus this document does not provide an Upper-Layer binding 307 for them. 309 4.2. NFSACL Protocol 311 Legacy NFS clients and servers convey NFSACL procedures on the same 312 transport connection and port as the NFS RPC program (100003). 313 Utilizing the same port obviates the need for a separate rpcbind 314 query to discover server support for this RPC program. 316 ACLs are typically small, but even large ACLs must be encoded and 317 decoded to some degree before being being stored in local 318 filesystems. Thus no data item in this Upper-Layer Protocol is DDP- 319 eligible. 321 For procedures whose replies do not include an ACL object, the size 322 of each Reply is determined directly from the NFSACL RPC program's 323 XDR definition. 325 The NFSACL protocol does not provide a mechanism to determine the 326 size of a received ACL in advance. When preparing for responses that 327 include ACLs, Legacy NFS clients estimate a maximum reply size based 328 on limits within their local file systems. If that estimation is 329 inadequate, a Responder falls back to message continuation. 331 5. Upper-Layer Binding For NFS Version 4 333 The Upper-Layer Binding specification in this section applies to 334 versions of the NFS RPC program defined in NFS version 4.0 [RFC7530], 335 NFS version 4.1 [RFC8881], and NFS version 4.2 [RFC7862]. 337 5.1. DDP-Eligibility 339 Only the following XDR data items in the COMPOUND procedure of all 340 NFS version 4 minor versions are DDP-eligible: 342 * The opaque data field in the WRITE4args structure 344 * The linkdata field of the NF4LNK arm in the createtype4 union 346 * The opaque data field in the READ4resok structure 348 * The linkdata field in the READLINK4resok structure 350 5.1.1. The NFSv4.2 READ_PLUS operation 352 NFS version 4.2 introduces an enhanced READ operation called 353 READ_PLUS [RFC7862]. READ_PLUS enables an NFS server to compact 354 returned READ data payloads. No part of a READ_PLUS Reply is DDP- 355 eligible. 357 In a READ_PLUS result, returned file content appears as a list of one 358 or more of the following items: 360 * Regular data content, the same as the result of a traditional READ 361 operation 363 * Unallocated space in a file, where no data has been written, or 364 previously-written data has been removed via a hole-punch 365 operation 367 * A counted pattern 369 Upon receipt of a READ_PLUS result, an NFSv4.2 client expands the 370 returned list into its preferred representation of the original file 371 content. 373 Before receiving that result, an NFSv4.2 client is unaware of how the 374 NFS server has organized the file content. Thus it is not possible 375 to predict the size or structure of a READ_PLUS Reply in advance. 376 The use of direct data placement is therefore challenging. Moreover, 377 the usual benefits of hardware-assisted data placement are entirely 378 lost if the client must parse the result of each READ I/O. 380 Therefore this Upper Layer Binding does not make elements of an 381 NFSv4.2 READ_PLUS Reply DDP-eligible. Further, this Upper Layer 382 Binding recommends that NFS client implemenations avoid using the 383 READ_PLUS operation on NFS/RDMA mount points. 385 5.1.2. NFS Version 4 COMPOUND Requests 387 5.1.2.1. Multiple DDP-eligible Data Items 389 An NFS version 4 COMPOUND procedure can contain more than one 390 operation that carries a DDP-eligible data item. An NFS version 4 391 client provides XDR Position values in each Read chunk to determine 392 which chunk is associated with which argument data item. However, 393 NFS version 4 server and client implementations must agree on how to 394 pair Write chunks with returned result data items. 396 A "READ operation" refers to any NFS version 4 operation with a DDP- 397 eligible result data item in the following lists. An NFS version 4 398 client applies the mechanism specified in Section 4.3.2 of 399 [I-D.ietf-nfsv4-rpcrdma-version-two] to this class of operations as 400 follows: 402 * If an NFS version 4 client wishes all DDP-eligible items in an NFS 403 reply to be conveyed inline, it leaves the Write list empty. 405 An NFS version 4 server acts as follows: 407 * The first READ operation MUST use the first chunk in the Write 408 list in an NFS version 4 COMPOUND procedure. The next READ 409 operation uses the next Write chunk, and so on. 411 * If an NFS version 4 client has provided a matching non-empty Write 412 chunk, then the corresponding READ operation MUST return its DDP- 413 eligible data item using that chunk. 415 * If an NFS version 4 client has provided an empty matching Write 416 chunk, then the corresponding READ operation MUST return all of 417 its result data items inline. 419 * If a READ operation returns a union arm which does not contain a 420 DDP-eligible result, and the NFS version 4 client has provided a 421 matching non-empty Write chunk, an NFS version 4 server MUST 422 return an empty Write chunk in that Write list position. 424 * If there are more READ operations than Write chunks, then 425 remaining NFS Read operations in an NFS version 4 COMPOUND that 426 have no matching Write chunk MUST return their results inline. 428 5.1.2.2. Chunk List Complexity 430 By default, the RPC-over-RDMA version 2 protocol limits the number of 431 chunks or segments that may appear in Read or Write lists (see 432 Section 5.2 of [I-D.ietf-nfsv4-rpcrdma-version-two]). 434 These implementation limits are significant when Kerberos integrity 435 or privacy is in use [RFC7861]. GSS services increase the size of 436 credential material in RPC headers, potentially requiring the more 437 frequent use of less efficient Special Payload or Continued Payload 438 messages. 440 NFS version 4 clients follow the prescriptions listed below when 441 constructing RPC-over-RDMA version 2 messages in the absence of an 442 explicit transport property exchange that alters these limits. NFS 443 version 4 servers MUST accept and process all such requests. 445 * The Read list can contain either a Call chunk, no more than one 446 Read chunk, or both a Call chunk and one Read chunk. 448 * The Write list can contain no more than one Write chunk. 450 NFS version 4 clients wishing to send more complex chunk lists can 451 use transport properties to bound the complexity of NFS version 4 452 COMPOUNDs, limit the number of elements in scatter-gather operations, 453 and avoid other sources of chunk overruns at the receiving peer. 455 5.1.2.3. NFS Version 4 COMPOUND Example 457 The following example shows a Write list with three Write chunks, A, 458 B, and C. The NFS version 4 server consumes the provided Write 459 chunks by writing the results of the designated operations in the 460 compound request (READ and READLINK) back to each chunk. 462 Write list: 464 A --> B --> C 466 NFS version 4 COMPOUND request: 468 PUTFH LOOKUP READ PUTFH LOOKUP READLINK PUTFH LOOKUP READ 469 | | | 470 v v v 471 A B C 473 If the NFS version 4 client does not want the READLINK result 474 returned via RDMA, it provides an empty Write chunk for buffer B to 475 indicate that the READLINK result must be returned inline. 477 5.2. Reply Size Estimation 479 Within NFS version 4, there are certain variable-length result data 480 items whose maximum size cannot be estimated by clients reliably 481 because there is no protocol-specified size limit on these result 482 arrays. These include: 484 * The attrlist4 field 486 * Fields containing ACLs such as fattr4_acl, fattr4_dacl, and 487 fattr4_sacl 489 * Fields in the fs_locations4 and fs_locations_info4 data structures 491 * Fields which pertain to pNFS layout metadata, such as loc_body, 492 loh_body, da_addr_body, lou_body, lrf_body, fattr_layout_types, 493 and fs_layout_types 495 5.2.1. Reply Size Estimation for Minor Version 0 497 The NFS version 4.0 protocol itself does not impose any bound on the 498 size of NFS Calls or Replies. 500 Variable-length fattr4 attributes make it particularly difficult for 501 clients to predict the maximum size of some NFS version 4.0 Replies. 502 Client implementations might rely upon internal architectural limits 503 to constrain the reply size, but such limits are not always reliable. 504 When an NFS version 4.0 client cannot predict the size of a Reply, it 505 can rely on message continuation to enable a Reply under any 506 circumstances. 508 5.2.2. Reply Size Estimation for Minor Version 1 and Newer 510 In NFS version 4.1 and newer minor versions, the csa_fore_chan_attrs 511 argument of the CREATE_SESSION operation contains a 512 ca_maxresponsesize field. The value in this field is the absolute 513 maximum size of replies generated by an NFS version 4.1 server. 515 An NFS version 4 client can use this value when it is impossible to 516 estimate a reply size upper bound precisely. In practice, objects 517 such as ACLs, named attributes, layout bodies, and security labels 518 are much smaller than this maximum. 520 5.3. RPC Binding Considerations 522 NFS version 4 servers are required to listen on TCP port 2049 and are 523 not required to register with an rpcbind service [RFC7530]. 524 Therefore, an NFS version 4 server supporting RPC-over-RDMA version 2 525 MUST use the alternative well-known port number for its RPC-over-RDMA 526 service defined in Section 9. 528 5.4. Transport Considerations 530 5.4.1. Congestion Avoidance 532 Section 3.1 of [RFC7530] states: 534 Where an NFS version 4 implementation supports operation over the 535 IP network protocol, the supported transport layer between NFS and 536 IP MUST be an IETF standardized transport protocol that is 537 specified to avoid network congestion; such transports include TCP 538 and the Stream Control Transmission Protocol (SCTP). 540 Section 2.9.1 of [RFC8881] further states: 542 Even if NFS version 4.1 is used over a non-IP network protocol, it 543 is RECOMMENDED that the transport support congestion control. 545 It is permissible for a connectionless transport to be used under 546 NFS version 4.1; however, reliable and in-order delivery of data 547 combined with congestion control by the connectionless transport 548 is REQUIRED. As a consequence, UDP by itself MUST NOT be used as 549 an NFS version 4.1 transport. 551 RPC-over-RDMA version 2 utilizes only reliable, connection-oriented 552 transports that guarantee in-order delivery, meeting all the above 553 requirements for NFS version 4.0 and 4.1. See Section 4.2.1 of 554 [I-D.ietf-nfsv4-rpcrdma-version-two] for more details. 556 5.4.2. Retransmission and Keep-alive 558 NFS version 4 client implementations often rely on a transport-layer 559 connection keep-alive mechanism to detect when an NFS version 4 560 server has become unresponsive. When an NFS server is no longer 561 responsive, client-side keep-alive terminates the connection, 562 triggering reconnection and RPC retransmission. 564 Some RDMA transports (such as the Reliable Connected QP type on 565 InfiniBand) have no keep-alive mechanism. Without a disconnect or 566 new RPC traffic, such connections can remain alive long after an NFS 567 server has become unresponsive. Once an NFS client has consumed all 568 available RPC-over-RDMA version 2 credits on that transport 569 connection, it indefinitely awaits a reply before sending another RPC 570 request. 572 NFS version 4 peers SHOULD reserve one RPC-over-RDMA version 2 credit 573 for periodic server or connection health assessment. Either peer can 574 use this credit to drive an RPC request on an otherwise idle 575 connection, triggering either a quick affirmative server response or 576 immediate connection termination. 578 In addition to network partition and request loss scenarios, RPC- 579 over-RDMA version 2 peers can terminate a connection when a Transport 580 header is malformed or when too many RPC-over-RDMA messages are sent 581 without a credit update. In such cases: 583 * If a transport error occurs (e.g., an RDMA2_ERROR type message is 584 received) just before the disconnect or instead of a disconnect, 585 the Requester MUST respond to that error as prescribed by the 586 specification of the RPC transport. Then the NFS version 4 rules 587 for handling retransmission apply. 589 * If there is a transport disconnect and the Responder has provided 590 no other response for a request, then only the NFS version 4 rules 591 for handling retransmission apply. 593 5.5. Session-Related Considerations 595 The presence of an NFS version 4 session (as defined in [RFC8881]) 596 does not affect the operation of RPC-over-RDMA version 2. None of 597 the operations introduced to support NFS sessions (e.g., the SEQUENCE 598 operation) contain DDP-eligible data items. There is no need to 599 match the number of session slots with the available RPC-over-RDMA 600 version 2 credits. 602 However, there are a few new cases where an RPC transaction can fail. 603 For example, a Requester might receive, in response to an RPC 604 request, an RDMA2_ERROR message with a rdma_err value of 605 RDMA2_ERR_BADXDR. These situations are not different from existing 606 RPC errors, which an NFS session implementation can already handle 607 for other transport types. Moreover, there might be no SEQUENCE 608 result available to the Requester to distinguish whether failure 609 occurred before or after the Responder executed the requested 610 operations. 612 When a transport error occurs (e.g., an RDMA2_ERROR type message is 613 received), the Requester proceeds, as usual, to match the incoming 614 XID value to a waiting RPC Call. The Requester terminates the RPC 615 transaction and reports the result status to the RPC consumer. The 616 Requester's session implementation then determines the session ID and 617 slot for the failed request and performs slot recovery to make that 618 slot usable again. Otherwise, that slot is rendered permanently 619 unavailable. 621 When an NFS session is not present (for example, when NFS version 4.0 622 is in use), a transport error does not indicate whether the server 623 has processed the arguments of the RPC Call, or whether the server 624 has accessed or modified client memory associated with that RPC. 626 6. Upper-Layer Binding For NFS Version 4 Callbacks 628 The NFS version 4 family of protocols supports server-initiated 629 callbacks to notify NFS version 4 clients of events such as recalled 630 delegations. 632 6.1. NFS Version 4.0 Callback 634 An NFS version 4.0 client uses the SETCLIENTID operation for 635 advertising the IP address, port, and netid of its NFS version 4.0 636 callback service. When an NFS version 4.0 server provides a 637 backchannel service to an NFS version 4.0 client that uses RPC-over- 638 RDMA version 2 for its forward channel, the server MUST advertise the 639 backchannel service using either the "tcp" or "tcp6" netid. 641 Because the NFSv4.0 backchannel does not operate on RPC-over-RDMA, 642 this document does not specify an Upper-Layer binding for the NFSv4.0 643 backchannel RPC program. 645 6.2. NFS Version 4.1 Callback 647 In NFS version 4.1 and newer minor versions, callback operations may 648 appear on the same connection that is in use for NFS version 4 649 forward channel client requests. NFS version 4 clients and servers 650 MUST use the mechanisms described in Section 4.5 of 651 [I-D.ietf-nfsv4-rpcrdma-version-two] to convey backchannel operations 652 on an RPC-over-RDMA version 2 transport. 654 The csa_back_chan_attrs argument of the CREATE_SESSION operation 655 contains a ca_maxresponsesize field. The value in this field is the 656 absolute maximum size of backchannel replies generated by a replying 657 NFS version 4 client. 659 There are no DDP-eligible data items in callback procedures defined 660 in NFS version 4.1 or NFS version 4.2. However, some callback 661 operations, such as messages that convey device ID information, can 662 be sizeable. A sender can use Message Continuation or a Special 663 Payload message in this situation. 665 When an NFS version 4.1 client can support Special Payload Calls in 666 its backchannel, it reports a backchannel ca_maxrequestsize that is 667 larger than the connection's inline thresholds. Otherwise, an NFS 668 version 4 server MUST use only Simple Payload or Continued Payload 669 messages to convey backchannel operations. 671 7. Extending NFS Upper-Layer Bindings 673 RPC programs such as NFS must have an Upper-Layer Binding 674 specification to operate on an RPC-over-RDMA version 2 transport 675 [I-D.ietf-nfsv4-rpcrdma-version-two]. Via standards action, the 676 Upper-Layer Binding specified in this document can be extended to 677 cover versions of the NFS version 4 protocol specified after NFS 678 version 4 minor version 2, or to cover separately published 679 extensions to an existing NFS version 4 minor version, as described 680 in [RFC8178]. 682 8. Security Considerations 684 RPC-over-RDMA version 2 supports all RPC security models, including 685 RPCSEC_GSS security and transport-level security [RFC7861]. The 686 choice of what Direct Data Placement mechanism to convey RPC argument 687 and results does not affect this since it changes only the method of 688 data transfer. Because the current document defines only the binding 689 of the NFS protocols atop RPC-over-RDMA version 2 690 [I-D.ietf-nfsv4-rpcrdma-version-two], all relevant security 691 considerations are, therefore, described at that layer. 693 9. IANA Considerations 695 The use of direct data placement in NFS introduces a need for an 696 additional port number assignment for networks that share traditional 697 UDP and TCP port spaces with RDMA services. The DDP protocol is such 698 an example [RFC5041]. 700 For this purpose, the current document lists a set of port number 701 assignments that IANA has already assigned for NFS/RDMA in the IANA 702 port registry, according to the guidelines described in [RFC6335]. 704 nfsrdma 20049/tcp Network File System (NFS) over RDMA 705 nfsrdma 20049/udp Network File System (NFS) over RDMA 706 nfsrdma 20049/sctp Network File System (NFS) over RDMA 708 The author requests that IANA add the current document as a reference 709 for the existing nfsrdma port assignments. This document does not 710 alter these assignments. 712 10. References 714 10.1. Normative References 716 [I-D.ietf-nfsv4-rpcrdma-version-two] 717 Lever, C. and D. Noveck, "RPC-over-RDMA Version 2 718 Protocol", Work in Progress, Internet-Draft, draft-ietf- 719 nfsv4-rpcrdma-version-two-06, 2 January 2022, 720 . 723 [RFC1833] Srinivasan, R., "Binding Protocols for ONC RPC Version 2", 724 RFC 1833, DOI 10.17487/RFC1833, August 1995, 725 . 727 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 728 Requirement Levels", BCP 14, RFC 2119, 729 DOI 10.17487/RFC2119, March 1997, 730 . 732 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 733 Cheshire, "Internet Assigned Numbers Authority (IANA) 734 Procedures for the Management of the Service Name and 735 Transport Protocol Port Number Registry", BCP 165, 736 RFC 6335, DOI 10.17487/RFC6335, August 2011, 737 . 739 [RFC7530] Haynes, T., Ed. and D. Noveck, Ed., "Network File System 740 (NFS) Version 4 Protocol", RFC 7530, DOI 10.17487/RFC7530, 741 March 2015, . 743 [RFC7861] Adamson, A. and N. Williams, "Remote Procedure Call (RPC) 744 Security Version 3", RFC 7861, DOI 10.17487/RFC7861, 745 November 2016, . 747 [RFC7862] Haynes, T., "Network File System (NFS) Version 4 Minor 748 Version 2 Protocol", RFC 7862, DOI 10.17487/RFC7862, 749 November 2016, . 751 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 752 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 753 May 2017, . 755 [RFC8881] Noveck, D., Ed. and C. Lever, "Network File System (NFS) 756 Version 4 Minor Version 1 Protocol", RFC 8881, 757 DOI 10.17487/RFC8881, August 2020, 758 . 760 10.2. Informative References 762 [RFC1094] Nowicki, B., "NFS: Network File System Protocol 763 specification", RFC 1094, DOI 10.17487/RFC1094, March 764 1989, . 766 [RFC1813] Callaghan, B., Pawlowski, B., and P. Staubach, "NFS 767 Version 3 Protocol Specification", RFC 1813, 768 DOI 10.17487/RFC1813, June 1995, 769 . 771 [RFC5041] Shah, H., Pinkerton, J., Recio, R., and P. Culley, "Direct 772 Data Placement over Reliable Transports", RFC 5041, 773 DOI 10.17487/RFC5041, October 2007, 774 . 776 [RFC8178] Noveck, D., "Rules for NFSv4 Extensions and Minor 777 Versions", RFC 8178, DOI 10.17487/RFC8178, July 2017, 778 . 780 [XNFS] The Open Group, "Protocols for Interworking: XNFS, Version 781 3W", January 1998. 783 Acknowledgments 785 Thanks to Tom Talpey, who contributed the text of Section 5.1.2.2. 786 David Noveck contributed the text of Section 5.5 and Section 7. The 787 author also wishes to thank Bill Baker and Greg Marsden for their 788 support of this work. 790 Special thanks go to Transport Area Directors Zaheduzzaman Sarker, 791 NFSV4 Working Group Chairs Brian Pawlowski, and David Noveck, and 792 NFSV4 Working Group Secretary Thomas Haynes for their support. 794 Author's Address 796 Charles Lever 797 Oracle Corporation 798 United States of America 799 Email: chuck.lever@oracle.com