RPC/RDMA: add data types and new FRMR memory registration enum.
authorTom Talpey <talpey@netapp.com>
Thu, 9 Oct 2008 18:59:59 +0000 (14:59 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 10 Oct 2008 19:09:24 +0000 (15:09 -0400)
Internal RPC/RDMA structure updates in preparation for FRMR support.

Signed-off-by: Tom Talpey <talpey@netapp.com>
Acked-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/xprtrdma.h
net/sunrpc/xprtrdma/xprt_rdma.h

index 4de56b1d372bf2b6203c500c618ff07e2e2baad6..55a5d92ca1e28f22a47413780ce5a545e38cec54 100644 (file)
@@ -78,6 +78,7 @@ enum rpcrdma_memreg {
        RPCRDMA_MEMWINDOWS,
        RPCRDMA_MEMWINDOWS_ASYNC,
        RPCRDMA_MTHCAFMR,
+       RPCRDMA_FRMR,
        RPCRDMA_ALLPHYSICAL,
        RPCRDMA_LAST
 };
index 2427822f8bd49edef84e50666a93694246bbdec4..05b7898e1f4b8fa6b7fd30761937e65f96844844 100644 (file)
@@ -58,6 +58,8 @@ struct rpcrdma_ia {
        struct rdma_cm_id       *ri_id;
        struct ib_pd            *ri_pd;
        struct ib_mr            *ri_bind_mem;
+       u32                     ri_dma_lkey;
+       int                     ri_have_dma_lkey;
        struct completion       ri_done;
        int                     ri_async_rc;
        enum rpcrdma_memreg     ri_memreg_strategy;
@@ -156,6 +158,10 @@ struct rpcrdma_mr_seg {            /* chunk descriptors */
                        union {
                                struct ib_mw    *mw;
                                struct ib_fmr   *fmr;
+                               struct {
+                                       struct ib_fast_reg_page_list *fr_pgl;
+                                       struct ib_mr *fr_mr;
+                               } frmr;
                        } r;
                        struct list_head mw_list;
                } *rl_mw;
@@ -198,7 +204,7 @@ struct rpcrdma_buffer {
        atomic_t        rb_credits;     /* most recent server credits */
        unsigned long   rb_cwndscale;   /* cached framework rpc_cwndscale */
        int             rb_max_requests;/* client max requests */
-       struct list_head rb_mws;        /* optional memory windows/fmrs */
+       struct list_head rb_mws;        /* optional memory windows/fmrs/frmrs */
        int             rb_send_index;
        struct rpcrdma_req      **rb_send_bufs;
        int             rb_recv_index;