Linux 4.19.133
[linux/fpc-iii.git] / net / sunrpc / xprtrdma / module.c
blob620327c01302ce8702062bd48f7545f9882cea24
1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2 /*
3 * Copyright (c) 2015, 2017 Oracle. All rights reserved.
4 */
6 /* rpcrdma.ko module initialization
7 */
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>
15 #include <asm/swab.h>
17 #include "xprt_rdma.h"
19 #define CREATE_TRACE_POINTS
20 #include <trace/events/rpcrdma.h>
22 MODULE_AUTHOR("Open Grid Computing and Network Appliance, Inc.");
23 MODULE_DESCRIPTION("RPC/RDMA Transport");
24 MODULE_LICENSE("Dual BSD/GPL");
25 MODULE_ALIAS("svcrdma");
26 MODULE_ALIAS("xprtrdma");
28 static void __exit rpc_rdma_cleanup(void)
30 xprt_rdma_cleanup();
31 svc_rdma_cleanup();
34 static int __init rpc_rdma_init(void)
36 int rc;
38 rc = svc_rdma_init();
39 if (rc)
40 goto out;
42 rc = xprt_rdma_init();
43 if (rc)
44 svc_rdma_cleanup();
46 out:
47 return rc;
50 module_init(rpc_rdma_init);
51 module_exit(rpc_rdma_cleanup);