• Tom Tucker's avatar
    rdma: SVCRDMA recvfrom · d5b31be6
    Tom Tucker authored
    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: default avatarTom Tucker <tom@opengridcomputing.com>
    Acked-by: default avatarNeil Brown <neilb@suse.de>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    d5b31be6
svc_rdma_recvfrom.c 16.9 KB