Skip to content

Commit

Permalink
RDS: Modularize RDMA and TCP transports
Browse files Browse the repository at this point in the history
Enable the building of transports as modules.

Also, improve consistency of Kconfig messages in relation to other
protocols, and move build dependency on IB from the RDS core code
to the rds_rdma module.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andy Grover authored and davem330 committed Aug 24, 2009
1 parent 616b757 commit 40d8660
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
26 changes: 20 additions & 6 deletions net/rds/Kconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@

config RDS
tristate "Reliable Datagram Sockets (RDS) (EXPERIMENTAL)"
depends on INET && INFINIBAND_IPOIB && EXPERIMENTAL
depends on INFINIBAND && INFINIBAND_ADDR_TRANS
tristate "The RDS Protocol (EXPERIMENTAL)"
depends on INET && EXPERIMENTAL
---help---
RDS provides reliable, sequenced delivery of datagrams
over Infiniband.
The RDS (Reliable Datagram Sockets) protocol provides reliable,
sequenced delivery of datagrams over Infiniband, iWARP,
or TCP.

config RDS_RDMA
tristate "RDS over Infiniband and iWARP"
depends on RDS && INFINIBAND && 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"
bool "RDS debugging messages"
depends on RDS
default n

11 changes: 9 additions & 2 deletions net/rds/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 0 additions & 8 deletions net/rds/af_rds.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#include "rds.h"
#include "rdma.h"
#include "rdma_transport.h"

/* this is just used for stats gathering :/ */
static DEFINE_SPINLOCK(rds_sock_lock);
Expand Down Expand Up @@ -509,7 +508,6 @@ static void rds_sock_info(struct socket *sock, unsigned int len,

static void __exit rds_exit(void)
{
rds_rdma_exit();
sock_unregister(rds_family_ops.family);
proto_unregister(&rds_proto);
rds_conn_exit();
Expand Down Expand Up @@ -549,14 +547,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:
Expand Down
6 changes: 6 additions & 0 deletions net/rds/rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ int __init rds_rdma_init(void)
out:
return ret;
}
module_init(rds_rdma_init);

void rds_rdma_exit(void)
{
Expand All @@ -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");

0 comments on commit 40d8660

Please sign in to comment.