diff options
author | \"Talpey, Thomas\ <Thomas.Talpey@netapp.com> | 2007-09-10 13:46:00 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:17:40 -0400 |
commit | 81c098af3da7981902e9f8163aeccc2467c4ba6d (patch) | |
tree | b98e3c8c9e519e34abf721410de70373cedb4a9f /include/linux/sunrpc/xprt.h | |
parent | 1244480976d357447aeddd3f44977586bfa0462b (diff) |
SUNRPC: Provide a new API for registering transport implementations
To allow transport capabilities to be loaded dynamically, provide an API
for registering and unregistering the transports with the RPC client.
Eventually xprt_create_transport() will be changed to search the list of
registered transports when initializing a fresh transport.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Tom Talpey <tmt@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc/xprt.h')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 513b0657e14d..7b6b137eca97 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -208,6 +208,15 @@ struct rpc_xprtsock_create { | |||
208 | struct rpc_timeout * timeout; /* optional timeout parameters */ | 208 | struct rpc_timeout * timeout; /* optional timeout parameters */ |
209 | }; | 209 | }; |
210 | 210 | ||
211 | struct xprt_class { | ||
212 | struct list_head list; | ||
213 | unsigned short family; | ||
214 | int protocol; | ||
215 | struct rpc_xprt * (*setup)(struct rpc_xprtsock_create *); | ||
216 | struct module *owner; | ||
217 | char name[32]; | ||
218 | }; | ||
219 | |||
211 | /* | 220 | /* |
212 | * Transport operations used by ULPs | 221 | * Transport operations used by ULPs |
213 | */ | 222 | */ |
@@ -239,6 +248,8 @@ static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 * | |||
239 | /* | 248 | /* |
240 | * Transport switch helper functions | 249 | * Transport switch helper functions |
241 | */ | 250 | */ |
251 | int xprt_register_transport(struct xprt_class *type); | ||
252 | int xprt_unregister_transport(struct xprt_class *type); | ||
242 | void xprt_set_retrans_timeout_def(struct rpc_task *task); | 253 | void xprt_set_retrans_timeout_def(struct rpc_task *task); |
243 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); | 254 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); |
244 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); | 255 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); |