All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: trond.myklebust@primarydata.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 5/6] NFS: Use port 20049 by default for NFS/RDMA mounts
Date: Wed, 12 Mar 2014 12:52:07 -0400	[thread overview]
Message-ID: <20140312165207.15349.79532.stgit@manet.1015granger.net> (raw)
In-Reply-To: <20140312164620.15349.22643.stgit@manet.1015granger.net>

When providing NFSv2 and v3 service via RDMA, NFS servers MAY use an
alternative well-known port number, 20049.  They are not required to
register the service with their local rpcbind.  At least one server
implementation I am aware of does not register it's NFS/RDMA service
with rpcbind.

When providing NFSv4 service via RDMA, the server MUST use the
alternative port number, 20049.  As with NFSv4 on IP-based
transports, clients SHOULD connect to this port without consulting
the server's rpcbind, so we can't expect rpcbind to help here
either.

See section 6 of RFC 5667 for details.

Today, admins are required to specify "port=" when mounting an
NFS/RDMA server.  To comply with RFC 5667 and for cross-
compatibility with heterogenous automounter maps, provide the proper
default port when mounting with "proto=rdma".

If the server does not use port 20049, the "port=" mount option is
still required to mount successfully. But clients today are forced
to specify this option anyway.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68401
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/super.c           |    2 ++
 include/uapi/linux/nfs.h |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 910ed90..6432600 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2157,6 +2157,8 @@ static int nfs_validate_text_mount_data(void *options,
 	} else
 		nfs_set_mount_transport_protocol(args);
 
+	if (args->nfs_server.protocol == XPRT_TRANSPORT_RDMA)
+		port = NFS_RDMA_PORT;
 	nfs_set_port(sap, &args->nfs_server.port, port);
 
 	return nfs_parse_devname(dev_name,
diff --git a/include/uapi/linux/nfs.h b/include/uapi/linux/nfs.h
index 5199a36..ccc6f8d 100644
--- a/include/uapi/linux/nfs.h
+++ b/include/uapi/linux/nfs.h
@@ -9,6 +9,7 @@
 
 #define NFS_PROGRAM	100003
 #define NFS_PORT	2049
+#define NFS_RDMA_PORT	20049
 #define NFS_MAXDATA	8192
 #define NFS_MAXPATHLEN	1024
 #define NFS_MAXNAMLEN	255


  parent reply	other threads:[~2014-03-12 16:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 16:51 [PATCH 0/6] NFS/RDMA fixes Chuck Lever
2014-03-12 16:51 ` [PATCH 1/6] NFS: Clean up: revert increase in READDIR RPC buffer max size Chuck Lever
2014-03-12 16:51 ` [PATCH 2/6] SUNRPC: Fix large reads on NFS/RDMA Chuck Lever
2014-03-12 16:51 ` [PATCH 3/6] SUNRPC: remove KERN_INFO from dprintk() call sites Chuck Lever
2014-03-12 16:51 ` [PATCH 4/6] NFS: advertise only supported callback netids Chuck Lever
2014-03-12 16:52 ` Chuck Lever [this message]
2014-03-12 16:52 ` [PATCH 6/6] NFS: incorrect "port=" value in /proc/mounts Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140312165207.15349.79532.stgit@manet.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.