git: 8ee0a615cb23 - main - nfsclient: Add a new nfs_client_rdma_enable variable

From: Rick Macklem <rmacklem_at_FreeBSD.org>
Date: Sun, 30 Aug 2026 22:12:43 UTC
The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=8ee0a615cb23badfcbeae4f008706caab1aa67be

commit 8ee0a615cb23badfcbeae4f008706caab1aa67be
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2026-08-30 22:11:08 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-08-30 22:11:08 +0000

    nfsclient: Add a new nfs_client_rdma_enable variable
    
    This patch adds a new nfs_client_rdma_enable variable
    to /etc/rc.d/nfsclient to enable the client side of
    NFS over RDMA.  The client side of NFS over RDMA
    requires the nfsclrdma.ko module, which is still under
    test/review.
    
    I wanted to get the "glue" into main so that others
    could test the module more easily.  Avaliability of
    the module will be announced on freebsd-current@ soon.
    
    It should not affect non-RDMA operation.
    
    I've specified a long MFC, since the module still
    requires extensive testing and, hopefully, a review.
    
    MFC after:      3 months
---
 libexec/rc/rc.conf        | 1 +
 libexec/rc/rc.d/nfsclient | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 41820cd26330..12da003978e8 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -384,6 +384,7 @@ automount_flags=""		# Flags to automount(8) (if autofs enabled).
 automountd_flags=""		# Flags to automountd(8) (if autofs enabled).
 autounmountd_flags=""		# Flags to autounmountd(8) (if autofs enabled).
 nfs_client_enable="NO"		# This host is an NFS client (or NO).
+nfs_client_rdma_enable="NO"	# Enable host for NFS over RDMA mounts.
 nfs_access_cache="60"		# Client cache timeout in seconds
 nfs_server_enable="NO"		# This host is an NFS server (or NO).
 nfs_server_flags="-u -t"	# Flags to nfsd (if enabled).
diff --git a/libexec/rc/rc.d/nfsclient b/libexec/rc/rc.d/nfsclient
index 857cfa02036f..9dbaf4e58cb1 100755
--- a/libexec/rc/rc.d/nfsclient
+++ b/libexec/rc/rc.d/nfsclient
@@ -32,6 +32,9 @@ nfsclient_start()
 			warn "failed to set vfs.nfs.bufpackets"
 		fi
 	fi
+	if checkyesno nfs_client_rdma_enable; then
+		load_kld nfsclrdma || err 1 "Cannot load nfsclrdma"
+	fi
 
 	unmount_all
 }