]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: Modularize RDMA and TCP transports
authorAndy Grover <andy.grover@oracle.com>
Wed, 12 Aug 2009 19:37:50 +0000 (12:37 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 23:41:17 +0000 (16:41 -0700)
Enable the building of transports as modules.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/Kconfig
net/rds/Makefile
net/rds/af_rds.c
net/rds/rdma_transport.c

index 796773b5df9b819c1bf33f90654556187264fe9d..d6679c854a9cb76b92af2714f7d251bde96a0e8d 100644 (file)
@@ -7,6 +7,20 @@ config RDS
          RDS provides reliable, sequenced delivery of datagrams
          over Infiniband.
 
+config RDS_RDMA
+       tristate "RDS over Infiniband and iWARP"
+       depends on RDS && INFINIBAND_ADDR_TRANS
+       ---help---
+         Allow RDS to use Infiniband and iWARP as a transport.
+         This transport supports RDMA operations.
+
+config RDS_TCP
+       tristate "RDS over TCP"
+       depends on RDS
+       ---help---
+         Allow RDS to use TCP as a transport.
+         This transport does not support RDMA operations.
+
 config RDS_DEBUG
         bool "Debugging messages"
        depends on RDS
index 51f27585fa083f840d228f59c7a2b1968c6ab095..b46eca109688b703e443ac2d63e09da9afcbec18 100644 (file)
@@ -1,13 +1,20 @@
 obj-$(CONFIG_RDS) += rds.o
 rds-y :=       af_rds.o bind.o cong.o connection.o info.o message.o   \
                        recv.o send.o stats.o sysctl.o threads.o transport.o \
-                       loop.o page.o rdma.o \
-                       rdma_transport.o \
+                       loop.o page.o rdma.o
+
+obj-$(CONFIG_RDS_RDMA) += rds_rdma.o
+rds_rdma-objs :=       rdma_transport.o \
                        ib.o ib_cm.o ib_recv.o ib_ring.o ib_send.o ib_stats.o \
                        ib_sysctl.o ib_rdma.o \
                        iw.o iw_cm.o iw_recv.o iw_ring.o iw_send.o iw_stats.o \
                        iw_sysctl.o iw_rdma.o
 
+
+obj-$(CONFIG_RDS_TCP) += rds_tcp.o
+rds_tcp-objs :=                tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
+                       tcp_send.o tcp_stats.o
+
 ifeq ($(CONFIG_RDS_DEBUG), y)
 EXTRA_CFLAGS += -DDEBUG
 endif
index 20cf16fc572f20594fa05d25ee4554a4f30d3d0a..c9602f5ed3639fb474983346f6ef3a0c5fffe55f 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "rds.h"
 #include "rdma.h"
-#include "rdma_transport.h"
 
 /* this is just used for stats gathering :/ */
 static DEFINE_SPINLOCK(rds_sock_lock);
@@ -510,7 +509,6 @@ out:
 
 static void __exit rds_exit(void)
 {
-       rds_rdma_exit();
        sock_unregister(rds_family_ops.family);
        proto_unregister(&rds_proto);
        rds_conn_exit();
@@ -550,14 +548,8 @@ static int __init rds_init(void)
        rds_info_register_func(RDS_INFO_SOCKETS, rds_sock_info);
        rds_info_register_func(RDS_INFO_RECV_MESSAGES, rds_sock_inc_info);
 
-       /* ib/iwarp transports currently compiled-in */
-       ret = rds_rdma_init();
-       if (ret)
-               goto out_sock;
        goto out;
 
-out_sock:
-       sock_unregister(rds_family_ops.family);
 out_proto:
        proto_unregister(&rds_proto);
 out_stats:
index fe096306eb0295f0f163ae7a6ca72bcd4f848c62..027e924ec9e0bb8d36a5874d0a66ee0785999721 100644 (file)
@@ -203,6 +203,7 @@ err_iw_init:
 out:
        return ret;
 }
+module_init(rds_rdma_init);
 
 void rds_rdma_exit(void)
 {
@@ -211,4 +212,9 @@ void rds_rdma_exit(void)
        rds_ib_exit();
        rds_iw_exit();
 }
+module_exit(rds_rdma_exit);
+
+MODULE_AUTHOR("Oracle Corporation <rds-devel@oss.oracle.com>");
+MODULE_DESCRIPTION("RDS: IB/iWARP transport");
+MODULE_LICENSE("Dual BSD/GPL");