summaryrefslogtreecommitdiffstats
path: root/net/atm/protocols.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2015-06-04 17:20:39 +0200
committerJ. Bruce Fields <bfields@redhat.com>2015-06-04 22:55:58 +0200
commit70747c25a701b563a54c20c4a77efe8292aad151 (patch)
tree166199a6b9e088a745f2334b9ff7f73d1cfd2fde /net/atm/protocols.h
parentnfsd: Update callback sequnce id only CB_SEQUENCE success (diff)
downloadlinux-70747c25a701b563a54c20c4a77efe8292aad151.tar.xz
linux-70747c25a701b563a54c20c4a77efe8292aad151.zip
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>
Diffstat (limited to 'net/atm/protocols.h')
0 files changed, 0 insertions, 0 deletions