module.c 830 B

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