提交 16b2d1e1 编写于 作者: A Andy Adamson 提交者: Trond Myklebust

SUNRPC register and unregister the back channel transport

Signed-off-by: NAndy Adamson <andros@netapp.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 1f11a034
...@@ -45,7 +45,6 @@ int svc_sock_names(struct svc_serv *serv, char *buf, ...@@ -45,7 +45,6 @@ int svc_sock_names(struct svc_serv *serv, char *buf,
int svc_addsock(struct svc_serv *serv, const int fd, int svc_addsock(struct svc_serv *serv, const int fd,
char *name_return, const size_t len); char *name_return, const size_t len);
void svc_init_xprt_sock(void); void svc_init_xprt_sock(void);
void svc_init_bc_xprt_sock(void);
void svc_cleanup_xprt_sock(void); void svc_cleanup_xprt_sock(void);
struct svc_xprt *svc_sock_create(struct svc_serv *serv, int prot); struct svc_xprt *svc_sock_create(struct svc_serv *serv, int prot);
void svc_sock_destroy(struct svc_xprt *); void svc_sock_destroy(struct svc_xprt *);
......
...@@ -1222,6 +1222,24 @@ static struct svc_xprt_class svc_tcp_bc_class = { ...@@ -1222,6 +1222,24 @@ static struct svc_xprt_class svc_tcp_bc_class = {
.xcl_ops = &svc_tcp_bc_ops, .xcl_ops = &svc_tcp_bc_ops,
.xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP, .xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP,
}; };
static void svc_init_bc_xprt_sock(void)
{
svc_reg_xprt_class(&svc_tcp_bc_class);
}
static void svc_cleanup_bc_xprt_sock(void)
{
svc_unreg_xprt_class(&svc_tcp_bc_class);
}
#else /* CONFIG_NFS_V4_1 */
static void svc_init_bc_xprt_sock(void)
{
}
static void svc_cleanup_bc_xprt_sock(void)
{
}
#endif /* CONFIG_NFS_V4_1 */ #endif /* CONFIG_NFS_V4_1 */
static struct svc_xprt_ops svc_tcp_ops = { static struct svc_xprt_ops svc_tcp_ops = {
...@@ -1247,12 +1265,14 @@ void svc_init_xprt_sock(void) ...@@ -1247,12 +1265,14 @@ void svc_init_xprt_sock(void)
{ {
svc_reg_xprt_class(&svc_tcp_class); svc_reg_xprt_class(&svc_tcp_class);
svc_reg_xprt_class(&svc_udp_class); svc_reg_xprt_class(&svc_udp_class);
svc_init_bc_xprt_sock();
} }
void svc_cleanup_xprt_sock(void) void svc_cleanup_xprt_sock(void)
{ {
svc_unreg_xprt_class(&svc_tcp_class); svc_unreg_xprt_class(&svc_tcp_class);
svc_unreg_xprt_class(&svc_udp_class); svc_unreg_xprt_class(&svc_udp_class);
svc_cleanup_bc_xprt_sock();
} }
static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv) static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册