rdma: SVCRDMA recvfrom
authorTom Tucker <tom@opengridcomputing.com>
Wed, 12 Dec 2007 22:13:23 +0000 (16:13 -0600)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 1 Feb 2008 21:42:14 +0000 (16:42 -0500)
commitd5b31be6823320d81570e0199acd60d3a3f75d85
tree7b8bee749a3c1b637c6d8e88ee73c802cb3698cd
parent377f9b2f4529e0ac702fd7b91e216afd0adc959e
rdma: SVCRDMA recvfrom

This file implements the RDMA transport recvfrom function. The function
dequeues work reqeust completion contexts from an I/O list that it shares
with the I/O tasklet in svc_rdma_transport.c. For ONCRPC RDMA, an RPC may
not be complete when it is received. Instead, the RDMA header that precedes
the RPC message informs the transport where to get the RPC data from on
the client and where to place it in the RPC message before it is delivered
to the server. The svc_rdma_recvfrom function therefore, parses this RDMA
header and issues any necessary RDMA operations to fetch the remainder of
the RPC from the client.

Special handling is required when the request involves an RDMA_READ.
In this case, recvfrom submits the RDMA_READ requests to the underlying
transport driver and then returns 0. When the transport
completes the last RDMA_READ for the request, it enqueues it on a
read completion queue and enqueues the transport. The recvfrom code
favors this queue over the regular DTO queue when satisfying reads.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c [new file with mode: 0644]