aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svc_rdma.h
Commit message (Collapse)AuthorAgeFilesLines
* svcrdma: Modify the RPC recv path to use FRMR when availableTom Tucker2008-10-061-0/+1
| | | | | | | | | | | | | | RPCRDMA requests that specify a read-list are fetched with RDMA_READ. Using an FRMR to map the data sink improves NFSRDMA security on transports that place the RDMA_READ data sink LKEY on the wire because the valid lifetime of the MR is only the duration of the RDMA_READ. The LKEY is invalidated when the last RDMA_READ WR completes. Mapping the data sink also allows for very large amounts to data to be fetched with a single WR, so if the client is also using FRMR, the entire RPC read-list can be fetched with a single WR. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Add a service to register a Fast Reg MR with the deviceTom Tucker2008-10-061-0/+1
| | | | | | | | Fast Reg MR introduces a new WR type. Add a service to register the region with the adapter and update the completion handling to support completions with a NULL WR context. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Add FRMR get/put servicesTom Tucker2008-10-061-0/+3
| | | | | | | | Add services for the allocating, freeing, and unmapping Fast Reg MR. These services will be used by the transport connection setup, send and receive routines. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Add Fast Reg MR Data TypesTom Tucker2008-10-031-1/+21
| | | | | | | | | | | | | | | Add data types to track Fast Reg Memory Regions. The core data type is svc_rdma_fastreg_mr that associates a device MR with a host kva and page list. A field is added to the WR context to keep track of the FRMR used to map the local memory for an RPC. An FRMR list and spin lock are added to the transport instance to keep track of all FRMR allocated for the transport. Also added are device capability flags to indicate what the memory registration capabilities are for the underlying device and whether or not fast memory registration is supported. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Fix race between svc_rdma_recvfrom thread and the dto_taskletTom Tucker2008-08-131-1/+0
| | | | | | | | | | | | | | | | | RDMA_READ completions are kept on a separate queue from the general I/O request queue. Since a separate lock is used to protect the RDMA_READ completion queue, a race exists between the dto_tasklet and the svc_rdma_recvfrom thread where the dto_tasklet sets the XPT_DATA bit and adds I/O to the read-completion queue. Concurrently, the recvfrom thread checks the generic queue, finds it empty and resets the XPT_DATA bit. A subsequent svc_xprt_enqueue will fail to enqueue the transport for I/O and cause the transport to "stall". The fix is to protect both lists with the same lock and set the XPT_DATA bit with this lock held. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* svcrdma: Change WR context get/put to use the kmem cacheTom Tucker2008-07-021-6/+0
| | | | | | | | Change the WR context pool to be shared across mount points. This reduces the RDMA transport memory footprint significantly since idle mounts don't consume WR context memory. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Remove unused wait q from svcrdma_xprt structureTom Tucker2008-07-021-1/+0
| | | | | | The sc_read_wait queue head is no longer used. Remove it. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Add dma map count and WARN_ONTom Tucker2008-07-021-0/+1
| | | | | | | Add a dma map count in order to verify that all DMA mapping resources have been freed when the transport is closed. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Use reply and chunk map for RDMA_READ processingTom Tucker2008-07-021-0/+1
| | | | | | | | | Modify the RDMA_READ processing to use the reply and chunk list mapping data types. Also add a special purpose 'hdr_count' field in in the context to hold the header page count instead of overloading the SGE length field and corrupting the DMA map length. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Add a type for keeping NFS RPC mappingTom Tucker2008-07-021-0/+27
| | | | | | | Create a new data structure to hold the remote client address space to local server address space mapping. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Change svc_rdma_send_error return type to voidTom Tucker2008-05-191-2/+2
| | | | | | | | | The svc_rdma_send_error function is called when an RPCRDMA protocol error is detected. This function attempts to post an error reply message. Since an error posting to a transport in error is ignored, change the return type to void. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Move destroy to kernel threadTom Tucker2008-05-191-0/+1
| | | | | | | | Some providers may wait while destroying adapter resources. Since it is possible that the last reference is put on the dto_tasklet, the actual destroy must be scheduled as a work item. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Use standard Linux lists for context cacheTom Tucker2008-05-191-2/+3
| | | | | | | | | Replace the one-off linked list implementation used to implement the context cache with the standard Linux list_head lists. Add a context counter to catch resource leaks. A WARN_ON will be added later to ensure that we've freed all contexts. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Simplify RDMA_READ deferral buffer managementTom Tucker2008-05-191-0/+1
| | | | | | | | | | | | | | | | An NFS_WRITE requires a set of RDMA_READ requests to fetch the write data from the client. There are two principal pieces of data that need to be tracked: the list of pages that comprise the completed RPC and the SGE of dma mapped pages to refer to this list of pages. Previously this whole bit was managed as a linked list of contexts with the context containing the page list buried in this list. This patch simplifies this processing by not keeping a linked list, but rather only a pionter from the last submitted RDMA_READ's context to the context that maps the set of pages that describe the RPC. This significantly simplifies this code path. SGE contexts are cleaned up inline in the DTO path instead of at read completion time. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* svcrdma: Remove unused READ_DONE context flags bitTom Tucker2008-05-191-1/+0
| | | | | | The RDMACTXT_F_READ_DONE bit is not longer used. Remove it. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
* rdma: SVCRMDA Header FileTom Tucker2008-02-011-0/+262
This file defines the data types used by the SVCRDMA transport module. The principle data structure is the transport specific extension to the svcxprt structure. 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>