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 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"); 27 28 static void __exit rpc_rdma_cleanup(void) 29 { 30 xprt_rdma_cleanup(); 31 svc_rdma_cleanup(); 32 } 33 34 static int __init rpc_rdma_init(void) 35 { 36 int rc; 37 38 rc = svc_rdma_init(); 39 if (rc) 40 goto out; 41 42 rc = xprt_rdma_init(); 43 if (rc) 44 svc_rdma_cleanup(); 45 46 out: 47 return rc; 48 } 49 50 module_init(rpc_rdma_init); 51 module_exit(rpc_rdma_cleanup); 52