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