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 MODULE_ALIAS("rpcrdma6"); 28 29 static void __exit rpc_rdma_cleanup(void) 30 { 31 xprt_rdma_cleanup(); 32 svc_rdma_cleanup(); 33 } 34 35 static 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 47 out: 48 return rc; 49 } 50 51 module_init(rpc_rdma_init); 52 module_exit(rpc_rdma_cleanup); 53