diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-03 11:53:18 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-03 11:54:58 -0500 |
commit | cc3ea893cbb386e657d775f299f61bb9ba3bc435 (patch) | |
tree | fd17f7af86fbe30d9c4c9d02102b3cbd02e90ca6 /include/linux/sunrpc | |
parent | c7c545d4a34872f4a3d710e22f21fb61f7258706 (diff) | |
parent | a0a1d50cd1e80652142af5cddcde500d06c71bdd (diff) |
Merge tag 'nfs-rdma-for-3.20' of git://git.linux-nfs.org/projects/anna/nfs-rdma
NFS: Client side changes for RDMA
These patches improve the scalability of the NFSoRDMA client and take large
variables off of the stack. Additionally, the GFP_* flags are updated to
match what TCP uses.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
* tag 'nfs-rdma-for-3.20' of git://git.linux-nfs.org/projects/anna/nfs-rdma: (21 commits)
xprtrdma: Update the GFP flags used in xprt_rdma_allocate()
xprtrdma: Clean up after adding regbuf management
xprtrdma: Allocate zero pad separately from rpcrdma_buffer
xprtrdma: Allocate RPC/RDMA receive buffer separately from struct rpcrdma_rep
xprtrdma: Allocate RPC/RDMA send buffer separately from struct rpcrdma_req
xprtrdma: Allocate RPC send buffer separately from struct rpcrdma_req
xprtrdma: Add struct rpcrdma_regbuf and helpers
xprtrdma: Refactor rpcrdma_buffer_create() and rpcrdma_buffer_destroy()
xprtrdma: Simplify synopsis of rpcrdma_buffer_create()
xprtrdma: Take struct ib_qp_attr and ib_qp_init_attr off the stack
xprtrdma: Take struct ib_device_attr off the stack
xprtrdma: Free the pd if ib_query_qp() fails
xprtrdma: Remove rpcrdma_ep::rep_func and ::rep_xprt
xprtrdma: Move credit update to RPC reply handler
xprtrdma: Remove rl_mr field, and the mr_chunk union
xprtrdma: Remove rpcrdma_ep::rep_ia
xprtrdma: Rename "xprt" and "rdma_connect" fields in struct rpcrdma_xprt
xprtrdma: Clean up hdrlen
xprtrdma: Display XIDs in host byte order
xprtrdma: Modernize htonl and ntohl
...
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/rpc_rdma.h | 14 | ||||
-rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h index b78f16b1dea3..f33c5a4d6fe4 100644 --- a/include/linux/sunrpc/rpc_rdma.h +++ b/include/linux/sunrpc/rpc_rdma.h | |||
@@ -42,6 +42,9 @@ | |||
42 | 42 | ||
43 | #include <linux/types.h> | 43 | #include <linux/types.h> |
44 | 44 | ||
45 | #define RPCRDMA_VERSION 1 | ||
46 | #define rpcrdma_version cpu_to_be32(RPCRDMA_VERSION) | ||
47 | |||
45 | struct rpcrdma_segment { | 48 | struct rpcrdma_segment { |
46 | __be32 rs_handle; /* Registered memory handle */ | 49 | __be32 rs_handle; /* Registered memory handle */ |
47 | __be32 rs_length; /* Length of the chunk in bytes */ | 50 | __be32 rs_length; /* Length of the chunk in bytes */ |
@@ -95,7 +98,10 @@ struct rpcrdma_msg { | |||
95 | } rm_body; | 98 | } rm_body; |
96 | }; | 99 | }; |
97 | 100 | ||
98 | #define RPCRDMA_HDRLEN_MIN 28 | 101 | /* |
102 | * Smallest RPC/RDMA header: rm_xid through rm_type, then rm_nochunks | ||
103 | */ | ||
104 | #define RPCRDMA_HDRLEN_MIN (sizeof(__be32) * 7) | ||
99 | 105 | ||
100 | enum rpcrdma_errcode { | 106 | enum rpcrdma_errcode { |
101 | ERR_VERS = 1, | 107 | ERR_VERS = 1, |
@@ -115,4 +121,10 @@ enum rpcrdma_proc { | |||
115 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ | 121 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ |
116 | }; | 122 | }; |
117 | 123 | ||
124 | #define rdma_msg cpu_to_be32(RDMA_MSG) | ||
125 | #define rdma_nomsg cpu_to_be32(RDMA_NOMSG) | ||
126 | #define rdma_msgp cpu_to_be32(RDMA_MSGP) | ||
127 | #define rdma_done cpu_to_be32(RDMA_DONE) | ||
128 | #define rdma_error cpu_to_be32(RDMA_ERROR) | ||
129 | |||
118 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ | 130 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 975da754c778..ddfe88f52219 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
@@ -63,8 +63,6 @@ extern atomic_t rdma_stat_rq_prod; | |||
63 | extern atomic_t rdma_stat_sq_poll; | 63 | extern atomic_t rdma_stat_sq_poll; |
64 | extern atomic_t rdma_stat_sq_prod; | 64 | extern atomic_t rdma_stat_sq_prod; |
65 | 65 | ||
66 | #define RPCRDMA_VERSION 1 | ||
67 | |||
68 | /* | 66 | /* |
69 | * Contexts are built when an RDMA request is created and are a | 67 | * Contexts are built when an RDMA request is created and are a |
70 | * record of the resources that can be recovered when the request | 68 | * record of the resources that can be recovered when the request |