diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2015-10-24 17:27:35 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2015-11-02 13:45:15 -0500 |
commit | 42e5c3e2725ba0c0affc1fc8a6aa1d5cf31ecb75 (patch) | |
tree | b6394fe31cdf2560533abfa37c35cab3f08f406a /include/linux/sunrpc | |
parent | a5b027e1897c811401862877d0ba4ca26fabc4da (diff) |
SUNRPC: Abstract backchannel operations
xprt_{setup,destroy}_backchannel() won't be adequate for RPC/RMDA
bi-direction. In particular, receive buffers have to be pre-
registered and posted in order to receive incoming backchannel
requests.
Add a virtual function call to allow the insertion of appropriate
backchannel setup and destruction methods for each transport.
In addition, freeing a backchannel request is a little different
for RPC/RDMA. Introduce an rpc_xprt_op to handle the difference.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Tested-By: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/bc_xprt.h | 5 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index 8df43c9f11dc..4397a4824c81 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -38,6 +38,11 @@ void xprt_free_bc_request(struct rpc_rqst *req); | |||
38 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 38 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
39 | void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs); | 39 | void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs); |
40 | 40 | ||
41 | /* Socket backchannel transport methods */ | ||
42 | int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs); | ||
43 | void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs); | ||
44 | void xprt_free_bc_rqst(struct rpc_rqst *req); | ||
45 | |||
41 | /* | 46 | /* |
42 | * Determine if a shared backchannel is in use | 47 | * Determine if a shared backchannel is in use |
43 | */ | 48 | */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 0fb9acbb4780..3f79c4a4ce74 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -136,6 +136,11 @@ struct rpc_xprt_ops { | |||
136 | int (*enable_swap)(struct rpc_xprt *xprt); | 136 | int (*enable_swap)(struct rpc_xprt *xprt); |
137 | void (*disable_swap)(struct rpc_xprt *xprt); | 137 | void (*disable_swap)(struct rpc_xprt *xprt); |
138 | void (*inject_disconnect)(struct rpc_xprt *xprt); | 138 | void (*inject_disconnect)(struct rpc_xprt *xprt); |
139 | int (*bc_setup)(struct rpc_xprt *xprt, | ||
140 | unsigned int min_reqs); | ||
141 | void (*bc_free_rqst)(struct rpc_rqst *rqst); | ||
142 | void (*bc_destroy)(struct rpc_xprt *xprt, | ||
143 | unsigned int max_reqs); | ||
139 | }; | 144 | }; |
140 | 145 | ||
141 | /* | 146 | /* |