aboutsummaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorChuck Lever2015-06-04 11:20:39 -0400
committerJ. Bruce Fields2015-06-04 16:55:58 -0400
commit70747c25a701b563a54c20c4a77efe8292aad151 (patch)
tree166199a6b9e088a745f2334b9ff7f73d1cfd2fde /include/drm
parent276f03e3ba242ebf2cf201cc3c7058d2884912b7 (diff)
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 'include/drm')
0 files changed, 0 insertions, 0 deletions