git: 799061fc769c - main - nfscl: A few more fixes for the NFS over RDMA client glue

From: Rick Macklem <rmacklem_at_FreeBSD.org>
Date: Thu, 03 Sep 2026 02:22:29 UTC
The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=799061fc769c96772a06881c1830a99d4db2fa67

commit 799061fc769c96772a06881c1830a99d4db2fa67
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2026-09-03 02:20:26 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-09-03 02:20:26 +0000

    nfscl: A few more fixes for the NFS over RDMA client glue
    
    A couple of additional fixes for the NFS client side RDMA glue:
    - For Readdirplus, the reply needs to be a large chunk, so set
      M_PROTO9 instead of M_PROTO8.
    - The nfsclrdma.ko module now uses xprt_rdma_unmap_chunk()
      instead of xprt_rdma_rekey_chunk().
    
    Hopefully, this is it for the NFS over RDMA client glue changes.
    
    MFC after:      3 months
    Fixes:  884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
---
 sys/fs/nfsclient/nfs_clrpcops.c | 2 +-
 sys/rpc/clntrdma.h              | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index d8e1f17b66ae..0c03ca07d63d 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -4197,7 +4197,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
 		NFSCL_REQSTART(nd, NFSPROC_READDIRPLUS, vp, cred);
 		/* For RDMA, mark that a small rdma_reply is needed. */
 		if (NFSHASRDMA(nmp))
-			nd->nd_mreq->m_flags |= M_PROTO8;
+			nd->nd_mreq->m_flags |= M_PROTO9;
  		NFSM_BUILD(tl, u_int32_t *, 6 * NFSX_UNSIGNED);
 		*tl++ = cookie.lval[0];
 		*tl++ = cookie.lval[1];
diff --git a/sys/rpc/clntrdma.h b/sys/rpc/clntrdma.h
index 09445faa25a1..21c61374692b 100644
--- a/sys/rpc/clntrdma.h
+++ b/sys/rpc/clntrdma.h
@@ -27,8 +27,6 @@ struct rpcrdma_xprt {
 	uint32_t	maxbck;
 	uint32_t	maxio;
 	uint32_t	maxsge;
-	struct mbuf	*reply_small[RPCRDMA_IO_NUMBUFS];
-	struct mbuf	*reply_large[RPCRDMA_IO_NUMBUFS];
 	void		*ep;
 };
 
@@ -89,7 +87,7 @@ int xprt_rdma_disconnected(struct rpcrdma_xprt *xp);
 
 int xprt_rdma_acquire_buf(struct rpcrdma_xprt *xp, int start, int end);
 
-int xprt_rdma_rekey_chunk(struct rpcrdma_xprt *xp, struct rpcrdma_chunk *chp);
+void xprt_rdma_unmap_chunk(struct rpcrdma_xprt *xp, struct rpcrdma_chunk *chp);
 
 struct mbuf *rpc_reduce_pg(int len, int pos, bool to_mem);