Skip to content

Commit c95a3c6

Browse files
chuckleveramschuma-ntap
authored andcommitted
xprtrdma: Disable pad optimization by default
Commit d5440e2 ("xprtrdma: Enable pad optimization") made the Linux client omit XDR round-up padding in normal Read and Write chunks so that the client doesn't have to register and invalidate 3-byte memory regions that contain no real data. Unfortunately, my cheery 2014 assessment that this optimization "is supported now by both Linux and Solaris servers" was premature. We've found bugs in Solaris in this area since commit d5440e2 ("xprtrdma: Enable pad optimization") was merged (SYMLINK is the main offender). So for maximum interoperability, I'm disabling this optimization again. If a CM private message is exchanged when connecting, the client recognizes that the server is Linux, and enables the optimization for that connection. Until now the Solaris server bugs did not impact common operations, and were thus largely benign. Soon, less capable devices on Linux NFS/RDMA clients will make use of Read chunks more often, and these Solaris bugs will prevent interoperation in more cases. Fixes: 677eb17 ("xprtrdma: Fix XDR tail buffer marshalling") Cc: [email protected] # v4.9+ Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent b5f0afb commit c95a3c6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

net/sunrpc/xprtrdma/transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ unsigned int xprt_rdma_max_inline_read = RPCRDMA_DEF_INLINE;
6767
static unsigned int xprt_rdma_max_inline_write = RPCRDMA_DEF_INLINE;
6868
static unsigned int xprt_rdma_inline_write_padding;
6969
static unsigned int xprt_rdma_memreg_strategy = RPCRDMA_FRMR;
70-
int xprt_rdma_pad_optimize = 1;
70+
int xprt_rdma_pad_optimize = 0;
7171

7272
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
7373

net/sunrpc/xprtrdma/verbs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ rpcrdma_update_connect_private(struct rpcrdma_xprt *r_xprt,
216216
pmsg->cp_magic == rpcrdma_cmp_magic &&
217217
pmsg->cp_version == RPCRDMA_CMP_VERSION) {
218218
r_xprt->rx_ia.ri_reminv_expected = true;
219+
r_xprt->rx_ia.ri_implicit_roundup = true;
219220
rsize = rpcrdma_decode_buffer_size(pmsg->cp_send_size);
220221
wsize = rpcrdma_decode_buffer_size(pmsg->cp_recv_size);
221222
}

0 commit comments

Comments
 (0)