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>
This commit is contained in:

committed by
Anna Schumaker

parent
a5b027e189
commit
42e5c3e272
@@ -38,6 +38,11 @@ void xprt_free_bc_request(struct rpc_rqst *req);
|
||||
int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
|
||||
void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs);
|
||||
|
||||
/* Socket backchannel transport methods */
|
||||
int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs);
|
||||
void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs);
|
||||
void xprt_free_bc_rqst(struct rpc_rqst *req);
|
||||
|
||||
/*
|
||||
* Determine if a shared backchannel is in use
|
||||
*/
|
||||
|
@@ -136,6 +136,11 @@ struct rpc_xprt_ops {
|
||||
int (*enable_swap)(struct rpc_xprt *xprt);
|
||||
void (*disable_swap)(struct rpc_xprt *xprt);
|
||||
void (*inject_disconnect)(struct rpc_xprt *xprt);
|
||||
int (*bc_setup)(struct rpc_xprt *xprt,
|
||||
unsigned int min_reqs);
|
||||
void (*bc_free_rqst)(struct rpc_rqst *rqst);
|
||||
void (*bc_destroy)(struct rpc_xprt *xprt,
|
||||
unsigned int max_reqs);
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user