2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 08:44:14 +08:00
linux-next/net/sunrpc/xprtrdma
Chuck Lever 70747c25a7 svcrdma: Fix byte-swapping in svc_rdma_sendto.c
In send_write_chunks(), we have:

	for (xdr_off = rqstp->rq_res.head[0].iov_len, chunk_no = 0;
	     xfer_len && chunk_no < arg_ary->wc_nchunks;
	     chunk_no++) {
		 . . .
	}

Note that arg_ary->wc_nchunk is in network byte-order. For the
comparison to work correctly, both have to be in native byte-order.

In send_reply_chunks, we have:

	write_len = min(xfer_len, htonl(ch->rs_length));

xfer_len is in native byte-order, and ch->rs_length is in
network byte-order. be32_to_cpu() is the correct byte swap
for ch->rs_length.

As an additional clean up, replace ntohl() with be32_to_cpu() in
a few other places.

This appears to address a problem with large rsize hangs while
using PHYSICAL memory registration. I suspect that is the only
registration mode that uses more than one chunk element.

BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=248
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2015-06-04 16:55:58 -04:00
..
fmr_ops.c NFS client updates for Linux 4.1 2015-04-26 17:33:59 -07:00
frwr_ops.c NFS client updates for Linux 4.1 2015-04-26 17:33:59 -07:00
Makefile xprtrdma: Add vector of ops for each memory registration strategy 2015-03-31 09:52:52 -04:00
physical_ops.c xprtrdma: Make rpcrdma_{un}map_one() into inline functions 2015-03-31 09:52:53 -04:00
rpc_rdma.c xprtrdma: Add a "deregister_external" op for each memreg mode 2015-03-31 09:52:52 -04:00
svc_rdma_marshal.c svcrdma: Remove svc_rdma_xdr_decode_deferred_req() 2015-06-03 15:15:23 -04:00
svc_rdma_recvfrom.c svcrdma: Handle additional inline content 2015-01-15 15:01:49 -05:00
svc_rdma_sendto.c svcrdma: Fix byte-swapping in svc_rdma_sendto.c 2015-06-04 16:55:58 -04:00
svc_rdma_transport.c svcrdma: Plant reader function in struct svcxprt_rdma 2015-01-15 15:01:46 -05:00
svc_rdma.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
transport.c xprtrdma: Add a "deregister_external" op for each memreg mode 2015-03-31 09:52:52 -04:00
verbs.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-04-14 09:50:27 -07:00
xprt_rdma.h xprtrdma: Make rpcrdma_{un}map_one() into inline functions 2015-03-31 09:52:53 -04:00