Loading...
1/*
2 * Copyright (c) 2015 Oracle. All rights reserved.
3 */
4
5/* rpcrdma.ko module initialization
6 */
7
8#include <linux/module.h>
9#include <linux/init.h>
10#include <linux/sunrpc/svc_rdma.h>
11#include "xprt_rdma.h"
12
13#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
14# define RPCDBG_FACILITY RPCDBG_TRANS
15#endif
16
17MODULE_AUTHOR("Open Grid Computing and Network Appliance, Inc.");
18MODULE_DESCRIPTION("RPC/RDMA Transport");
19MODULE_LICENSE("Dual BSD/GPL");
20MODULE_ALIAS("svcrdma");
21MODULE_ALIAS("xprtrdma");
22
23static void __exit rpc_rdma_cleanup(void)
24{
25 xprt_rdma_cleanup();
26 svc_rdma_cleanup();
27}
28
29static int __init rpc_rdma_init(void)
30{
31 int rc;
32
33 rc = svc_rdma_init();
34 if (rc)
35 goto out;
36
37 rc = xprt_rdma_init();
38 if (rc)
39 svc_rdma_cleanup();
40
41out:
42 return rc;
43}
44
45module_init(rpc_rdma_init);
46module_exit(rpc_rdma_cleanup);
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*
3 * Copyright (c) 2015, 2017 Oracle. All rights reserved.
4 */
5
6/* rpcrdma.ko module initialization
7 */
8
9#include <linux/types.h>
10#include <linux/compiler.h>
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/sunrpc/svc_rdma.h>
14
15#include <asm/swab.h>
16
17#include "xprt_rdma.h"
18
19#define CREATE_TRACE_POINTS
20#include <trace/events/rpcrdma.h>
21
22MODULE_AUTHOR("Open Grid Computing and Network Appliance, Inc.");
23MODULE_DESCRIPTION("RPC/RDMA Transport");
24MODULE_LICENSE("Dual BSD/GPL");
25MODULE_ALIAS("svcrdma");
26MODULE_ALIAS("xprtrdma");
27MODULE_ALIAS("rpcrdma6");
28
29static void __exit rpc_rdma_cleanup(void)
30{
31 xprt_rdma_cleanup();
32 svc_rdma_cleanup();
33}
34
35static int __init rpc_rdma_init(void)
36{
37 int rc;
38
39 rc = svc_rdma_init();
40 if (rc)
41 goto out;
42
43 rc = xprt_rdma_init();
44 if (rc)
45 svc_rdma_cleanup();
46
47out:
48 return rc;
49}
50
51module_init(rpc_rdma_init);
52module_exit(rpc_rdma_cleanup);